On Tue, Aug 07, 2007 at 01:28:06PM +1000, David Gibson wrote:
> It would be possible, I guess, to define a 'swizzled-ranges' property
> or something which allows child devices to be embedded in the parent's
> address range in a not-direct way.  However, the swizzling on the
> flash bank is really a property of the flash bank, not of the parent
> bus - requiring it to be encoded in the parent is pretty yucky -
> especially if the flash bank is just part of a larger chunk of bus
> address space, defined by a single large ranges entry in the parent.

It's more a property of the connection between the bus and the flash
chips, and that connection could be described as its own "bus" node,
something like:

localbus {
        #address-cells = <1>;
        #size-cells = <1>;
        ranges;

        [EMAIL PROTECTED] {
                reg = <ff000000 800000>;
                ...
        };
        
        [EMAIL PROTECTED] {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "with-enough-lsd";
                swizzle-bytes = <4>;
                swizzle-ranges = <0 ff800000 00800000 2 3 0 1>;
                
                [EMAIL PROTECTED] {
                        compatible = "cfi-flash";
                        reg = <0 800000>;
                        bank-width = <4>;
                        device-width = <2>;
                };
        };
};

Similar intermediary buses could be used for flashes with indirect
access (SPI and such).

-Scott
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to