anchor.diff:      ELSE
   	drop
       THEN
  -    fdt-debug IF ." Setting node: " 2dup type cr THEN
       2dup find-node ?dup 0 <> IF
  -	set-node 2drop
  +	set-node
  +	fdt-debug IF ." Setting node: " 2dup type cr THEN
  +	2drop
  +	\ newnode?=0: updating the existing node, i.e. pass1 adds only phandles
  +	0
       ELSE
  +	fdt-cas-pass 0 <> IF
  +	    \ We could not find the node added in the previous pass,
  +	    \ most likely because it is hotplug-under-hotplug case
  +	    \ (such as PCI brigde under bridge) when missing new node methods
  +	    \ such as "decode-unit" are critical.
  +	    \ Reboot when detect such case which is expected as it is a part of
  +	    \ ibm,client-architecture-support.
  +	    ." Cannot handle FDT update for the " 2dup type
  +	    ."  node, rebooting" cr
  +	    reset-all
  +	THEN
   	fdt-debug IF ." Creating node: " 2dup type cr THEN
  -	fdt-create-cas-node
  -    THEN
  -    fdt-debug IF ." Current  now: " pwd cr THEN
  +	new-device
  +	2dup " @" find-substr nip
  +	device-name
  +	\ newnode?=1: adding new node, i.e. pass1 adds all properties,
  +	\ most importantly "reg". After reading properties, we call
  +	\ "fdt-cas-finish-device" which sets the unit address from "reg".
  +	1
  +    THEN
  +    swap			( newnode? a1 )
  +
  +    fdt-debug IF ." Current  now: " pwd  get-node ."  = " . cr THEN
       BEGIN
   	fdt-next-tag dup OF_DT_END_NODE <>
       WHILE
  +				( newnode? a1 tag )
   	dup OF_DT_PROP = IF
  -	    drop dup		( drop tag, dup addr     : a1 a1 )
  -	    dup l@ dup rot 4 +	( fetch size, stack is   : a1 s s a2)
  -	    dup l@ swap 4 +	( fetch nameid, stack is : a1 s s i a3 )
  -	    rot			( we now have: a1 s i a3 s )
  -	    fdt-encode-prop rot	( a1 s pa ps i)
  -	    fdt-fetch-string		( a1 s pa ps na ns )
  +	    drop dup		( newnode? a1 a1 )
  +	    dup l@ dup rot 4 +	( newnode? a1 s s a2)
  +	    dup l@ swap 4 +	( newnode? a1 s s i a3 )
  +	    rot			( newnode? a1 s i a3 s )
  +	    fdt-encode-prop rot	( newnode? a1 s pa ps i)
  +	    fdt-fetch-string	( newnode? a1 s pa ps na ns )
   
   	    fdt-cas-pass CASE
   	    0 OF
  -		2dup str=phandle? IF
  -		    fdt-debug IF 4dup ."   Phandle: " type ." =" swap ." @" . ."  " .d ."  bytes" cr THEN
  +		2dup str=phandle? 7 pick or IF
  +		    fdt-debug IF 4dup ."   Property: " type ." =" swap ." @" . ."  " .d ."  bytes" cr THEN
   		    property
   		ELSE
   		    4drop
  
positive.code: 	    THEN
  	THEN
      REPEAT
      drop \ drop tag
  ;
  
  : fdt-fix-cas-node ( start -- )
      0 to fdt-cas-pass dup (fdt-fix-cas-node) drop \ Add phandles
      1 to fdt-cas-pass dup (fdt-fix-cas-node) drop \ Patch+add other properties
      2 to fdt-cas-pass dup (fdt-fix-cas-node) drop \ Delete phandles from pass 1
      drop
  ;
  
  
negative.code:    device-end
  ;
  
  : str=phandle? ( s len -- true|false )
      2dup s" phandle" str= >r
      s" linux,phandle" str=
      r> or
  ;
  
  : fdt-cas-finish-device ( -- )
      " reg" get-node get-package-property IF ELSE fdt-reg-unit THEN
      get-node finish-device set-node
  ;
  
  : (fdt-fix-cas-node) ( start -- end )
  