[PATCH] Add 8548CDS with Arcadia 3.0 support

Segher Boessenkool segher at kernel.crashing.org
Fri Jul 20 01:51:17 EST 2007


> +	compatible = "MPC8548CDS", "MPC85xxCDS";

No new "xx" please.

> +	memory {
> +		device_type = "memory";
> +		reg = <00000000 08000000>;	// 128M at 0x0

memory at 0.  Simplified rule: whenever there is a "reg",
there is an "@".

> +	soc8548 at e0000000 {

soc at e0000000

> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		device_type = "soc";

No "device_type".  Missing "compatible".

> +		ranges = <0 e0000000 00100000>;
> +		reg = <e0000000 00100000>;	// CCSRBAR 1M

"reg" and "ranges" overlap, that can't be right.

> +		i2c at 3000 {
> +			device_type = "i2c";
> +			compatible = "fsl-i2c";

Please put a more exact "compatible" entry in there.  If
you need to keep "fsl-i2c" as well, for backwards compatibility
reasons, that's fine; but do put a better name in.

> +			dfsrr;

This wins the prize for worst-name property ever!  :-)

> +		serial at 4500 {
> +			device_type = "serial";
> +			compatible = "ns16550";
> +			reg = <4500 100>; 	// reg base, size

I wonder how it can be NS16550-compatible if its register
bank is a completely different size.


> +		pci1: pci at 8000 {
> +			interrupt-map-mask = <f800 0 0 7>;
> +			interrupt-map = <
> +
> +				/* IDSEL 0x2 (PCIX Tsi310 bridge) */
> +				1000 0 0 1 &mpic 0 1
> +				1000 0 0 2 &mpic 1 1
> +				1000 0 0 3 &mpic 2 1
> +				1000 0 0 4 &mpic 3 1

You map all dev#s' interrupts identically, you could just do

	interrupt-map-mask = <0 0 0 7>

and do one set of four mappings in the interrupt-map, with the
device number field set to 0.

The mask exists to not have to write out lots of huge tables :-)

> +		pci at 9000 {
> +			interrupt-map-mask = <f800 0 0 7>;
> +			interrupt-map = <
> +
> +				/* IDSEL 0x15 */
> +				a800 0 0 1 &mpic b 1
> +				a800 0 0 2 &mpic b 1
> +				a800 0 0 3 &mpic b 1
> +				a800 0 0 4 &mpic b 1>;

You can do a similar mask trick here.

> +		mpic: pic at 40000 {

interrupt-controller at 40000


Segher




More information about the Linuxppc-dev mailing list