[PATCH 2/6] PowerPC 440EPx: Sequoia DTS

Scott Wood scottwood at freescale.com
Wed Aug 8 01:43:07 EST 2007


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;

	random-sane-device at ff000000 {
		reg = <ff000000 800000>;
		...
	};
	
	freaky-swizzle-bus at ff800000 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "with-enough-lsd";
		swizzle-bytes = <4>;
		swizzle-ranges = <0 ff800000 00800000 2 3 0 1>;
		
		flash at 0 {
			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



More information about the Linuxppc-dev mailing list