linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] powerpc: mv64x60 and prpmc2800 DTS cleanups
@ 2008-03-28 23:39 Dale Farnsworth
  2008-03-28 23:42 ` [PATCH 1/9] [POWERPC] mv64x60: change FDT compatible prefix to mrvl Dale Farnsworth
                   ` (8 more replies)
  0 siblings, 9 replies; 25+ messages in thread
From: Dale Farnsworth @ 2008-03-28 23:39 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

This series of patches again attempts to clean up and document
the Marvell MV64x60 device tree.  It supersedes Mark Greer's
series posted on 11 December 2007.  See:
http://ozlabs.org/pipermail/linuxppc-dev/2007-December/047986.html
I think I've addressed all comments on that patch series, but I'm
open to further comments. :)

These apply on the powerpc-next branch, and I'd like to get them
into 2.6.26.

Thanks,
-Dale

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 1/9] [POWERPC] mv64x60: change FDT compatible prefix to mrvl
  2008-03-28 23:39 [PATCH 0/9] powerpc: mv64x60 and prpmc2800 DTS cleanups Dale Farnsworth
@ 2008-03-28 23:42 ` Dale Farnsworth
  2008-03-28 23:47   ` Grant Likely
  2008-03-28 23:44 ` [PATCH 2/9] [POWERPC] prpmc2800: convert DTS to v1 and add labels Dale Farnsworth
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 25+ messages in thread
From: Dale Farnsworth @ 2008-03-28 23:42 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

From: Dale Farnsworth <dale@farnsworth.org>

Follow the convention that compatible names are prefixed by the
vendor's stock ticker symbol.  For Marvell Technology Group Ltd.,
that's MRVL.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Acked-by: Mark A. Greer <mgreer@mvista.com>

Index: linux-2.6/arch/powerpc/boot/dts/prpmc2800.dts
===================================================================
--- linux-2.6.orig/arch/powerpc/boot/dts/prpmc2800.dts
+++ linux-2.6/arch/powerpc/boot/dts/prpmc2800.dts
@@ -44,7 +44,7 @@
 		#address-cells = <1>;
 		#size-cells = <1>;
 		model = "mv64360";			/* Default */
-		compatible = "marvell,mv64x60";
+		compatible = "mrvl,mv64x60";
 		clock-frequency = <7f28155>;		/* 133.333333 MHz */
 		reg = <f1000000 00010000>;
 		virtual-reg = <f1000000>;
@@ -72,7 +72,7 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 			device_type = "mdio";
-			compatible = "marvell,mv64x60-mdio";
+			compatible = "mrvl,mv64x60-mdio";
 			ethernet-phy@1 {
 				device_type = "ethernet-phy";
 				compatible = "broadcom,bcm5421";
@@ -93,7 +93,7 @@
 			reg = <2000 2000>;
 			eth0 {
 				device_type = "network";
-				compatible = "marvell,mv64x60-eth";
+				compatible = "mrvl,mv64x60-eth";
 				block-index = <0>;
 				interrupts = <20>;
 				interrupt-parent = <&/mv64x60/pic>;
@@ -102,7 +102,7 @@
 			};
 			eth1 {
 				device_type = "network";
-				compatible = "marvell,mv64x60-eth";
+				compatible = "mrvl,mv64x60-eth";
 				block-index = <1>;
 				interrupts = <21>;
 				interrupt-parent = <&/mv64x60/pic>;
@@ -113,7 +113,7 @@
 
 		sdma@4000 {
 			device_type = "dma";
-			compatible = "marvell,mv64x60-sdma";
+			compatible = "mrvl,mv64x60-sdma";
 			reg = <4000 c18>;
 			virtual-reg = <f1004000>;
 			interrupt-base = <0>;
@@ -123,7 +123,7 @@
 
 		sdma@6000 {
 			device_type = "dma";
-			compatible = "marvell,mv64x60-sdma";
+			compatible = "mrvl,mv64x60-sdma";
 			reg = <6000 c18>;
 			virtual-reg = <f1006000>;
 			interrupt-base = <0>;
@@ -132,7 +132,7 @@
 		};
 
 		brg@b200 {
-			compatible = "marvell,mv64x60-brg";
+			compatible = "mrvl,mv64x60-brg";
 			reg = <b200 8>;
 			clock-src = <8>;
 			clock-frequency = <7ed6b40>;
@@ -141,7 +141,7 @@
 		};
 
 		brg@b208 {
-			compatible = "marvell,mv64x60-brg";
+			compatible = "mrvl,mv64x60-brg";
 			reg = <b208 8>;
 			clock-src = <8>;
 			clock-frequency = <7ed6b40>;
@@ -164,7 +164,7 @@
 
 		mpsc@8000 {
 			device_type = "serial";
-			compatible = "marvell,mpsc";
+			compatible = "mrvl,mpsc";
 			reg = <8000 38>;
 			virtual-reg = <f1008000>;
 			sdma = <&/mv64x60/sdma@4000>;
@@ -184,7 +184,7 @@
 
 		mpsc@9000 {
 			device_type = "serial";
-			compatible = "marvell,mpsc";
+			compatible = "mrvl,mpsc";
 			reg = <9000 38>;
 			virtual-reg = <f1009000>;
 			sdma = <&/mv64x60/sdma@6000>;
@@ -203,14 +203,14 @@
 		};
 
 		wdt@b410 {			/* watchdog timer */
-			compatible = "marvell,mv64x60-wdt";
+			compatible = "mrvl,mv64x60-wdt";
 			reg = <b410 8>;
 			timeout = <a>;		/* wdt timeout in seconds */
 		};
 
 		i2c@c000 {
 			device_type = "i2c";
-			compatible = "marvell,mv64x60-i2c";
+			compatible = "mrvl,mv64x60-i2c";
 			reg = <c000 20>;
 			virtual-reg = <f100c000>;
 			freq_m = <8>;
@@ -224,18 +224,18 @@
 		pic {
 			#interrupt-cells = <1>;
 			#address-cells = <0>;
-			compatible = "marvell,mv64x60-pic";
+			compatible = "mrvl,mv64x60-pic";
 			reg = <0000 88>;
 			interrupt-controller;
 		};
 
 		mpp@f000 {
-			compatible = "marvell,mv64x60-mpp";
+			compatible = "mrvl,mv64x60-mpp";
 			reg = <f000 10>;
 		};
 
 		gpp@f100 {
-			compatible = "marvell,mv64x60-gpp";
+			compatible = "mrvl,mv64x60-gpp";
 			reg = <f100 20>;
 		};
 
@@ -244,7 +244,7 @@
 			#size-cells = <2>;
 			#interrupt-cells = <1>;
 			device_type = "pci";
-			compatible = "marvell,mv64x60-pci";
+			compatible = "mrvl,mv64x60-pci";
 			reg = <0cf8 8>;
 			ranges = <01000000 0        0 88000000 0 01000000
 				  02000000 0 80000000 80000000 0 08000000>;
@@ -281,28 +281,28 @@
 		};
 
 		cpu-error@0070 {
-			compatible = "marvell,mv64x60-cpu-error";
+			compatible = "mrvl,mv64x60-cpu-error";
 			reg = <0070 10 0128 28>;
 			interrupts = <03>;
 			interrupt-parent = <&/mv64x60/pic>;
 		};
 
 		sram-ctrl@0380 {
-			compatible = "marvell,mv64x60-sram-ctrl";
+			compatible = "mrvl,mv64x60-sram-ctrl";
 			reg = <0380 80>;
 			interrupts = <0d>;
 			interrupt-parent = <&/mv64x60/pic>;
 		};
 
 		pci-error@1d40 {
-			compatible = "marvell,mv64x60-pci-error";
+			compatible = "mrvl,mv64x60-pci-error";
 			reg = <1d40 40 0c28 4>;
 			interrupts = <0c>;
 			interrupt-parent = <&/mv64x60/pic>;
 		};
 
 		mem-ctrl@1400 {
-			compatible = "marvell,mv64x60-mem-ctrl";
+			compatible = "mrvl,mv64x60-mem-ctrl";
 			reg = <1400 60>;
 			interrupts = <11>;
 			interrupt-parent = <&/mv64x60/pic>;
Index: linux-2.6/arch/powerpc/boot/serial.c
===================================================================
--- linux-2.6.orig/arch/powerpc/boot/serial.c
+++ linux-2.6/arch/powerpc/boot/serial.c
@@ -119,7 +119,7 @@ int serial_console_init(void)
 
 	if (dt_is_compatible(devp, "ns16550"))
 		rc = ns16550_console_init(devp, &serial_cd);
-	else if (dt_is_compatible(devp, "marvell,mpsc"))
+	else if (dt_is_compatible(devp, "mrvl,mpsc"))
 		rc = mpsc_console_init(devp, &serial_cd);
 	else if (dt_is_compatible(devp, "fsl,cpm1-scc-uart") ||
 	         dt_is_compatible(devp, "fsl,cpm1-smc-uart") ||
Index: linux-2.6/arch/powerpc/platforms/embedded6xx/prpmc2800.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/embedded6xx/prpmc2800.c
+++ linux-2.6/arch/powerpc/platforms/embedded6xx/prpmc2800.c
@@ -49,13 +49,13 @@ static void __init prpmc2800_setup_arch(
 	 * ioremap mpp and gpp registers in case they are later
 	 * needed by prpmc2800_reset_board().
 	 */
-	np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60-mpp");
+	np = of_find_compatible_node(NULL, NULL, "mrvl,mv64x60-mpp");
 	reg = of_get_property(np, "reg", NULL);
 	paddr = of_translate_address(np, reg);
 	of_node_put(np);
 	mv64x60_mpp_reg_base = ioremap(paddr, reg[1]);
 
-	np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60-gpp");
+	np = of_find_compatible_node(NULL, NULL, "mrvl,mv64x60-gpp");
 	reg = of_get_property(np, "reg", NULL);
 	paddr = of_translate_address(np, reg);
 	of_node_put(np);
Index: linux-2.6/arch/powerpc/sysdev/mv64x60_dev.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/mv64x60_dev.c
+++ linux-2.6/arch/powerpc/sysdev/mv64x60_dev.c
@@ -446,22 +446,22 @@ static int __init mv64x60_device_setup(v
 	int err;
 
 	id = 0;
-	for_each_compatible_node(np, "serial", "marvell,mpsc")
+	for_each_compatible_node(np, "serial", "mrvl,mpsc")
 		if ((err = mv64x60_mpsc_device_setup(np, id++)))
 			goto error;
 
 	id = 0;
-	for_each_compatible_node(np, "network", "marvell,mv64x60-eth")
+	for_each_compatible_node(np, "network", "mrvl,mv64x60-eth")
 		if ((err = mv64x60_eth_device_setup(np, id++)))
 			goto error;
 
 	id = 0;
-	for_each_compatible_node(np, "i2c", "marvell,mv64x60-i2c")
+	for_each_compatible_node(np, "i2c", "mrvl,mv64x60-i2c")
 		if ((err = mv64x60_i2c_device_setup(np, id++)))
 			goto error;
 
 	/* support up to one watchdog timer */
-	np = of_find_compatible_node(np, NULL, "marvell,mv64x60-wdt");
+	np = of_find_compatible_node(np, NULL, "mrvl,mv64x60-wdt");
 	if (np) {
 		if ((err = mv64x60_wdt_device_setup(np, id)))
 			goto error;
@@ -489,7 +489,7 @@ static int __init mv64x60_add_mpsc_conso
 	if (!np)
 		goto not_mpsc;
 
-	if (!of_device_is_compatible(np, "marvell,mpsc"))
+	if (!of_device_is_compatible(np, "mrvl,mpsc"))
 		goto not_mpsc;
 
 	prop = of_get_property(np, "block-index", NULL);
Index: linux-2.6/arch/powerpc/sysdev/mv64x60_pci.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/mv64x60_pci.c
+++ linux-2.6/arch/powerpc/sysdev/mv64x60_pci.c
@@ -86,14 +86,14 @@ static int __init mv64x60_sysfs_init(voi
 	struct platform_device *pdev;
 	const unsigned int *prop;
 
-	np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60");
+	np = of_find_compatible_node(NULL, NULL, "mrvl,mv64x60");
 	if (!np)
 		return 0;
 
 	prop = of_get_property(np, "hs_reg_valid", NULL);
 	of_node_put(np);
 
-	pdev = platform_device_register_simple("marvell,mv64x60", 0, NULL, 0);
+	pdev = platform_device_register_simple("mrvl,mv64x60", 0, NULL, 0);
 	if (IS_ERR(pdev))
 		return PTR_ERR(pdev);
 
@@ -166,6 +166,6 @@ void __init mv64x60_pci_init(void)
 {
 	struct device_node *np;
 
-	for_each_compatible_node(np, "pci", "marvell,mv64x60-pci")
+	for_each_compatible_node(np, "pci", "mrvl,mv64x60-pci")
 		mv64x60_add_bridge(np);
 }
Index: linux-2.6/arch/powerpc/sysdev/mv64x60_pic.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/mv64x60_pic.c
+++ linux-2.6/arch/powerpc/sysdev/mv64x60_pic.c
@@ -238,13 +238,13 @@ void __init mv64x60_init_irq(void)
 	const unsigned int *reg;
 	unsigned long flags;
 
-	np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60-gpp");
+	np = of_find_compatible_node(NULL, NULL, "mrvl,mv64x60-gpp");
 	reg = of_get_property(np, "reg", &size);
 	paddr = of_translate_address(np, reg);
 	mv64x60_gpp_reg_base = ioremap(paddr, reg[1]);
 	of_node_put(np);
 
-	np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60-pic");
+	np = of_find_compatible_node(NULL, NULL, "mrvl,mv64x60-pic");
 	reg = of_get_property(np, "reg", &size);
 	paddr = of_translate_address(np, reg);
 	mv64x60_irq_reg_base = ioremap(paddr, reg[1]);
Index: linux-2.6/arch/powerpc/sysdev/mv64x60_udbg.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/mv64x60_udbg.c
+++ linux-2.6/arch/powerpc/sysdev/mv64x60_udbg.c
@@ -85,7 +85,7 @@ static void mv64x60_udbg_init(void)
 	if (!stdout)
 		return;
 
-	for_each_compatible_node(np, "serial", "marvell,mpsc") {
+	for_each_compatible_node(np, "serial", "mrvl,mpsc") {
 		if (np == stdout)
 			break;
 	}

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 2/9] [POWERPC] prpmc2800: convert DTS to v1 and add labels
  2008-03-28 23:39 [PATCH 0/9] powerpc: mv64x60 and prpmc2800 DTS cleanups Dale Farnsworth
  2008-03-28 23:42 ` [PATCH 1/9] [POWERPC] mv64x60: change FDT compatible prefix to mrvl Dale Farnsworth
@ 2008-03-28 23:44 ` Dale Farnsworth
  2008-03-28 23:45 ` [PATCH 3/9] [POWERPC] prpmc2800: fix frequencies in prpmc2800.dts Dale Farnsworth
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 25+ messages in thread
From: Dale Farnsworth @ 2008-03-28 23:44 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

From: Mark A. Greer <mgreer@mvista.com>

Update the prpmc2800 DTS file to version 1 and add labels.
I verified that there was no change in the resulting dtb file.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>

Index: linux-2.6/arch/powerpc/boot/dts/prpmc2800.dts
===================================================================
--- linux-2.6.orig/arch/powerpc/boot/dts/prpmc2800.dts
+++ linux-2.6/arch/powerpc/boot/dts/prpmc2800.dts
@@ -11,6 +11,8 @@
  * if it can determine the exact PrPMC type.
  */
 
+/dts-v1/;
+
 / {
 	#address-cells = <1>;
 	#size-cells = <1>;
@@ -25,19 +27,19 @@
 		PowerPC,7447 {
 			device_type = "cpu";
 			reg = <0>;
-			clock-frequency = <2bb0b140>;	/* Default (733 MHz) */
-			bus-frequency = <7f28155>;	/* 133.333333 MHz */
-			timebase-frequency = <1fca055>;	/* 33.333333 MHz */
-			i-cache-line-size = <20>;
-			d-cache-line-size = <20>;
-			i-cache-size = <8000>;
-			d-cache-size = <8000>;
+			clock-frequency = <733000000>;	/* Default */
+			bus-frequency = <133333333>;
+			timebase-frequency = <33333333>;
+			i-cache-line-size = <32>;
+			d-cache-line-size = <32>;
+			i-cache-size = <32768>;
+			d-cache-size = <32768>;
 		};
 	};
 
 	memory {
 		device_type = "memory";
-		reg = <00000000 20000000>;	/* Default (512MB) */
+		reg = <0x0 0x20000000>;			/* Default (512MB) */
 	};
 
 	mv64x60@f1000000 { /* Marvell Discovery */
@@ -45,26 +47,26 @@
 		#size-cells = <1>;
 		model = "mv64360";			/* Default */
 		compatible = "mrvl,mv64x60";
-		clock-frequency = <7f28155>;		/* 133.333333 MHz */
-		reg = <f1000000 00010000>;
-		virtual-reg = <f1000000>;
-		ranges = <88000000 88000000 01000000	/* PCI 0 I/O Space */
-			  80000000 80000000 08000000	/* PCI 0 MEM Space */
-			  a0000000 a0000000 04000000	/* User FLASH */
-			  00000000 f1000000 00010000	/* Bridge's regs */
-			  f2000000 f2000000 00040000>;	/* Integrated SRAM */
+		clock-frequency = <133333333>;
+		reg = <0xf1000000 0x10000>;
+		virtual-reg = <0xf1000000>;
+		ranges = <0x88000000 0x88000000 0x1000000 /* PCI 0 I/O Space */
+			  0x80000000 0x80000000 0x8000000 /* PCI 0 MEM Space */
+			  0xa0000000 0xa0000000 0x4000000 /* User FLASH */
+			  0x00000000 0xf1000000 0x0010000 /* Bridge's regs */
+			  0xf2000000 0xf2000000 0x0040000>;/* Integrated SRAM */
 
 		flash@a0000000 {
 			device_type = "rom";
 			compatible = "direct-mapped";
-			reg = <a0000000 4000000>; /* Default (64MB) */
+			reg = <0xa0000000 0x4000000>; /* Default (64MB) */
 			probe-type = "CFI";
 			bank-width = <4>;
-			partitions = <00000000 00100000 /* RO */
-				      00100000 00040001 /* RW */
-				      00140000 00400000 /* RO */
-				      00540000 039c0000 /* RO */
-				      03f00000 00100000>; /* RO */
+			partitions = <0x00000000 0x00100000 /* RO */
+				      0x00100000 0x00040001 /* RW */
+				      0x00140000 0x00400000 /* RO */
+				      0x00540000 0x039c0000 /* RO */
+				      0x03f00000 0x00100000>; /* RO */
 			partition-names = "FW Image A", "FW Config Data", "Kernel Image", "Filesystem", "FW Image B";
 		};
 
@@ -73,170 +75,170 @@
 			#size-cells = <0>;
 			device_type = "mdio";
 			compatible = "mrvl,mv64x60-mdio";
-			ethernet-phy@1 {
+			PHY0: ethernet-phy@1 {
 				device_type = "ethernet-phy";
 				compatible = "broadcom,bcm5421";
-				interrupts = <4c>;	/* GPP 12 */
-				interrupt-parent = <&/mv64x60/pic>;
+				interrupts = <76>;	/* GPP 12 */
+				interrupt-parent = <&PIC>;
 				reg = <1>;
 			};
-			ethernet-phy@3 {
+			PHY1: ethernet-phy@3 {
 				device_type = "ethernet-phy";
 				compatible = "broadcom,bcm5421";
-				interrupts = <4c>;	/* GPP 12 */
-				interrupt-parent = <&/mv64x60/pic>;
+				interrupts = <76>;	/* GPP 12 */
+				interrupt-parent = <&PIC>;
 				reg = <3>;
 			};
 		};
 
 		ethernet@2000 {
-			reg = <2000 2000>;
+			reg = <0x2000 0x2000>;
 			eth0 {
 				device_type = "network";
 				compatible = "mrvl,mv64x60-eth";
 				block-index = <0>;
-				interrupts = <20>;
-				interrupt-parent = <&/mv64x60/pic>;
-				phy = <&/mv64x60/mdio/ethernet-phy@1>;
+				interrupts = <32>;
+				interrupt-parent = <&PIC>;
+				phy = <&PHY0>;
 				local-mac-address = [ 00 00 00 00 00 00 ];
 			};
 			eth1 {
 				device_type = "network";
 				compatible = "mrvl,mv64x60-eth";
 				block-index = <1>;
-				interrupts = <21>;
-				interrupt-parent = <&/mv64x60/pic>;
-				phy = <&/mv64x60/mdio/ethernet-phy@3>;
+				interrupts = <33>;
+				interrupt-parent = <&PIC>;
+				phy = <&PHY1>;
 				local-mac-address = [ 00 00 00 00 00 00 ];
 			};
 		};
 
-		sdma@4000 {
+		SDMA0: sdma@4000 {
 			device_type = "dma";
 			compatible = "mrvl,mv64x60-sdma";
-			reg = <4000 c18>;
-			virtual-reg = <f1004000>;
+			reg = <0x4000 0xc18>;
+			virtual-reg = <0xf1004000>;
 			interrupt-base = <0>;
-			interrupts = <24>;
-			interrupt-parent = <&/mv64x60/pic>;
+			interrupts = <36>;
+			interrupt-parent = <&PIC>;
 		};
 
-		sdma@6000 {
+		SDMA1: sdma@6000 {
 			device_type = "dma";
 			compatible = "mrvl,mv64x60-sdma";
-			reg = <6000 c18>;
-			virtual-reg = <f1006000>;
+			reg = <0x6000 0xc18>;
+			virtual-reg = <0xf1006000>;
 			interrupt-base = <0>;
-			interrupts = <26>;
-			interrupt-parent = <&/mv64x60/pic>;
+			interrupts = <38>;
+			interrupt-parent = <&PIC>;
 		};
 
-		brg@b200 {
+		BRG0: brg@b200 {
 			compatible = "mrvl,mv64x60-brg";
-			reg = <b200 8>;
+			reg = <0xb200 0x8>;
 			clock-src = <8>;
-			clock-frequency = <7ed6b40>;
-			current-speed = <2580>;
+			clock-frequency = <133000000>;
+			current-speed = <9600>;
 			bcr = <0>;
 		};
 
-		brg@b208 {
+		BRG1: brg@b208 {
 			compatible = "mrvl,mv64x60-brg";
-			reg = <b208 8>;
+			reg = <0xb208 0x8>;
 			clock-src = <8>;
-			clock-frequency = <7ed6b40>;
-			current-speed = <2580>;
+			clock-frequency = <133000000>;
+			current-speed = <9600>;
 			bcr = <0>;
 		};
 
-		cunit@f200 {
-			reg = <f200 200>;
+		CUNIT: cunit@f200 {
+			reg = <0xf200 0x200>;
 		};
 
-		mpscrouting@b400 {
-			reg = <b400 c>;
+		MPSCROUTING: mpscrouting@b400 {
+			reg = <0xb400 0xc>;
 		};
 
-		mpscintr@b800 {
-			reg = <b800 100>;
-			virtual-reg = <f100b800>;
+		MPSCINTR: mpscintr@b800 {
+			reg = <0xb800 0x100>;
+			virtual-reg = <0xf100b800>;
 		};
 
-		mpsc@8000 {
+		MPSC0: mpsc@8000 {
 			device_type = "serial";
 			compatible = "mrvl,mpsc";
-			reg = <8000 38>;
-			virtual-reg = <f1008000>;
-			sdma = <&/mv64x60/sdma@4000>;
-			brg = <&/mv64x60/brg@b200>;
-			cunit = <&/mv64x60/cunit@f200>;
-			mpscrouting = <&/mv64x60/mpscrouting@b400>;
-			mpscintr = <&/mv64x60/mpscintr@b800>;
+			reg = <0x8000 0x38>;
+			virtual-reg = <0xf1008000>;
+			sdma = <&SDMA0>;
+			brg = <&BRG0>;
+			cunit = <&CUNIT>;
+			mpscrouting = <&MPSCROUTING>;
+			mpscintr = <&MPSCINTR>;
 			block-index = <0>;
-			max_idle = <28>;
+			max_idle = <40>;
 			chr_1 = <0>;
 			chr_2 = <0>;
 			chr_10 = <3>;
 			mpcr = <0>;
-			interrupts = <28>;
-			interrupt-parent = <&/mv64x60/pic>;
+			interrupts = <40>;
+			interrupt-parent = <&PIC>;
 		};
 
-		mpsc@9000 {
+		MPSC1: mpsc@9000 {
 			device_type = "serial";
 			compatible = "mrvl,mpsc";
-			reg = <9000 38>;
-			virtual-reg = <f1009000>;
-			sdma = <&/mv64x60/sdma@6000>;
-			brg = <&/mv64x60/brg@b208>;
-			cunit = <&/mv64x60/cunit@f200>;
-			mpscrouting = <&/mv64x60/mpscrouting@b400>;
-			mpscintr = <&/mv64x60/mpscintr@b800>;
+			reg = <0x9000 0x38>;
+			virtual-reg = <0xf1009000>;
+			sdma = <&SDMA1>;
+			brg = <&BRG1>;
+			cunit = <&CUNIT>;
+			mpscrouting = <&MPSCROUTING>;
+			mpscintr = <&MPSCINTR>;
 			block-index = <1>;
-			max_idle = <28>;
+			max_idle = <40>;
 			chr_1 = <0>;
 			chr_2 = <0>;
 			chr_10 = <3>;
 			mpcr = <0>;
-			interrupts = <2a>;
-			interrupt-parent = <&/mv64x60/pic>;
+			interrupts = <42>;
+			interrupt-parent = <&PIC>;
 		};
 
 		wdt@b410 {			/* watchdog timer */
 			compatible = "mrvl,mv64x60-wdt";
-			reg = <b410 8>;
-			timeout = <a>;		/* wdt timeout in seconds */
+			reg = <0xb410 0x8>;
+			timeout = <10>;		/* wdt timeout in seconds */
 		};
 
 		i2c@c000 {
 			device_type = "i2c";
 			compatible = "mrvl,mv64x60-i2c";
-			reg = <c000 20>;
-			virtual-reg = <f100c000>;
+			reg = <0xc000 0x20>;
+			virtual-reg = <0xf100c000>;
 			freq_m = <8>;
 			freq_n = <3>;
-			timeout = <3e8>;		/* 1000 = 1 second */
+			timeout = <1000>;		/* 1000 = 1 second */
 			retries = <1>;
-			interrupts = <25>;
-			interrupt-parent = <&/mv64x60/pic>;
+			interrupts = <37>;
+			interrupt-parent = <&PIC>;
 		};
 
-		pic {
+		PIC: pic {
 			#interrupt-cells = <1>;
 			#address-cells = <0>;
 			compatible = "mrvl,mv64x60-pic";
-			reg = <0000 88>;
+			reg = <0x0 0x88>;
 			interrupt-controller;
 		};
 
 		mpp@f000 {
 			compatible = "mrvl,mv64x60-mpp";
-			reg = <f000 10>;
+			reg = <0xf000 0x10>;
 		};
 
 		gpp@f100 {
 			compatible = "mrvl,mv64x60-gpp";
-			reg = <f100 20>;
+			reg = <0xf100 0x20>;
 		};
 
 		pci@80000000 {
@@ -245,72 +247,74 @@
 			#interrupt-cells = <1>;
 			device_type = "pci";
 			compatible = "mrvl,mv64x60-pci";
-			reg = <0cf8 8>;
-			ranges = <01000000 0        0 88000000 0 01000000
-				  02000000 0 80000000 80000000 0 08000000>;
-			bus-range = <0 ff>;
-			clock-frequency = <3EF1480>;
-			interrupt-pci-iack = <0c34>;
-			interrupt-parent = <&/mv64x60/pic>;
-			interrupt-map-mask = <f800 0 0 7>;
+			reg = <0xcf8 0x8>;
+			ranges = <0x01000000 0x0        0x0
+					0x88000000 0x0 0x01000000
+				  0x02000000 0x0 0x80000000
+				  	0x80000000 0x0 0x08000000>;
+			bus-range = <0 255>;
+			clock-frequency = <66000000>;
+			interrupt-pci-iack = <0xc34>;
+			interrupt-parent = <&PIC>;
+			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
 			interrupt-map = <
 				/* IDSEL 0x0a */
-				5000 0 0 1 &/mv64x60/pic 50
-				5000 0 0 2 &/mv64x60/pic 51
-				5000 0 0 3 &/mv64x60/pic 5b
-				5000 0 0 4 &/mv64x60/pic 5d
+				0x5000 0 0 1 &PIC 80
+				0x5000 0 0 2 &PIC 81
+				0x5000 0 0 3 &PIC 91
+				0x5000 0 0 4 &PIC 93
 
 				/* IDSEL 0x0b */
-				5800 0 0 1 &/mv64x60/pic 5b
-				5800 0 0 2 &/mv64x60/pic 5d
-				5800 0 0 3 &/mv64x60/pic 50
-				5800 0 0 4 &/mv64x60/pic 51
+				0x5800 0 0 1 &PIC 91
+				0x5800 0 0 2 &PIC 93
+				0x5800 0 0 3 &PIC 80
+				0x5800 0 0 4 &PIC 81
 
 				/* IDSEL 0x0c */
-				6000 0 0 1 &/mv64x60/pic 5b
-				6000 0 0 2 &/mv64x60/pic 5d
-				6000 0 0 3 &/mv64x60/pic 50
-				6000 0 0 4 &/mv64x60/pic 51
+				0x6000 0 0 1 &PIC 91
+				0x6000 0 0 2 &PIC 93
+				0x6000 0 0 3 &PIC 80
+				0x6000 0 0 4 &PIC 81
 
 				/* IDSEL 0x0d */
-				6800 0 0 1 &/mv64x60/pic 5d
-				6800 0 0 2 &/mv64x60/pic 50
-				6800 0 0 3 &/mv64x60/pic 51
-				6800 0 0 4 &/mv64x60/pic 5b
+				0x6800 0 0 1 &PIC 93
+				0x6800 0 0 2 &PIC 80
+				0x6800 0 0 3 &PIC 81
+				0x6800 0 0 4 &PIC 91
 			>;
 		};
 
 		cpu-error@0070 {
 			compatible = "mrvl,mv64x60-cpu-error";
-			reg = <0070 10 0128 28>;
-			interrupts = <03>;
-			interrupt-parent = <&/mv64x60/pic>;
+			reg = <0x70 0x10 0x128 0x28>;
+			interrupts = <3>;
+			interrupt-parent = <&PIC>;
 		};
 
 		sram-ctrl@0380 {
 			compatible = "mrvl,mv64x60-sram-ctrl";
-			reg = <0380 80>;
-			interrupts = <0d>;
-			interrupt-parent = <&/mv64x60/pic>;
+			reg = <0x380 0x80>;
+			interrupts = <13>;
+			interrupt-parent = <&PIC>;
 		};
 
 		pci-error@1d40 {
 			compatible = "mrvl,mv64x60-pci-error";
-			reg = <1d40 40 0c28 4>;
-			interrupts = <0c>;
-			interrupt-parent = <&/mv64x60/pic>;
+			reg = <0x1d40 0x40 0xc28 0x4>;
+			interrupts = <12>;
+			interrupt-parent = <&PIC>;
 		};
 
 		mem-ctrl@1400 {
 			compatible = "mrvl,mv64x60-mem-ctrl";
-			reg = <1400 60>;
-			interrupts = <11>;
-			interrupt-parent = <&/mv64x60/pic>;
+			reg = <0x1400 0x60>;
+			interrupts = <17>;
+			interrupt-parent = <&PIC>;
 		};
 	};
 
 	chosen {
 		bootargs = "ip=on";
-		linux,stdout-path = "/mv64x60@f1000000/mpsc@8000";
+		linux,stdout-path = &MPSC0;
 	};
 };

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 3/9] [POWERPC] prpmc2800: fix frequencies in prpmc2800.dts
  2008-03-28 23:39 [PATCH 0/9] powerpc: mv64x60 and prpmc2800 DTS cleanups Dale Farnsworth
  2008-03-28 23:42 ` [PATCH 1/9] [POWERPC] mv64x60: change FDT compatible prefix to mrvl Dale Farnsworth
  2008-03-28 23:44 ` [PATCH 2/9] [POWERPC] prpmc2800: convert DTS to v1 and add labels Dale Farnsworth
@ 2008-03-28 23:45 ` Dale Farnsworth
  2008-03-28 23:47 ` [PATCH 4/9] [POWERPC] mv64x60: Fix FDT compatible names: mv64x60 => mv64360 Dale Farnsworth
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 25+ messages in thread
From: Dale Farnsworth @ 2008-03-28 23:45 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

From: Dale Farnsworth <dale@farnsworth.org>

After the conversion to dts v1 format, seeing the frequencies
in decimal made it obvious that some of them had been
incorrectly truncated.  This fixes them.  Note that the PCI
frequency comes from a different source and is documented
as 66MHz, so it was left at 66000000.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Acked-by: Mark A. Greer <mgreer@mvista.com>

Index: linux-2.6/arch/powerpc/boot/dts/prpmc2800.dts
===================================================================
--- linux-2.6.orig/arch/powerpc/boot/dts/prpmc2800.dts
+++ linux-2.6/arch/powerpc/boot/dts/prpmc2800.dts
@@ -27,7 +27,7 @@
 		PowerPC,7447 {
 			device_type = "cpu";
 			reg = <0>;
-			clock-frequency = <733000000>;	/* Default */
+			clock-frequency = <733333333>;	/* Default */
 			bus-frequency = <133333333>;
 			timebase-frequency = <33333333>;
 			i-cache-line-size = <32>;
@@ -137,7 +137,7 @@
 			compatible = "mrvl,mv64x60-brg";
 			reg = <0xb200 0x8>;
 			clock-src = <8>;
-			clock-frequency = <133000000>;
+			clock-frequency = <133333333>;
 			current-speed = <9600>;
 			bcr = <0>;
 		};
@@ -146,7 +146,7 @@
 			compatible = "mrvl,mv64x60-brg";
 			reg = <0xb208 0x8>;
 			clock-src = <8>;
-			clock-frequency = <133000000>;
+			clock-frequency = <133333333>;
 			current-speed = <9600>;
 			bcr = <0>;
 		};

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 4/9] [POWERPC] mv64x60: Fix FDT compatible names: mv64x60 => mv64360
  2008-03-28 23:39 [PATCH 0/9] powerpc: mv64x60 and prpmc2800 DTS cleanups Dale Farnsworth
                   ` (2 preceding siblings ...)
  2008-03-28 23:45 ` [PATCH 3/9] [POWERPC] prpmc2800: fix frequencies in prpmc2800.dts Dale Farnsworth
@ 2008-03-28 23:47 ` Dale Farnsworth
  2008-03-29 21:57   ` Olof Johansson
  2008-03-28 23:48 ` [PATCH 5/9] [POWERPC] mv64x60: remove device tree absolute path references Dale Farnsworth
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 25+ messages in thread
From: Dale Farnsworth @ 2008-03-28 23:47 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

From: Mark A. Greer <mgreer@mvista.com>

Compatible names should refer to a specific version of the hardware,
without wildcards.  Change each instance of mv64x60 to mv64360, which
is the oldest version we currently support.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>

Index: linux-2.6/arch/powerpc/boot/dts/prpmc2800.dts
===================================================================
--- linux-2.6.orig/arch/powerpc/boot/dts/prpmc2800.dts
+++ linux-2.6/arch/powerpc/boot/dts/prpmc2800.dts
@@ -46,7 +46,7 @@
 		#address-cells = <1>;
 		#size-cells = <1>;
 		model = "mv64360";			/* Default */
-		compatible = "mrvl,mv64x60";
+		compatible = "mrvl,mv64360";
 		clock-frequency = <133333333>;
 		reg = <0xf1000000 0x10000>;
 		virtual-reg = <0xf1000000>;
@@ -74,7 +74,7 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 			device_type = "mdio";
-			compatible = "mrvl,mv64x60-mdio";
+			compatible = "mrvl,mv64360-mdio";
 			PHY0: ethernet-phy@1 {
 				device_type = "ethernet-phy";
 				compatible = "broadcom,bcm5421";
@@ -95,7 +95,7 @@
 			reg = <0x2000 0x2000>;
 			eth0 {
 				device_type = "network";
-				compatible = "mrvl,mv64x60-eth";
+				compatible = "mrvl,mv64360-eth";
 				block-index = <0>;
 				interrupts = <32>;
 				interrupt-parent = <&PIC>;
@@ -104,7 +104,7 @@
 			};
 			eth1 {
 				device_type = "network";
-				compatible = "mrvl,mv64x60-eth";
+				compatible = "mrvl,mv64360-eth";
 				block-index = <1>;
 				interrupts = <33>;
 				interrupt-parent = <&PIC>;
@@ -115,7 +115,7 @@
 
 		SDMA0: sdma@4000 {
 			device_type = "dma";
-			compatible = "mrvl,mv64x60-sdma";
+			compatible = "mrvl,mv64360-sdma";
 			reg = <0x4000 0xc18>;
 			virtual-reg = <0xf1004000>;
 			interrupt-base = <0>;
@@ -125,7 +125,7 @@
 
 		SDMA1: sdma@6000 {
 			device_type = "dma";
-			compatible = "mrvl,mv64x60-sdma";
+			compatible = "mrvl,mv64360-sdma";
 			reg = <0x6000 0xc18>;
 			virtual-reg = <0xf1006000>;
 			interrupt-base = <0>;
@@ -134,7 +134,7 @@
 		};
 
 		BRG0: brg@b200 {
-			compatible = "mrvl,mv64x60-brg";
+			compatible = "mrvl,mv64360-brg";
 			reg = <0xb200 0x8>;
 			clock-src = <8>;
 			clock-frequency = <133333333>;
@@ -143,7 +143,7 @@
 		};
 
 		BRG1: brg@b208 {
-			compatible = "mrvl,mv64x60-brg";
+			compatible = "mrvl,mv64360-brg";
 			reg = <0xb208 0x8>;
 			clock-src = <8>;
 			clock-frequency = <133333333>;
@@ -166,7 +166,7 @@
 
 		MPSC0: mpsc@8000 {
 			device_type = "serial";
-			compatible = "mrvl,mpsc";
+			compatible = "mrvl,mv64360-mpsc";
 			reg = <0x8000 0x38>;
 			virtual-reg = <0xf1008000>;
 			sdma = <&SDMA0>;
@@ -186,7 +186,7 @@
 
 		MPSC1: mpsc@9000 {
 			device_type = "serial";
-			compatible = "mrvl,mpsc";
+			compatible = "mrvl,mv64360-mpsc";
 			reg = <0x9000 0x38>;
 			virtual-reg = <0xf1009000>;
 			sdma = <&SDMA1>;
@@ -205,14 +205,14 @@
 		};
 
 		wdt@b410 {			/* watchdog timer */
-			compatible = "mrvl,mv64x60-wdt";
+			compatible = "mrvl,mv64360-wdt";
 			reg = <0xb410 0x8>;
 			timeout = <10>;		/* wdt timeout in seconds */
 		};
 
 		i2c@c000 {
 			device_type = "i2c";
-			compatible = "mrvl,mv64x60-i2c";
+			compatible = "mrvl,mv64360-i2c";
 			reg = <0xc000 0x20>;
 			virtual-reg = <0xf100c000>;
 			freq_m = <8>;
@@ -226,18 +226,18 @@
 		PIC: pic {
 			#interrupt-cells = <1>;
 			#address-cells = <0>;
-			compatible = "mrvl,mv64x60-pic";
+			compatible = "mrvl,mv64360-pic";
 			reg = <0x0 0x88>;
 			interrupt-controller;
 		};
 
 		mpp@f000 {
-			compatible = "mrvl,mv64x60-mpp";
+			compatible = "mrvl,mv64360-mpp";
 			reg = <0xf000 0x10>;
 		};
 
 		gpp@f100 {
-			compatible = "mrvl,mv64x60-gpp";
+			compatible = "mrvl,mv64360-gpp";
 			reg = <0xf100 0x20>;
 		};
 
@@ -246,7 +246,7 @@
 			#size-cells = <2>;
 			#interrupt-cells = <1>;
 			device_type = "pci";
-			compatible = "mrvl,mv64x60-pci";
+			compatible = "mrvl,mv64360-pci";
 			reg = <0xcf8 0x8>;
 			ranges = <0x01000000 0x0        0x0
 					0x88000000 0x0 0x01000000
@@ -285,28 +285,28 @@
 		};
 
 		cpu-error@0070 {
-			compatible = "mrvl,mv64x60-cpu-error";
+			compatible = "mrvl,mv64360-cpu-error";
 			reg = <0x70 0x10 0x128 0x28>;
 			interrupts = <3>;
 			interrupt-parent = <&PIC>;
 		};
 
 		sram-ctrl@0380 {
-			compatible = "mrvl,mv64x60-sram-ctrl";
+			compatible = "mrvl,mv64360-sram-ctrl";
 			reg = <0x380 0x80>;
 			interrupts = <13>;
 			interrupt-parent = <&PIC>;
 		};
 
 		pci-error@1d40 {
-			compatible = "mrvl,mv64x60-pci-error";
+			compatible = "mrvl,mv64360-pci-error";
 			reg = <0x1d40 0x40 0xc28 0x4>;
 			interrupts = <12>;
 			interrupt-parent = <&PIC>;
 		};
 
 		mem-ctrl@1400 {
-			compatible = "mrvl,mv64x60-mem-ctrl";
+			compatible = "mrvl,mv64360-mem-ctrl";
 			reg = <0x1400 0x60>;
 			interrupts = <17>;
 			interrupt-parent = <&PIC>;
Index: linux-2.6/arch/powerpc/boot/serial.c
===================================================================
--- linux-2.6.orig/arch/powerpc/boot/serial.c
+++ linux-2.6/arch/powerpc/boot/serial.c
@@ -119,7 +119,7 @@ int serial_console_init(void)
 
 	if (dt_is_compatible(devp, "ns16550"))
 		rc = ns16550_console_init(devp, &serial_cd);
-	else if (dt_is_compatible(devp, "mrvl,mpsc"))
+	else if (dt_is_compatible(devp, "mrvl,mv64360-mpsc"))
 		rc = mpsc_console_init(devp, &serial_cd);
 	else if (dt_is_compatible(devp, "fsl,cpm1-scc-uart") ||
 	         dt_is_compatible(devp, "fsl,cpm1-smc-uart") ||
Index: linux-2.6/arch/powerpc/platforms/embedded6xx/prpmc2800.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/embedded6xx/prpmc2800.c
+++ linux-2.6/arch/powerpc/platforms/embedded6xx/prpmc2800.c
@@ -49,13 +49,13 @@ static void __init prpmc2800_setup_arch(
 	 * ioremap mpp and gpp registers in case they are later
 	 * needed by prpmc2800_reset_board().
 	 */
-	np = of_find_compatible_node(NULL, NULL, "mrvl,mv64x60-mpp");
+	np = of_find_compatible_node(NULL, NULL, "mrvl,mv64360-mpp");
 	reg = of_get_property(np, "reg", NULL);
 	paddr = of_translate_address(np, reg);
 	of_node_put(np);
 	mv64x60_mpp_reg_base = ioremap(paddr, reg[1]);
 
-	np = of_find_compatible_node(NULL, NULL, "mrvl,mv64x60-gpp");
+	np = of_find_compatible_node(NULL, NULL, "mrvl,mv64360-gpp");
 	reg = of_get_property(np, "reg", NULL);
 	paddr = of_translate_address(np, reg);
 	of_node_put(np);
Index: linux-2.6/arch/powerpc/sysdev/mv64x60_dev.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/mv64x60_dev.c
+++ linux-2.6/arch/powerpc/sysdev/mv64x60_dev.c
@@ -446,22 +446,22 @@ static int __init mv64x60_device_setup(v
 	int err;
 
 	id = 0;
-	for_each_compatible_node(np, "serial", "mrvl,mpsc")
+	for_each_compatible_node(np, "serial", "mrvl,mv64360-mpsc")
 		if ((err = mv64x60_mpsc_device_setup(np, id++)))
 			goto error;
 
 	id = 0;
-	for_each_compatible_node(np, "network", "mrvl,mv64x60-eth")
+	for_each_compatible_node(np, "network", "mrvl,mv64360-eth")
 		if ((err = mv64x60_eth_device_setup(np, id++)))
 			goto error;
 
 	id = 0;
-	for_each_compatible_node(np, "i2c", "mrvl,mv64x60-i2c")
+	for_each_compatible_node(np, "i2c", "mrvl,mv64360-i2c")
 		if ((err = mv64x60_i2c_device_setup(np, id++)))
 			goto error;
 
 	/* support up to one watchdog timer */
-	np = of_find_compatible_node(np, NULL, "mrvl,mv64x60-wdt");
+	np = of_find_compatible_node(np, NULL, "mrvl,mv64360-wdt");
 	if (np) {
 		if ((err = mv64x60_wdt_device_setup(np, id)))
 			goto error;
@@ -489,7 +489,7 @@ static int __init mv64x60_add_mpsc_conso
 	if (!np)
 		goto not_mpsc;
 
-	if (!of_device_is_compatible(np, "mrvl,mpsc"))
+	if (!of_device_is_compatible(np, "mrvl,mv64360-mpsc"))
 		goto not_mpsc;
 
 	prop = of_get_property(np, "block-index", NULL);
Index: linux-2.6/arch/powerpc/sysdev/mv64x60_pci.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/mv64x60_pci.c
+++ linux-2.6/arch/powerpc/sysdev/mv64x60_pci.c
@@ -86,14 +86,14 @@ static int __init mv64x60_sysfs_init(voi
 	struct platform_device *pdev;
 	const unsigned int *prop;
 
-	np = of_find_compatible_node(NULL, NULL, "mrvl,mv64x60");
+	np = of_find_compatible_node(NULL, NULL, "mrvl,mv64360");
 	if (!np)
 		return 0;
 
 	prop = of_get_property(np, "hs_reg_valid", NULL);
 	of_node_put(np);
 
-	pdev = platform_device_register_simple("mrvl,mv64x60", 0, NULL, 0);
+	pdev = platform_device_register_simple("mrvl,mv64360", 0, NULL, 0);
 	if (IS_ERR(pdev))
 		return PTR_ERR(pdev);
 
@@ -166,6 +166,6 @@ void __init mv64x60_pci_init(void)
 {
 	struct device_node *np;
 
-	for_each_compatible_node(np, "pci", "mrvl,mv64x60-pci")
+	for_each_compatible_node(np, "pci", "mrvl,mv64360-pci")
 		mv64x60_add_bridge(np);
 }
Index: linux-2.6/arch/powerpc/sysdev/mv64x60_pic.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/mv64x60_pic.c
+++ linux-2.6/arch/powerpc/sysdev/mv64x60_pic.c
@@ -238,13 +238,13 @@ void __init mv64x60_init_irq(void)
 	const unsigned int *reg;
 	unsigned long flags;
 
-	np = of_find_compatible_node(NULL, NULL, "mrvl,mv64x60-gpp");
+	np = of_find_compatible_node(NULL, NULL, "mrvl,mv64360-gpp");
 	reg = of_get_property(np, "reg", &size);
 	paddr = of_translate_address(np, reg);
 	mv64x60_gpp_reg_base = ioremap(paddr, reg[1]);
 	of_node_put(np);
 
-	np = of_find_compatible_node(NULL, NULL, "mrvl,mv64x60-pic");
+	np = of_find_compatible_node(NULL, NULL, "mrvl,mv64360-pic");
 	reg = of_get_property(np, "reg", &size);
 	paddr = of_translate_address(np, reg);
 	mv64x60_irq_reg_base = ioremap(paddr, reg[1]);
Index: linux-2.6/arch/powerpc/sysdev/mv64x60_udbg.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/mv64x60_udbg.c
+++ linux-2.6/arch/powerpc/sysdev/mv64x60_udbg.c
@@ -85,7 +85,7 @@ static void mv64x60_udbg_init(void)
 	if (!stdout)
 		return;
 
-	for_each_compatible_node(np, "serial", "mrvl,mpsc") {
+	for_each_compatible_node(np, "serial", "mrvl,mv64360-mpsc") {
 		if (np == stdout)
 			break;
 	}

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 1/9] [POWERPC] mv64x60: change FDT compatible prefix to mrvl
  2008-03-28 23:42 ` [PATCH 1/9] [POWERPC] mv64x60: change FDT compatible prefix to mrvl Dale Farnsworth
@ 2008-03-28 23:47   ` Grant Likely
  2008-03-29  0:00     ` Dale Farnsworth
  2008-03-30 23:44     ` David Gibson
  0 siblings, 2 replies; 25+ messages in thread
From: Grant Likely @ 2008-03-28 23:47 UTC (permalink / raw)
  To: Dale Farnsworth; +Cc: linuxppc-dev, paulus

On Fri, Mar 28, 2008 at 5:42 PM, Dale Farnsworth <dale@farnsworth.org> wrote:
> From: Dale Farnsworth <dale@farnsworth.org>
>
>  Follow the convention that compatible names are prefixed by the
>  vendor's stock ticker symbol.  For Marvell Technology Group Ltd.,
>  that's MRVL.
>
>  Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
>  Acked-by: Mark A. Greer <mgreer@mvista.com>

Are there any boards "in the wild" using the old string?  If so are
does changing this string risk complicating upgrades to a new kernel
version?

g.


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 5/9] [POWERPC] mv64x60: remove device tree absolute path references
  2008-03-28 23:39 [PATCH 0/9] powerpc: mv64x60 and prpmc2800 DTS cleanups Dale Farnsworth
                   ` (3 preceding siblings ...)
  2008-03-28 23:47 ` [PATCH 4/9] [POWERPC] mv64x60: Fix FDT compatible names: mv64x60 => mv64360 Dale Farnsworth
@ 2008-03-28 23:48 ` Dale Farnsworth
  2008-03-28 23:49 ` [PATCH 6/9] [POWERPC] prpmc2800: clean up dts properties Dale Farnsworth
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 25+ messages in thread
From: Dale Farnsworth @ 2008-03-28 23:48 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

From: Dale Farnsworth <dale@farnsworth.org>

Replace several device node absolute path lookups in the mv64x60
bootwrapper code with lookups by compatible or device_type
properties.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Acked-by: Mark A. Greer <mgreer@mvista.com>

--- a/arch/powerpc/boot/mv64x60.c
+++ b/arch/powerpc/boot/mv64x60.c
@@ -535,7 +535,7 @@ u8 *mv64x60_get_bridge_pbase(void)
 	u32 v[2];
 	void *devp;
 
-	devp = finddevice("/mv64x60");
+	devp = find_node_by_compatible(NULL, "mrvl,mv64360");
 	if (devp == NULL)
 		goto err_out;
 	if (getprop(devp, "reg", v, sizeof(v)) != sizeof(v))
@@ -553,7 +553,7 @@ u8 *mv64x60_get_bridge_base(void)
 	u32 v;
 	void *devp;
 
-	devp = finddevice("/mv64x60");
+	devp = find_node_by_compatible(NULL, "mrvl,mv64360");
 	if (devp == NULL)
 		goto err_out;
 	if (getprop(devp, "virtual-reg", &v, sizeof(v)) != sizeof(v))
diff --git a/arch/powerpc/boot/mv64x60_i2c.c b/arch/powerpc/boot/mv64x60_i2c.c
index d085377..a69cd7a 100644
--- a/arch/powerpc/boot/mv64x60_i2c.c
+++ b/arch/powerpc/boot/mv64x60_i2c.c
@@ -185,7 +185,7 @@ int mv64x60_i2c_open(void)
 	u32 v;
 	void *devp;
 
-	devp = finddevice("/mv64x60/i2c");
+	devp = find_node_by_compatible(NULL, "mrvl,mv64360-i2c");
 	if (devp == NULL)
 		goto err_out;
 	if (getprop(devp, "virtual-reg", &v, sizeof(v)) != sizeof(v))
diff --git a/arch/powerpc/boot/prpmc2800.c b/arch/powerpc/boot/prpmc2800.c
index 05c3245..f74b2cf 100644
--- a/arch/powerpc/boot/prpmc2800.c
+++ b/arch/powerpc/boot/prpmc2800.c
@@ -344,20 +344,20 @@ static void prpmc2800_bridge_setup(u32 mem_size)
 			acc_bits);
 
 	/* Get the cpu -> pci i/o & mem mappings from the device tree */
-	devp = finddevice("/mv64x60/pci@80000000");
+	devp = find_node_by_compatible(NULL, "mrvl,mv64360-pci");
 	if (devp == NULL)
-		fatal("Error: Missing /mv64x60/pci@80000000"
+		fatal("Error: Missing mrvl,mv64360-pci"
 				" device tree node\n\r");
 
 	rc = getprop(devp, "ranges", v, sizeof(v));
 	if (rc != sizeof(v))
-		fatal("Error: Can't find /mv64x60/pci@80000000/ranges"
+		fatal("Error: Can't find mrvl,mv64360-pci ranges"
 				" property\n\r");
 
 	/* Get the cpu -> pci i/o & mem mappings from the device tree */
-	devp = finddevice("/mv64x60");
+	devp = find_node_by_compatible(NULL, "mrvl,mv64360");
 	if (devp == NULL)
-		fatal("Error: Missing /mv64x60 device tree node\n\r");
+		fatal("Error: Missing mrvl,mv64360 device tree node\n\r");
 
 	enables = in_le32((u32 *)(bridge_base + MV64x60_CPU_BAR_ENABLE));
 	enables |= 0x0007fe00; /* Disable all cpu->pci windows */
@@ -429,9 +429,9 @@ static void prpmc2800_fixups(void)
 	setprop(devp, "model", model, l);
 
 	/* Set /cpus/PowerPC,7447/clock-frequency */
-	devp = finddevice("/cpus/PowerPC,7447");
+	devp = find_node_by_prop_value_str(NULL, "device_type", "cpu");
 	if (devp == NULL)
-		fatal("Error: Missing proper /cpus device tree node\n\r");
+		fatal("Error: Missing proper cpu device tree node\n\r");
 	v[0] = bip->core_speed;
 	setprop(devp, "clock-frequency", &v[0], sizeof(v[0]));
 
@@ -443,16 +443,17 @@ static void prpmc2800_fixups(void)
 	v[1] = bip->mem_size;
 	setprop(devp, "reg", v, sizeof(v));
 
-	/* Update /mv64x60/model, if this is a mv64362 */
+	/* Update model, if this is a mv64362 */
 	if (bip->bridge_type == BRIDGE_TYPE_MV64362) {
-		devp = finddevice("/mv64x60");
+		devp = find_node_by_compatible(NULL, "mrvl,mv64360");
 		if (devp == NULL)
-			fatal("Error: Missing /mv64x60 device tree node\n\r");
+			fatal("Error: Missing mrvl,mv64360"
+					" device tree node\n\r");
 		setprop(devp, "model", "mv64362", strlen("mv64362") + 1);
 	}
 
 	/* Set User FLASH size */
-	devp = finddevice("/mv64x60/flash@a0000000");
+	devp = find_node_by_compatible(NULL, "direct-mapped");
 	if (devp == NULL)
 		fatal("Error: Missing User FLASH device tree node\n\r");
 	rc = getprop(devp, "reg", v, sizeof(v));

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 6/9] [POWERPC] prpmc2800: clean up dts properties
  2008-03-28 23:39 [PATCH 0/9] powerpc: mv64x60 and prpmc2800 DTS cleanups Dale Farnsworth
                   ` (4 preceding siblings ...)
  2008-03-28 23:48 ` [PATCH 5/9] [POWERPC] mv64x60: remove device tree absolute path references Dale Farnsworth
@ 2008-03-28 23:49 ` Dale Farnsworth
  2008-03-29 21:59   ` Olof Johansson
  2008-03-28 23:50 ` [PATCH 7/9] [POWERPC] mv643xx_eth: prepare to support multiple silicon blocks Dale Farnsworth
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 25+ messages in thread
From: Dale Farnsworth @ 2008-03-28 23:49 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

From: Mark A. Greer <mgreer@mvista.com>

Remove several unused (or software config only) properties.
Rename marvel node to "soc".  Technically, it's not an SOC,
but its organization is the same as an SOC.  Also, rename the
"block-index" property to "cell-index" to conform to current
practice.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>

Index: linux-2.6/arch/powerpc/boot/dts/prpmc2800.dts
===================================================================
--- linux-2.6.orig/arch/powerpc/boot/dts/prpmc2800.dts
+++ linux-2.6/arch/powerpc/boot/dts/prpmc2800.dts
@@ -42,7 +42,7 @@
 		reg = <0x0 0x20000000>;			/* Default (512MB) */
 	};
 
-	mv64x60@f1000000 { /* Marvell Discovery */
+	soc@f1000000 { /* Marvell Discovery */
 		#address-cells = <1>;
 		#size-cells = <1>;
 		model = "mv64360";			/* Default */
@@ -114,21 +114,17 @@
 		};
 
 		SDMA0: sdma@4000 {
-			device_type = "dma";
 			compatible = "mrvl,mv64360-sdma";
 			reg = <0x4000 0xc18>;
 			virtual-reg = <0xf1004000>;
-			interrupt-base = <0>;
 			interrupts = <36>;
 			interrupt-parent = <&PIC>;
 		};
 
 		SDMA1: sdma@6000 {
-			device_type = "dma";
 			compatible = "mrvl,mv64360-sdma";
 			reg = <0x6000 0xc18>;
 			virtual-reg = <0xf1006000>;
-			interrupt-base = <0>;
 			interrupts = <38>;
 			interrupt-parent = <&PIC>;
 		};
@@ -139,7 +135,6 @@
 			clock-src = <8>;
 			clock-frequency = <133333333>;
 			current-speed = <9600>;
-			bcr = <0>;
 		};
 
 		BRG1: brg@b208 {
@@ -148,7 +143,6 @@
 			clock-src = <8>;
 			clock-frequency = <133333333>;
 			current-speed = <9600>;
-			bcr = <0>;
 		};
 
 		CUNIT: cunit@f200 {
@@ -174,12 +168,7 @@
 			cunit = <&CUNIT>;
 			mpscrouting = <&MPSCROUTING>;
 			mpscintr = <&MPSCINTR>;
-			block-index = <0>;
-			max_idle = <40>;
-			chr_1 = <0>;
-			chr_2 = <0>;
-			chr_10 = <3>;
-			mpcr = <0>;
+			cell-index = <0>;
 			interrupts = <40>;
 			interrupt-parent = <&PIC>;
 		};
@@ -194,12 +183,7 @@
 			cunit = <&CUNIT>;
 			mpscrouting = <&MPSCROUTING>;
 			mpscintr = <&MPSCINTR>;
-			block-index = <1>;
-			max_idle = <40>;
-			chr_1 = <0>;
-			chr_2 = <0>;
-			chr_10 = <3>;
-			mpcr = <0>;
+			cell-index = <1>;
 			interrupts = <42>;
 			interrupt-parent = <&PIC>;
 		};
@@ -207,7 +191,6 @@
 		wdt@b410 {			/* watchdog timer */
 			compatible = "mrvl,mv64360-wdt";
 			reg = <0xb410 0x8>;
-			timeout = <10>;		/* wdt timeout in seconds */
 		};
 
 		i2c@c000 {
@@ -215,10 +198,6 @@
 			compatible = "mrvl,mv64360-i2c";
 			reg = <0xc000 0x20>;
 			virtual-reg = <0xf100c000>;
-			freq_m = <8>;
-			freq_n = <3>;
-			timeout = <1000>;		/* 1000 = 1 second */
-			retries = <1>;
 			interrupts = <37>;
 			interrupt-parent = <&PIC>;
 		};
Index: linux-2.6/arch/powerpc/boot/mpsc.c
===================================================================
--- linux-2.6.orig/arch/powerpc/boot/mpsc.c
+++ linux-2.6/arch/powerpc/boot/mpsc.c
@@ -141,7 +141,7 @@ int mpsc_console_init(void *devp, struct
 	if (mpscintr_base == NULL)
 		goto err_out;
 
-	n = getprop(devp, "block-index", &v, sizeof(v));
+	n = getprop(devp, "cell-index", &v, sizeof(v));
 	if (n != sizeof(v))
 		goto err_out;
 	reg_set = (int)v;
Index: linux-2.6/arch/powerpc/sysdev/mv64x60_dev.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/mv64x60_dev.c
+++ linux-2.6/arch/powerpc/sysdev/mv64x60_dev.c
@@ -127,7 +127,7 @@ static int __init mv64x60_mpsc_device_se
 	if (err)
 		return err;
 
-	prop = of_get_property(np, "block-index", NULL);
+	prop = of_get_property(np, "cell-index", NULL);
 	if (!prop)
 		return -ENODEV;
 	port_number = *(int *)prop;
@@ -136,6 +136,7 @@ static int __init mv64x60_mpsc_device_se
 
 	pdata.cache_mgmt = 1; /* All current revs need this set */
 
+	pdata.max_idle = 40; /* default */
 	prop = of_get_property(np, "max_idle", NULL);
 	if (prop)
 		pdata.max_idle = *prop;
@@ -345,21 +346,19 @@ static int __init mv64x60_i2c_device_set
 
 	memset(&pdata, 0, sizeof(pdata));
 
+	pdata.freq_m = 8;	/* default */
 	prop = of_get_property(np, "freq_m", NULL);
 	if (!prop)
 		return -ENODEV;
 	pdata.freq_m = *prop;
 
+	pdata.freq_m = 3;	/* default */
 	prop = of_get_property(np, "freq_n", NULL);
 	if (!prop)
 		return -ENODEV;
 	pdata.freq_n = *prop;
 
-	prop = of_get_property(np, "timeout", NULL);
-	if (prop)
-		pdata.timeout = *prop;
-	else
-		pdata.timeout = 1000;	/* 1 second */
+	pdata.timeout = 1000;				/* default: 1 second */
 
 	pdev = platform_device_alloc(MV64XXX_I2C_CTLR_NAME, id);
 	if (!pdev)
@@ -401,10 +400,7 @@ static int __init mv64x60_wdt_device_set
 
 	memset(&pdata, 0, sizeof(pdata));
 
-	prop = of_get_property(np, "timeout", NULL);
-	if (!prop)
-		return -ENODEV;
-	pdata.timeout = *prop;
+	pdata.timeout = 10;			/* Default: 10 seconds */
 
 	np = of_get_parent(np);
 	if (!np)
@@ -492,7 +488,7 @@ static int __init mv64x60_add_mpsc_conso
 	if (!of_device_is_compatible(np, "mrvl,mv64360-mpsc"))
 		goto not_mpsc;
 
-	prop = of_get_property(np, "block-index", NULL);
+	prop = of_get_property(np, "cell-index", NULL);
 	if (!prop)
 		goto not_mpsc;
 

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 7/9] [POWERPC] mv643xx_eth: prepare to support multiple silicon blocks
  2008-03-28 23:39 [PATCH 0/9] powerpc: mv64x60 and prpmc2800 DTS cleanups Dale Farnsworth
                   ` (5 preceding siblings ...)
  2008-03-28 23:49 ` [PATCH 6/9] [POWERPC] prpmc2800: clean up dts properties Dale Farnsworth
@ 2008-03-28 23:50 ` Dale Farnsworth
  2008-03-28 23:51 ` [PATCH 8/9] [POWERPC] Document the mv64x60 device tree bindings Dale Farnsworth
  2008-03-28 23:52 ` [PATCH 9/9] [POWERPC] prpmc2800 needs a dtbImage Dale Farnsworth
  8 siblings, 0 replies; 25+ messages in thread
From: Dale Farnsworth @ 2008-03-28 23:50 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

From: Dale Farnsworth <dale@farnsworth.org>

The mv643xx_eth driver is being modified to support multiple instances
of the ethernet silicon block on the same platform.  Each block contains
a single register bank containing the registers for up to three ports
interleaved within that bank.  This patch updates the PowerPC OF to
platform_device glue code to support multiple silicon blocks, each
with up to three ethernet ports.  The main difference is that we now
allow multiple mv64x60_shared platform_devices to be registered and
we provide each port platform_device with a pointer to its associated
shared platform_device.  The pointer will not be used until the
mv643xx_eth driver changes are committed.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Acked-by: Mark Greer <mgreer@mvista.com>

Index: linux-2.6/arch/powerpc/boot/dts/prpmc2800.dts
===================================================================
--- linux-2.6.orig/arch/powerpc/boot/dts/prpmc2800.dts
+++ linux-2.6/arch/powerpc/boot/dts/prpmc2800.dts
@@ -91,21 +91,24 @@
 			};
 		};
 
-		ethernet@2000 {
+		ethernet-group@2000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "mrvl,mv64360-eth-group";
 			reg = <0x2000 0x2000>;
-			eth0 {
+			ethernet@0 {
 				device_type = "network";
 				compatible = "mrvl,mv64360-eth";
-				block-index = <0>;
+				reg = <0>;
 				interrupts = <32>;
 				interrupt-parent = <&PIC>;
 				phy = <&PHY0>;
 				local-mac-address = [ 00 00 00 00 00 00 ];
 			};
-			eth1 {
+			ethernet@1 {
 				device_type = "network";
 				compatible = "mrvl,mv64360-eth";
-				block-index = <1>;
+				reg = <1>;
 				interrupts = <33>;
 				interrupt-parent = <&PIC>;
 				phy = <&PHY1>;
Index: linux-2.6/arch/powerpc/sysdev/mv64x60_dev.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/mv64x60_dev.c
+++ linux-2.6/arch/powerpc/sysdev/mv64x60_dev.c
@@ -206,30 +206,24 @@ error:
 /*
  * Create mv64x60_eth platform devices
  */
-static int __init eth_register_shared_pdev(struct device_node *np)
+static struct platform_device * __init mv64x60_eth_register_shared_pdev(
+						struct device_node *np, int id)
 {
 	struct platform_device *pdev;
 	struct resource r[1];
 	int err;
 
-	np = of_get_parent(np);
-	if (!np)
-		return -ENODEV;
-
 	err = of_address_to_resource(np, 0, &r[0]);
-	of_node_put(np);
 	if (err)
-		return err;
+		return ERR_PTR(err);
 
-	pdev = platform_device_register_simple(MV643XX_ETH_SHARED_NAME, 0,
+	pdev = platform_device_register_simple(MV643XX_ETH_SHARED_NAME, id,
 					       r, 1);
-	if (IS_ERR(pdev))
-		return PTR_ERR(pdev);
-
-	return 0;
+	return pdev;
 }
 
-static int __init mv64x60_eth_device_setup(struct device_node *np, int id)
+static int __init mv64x60_eth_device_setup(struct device_node *np, int id,
+					   struct platform_device *shared_pdev)
 {
 	struct resource r[1];
 	struct mv643xx_eth_platform_data pdata;
@@ -240,16 +234,12 @@ static int __init mv64x60_eth_device_set
 	const phandle *ph;
 	int err;
 
-	/* only register the shared platform device the first time through */
-	if (id == 0 && (err = eth_register_shared_pdev(np)))
-		return err;
-
 	memset(r, 0, sizeof(r));
 	of_irq_to_resource(np, 0, &r[0]);
 
 	memset(&pdata, 0, sizeof(pdata));
 
-	prop = of_get_property(np, "block-index", NULL);
+	prop = of_get_property(np, "reg", NULL);
 	if (!prop)
 		return -ENODEV;
 	pdata.port_number = *prop;
@@ -302,7 +292,7 @@ static int __init mv64x60_eth_device_set
 
 	of_node_put(phy);
 
-	pdev = platform_device_alloc(MV643XX_ETH_NAME, pdata.port_number);
+	pdev = platform_device_alloc(MV643XX_ETH_NAME, id);
 	if (!pdev)
 		return -ENOMEM;
 
@@ -437,8 +427,9 @@ error:
 
 static int __init mv64x60_device_setup(void)
 {
-	struct device_node *np = NULL;
-	int id;
+	struct device_node *np, *np2;
+	struct platform_device *pdev;
+	int id, id2;
 	int err;
 
 	id = 0;
@@ -447,9 +438,24 @@ static int __init mv64x60_device_setup(v
 			goto error;
 
 	id = 0;
-	for_each_compatible_node(np, "network", "mrvl,mv64360-eth")
-		if ((err = mv64x60_eth_device_setup(np, id++)))
+	id2 = 0;
+	for_each_compatible_node(np, NULL, "mrvl,mv64360-eth-group") {
+		pdev = mv64x60_eth_register_shared_pdev(np, id++);
+		if (IS_ERR(pdev)) {
+			err = PTR_ERR(pdev);
 			goto error;
+		}
+		for_each_child_of_node(np, np2) {
+			if (!of_device_is_compatible(np2,
+					"mrvl,mv64360-eth"))
+				continue;
+			err = mv64x60_eth_device_setup(np2, id2++, pdev);
+			if (err) {
+				of_node_put(np2);
+				goto error;
+			}
+		}
+	}
 
 	id = 0;
 	for_each_compatible_node(np, "i2c", "mrvl,mv64360-i2c")

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 8/9] [POWERPC] Document the mv64x60 device tree bindings
  2008-03-28 23:39 [PATCH 0/9] powerpc: mv64x60 and prpmc2800 DTS cleanups Dale Farnsworth
                   ` (6 preceding siblings ...)
  2008-03-28 23:50 ` [PATCH 7/9] [POWERPC] mv643xx_eth: prepare to support multiple silicon blocks Dale Farnsworth
@ 2008-03-28 23:51 ` Dale Farnsworth
  2008-03-28 23:52 ` [PATCH 9/9] [POWERPC] prpmc2800 needs a dtbImage Dale Farnsworth
  8 siblings, 0 replies; 25+ messages in thread
From: Dale Farnsworth @ 2008-03-28 23:51 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

From: Dale Farnsworth <dale@farnsworth.org>

Add the device tree bindings for the Marvell mv64x60 series of
system controller chips in booting-without-of.text.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Acked-by: Mark A. Greer <mgreer@mvista.com>

Index: linux-2.6/Documentation/powerpc/booting-without-of.txt
===================================================================
--- linux-2.6.orig/Documentation/powerpc/booting-without-of.txt
+++ linux-2.6/Documentation/powerpc/booting-without-of.txt
@@ -57,7 +57,8 @@ Table of Contents
       n) 4xx/Axon EMAC ethernet nodes
       o) Xilinx IP cores
       p) Freescale Synchronous Serial Interface
-	  q) USB EHCI controllers
+      q) USB EHCI controllers
+      r) Marvell Discovery mv64[345]6x System Controller chips
 
   VII - Specifying interrupt information for devices
     1) interrupts property
@@ -2817,6 +2818,471 @@ platforms are moved over to use the flat
 	   };
 
 
+    r) Marvell Discovery mv64[345]6x System Controller chips.
+
+    Note that while the Marvell mv64[345]60 series of system controller
+    chips are not true system-on-a-chip processors, they essentially
+    contain the peripheral portion of an SOC and the device tree takes
+    the same form, and we will document them here as if they were an SOC.
+    Compatible string values are prefixed with the string "mrvl,",
+    which is the stock ticker symbol for Marvell Technology Group Ltd.
+
+    An SOC node describes the Marvell chip as described in section III.5.f
+    above.
+    
+    Example Marvell Discovery mv64360 SOC node:
+
+	soc@f1000000 { /* Marvell Discovery */
+		#address-cells = <1>;
+		#size-cells = <1>;
+		model = "mv64360";                      /* Default */
+		compatible = "mrvl,mv64360";
+		clock-frequency = <133333333>;
+		reg = <0xf1000000 0x10000>;
+		virtual-reg = <0xf1000000>;
+		ranges = <0x88000000 0x88000000 0x1000000 /* PCI 0 I/O Space */
+			0x80000000 0x80000000 0x8000000 /* PCI 0 MEM Space */
+			0xa0000000 0xa0000000 0x4000000 /* User FLASH */
+			0x00000000 0xf1000000 0x0010000 /* Bridge's regs */
+			0xf2000000 0xf2000000 0x0040000>;/* Integrated SRAM */
+	}
+
+      
+      1. Marvell Discovery MDIO bus
+
+      The MDIO is a bus to which the PHY devices are connected.  For each
+      device that exists on this bus, a child node should be created.  See
+      the definition of the PHY node below for an example of how to define
+      a PHY.
+
+      Required properties:
+        - #address-cells : Should be <1>
+        - #size-cells : Should be <0>
+        - device_type : Should be "mdio"
+        - compatible : Should be "mrvl,mv64360-mdio"
+
+      Example:
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		device_type = "mdio";
+		compatible = "mrvl,mv64360-mdio";
+
+		ethernet-phy@0 {
+			......
+		};
+	};
+
+
+      2.  Marvell Discovery ethernet controller
+      
+      The Discover ethernet controller is described with two levels
+      of nodes.  The first level describes an ethernet silicon block
+      and the second level describes up to 3 ethernet nodes within
+      that block.  The reason for the multiple levels is that the
+      registers for the node are interleaved within a single set
+      of registers.  The "ethernet-block" level describes the
+      shared register set, and the "ethernet" nodes describe ethernet
+      port-specific properties.
+
+      Ethernet block node
+
+      Required properties:
+        - #address-cells : <1>
+	- #size-cells : <0>
+	- compatible : "mrvl,mv64360-eth-block"
+	- reg : Offset and length of the register set for this block
+	
+      Example Discovery Ethernet block node:
+	ethernet-block@2000 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "mrvl,mv64360-eth-block";
+		reg = <0x2000 0x2000>;
+		ethernet@0 {
+			.......
+		};
+	};
+
+      Ethernet port node
+
+      Required properties:
+        - device_type : Should be "network".
+	- compatible : Should be "mrvl,mv64360-eth".
+	- reg : Should be <0>, <1>, or <2>, according to which registers
+	  within the silicon block the device uses.
+	- interrupts : <a> where a is the interrupt number for the port.
+	- interrupt-parent : the phandle for the interrupt controller
+	  that services interrupts for this device.
+	- phy : the phandle for the PHY connected to this ethernet
+	  controller.
+	- local-mac-address : 6 bytes, MAC address
+
+      Example Discovery Ethernet port node:
+	ethernet@0 {
+		device_type = "network";
+		compatible = "mrvl,mv64360-eth";
+		reg = <0>;
+		interrupts = <32>;
+		interrupt-parent = <&PIC>;
+		phy = <&PHY0>;
+		local-mac-address = [ 00 00 00 00 00 00 ];
+	};
+
+
+
+      3.  Marvell Discovery PHY nodes
+
+      Required properties:
+        - device_type : Should be "ethernet-phy"
+        - interrupts : <a> where a is the interrupt number for this phy.
+        - interrupt-parent : the phandle for the interrupt controller that
+          services interrupts for this device.
+        - reg : The ID number for the phy, usually a small integer
+
+      Example Discovery PHY node:
+	ethernet-phy@1 {
+		device_type = "ethernet-phy";
+		compatible = "broadcom,bcm5421";
+		interrupts = <76>;      /* GPP 12 */
+		interrupt-parent = <&PIC>;
+		reg = <1>;
+	};
+
+
+
+      4.  Marvell Discovery SDMA nodes
+      Represent DMA hardware associated with the MPSC (multiprotocol
+      serial controllers).
+
+      Required properties:
+        - compatible : "mrvl,mv64360-sdma"
+	- reg : Offset and length of the register set for this device
+	- interrupts : <a> where a is the interrupt number for the DMA
+	  device.
+	- interrupt-parent : the phandle for the interrupt controller
+	  that services interrupts for this device.
+
+      Example Discovery SDMA node:
+	sdma@4000 {
+		compatible = "mrvl,mv64360-sdma";
+		reg = <0x4000 0xc18>;
+		virtual-reg = <0xf1004000>;
+		interrupts = <36>;
+		interrupt-parent = <&PIC>;
+	};
+      
+
+      5.  Marvell Discovery BRG nodes
+      Represent baud rate generator hardware associated with the MPSC
+      (multiprotocol serial controllers).
+
+      Required properties:
+        - compatible : "mrvl,mv64360-brg"
+	- reg : Offset and length of the register set for this device
+	- clock-src : A value from 0 to 15 which selects the clock
+	  source for the baud rate generator.  This value corresponds
+	  to the CLKS value in the BRGx configuration register.  See
+	  the mv64x60 User's Manual.
+	- clock-frequence : The frequency (in Hz) of the baud rate
+	  generator's input clock.
+	- current-speed : The current speed setting (presumably by
+	  firmware) of the baud rate generator.
+
+      Example Discovery BRG node:
+        brg@b200 {
+		compatible = "mrvl,mv64360-brg";
+		reg = <0xb200 0x8>;
+		clock-src = <8>;
+		clock-frequency = <133333333>;
+		current-speed = <9600>;
+	};
+
+      
+      6.  Marvell Discovery CUNIT nodes
+      Represent the Serial Communications Unit device hardware.
+
+      Required properties:
+	- reg : Offset and length of the register set for this device
+
+      Example Discovery CUNIT node:
+        cunit@f200 {
+		reg = <0xf200 0x200>;
+	};
+
+
+      7.  Marvell Discovery MPSCROUTING nodes
+      Represent the Discovery's MPSC routing hardware
+
+      Required properties:
+	- reg : Offset and length of the register set for this device
+
+      Example Discovery CUNIT node:
+        mpscrouting@b500 {
+		reg = <0xb400 0xc>;
+	};
+
+
+      8.  Marvell Discovery MPSCINTR nodes
+      Represent the Discovery's MPSC DMA interrupt hardware registers
+      (SDMA cause and mask registers).
+
+      Required properties:
+	- reg : Offset and length of the register set for this device
+
+      Example Discovery MPSCINTR node:
+        mpsintr@b800 {
+		reg = <0xb800 0x100>;
+	};
+
+
+      9.  Marvell Discovery MPSC nodes
+      Represent the Discovery's MPSC (Multiprotocol Serial Controller)
+      serial port.
+
+      Required properties:
+        - device_type : "serial"
+	- compatible : "mrvl,mv64360-mpsc"
+	- reg : Offset and length of the register set for this device
+	- sdma : the phandle for the SDMA node used by this port
+	- brg : the phandle for the BRG node used by this port
+	- cunit : the phandle for the CUNIT node used by this port
+	- mpscrouting : the phandle for the MPSCROUTING node used by this port
+	- mpscintr : the phandle for the MPSCINTR node used by this port
+	- cell-index : the hardware index of this cell in the MPSC core
+	- max_idle : value needed for MPSC CHR3 (Maximum Frame Length)
+	  register
+	- interrupts : <a> where a is the interrupt number for the MPSC.
+	- interrupt-parent : the phandle for the interrupt controller
+	  that services interrupts for this device.
+	
+      Example Discovery MPSCINTR node:
+        mpsc@8000 {
+		device_type = "serial";
+		compatible = "mrvl,mv64360-mpsc";
+		reg = <0x8000 0x38>;
+		virtual-reg = <0xf1008000>;
+		sdma = <&SDMA0>;
+		brg = <&BRG0>;
+		cunit = <&CUNIT>;
+		mpscrouting = <&MPSCROUTING>;
+		mpscintr = <&MPSCINTR>;
+		cell-index = <0>;
+		max_idle = <40>;
+		interrupts = <40>;
+		interrupt-parent = <&PIC>;
+	};
+
+
+      10.  Marvell Discovery Watch Dog Timer nodes
+      Represent the Discovery's watchdog timer hardware
+
+      Required properties:
+        - compatible : "mrvl,mv64360-wdt"
+	- reg : Offset and length of the register set for this device
+
+      Example Discovery Watch Dog Timer node:
+        wdt@b410 {
+		compatible = "mrvl,mv64360-wdt";
+		reg = <0xb410 0x8>;
+	};
+
+
+      11.  Marvell Discovery I2C nodes
+      Represent the Discovery's I2C hardware
+
+      Required properties:
+        - device_type : "i2c"
+        - compatible : "mrvl,mv64360-i2c"
+	- reg : Offset and length of the register set for this device
+	- interrupts : <a> where a is the interrupt number for the I2C.
+	- interrupt-parent : the phandle for the interrupt controller
+	  that services interrupts for this device.
+
+      Example Discovery I2C node:
+		compatible = "mrvl,mv64360-i2c";
+		reg = <0xc000 0x20>;
+		virtual-reg = <0xf100c000>;
+		interrupts = <37>;
+		interrupt-parent = <&PIC>;
+	};
+
+
+      12.  Marvell Discovery PIC (Programmable Interrupt Controller) nodes
+      Represent the Discovery's PIC hardware
+
+      Required properties:
+        - #interrupt-cells : <1>
+	- #address-cells : <0>
+	- compatible : "mrvl,mv64360-pic"
+	- reg : Offset and length of the register set for this device
+	- interrupt-controller
+
+      Example Discovery PIC node:
+        pic {
+		#interrupt-cells = <1>;
+		#address-cells = <0>;
+		compatible = "mrvl,mv64360-pic";
+		reg = <0x0 0x88>;
+		interrupt-controller;
+	};
+
+
+      13.  Marvell Discovery MPP (Multipurpose Pins) multiplexing nodes
+      Represent the Discovery's MPP hardware
+
+      Required properties:
+        - compatible : "mrvl,mv64360-mpp"
+	- reg : Offset and length of the register set for this device
+
+      Example Discovery MPP node:
+	mpp@f000 {
+		compatible = "mrvl,mv64360-mpp";
+		reg = <0xf000 0x10>;
+	};
+
+
+      14.  Marvell Discovery GPP (General Purpose Pins) nodes
+      Represent the Discovery's GPP hardware
+
+      Required properties:
+        - compatible : "mrvl,mv64360-gpp"
+	- reg : Offset and length of the register set for this device
+
+      Example Discovery GPP node:
+	gpp@f000 {
+		compatible = "mrvl,mv64360-gpp";
+		reg = <0xf100 0x20>;
+	};
+
+
+      15.  Marvell Discovery PCI host bridge node
+      Represents the Discovery's PCI host bridge device.  The properties
+      for this node conform to Rev 2.1 of the PCI Bus Binding to IEEE
+      1275-1994.  A typical value for the compatible property is
+      "mrvl,mv64360-pci".
+
+      Example Discovery PCI host bridge node
+	pci@80000000 {       
+		#address-cells = <3>;
+		#size-cells = <2>;
+		#interrupt-cells = <1>;
+		device_type = "pci";
+		compatible = "mrvl,mv64360-pci";
+		reg = <0xcf8 0x8>;
+		ranges = <0x01000000 0x0        0x0
+				0x88000000 0x0 0x01000000
+			  0x02000000 0x0 0x80000000
+				0x80000000 0x0 0x08000000>;
+		bus-range = <0 255>;
+		clock-frequency = <66000000>;
+		interrupt-parent = <&PIC>;
+		interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
+		interrupt-map = <
+			/* IDSEL 0x0a */
+			0x5000 0 0 1 &PIC 80
+			0x5000 0 0 2 &PIC 81
+			0x5000 0 0 3 &PIC 91
+			0x5000 0 0 4 &PIC 93
+
+			/* IDSEL 0x0b */
+			0x5800 0 0 1 &PIC 91
+			0x5800 0 0 2 &PIC 93
+			0x5800 0 0 3 &PIC 80
+			0x5800 0 0 4 &PIC 81
+
+			/* IDSEL 0x0c */
+			0x6000 0 0 1 &PIC 91
+			0x6000 0 0 2 &PIC 93
+			0x6000 0 0 3 &PIC 80
+			0x6000 0 0 4 &PIC 81
+
+			/* IDSEL 0x0d */
+			0x6800 0 0 1 &PIC 93
+			0x6800 0 0 2 &PIC 80
+			0x6800 0 0 3 &PIC 81
+			0x6800 0 0 4 &PIC 91
+		>;
+	};
+
+
+      16.  Marvell Discovery CPU Error nodes
+      Represent the Discovery's CPU error handler device.
+
+      Required properties:
+        - compatible : "mrvl,mv64360-cpu-error"
+	- reg : Offset and length of the register set for this device
+	- interrupts : the interrupt number for this device
+	- interrupt-parent : the phandle for the interrupt controller
+	  that services interrupts for this device.
+
+      Example Discovery CPU Error node:
+	cpu-error@0070 {
+		compatible = "mrvl,mv64360-cpu-error";
+		reg = <0x70 0x10 0x128 0x28>;
+		interrupts = <3>;
+		interrupt-parent = <&PIC>;
+	};
+
+
+      17.  Marvell Discovery SRAM Controller nodes
+      Represent the Discovery's SRAM controller device.
+
+      Required properties:
+        - compatible : "mrvl,mv64360-sram-ctrl"
+	- reg : Offset and length of the register set for this device
+	- interrupts : the interrupt number for this device
+	- interrupt-parent : the phandle for the interrupt controller
+	  that services interrupts for this device.
+
+      Example Discovery SRAM Controller node:
+	sram-ctrl@0380 {
+		compatible = "mrvl,mv64360-sram-ctrl";
+		reg = <0x380 0x80>;
+		interrupts = <13>;
+		interrupt-parent = <&PIC>;
+	};
+
+
+      18.  Marvell Discovery PCI Error Handler nodes
+      Represent the Discovery's PCI error handler device.
+
+      Required properties:
+        - compatible : "mrvl,mv64360-pci-error"
+	- reg : Offset and length of the register set for this device
+	- interrupts : the interrupt number for this device
+	- interrupt-parent : the phandle for the interrupt controller
+	  that services interrupts for this device.
+
+      Example Discovery PCI Error Handler node:
+	pci-error@1d40 {
+		compatible = "mrvl,mv64360-pci-error";
+		reg = <0x1d40 0x40 0xc28 0x4>;
+		interrupts = <12>;
+		interrupt-parent = <&PIC>;
+	};
+
+
+      19.  Marvell Discovery Memory Controller nodes
+      Represent the Discovery's memory controller device.
+
+      Required properties:
+        - compatible : "mrvl,mv64360-mem-ctrl"
+	- reg : Offset and length of the register set for this device
+	- interrupts : the interrupt number for this device
+	- interrupt-parent : the phandle for the interrupt controller
+	  that services interrupts for this device.
+
+      Example Discovery Memory Controller node:
+	mem-ctrl@1400 {
+		compatible = "mrvl,mv64360-mem-ctrl";
+		reg = <0x1400 0x60>;
+		interrupts = <17>;
+		interrupt-parent = <&PIC>;
+	};
+
+
    More devices will be defined as this spec matures.
 
 VII - Specifying interrupt information for devices

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 9/9] [POWERPC] prpmc2800 needs a dtbImage
  2008-03-28 23:39 [PATCH 0/9] powerpc: mv64x60 and prpmc2800 DTS cleanups Dale Farnsworth
                   ` (7 preceding siblings ...)
  2008-03-28 23:51 ` [PATCH 8/9] [POWERPC] Document the mv64x60 device tree bindings Dale Farnsworth
@ 2008-03-28 23:52 ` Dale Farnsworth
  2008-03-28 23:56   ` Grant Likely
  8 siblings, 1 reply; 25+ messages in thread
From: Dale Farnsworth @ 2008-03-28 23:52 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

From: Dale Farnsworth <dale@farnsworth.org>

The prpmc2800 platform requires a zImage formatted file with an
embedded dtb file.  Rename the requested boot image file to
dtbImage.prpmc2800.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Acked-by: Mark A. Greer <mgreer@mvista.com>

--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -192,7 +192,7 @@ image-$(CONFIG_PPC_CHRP)		+= zImage.chrp
 image-$(CONFIG_PPC_EFIKA)		+= zImage.chrp
 image-$(CONFIG_PPC_PMAC)		+= zImage.pmac
 image-$(CONFIG_PPC_HOLLY)		+= zImage.holly
-image-$(CONFIG_PPC_PRPMC2800)		+= zImage.prpmc2800
+image-$(CONFIG_PPC_PRPMC2800)		+= dtbImage.prpmc2800
 image-$(CONFIG_PPC_ISERIES)		+= zImage.iseries
 image-$(CONFIG_DEFAULT_UIMAGE)		+= uImage
 

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 9/9] [POWERPC] prpmc2800 needs a dtbImage
  2008-03-28 23:52 ` [PATCH 9/9] [POWERPC] prpmc2800 needs a dtbImage Dale Farnsworth
@ 2008-03-28 23:56   ` Grant Likely
  0 siblings, 0 replies; 25+ messages in thread
From: Grant Likely @ 2008-03-28 23:56 UTC (permalink / raw)
  To: Dale Farnsworth; +Cc: linuxppc-dev, paulus

On Fri, Mar 28, 2008 at 5:52 PM, Dale Farnsworth <dale@farnsworth.org> wrote:
> From: Dale Farnsworth <dale@farnsworth.org>
>
>  The prpmc2800 platform requires a zImage formatted file with an
>  embedded dtb file.  Rename the requested boot image file to
>  dtbImage.prpmc2800.
>
>  Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
>  Acked-by: Mark A. Greer <mgreer@mvista.com>

Acked-by: Grant Likely <grant.likely@secretlab.ca>

>
>  --- a/arch/powerpc/boot/Makefile
>  +++ b/arch/powerpc/boot/Makefile
>  @@ -192,7 +192,7 @@ image-$(CONFIG_PPC_CHRP)            += zImage.chrp
>   image-$(CONFIG_PPC_EFIKA)              += zImage.chrp
>   image-$(CONFIG_PPC_PMAC)               += zImage.pmac
>   image-$(CONFIG_PPC_HOLLY)              += zImage.holly
>  -image-$(CONFIG_PPC_PRPMC2800)          += zImage.prpmc2800
>  +image-$(CONFIG_PPC_PRPMC2800)          += dtbImage.prpmc2800
>   image-$(CONFIG_PPC_ISERIES)            += zImage.iseries
>   image-$(CONFIG_DEFAULT_UIMAGE)         += uImage
>
>  _______________________________________________
>  Linuxppc-dev mailing list
>  Linuxppc-dev@ozlabs.org
>  https://ozlabs.org/mailman/listinfo/linuxppc-dev
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 1/9] [POWERPC] mv64x60: change FDT compatible prefix to mrvl
  2008-03-28 23:47   ` Grant Likely
@ 2008-03-29  0:00     ` Dale Farnsworth
  2008-03-29  0:12       ` Grant Likely
  2008-03-30 23:44     ` David Gibson
  1 sibling, 1 reply; 25+ messages in thread
From: Dale Farnsworth @ 2008-03-29  0:00 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, paulus

On Fri, Mar 28, 2008 at 05:47:25PM -0600, Grant Likely wrote:
> On Fri, Mar 28, 2008 at 5:42 PM, Dale Farnsworth <dale@farnsworth.org> wrote:
> > From: Dale Farnsworth <dale@farnsworth.org>
> >
> >  Follow the convention that compatible names are prefixed by the
> >  vendor's stock ticker symbol.  For Marvell Technology Group Ltd.,
> >  that's MRVL.
> >
> >  Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
> >  Acked-by: Mark A. Greer <mgreer@mvista.com>
> 
> Are there any boards "in the wild" using the old string?  If so are
> does changing this string risk complicating upgrades to a new kernel
> version?

I don't think this complicates things much, since all these boards boot
a dtbImage, with an embedded dtb file built from the kernel source.
So the dts and code don't have much opportunity to get out of sync.

-Dale

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 1/9] [POWERPC] mv64x60: change FDT compatible prefix to mrvl
  2008-03-29  0:00     ` Dale Farnsworth
@ 2008-03-29  0:12       ` Grant Likely
  0 siblings, 0 replies; 25+ messages in thread
From: Grant Likely @ 2008-03-29  0:12 UTC (permalink / raw)
  To: Dale Farnsworth; +Cc: linuxppc-dev, paulus

On Fri, Mar 28, 2008 at 6:00 PM, Dale Farnsworth <dale@farnsworth.org> wrote:
> On Fri, Mar 28, 2008 at 05:47:25PM -0600, Grant Likely wrote:
>  > On Fri, Mar 28, 2008 at 5:42 PM, Dale Farnsworth <dale@farnsworth.org> wrote:
>  > > From: Dale Farnsworth <dale@farnsworth.org>
>  > >
>  > >  Follow the convention that compatible names are prefixed by the
>  > >  vendor's stock ticker symbol.  For Marvell Technology Group Ltd.,
>  > >  that's MRVL.
>  > >
>  > >  Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
>  > >  Acked-by: Mark A. Greer <mgreer@mvista.com>
>  >
>  > Are there any boards "in the wild" using the old string?  If so are
>  > does changing this string risk complicating upgrades to a new kernel
>  > version?
>
>  I don't think this complicates things much, since all these boards boot
>  a dtbImage, with an embedded dtb file built from the kernel source.
>  So the dts and code don't have much opportunity to get out of sync.

Cool; then looks good to me!  :-)

Acked-by: Grant Likely <grant.likely@secretlab.ca>


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/9] [POWERPC] mv64x60: Fix FDT compatible names: mv64x60 => mv64360
  2008-03-28 23:47 ` [PATCH 4/9] [POWERPC] mv64x60: Fix FDT compatible names: mv64x60 => mv64360 Dale Farnsworth
@ 2008-03-29 21:57   ` Olof Johansson
  2008-03-30 19:20     ` Segher Boessenkool
  2008-03-31 16:33     ` Dale Farnsworth
  0 siblings, 2 replies; 25+ messages in thread
From: Olof Johansson @ 2008-03-29 21:57 UTC (permalink / raw)
  To: Dale Farnsworth; +Cc: linuxppc-dev, paulus

On Fri, Mar 28, 2008 at 04:47:04PM -0700, Dale Farnsworth wrote:
> From: Mark A. Greer <mgreer@mvista.com>
> 
> Compatible names should refer to a specific version of the hardware,
> without wildcards.  Change each instance of mv64x60 to mv64360, which
> is the oldest version we currently support.

Actually, it's normal to have more than one compatible field, from
specific to generic. So it should make sense to have both (with the
64360 entry first).


-Olof

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 6/9] [POWERPC] prpmc2800: clean up dts properties
  2008-03-28 23:49 ` [PATCH 6/9] [POWERPC] prpmc2800: clean up dts properties Dale Farnsworth
@ 2008-03-29 21:59   ` Olof Johansson
  2008-03-30 10:11     ` David Gibson
  0 siblings, 1 reply; 25+ messages in thread
From: Olof Johansson @ 2008-03-29 21:59 UTC (permalink / raw)
  To: Dale Farnsworth; +Cc: linuxppc-dev, paulus

On Fri, Mar 28, 2008 at 04:49:00PM -0700, Dale Farnsworth wrote:
> From: Mark A. Greer <mgreer@mvista.com>
> 
> Remove several unused (or software config only) properties.
> Rename marvel node to "soc".  Technically, it's not an SOC,
> but its organization is the same as an SOC.  Also, rename the
> "block-index" property to "cell-index" to conform to current
> practice.

I see this rename as purely misleading. It isn't an soc, so it shouldn't
be named as such. Call it system-controller or something. Pretty much
any other name is better. :-)


-Olof

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 6/9] [POWERPC] prpmc2800: clean up dts properties
  2008-03-29 21:59   ` Olof Johansson
@ 2008-03-30 10:11     ` David Gibson
  2008-03-31 16:43       ` Dale Farnsworth
  0 siblings, 1 reply; 25+ messages in thread
From: David Gibson @ 2008-03-30 10:11 UTC (permalink / raw)
  To: Olof Johansson; +Cc: paulus, linuxppc-dev

On Sat, Mar 29, 2008 at 04:59:42PM -0500, Olof Johansson wrote:
> On Fri, Mar 28, 2008 at 04:49:00PM -0700, Dale Farnsworth wrote:
> > From: Mark A. Greer <mgreer@mvista.com>
> > 
> > Remove several unused (or software config only) properties.
> > Rename marvel node to "soc".  Technically, it's not an SOC,
> > but its organization is the same as an SOC.  Also, rename the
> > "block-index" property to "cell-index" to conform to current
> > practice.
> 
> I see this rename as purely misleading. It isn't an soc, so it shouldn't
> be named as such. Call it system-controller or something. Pretty much
> any other name is better. :-)

I agree.  system-controller, host-bridge, north-bridge, maybe, but not
soc.  With current conventions, the node name is primarily for the
benefit of human readers, so if it misleads it has failed entirely in
its purpose.

-- 
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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/9] [POWERPC] mv64x60: Fix FDT compatible names: mv64x60 => mv64360
  2008-03-29 21:57   ` Olof Johansson
@ 2008-03-30 19:20     ` Segher Boessenkool
  2008-03-31 16:33     ` Dale Farnsworth
  1 sibling, 0 replies; 25+ messages in thread
From: Segher Boessenkool @ 2008-03-30 19:20 UTC (permalink / raw)
  To: Olof Johansson; +Cc: paulus, linuxppc-dev

>> Compatible names should refer to a specific version of the hardware,
>> without wildcards.  Change each instance of mv64x60 to mv64360, which
>> is the oldest version we currently support.
>
> Actually, it's normal to have more than one compatible field, from
> specific to generic. So it should make sense to have both (with the
> 64360 entry first).

The normal use is to have the exact device first, and older devices
that the device is compatible to after that.

There is no such thing as a "generic" device, in general.  It's a
mistake to define generic "compatible" values [*], that's like
trying to predict the future -- how can you guarantee that all
future devices in a device family will be compatible?


Segher


[*] In certain cases, like usb-ohci, there _is_ a defined interface
for all future devices.  Also, "legacy" devices have a de facto such
interface.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 1/9] [POWERPC] mv64x60: change FDT compatible prefix to mrvl
  2008-03-28 23:47   ` Grant Likely
  2008-03-29  0:00     ` Dale Farnsworth
@ 2008-03-30 23:44     ` David Gibson
  2008-03-31 16:56       ` Dale Farnsworth
  1 sibling, 1 reply; 25+ messages in thread
From: David Gibson @ 2008-03-30 23:44 UTC (permalink / raw)
  To: Grant Likely; +Cc: paulus, linuxppc-dev

On Fri, Mar 28, 2008 at 05:47:25PM -0600, Grant Likely wrote:
> On Fri, Mar 28, 2008 at 5:42 PM, Dale Farnsworth <dale@farnsworth.org> wrote:
> > From: Dale Farnsworth <dale@farnsworth.org>
> >
> >  Follow the convention that compatible names are prefixed by the
> >  vendor's stock ticker symbol.  For Marvell Technology Group Ltd.,
> >  that's MRVL.
> >
> >  Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
> >  Acked-by: Mark A. Greer <mgreer@mvista.com>
> 
> Are there any boards "in the wild" using the old string?  If so are
> does changing this string risk complicating upgrades to a new kernel
> version?

In particular are there any pre-flattened-tree real-OF systems in the
wild using "marvell" as the vendor prefix (there might be Apple or IBM
systems out there with Marvell PHYs for example).

Existing practice trumps "use stock ticker" for the standard vendor
prefix.

-- 
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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/9] [POWERPC] mv64x60: Fix FDT compatible names: mv64x60 => mv64360
  2008-03-29 21:57   ` Olof Johansson
  2008-03-30 19:20     ` Segher Boessenkool
@ 2008-03-31 16:33     ` Dale Farnsworth
  1 sibling, 0 replies; 25+ messages in thread
From: Dale Farnsworth @ 2008-03-31 16:33 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev, paulus

On Sat, Mar 29, 2008 at 04:57:53PM -0500, Olof Johansson wrote:
> On Fri, Mar 28, 2008 at 04:47:04PM -0700, Dale Farnsworth wrote:
> > From: Mark A. Greer <mgreer@mvista.com>
> > 
> > Compatible names should refer to a specific version of the hardware,
> > without wildcards.  Change each instance of mv64x60 to mv64360, which
> > is the oldest version we currently support.
> 
> Actually, it's normal to have more than one compatible field, from
> specific to generic. So it should make sense to have both (with the
> 64360 entry first).

Sure it's normal to have multiple entries.  But it's not correct to
have names that refer to a range of models, such as mv64x60.  We're
replacing it with a name referring to the oldest specific model, mv64360.
We can add additional entries later if the need arises.

-Dale

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 6/9] [POWERPC] prpmc2800: clean up dts properties
  2008-03-30 10:11     ` David Gibson
@ 2008-03-31 16:43       ` Dale Farnsworth
  2008-04-01  1:17         ` Segher Boessenkool
  2008-04-01  2:22         ` David Gibson
  0 siblings, 2 replies; 25+ messages in thread
From: Dale Farnsworth @ 2008-03-31 16:43 UTC (permalink / raw)
  To: Olof Johansson, linuxppc-dev, paulus

On Sun, Mar 30, 2008 at 09:11:28PM +1100, David Gibson wrote:
> On Sat, Mar 29, 2008 at 04:59:42PM -0500, Olof Johansson wrote:
> > On Fri, Mar 28, 2008 at 04:49:00PM -0700, Dale Farnsworth wrote:
> > > From: Mark A. Greer <mgreer@mvista.com>
> > > 
> > > Remove several unused (or software config only) properties.
> > > Rename marvel node to "soc".  Technically, it's not an SOC,
> > > but its organization is the same as an SOC.  Also, rename the
> > > "block-index" property to "cell-index" to conform to current
> > > practice.
> > 
> > I see this rename as purely misleading. It isn't an soc, so it shouldn't
> > be named as such. Call it system-controller or something. Pretty much
> > any other name is better. :-)
> 
> I agree.  system-controller, host-bridge, north-bridge, maybe, but not
> soc.  With current conventions, the node name is primarily for the
> benefit of human readers, so if it misleads it has failed entirely in
> its purpose.

I'm convinced.  I'll change it to system-controller.

However, I can't resist pointing out that in the existing devtrees
with a "soc" node, the name is also misleading.  That node doesn't
refer to the SOC itself, but to the part of the SOC containing the
peripherals.  Whether the system is implemented on one or two chips
is an implementation detail irrelevant to the drivers or device tree.

-Dale

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 1/9] [POWERPC] mv64x60: change FDT compatible prefix to mrvl
  2008-03-30 23:44     ` David Gibson
@ 2008-03-31 16:56       ` Dale Farnsworth
  2008-04-01  1:53         ` David Gibson
  0 siblings, 1 reply; 25+ messages in thread
From: Dale Farnsworth @ 2008-03-31 16:56 UTC (permalink / raw)
  To: Grant Likely, linuxppc-dev, paulus

On Mon, Mar 31, 2008 at 10:44:20AM +1100, David Gibson wrote:
> On Fri, Mar 28, 2008 at 05:47:25PM -0600, Grant Likely wrote:
> > On Fri, Mar 28, 2008 at 5:42 PM, Dale Farnsworth <dale@farnsworth.org> wrote:
> > > From: Dale Farnsworth <dale@farnsworth.org>
> > >
> > >  Follow the convention that compatible names are prefixed by the
> > >  vendor's stock ticker symbol.  For Marvell Technology Group Ltd.,
> > >  that's MRVL.
> > >
> > >  Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
> > >  Acked-by: Mark A. Greer <mgreer@mvista.com>
> > 
> > Are there any boards "in the wild" using the old string?  If so are
> > does changing this string risk complicating upgrades to a new kernel
> > version?
> 
> In particular are there any pre-flattened-tree real-OF systems in the
> wild using "marvell" as the vendor prefix (there might be Apple or IBM
> systems out there with Marvell PHYs for example).

It's difficult to prove a negative.  However, I've seen no evidence of
such systems.  When Mark invented the "marvell," prefix, it wasn't based
on existing practice.

However, I believe that the Genesi Pegasos board uses OF and has a
Marvell bridge chip.  They may have copied the "marvell," prefix.

Matt, can you check whether any of the Genesi boards contain device node
descriptions for the Marvel 64[34]60, and let us know what prefix is used
in their compatible properties?

Thanks,
-Dale

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 6/9] [POWERPC] prpmc2800: clean up dts properties
  2008-03-31 16:43       ` Dale Farnsworth
@ 2008-04-01  1:17         ` Segher Boessenkool
  2008-04-01  2:22         ` David Gibson
  1 sibling, 0 replies; 25+ messages in thread
From: Segher Boessenkool @ 2008-04-01  1:17 UTC (permalink / raw)
  To: Dale Farnsworth; +Cc: Olof Johansson, linuxppc-dev, paulus

> However, I can't resist pointing out that in the existing devtrees
> with a "soc" node, the name is also misleading.  That node doesn't
> refer to the SOC itself, but to the part of the SOC containing the
> peripherals.  Whether the system is implemented on one or two chips
> is an implementation detail irrelevant to the drivers or device tree.

It's not ideal to call it "the-perhaps-virtual-bus-on-the-soc-that-
contains-all-of-the-register-blocks-for-all-the-devices-on-the-soc-
except-some" either.  A better name is welcome of course.

Maybe it's best to name this node with the name _of_ the SoC (or host
bridge, or what ever you want to call it), if that name is not too
unwieldy.

In general, "name" should be as generic as is useful, but not more
generic than that, because it wouldn't be useful anymore.

In any case, it's just "name", it should normally only be looked at
by humans.  Use whatever you like best here, and don't use it in the
kernel code.


Segher

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 1/9] [POWERPC] mv64x60: change FDT compatible prefix to mrvl
  2008-03-31 16:56       ` Dale Farnsworth
@ 2008-04-01  1:53         ` David Gibson
  0 siblings, 0 replies; 25+ messages in thread
From: David Gibson @ 2008-04-01  1:53 UTC (permalink / raw)
  To: Dale Farnsworth; +Cc: linuxppc-dev, paulus

On Mon, Mar 31, 2008 at 09:56:05AM -0700, Dale Farnsworth wrote:
> On Mon, Mar 31, 2008 at 10:44:20AM +1100, David Gibson wrote:
> > On Fri, Mar 28, 2008 at 05:47:25PM -0600, Grant Likely wrote:
> > > On Fri, Mar 28, 2008 at 5:42 PM, Dale Farnsworth <dale@farnsworth.org> wrote:
> > > > From: Dale Farnsworth <dale@farnsworth.org>
> > > >
> > > >  Follow the convention that compatible names are prefixed by the
> > > >  vendor's stock ticker symbol.  For Marvell Technology Group Ltd.,
> > > >  that's MRVL.
> > > >
> > > >  Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
> > > >  Acked-by: Mark A. Greer <mgreer@mvista.com>
> > > 
> > > Are there any boards "in the wild" using the old string?  If so are
> > > does changing this string risk complicating upgrades to a new kernel
> > > version?
> > 
> > In particular are there any pre-flattened-tree real-OF systems in the
> > wild using "marvell" as the vendor prefix (there might be Apple or IBM
> > systems out there with Marvell PHYs for example).
> 
> It's difficult to prove a negative.  However, I've seen no evidence of
> such systems.  When Mark invented the "marvell," prefix, it wasn't based
> on existing practice.
> 
> However, I believe that the Genesi Pegasos board uses OF and has a
> Marvell bridge chip.  They may have copied the "marvell," prefix.
> 
> Matt, can you check whether any of the Genesi boards contain device node
> descriptions for the Marvel 64[34]60, and let us know what prefix is used
> in their compatible properties?

Ok, fair enough.  As long as you've been duly diligent about checking
for existing practice I'm happy.

-- 
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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 6/9] [POWERPC] prpmc2800: clean up dts properties
  2008-03-31 16:43       ` Dale Farnsworth
  2008-04-01  1:17         ` Segher Boessenkool
@ 2008-04-01  2:22         ` David Gibson
  1 sibling, 0 replies; 25+ messages in thread
From: David Gibson @ 2008-04-01  2:22 UTC (permalink / raw)
  To: Dale Farnsworth; +Cc: Olof Johansson, linuxppc-dev, paulus

On Mon, Mar 31, 2008 at 09:43:02AM -0700, Dale Farnsworth wrote:
> On Sun, Mar 30, 2008 at 09:11:28PM +1100, David Gibson wrote:
> > On Sat, Mar 29, 2008 at 04:59:42PM -0500, Olof Johansson wrote:
> > > On Fri, Mar 28, 2008 at 04:49:00PM -0700, Dale Farnsworth wrote:
> > > > From: Mark A. Greer <mgreer@mvista.com>
> > > > 
> > > > Remove several unused (or software config only) properties.
> > > > Rename marvel node to "soc".  Technically, it's not an SOC,
> > > > but its organization is the same as an SOC.  Also, rename the
> > > > "block-index" property to "cell-index" to conform to current
> > > > practice.
> > > 
> > > I see this rename as purely misleading. It isn't an soc, so it shouldn't
> > > be named as such. Call it system-controller or something. Pretty much
> > > any other name is better. :-)
> > 
> > I agree.  system-controller, host-bridge, north-bridge, maybe, but not
> > soc.  With current conventions, the node name is primarily for the
> > benefit of human readers, so if it misleads it has failed entirely in
> > its purpose.
> 
> I'm convinced.  I'll change it to system-controller.
> 
> However, I can't resist pointing out that in the existing devtrees
> with a "soc" node, the name is also misleading.  That node doesn't
> refer to the SOC itself, but to the part of the SOC containing the
> peripherals.  Whether the system is implemented on one or two chips
> is an implementation detail irrelevant to the drivers or device
> tree.

Well, quite so.  It's not even all of the peripherals on the SOC, just
the ones on Freescale SoCs that are relocatable by the IMMR register.
Which is why 4xx SoCs don't use /soc and instead have separate nodes
for the on-chip busses.

However, /soc is established now, but let's not accrete it with any
more badly named examples.

-- 
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

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2008-04-01  2:22 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-28 23:39 [PATCH 0/9] powerpc: mv64x60 and prpmc2800 DTS cleanups Dale Farnsworth
2008-03-28 23:42 ` [PATCH 1/9] [POWERPC] mv64x60: change FDT compatible prefix to mrvl Dale Farnsworth
2008-03-28 23:47   ` Grant Likely
2008-03-29  0:00     ` Dale Farnsworth
2008-03-29  0:12       ` Grant Likely
2008-03-30 23:44     ` David Gibson
2008-03-31 16:56       ` Dale Farnsworth
2008-04-01  1:53         ` David Gibson
2008-03-28 23:44 ` [PATCH 2/9] [POWERPC] prpmc2800: convert DTS to v1 and add labels Dale Farnsworth
2008-03-28 23:45 ` [PATCH 3/9] [POWERPC] prpmc2800: fix frequencies in prpmc2800.dts Dale Farnsworth
2008-03-28 23:47 ` [PATCH 4/9] [POWERPC] mv64x60: Fix FDT compatible names: mv64x60 => mv64360 Dale Farnsworth
2008-03-29 21:57   ` Olof Johansson
2008-03-30 19:20     ` Segher Boessenkool
2008-03-31 16:33     ` Dale Farnsworth
2008-03-28 23:48 ` [PATCH 5/9] [POWERPC] mv64x60: remove device tree absolute path references Dale Farnsworth
2008-03-28 23:49 ` [PATCH 6/9] [POWERPC] prpmc2800: clean up dts properties Dale Farnsworth
2008-03-29 21:59   ` Olof Johansson
2008-03-30 10:11     ` David Gibson
2008-03-31 16:43       ` Dale Farnsworth
2008-04-01  1:17         ` Segher Boessenkool
2008-04-01  2:22         ` David Gibson
2008-03-28 23:50 ` [PATCH 7/9] [POWERPC] mv643xx_eth: prepare to support multiple silicon blocks Dale Farnsworth
2008-03-28 23:51 ` [PATCH 8/9] [POWERPC] Document the mv64x60 device tree bindings Dale Farnsworth
2008-03-28 23:52 ` [PATCH 9/9] [POWERPC] prpmc2800 needs a dtbImage Dale Farnsworth
2008-03-28 23:56   ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).