Re: [U-Boot] [PATCH 0/7] libfdt: Update to resync with dtc/libfdt
[EMAIL PROTECTED] wrote: The following changesets resynchronize u-boot with the master libfdt. Best regards, gvb First results using aliases with David's libfdt improvements... These are the aliases: = fdt p /aliases aliases { ethernet0 = /[EMAIL PROTECTED]/[EMAIL PROTECTED]; ethernet1 = /[EMAIL PROTECTED]/[EMAIL PROTECTED]; serial0 = /[EMAIL PROTECTED]/[EMAIL PROTECTED]; serial1 = /[EMAIL PROTECTED]/[EMAIL PROTECTED]; pci0 = /[EMAIL PROTECTED]; }; Dereference an alias by not using the '/' prefix per OF conventions: = fdt print ethernet0 [EMAIL PROTECTED] { device_type = network; compatible = ucc_geth; cell-index = 0x1; reg = 0x2000 0x200; interrupts = 0x20; interrupt-parent = 0x2; local-mac-address = [00 00 00 00 00 00]; rx-clock-name = none; tx-clock-name = clk9; phy-handle = 0x3; phy-connection-type = rgmii-id; pio-handle = 0x4; }; Whooo-h! Dereference the ethernet0 alias and print a property: = fdt print ethernet0/phy-connection-type libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND Doh doh doh! :-) Pretty close, though. I'll have to dig into this a bit more to see why the alias expansion doesn't seem to work with properties, check how it behaves with nested nodes (maybe). I've rebased u-boot-fdt against u-boot and pushed David's (and other's) libfdt improvements to u-boot-fdt. This is *NOT* ready to be merged into the mainline, but I've made it available in case others want to play with it. Warning: I will be rebasing u-boot-fdt as Wolfgang merges more changes into the mainline. I have not seen problems with rebasing, but YMMV. Best regards, gvb ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/7] libfdt: Update to resync with dtc/libfdt
On Wed, Aug 20, 2008 at 09:45:04PM -0400, Jerry Van Baren wrote: [EMAIL PROTECTED] wrote: The following changesets resynchronize u-boot with the master libfdt. Best regards, gvb First results using aliases with David's libfdt improvements... These are the aliases: = fdt p /aliases aliases { ethernet0 = /[EMAIL PROTECTED]/[EMAIL PROTECTED]; ethernet1 = /[EMAIL PROTECTED]/[EMAIL PROTECTED]; serial0 = /[EMAIL PROTECTED]/[EMAIL PROTECTED]; serial1 = /[EMAIL PROTECTED]/[EMAIL PROTECTED]; pci0 = /[EMAIL PROTECTED]; }; Dereference an alias by not using the '/' prefix per OF conventions: = fdt print ethernet0 [EMAIL PROTECTED] { device_type = network; compatible = ucc_geth; cell-index = 0x1; reg = 0x2000 0x200; interrupts = 0x20; interrupt-parent = 0x2; local-mac-address = [00 00 00 00 00 00]; rx-clock-name = none; tx-clock-name = clk9; phy-handle = 0x3; phy-connection-type = rgmii-id; pio-handle = 0x4; }; Whooo-h! Dereference the ethernet0 alias and print a property: = fdt print ethernet0/phy-connection-type libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND Uh... didn't I talk you out of this broken path-to-property stuff way back when? -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/7] libfdt: Update to resync with dtc/libfdt
David Gibson wrote: On Wed, Aug 20, 2008 at 09:45:04PM -0400, Jerry Van Baren wrote: [EMAIL PROTECTED] wrote: The following changesets resynchronize u-boot with the master libfdt. Best regards, gvb First results using aliases with David's libfdt improvements... These are the aliases: = fdt p /aliases aliases { ethernet0 = /[EMAIL PROTECTED]/[EMAIL PROTECTED]; ethernet1 = /[EMAIL PROTECTED]/[EMAIL PROTECTED]; serial0 = /[EMAIL PROTECTED]/[EMAIL PROTECTED]; serial1 = /[EMAIL PROTECTED]/[EMAIL PROTECTED]; pci0 = /[EMAIL PROTECTED]; }; Dereference an alias by not using the '/' prefix per OF conventions: = fdt print ethernet0 [EMAIL PROTECTED] { device_type = network; compatible = ucc_geth; cell-index = 0x1; reg = 0x2000 0x200; interrupts = 0x20; interrupt-parent = 0x2; local-mac-address = [00 00 00 00 00 00]; rx-clock-name = none; tx-clock-name = clk9; phy-handle = 0x3; phy-connection-type = rgmii-id; pio-handle = 0x4; }; Whooo-h! Dereference the ethernet0 alias and print a property: = fdt print ethernet0/phy-connection-type libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND Uh... didn't I talk you out of this broken path-to-property stuff way back when? Dang, you are quick. I just realized that myself. The alias dereference *IS* working as expected. As you point out, the proper syntax is path space property: = fdt print ethernet0 phy-connection-type device_type = network which works just fine. Thanks! gvb ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/7] libfdt: Update to resync with dtc/libfdt
The following changesets resynchronize u-boot with the master libfdt. Best regards, gvb ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot