Device Tree updates for xilinx.
David Gibson
david at gibson.dropbear.id.au
Sun Dec 16 18:04:04 EST 2007
On Thu, Dec 13, 2007 at 03:41:16PM -0800, Stephen Neuendorffer wrote:
> These patches synchronize all the in-kernel drivers to use the
> compatible names generated by the UBoot BSP generator.
> (at git://git.xilinx.com/gen-mhs-devtree.git)
>
> The patches to make this work are coming shortly:
>
> patches 1-2 are provided for context only... They're not ready for
> mainline. They provide 'raw' boot support and port some initialization
> code from ARCH=ppc.
> patches 3-7 are the interesting patches, which I think could be taken
> for 2.6.25.
>
> I've also pushed the working tree up to git.xilinx.com containing these
> patches. This tree also includes updates for ps2, gpio, etc.
> The ll_temac currently doesn't work because I haven't gone back and
> fixed the mechanism by which it finds out about the DMA that it is
> connected to.
>
> If you want output from the boot loader, you'll need something like:
> linux,stdout-path = "/plb_v34/opb_v20/serial at 40400000";
> This seems to work with uartlite, but I wasn't able to get it working
> with a UART design.
>
> Currently, you'll need to add, by hand the following labels:
>
> mem_size_cells, on the toplevel #address-cells attribue, e,g. :
> mem_size_cells: #address-cells = <1>;
Having a label called *_size_cells which is attached to
#address-cells, rather than #size-cells seems like a bad idea. Plus,
if I understood correctly, this is used to interpret the 'memsize'
value, which means it should be #size-cells anyway.
Also, if I understood the code in your later patches correctly, this
label is used as a direct pointer to the value you want. That means
it needs to be on the property value, not on the property, i.e.
#size-cells = <mem_size_cells: 1>;
instead of
mem_size_cells: #size-cells = <1>;
(the latter form will put the label on the tag which introduces the
property instead).
> timebase, on the processors timebase-frequency attribute, e.g. :
> timebase: timebase-frequency = <11e1a300>;
>
> memsize, on the memory's size, e.g.:
> DDR_256MB_32MX64_rank1_row13_col10_cl2_5: memory at 0 {
> device_type = "memory";
> reg = < 0 memsize:10000000 >;
> } ;
>
> In addition, if you're using uartlite, you'll have to specify
> 'console=ttyUL0' as boot args.
>
> For reference, below is the device tree for a Virtex2Pro design. Except
> for the changes noted above, this is entirely automatically generated.
>
> Steve
>
> / {
> mem_size_cells: #address-cells = <1>;
> #size-cells = <1>;
> compatible = "xlnx,virtex";
> model = "testing";
> DDR_256MB_32MX64_rank1_row13_col10_cl2_5: memory at 0 {
> device_type = "memory";
> reg = < 0 memsize:10000000 >;
> } ;
> chosen {
> bootargs = "root=/dev/nfs
> nfsroot=172.19.221.221:/exports/xup/ydl41 ip=dhcp console=ttyUL0";
> } ;
> cpus {
> #address-cells = <1>;
> #cpus = <1>;
> #size-cells = <0>;
> PowerPC,405 at 0 {
I'm trying to encourage people to move to naming cpu nodes simply
"cpu at XX", with the type of core in "compatible" instead - in keeping
with the generic names convention used elsewhere. I think this will
make your generator simpler, too.
--
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
More information about the Linuxppc-dev
mailing list