LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: Network Bad Kernel Access
From: Grant Likely @ 2008-03-28 23:24 UTC (permalink / raw)
  To: Glenn.G.Hart, Stephen Neuendorffer, John Linn; +Cc: linuxppc-embedded
In-Reply-To: <OF268312ED.06BF1E68-ON85257344.0004544A-85257344.00059541@ct.wec.com>

On Sun, Aug 26, 2007 at 7:00 PM,  <Glenn.G.Hart@us.westinghouse.com> wrote:
> I am having a problem with my network.  I am using a V4FX12 running linux
>  2.6.21 with the TEMAC.  I am running the PPC at 300 MHz and the TEMAC is
>  configured for DMA and DRE on the Xmit and the Recv.  I have tried varying
>  the FIFO depth and enabling/disabling the checksum offloading.  All produce
>  the error below when under heavy network traffic (specifically sending data
>  from the PPC).  Has anybody seen this?  It seems like I am overflowing some
>  memory, but I am not sure what/where to increase it.

I'm seeing the same behavior on my platform except that I get it
almost immediately after bringing up the Ethernet interface.  I've
only just started to debug this.  The bug showed up when DMA+DRE+CSUM
were enabled on the core.

Stephen, John; does any of this look familiar?

Cheers,
g.

>
>  Thanks,
>  Glenn
>
>
>
>  [  484.696738] Oops: kernel access of bad area, sig: 11 [#1]
>  [  484.761286] NIP: c00e1ef4 LR: c00cfec0 CTR: c00cfe34
>  [  484.820650] REGS: c0483b10 TRAP: 0300   Not tainted  (2.6.21)
>  [  484.889378] MSR: 00029030 <EE,ME,IR,DR>  CR: 93005999  XER: e0000000
>  [  484.965410] DAR: bb857caf, DSISR: 00000000
>  [  485.014365] TASK = c0648b60[129] 'rcS' THREAD: c0482000
>  [  485.074765] GPR00: c04fdfb8 c0483bc0 c0648b60 bb857c2b c04fd9a0 c0483bcc
>  04000000 ff107ac0
>  [  485.174747] GPR08: 0000000f c04fdfb8 c04d2478 00010001 00648d10 1003c2e0
>  00000000 00000001
>  [  485.274732] GPR16: 00000003 c0483ed8 00004fd8 000005b4 000005b4 00000000
>  00000000 0001679c
>  [  485.374716] GPR24: 7ff8b398 3002afe0 0000000f c04d2000 c04d23b8 c06bbe60
>  00000003 c04d2320
>  [  485.476784] NIP [c00e1ef4] kfree_skb+0x8/0x3c
>  [  485.528858] LR [c00cfec0] SgSendHandlerBH+0x8c/0x1cc
>  [  485.588223] Call Trace:
>  [  485.617389] [c0483bc0] [c00cfec0] SgSendHandlerBH+0x8c/0x1cc
>  (unreliable)
>  [  485.698628] [c0483bf0] [c0019218] tasklet_action+0x90/0xd4
>  [  485.764241] [c0483c00] [c0018ebc] __do_softirq+0x64/0xd0
>  [  485.827772] [c0483c20] [c00064a8] do_softirq+0x40/0x58
>  [  485.889221] [c0483c30] [c0018f74] irq_exit+0x38/0x48
>  [  485.948586] [c0483c40] [c0006450] do_IRQ+0x88/0xa0
>  [  486.005868] [c0483c50] [c00032d8] ret_from_except+0x0/0x18
>  [  486.071483] [c0483d10] [c0483d00] 0xc0483d00
>  [  486.122516] [c0483d20] [c00e17d4] __alloc_skb+0x48/0x11c
>  [  486.186048] [c0483d40] [c0109218] tcp_sendmsg+0x1ac/0xc40
>  [  486.250621] [c0483db0] [c0126b58] inet_sendmsg+0x60/0x74
>  [  486.314152] [c0483dd0] [c00dcf34] sock_aio_write+0xe0/0xfc
>  [  486.379765] [c0483e30] [c0050910] do_sync_write+0xb8/0x10c
>  [  486.445381] [c0483ef0] [c0050a40] vfs_write+0xdc/0x10c
>  [  486.506829] [c0483f10] [c0050b48] sys_write+0x4c/0x8c
>  [  486.567236] [c0483f40] [c0002c90] ret_from_syscall+0x0/0x3c
>  [  486.633888] Instruction dump:
>  [  486.669300] 0f000000 7fe3fb78 7d6803a6 4e800021 80010014 7fe3fb78
>  7c0803a6 bbc10008
>  [  486.761992] 38210010 4bfffe78 2c030000 4d820020 <80030084> 39230084
>  2f800001 409e0008
>  [  486.858162] Kernel panic - not syncing: Aiee, killing interrupt handler!
>  [  486.938382] Rebooting in 180 seconds..
>
>
>  _______________________________________________
>  Linuxppc-embedded mailing list
>  Linuxppc-embedded@ozlabs.org
>  https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>



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

^ permalink raw reply

* RE: Network Bad Kernel Access
From: John Linn @ 2008-03-28 23:29 UTC (permalink / raw)
  To: Grant Likely, Glenn.G.Hart, Stephen Neuendorffer; +Cc: linuxppc-embedded
In-Reply-To: <fa686aa40803281624y7db3ca7cyc022bf78acf26f8@mail.gmail.com>

I'm not using DRE and CSUM yet. I have seen some weirdness similar to
that but hard to reproduce reliably to chase it.=20

I tend to see it with heavy traffic also, so maybe it's not related to
DRE & CSUM. I am running DMA.

-- John


-----Original Message-----
From: glikely@secretlab.ca [mailto:glikely@secretlab.ca] On Behalf Of
Grant Likely
Sent: Friday, March 28, 2008 5:25 PM
To: Glenn.G.Hart@us.westinghouse.com; Stephen Neuendorffer; John Linn
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Network Bad Kernel Access

On Sun, Aug 26, 2007 at 7:00 PM,  <Glenn.G.Hart@us.westinghouse.com>
wrote:
> I am having a problem with my network.  I am using a V4FX12 running
linux
>  2.6.21 with the TEMAC.  I am running the PPC at 300 MHz and the TEMAC
is
>  configured for DMA and DRE on the Xmit and the Recv.  I have tried
varying
>  the FIFO depth and enabling/disabling the checksum offloading.  All
produce
>  the error below when under heavy network traffic (specifically
sending data
>  from the PPC).  Has anybody seen this?  It seems like I am
overflowing some
>  memory, but I am not sure what/where to increase it.

I'm seeing the same behavior on my platform except that I get it
almost immediately after bringing up the Ethernet interface.  I've
only just started to debug this.  The bug showed up when DMA+DRE+CSUM
were enabled on the core.

Stephen, John; does any of this look familiar?

Cheers,
g.

>
>  Thanks,
>  Glenn
>
>
>
>  [  484.696738] Oops: kernel access of bad area, sig: 11 [#1]
>  [  484.761286] NIP: c00e1ef4 LR: c00cfec0 CTR: c00cfe34
>  [  484.820650] REGS: c0483b10 TRAP: 0300   Not tainted  (2.6.21)
>  [  484.889378] MSR: 00029030 <EE,ME,IR,DR>  CR: 93005999  XER:
e0000000
>  [  484.965410] DAR: bb857caf, DSISR: 00000000
>  [  485.014365] TASK =3D c0648b60[129] 'rcS' THREAD: c0482000
>  [  485.074765] GPR00: c04fdfb8 c0483bc0 c0648b60 bb857c2b c04fd9a0
c0483bcc
>  04000000 ff107ac0
>  [  485.174747] GPR08: 0000000f c04fdfb8 c04d2478 00010001 00648d10
1003c2e0
>  00000000 00000001
>  [  485.274732] GPR16: 00000003 c0483ed8 00004fd8 000005b4 000005b4
00000000
>  00000000 0001679c
>  [  485.374716] GPR24: 7ff8b398 3002afe0 0000000f c04d2000 c04d23b8
c06bbe60
>  00000003 c04d2320
>  [  485.476784] NIP [c00e1ef4] kfree_skb+0x8/0x3c
>  [  485.528858] LR [c00cfec0] SgSendHandlerBH+0x8c/0x1cc
>  [  485.588223] Call Trace:
>  [  485.617389] [c0483bc0] [c00cfec0] SgSendHandlerBH+0x8c/0x1cc
>  (unreliable)
>  [  485.698628] [c0483bf0] [c0019218] tasklet_action+0x90/0xd4
>  [  485.764241] [c0483c00] [c0018ebc] __do_softirq+0x64/0xd0
>  [  485.827772] [c0483c20] [c00064a8] do_softirq+0x40/0x58
>  [  485.889221] [c0483c30] [c0018f74] irq_exit+0x38/0x48
>  [  485.948586] [c0483c40] [c0006450] do_IRQ+0x88/0xa0
>  [  486.005868] [c0483c50] [c00032d8] ret_from_except+0x0/0x18
>  [  486.071483] [c0483d10] [c0483d00] 0xc0483d00
>  [  486.122516] [c0483d20] [c00e17d4] __alloc_skb+0x48/0x11c
>  [  486.186048] [c0483d40] [c0109218] tcp_sendmsg+0x1ac/0xc40
>  [  486.250621] [c0483db0] [c0126b58] inet_sendmsg+0x60/0x74
>  [  486.314152] [c0483dd0] [c00dcf34] sock_aio_write+0xe0/0xfc
>  [  486.379765] [c0483e30] [c0050910] do_sync_write+0xb8/0x10c
>  [  486.445381] [c0483ef0] [c0050a40] vfs_write+0xdc/0x10c
>  [  486.506829] [c0483f10] [c0050b48] sys_write+0x4c/0x8c
>  [  486.567236] [c0483f40] [c0002c90] ret_from_syscall+0x0/0x3c
>  [  486.633888] Instruction dump:
>  [  486.669300] 0f000000 7fe3fb78 7d6803a6 4e800021 80010014 7fe3fb78
>  7c0803a6 bbc10008
>  [  486.761992] 38210010 4bfffe78 2c030000 4d820020 <80030084>
39230084
>  2f800001 409e0008
>  [  486.858162] Kernel panic - not syncing: Aiee, killing interrupt
handler!
>  [  486.938382] Rebooting in 180 seconds..
>
>
>  _______________________________________________
>  Linuxppc-embedded mailing list
>  Linuxppc-embedded@ozlabs.org
>  https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>



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

^ permalink raw reply

* [PATCH 0/9] powerpc: mv64x60 and prpmc2800 DTS cleanups
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

* Re: [PATCH 1/9] [POWERPC] mv64x60: change FDT compatible prefix to mrvl
From: Dale Farnsworth @ 2008-03-28 23:42 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20080328233954.GA29499@farnsworth.org>

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

* [PATCH 2/9] [POWERPC] prpmc2800: convert DTS to v1 and add labels
From: Dale Farnsworth @ 2008-03-28 23:44 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20080328233954.GA29499@farnsworth.org>

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

* [PATCH 3/9] [POWERPC] prpmc2800: fix frequencies in prpmc2800.dts
From: Dale Farnsworth @ 2008-03-28 23:45 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20080328233954.GA29499@farnsworth.org>

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

* [PATCH 4/9] [POWERPC] mv64x60: Fix FDT compatible names: mv64x60 => mv64360
From: Dale Farnsworth @ 2008-03-28 23:47 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20080328233954.GA29499@farnsworth.org>

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

* Re: [PATCH 1/9] [POWERPC] mv64x60: change FDT compatible prefix to mrvl
From: Grant Likely @ 2008-03-28 23:47 UTC (permalink / raw)
  To: Dale Farnsworth; +Cc: linuxppc-dev, paulus
In-Reply-To: <20080328234241.GA30214@farnsworth.org>

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

* [PATCH 5/9] [POWERPC] mv64x60: remove device tree absolute path references
From: Dale Farnsworth @ 2008-03-28 23:48 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20080328233954.GA29499@farnsworth.org>

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

* [PATCH 6/9] [POWERPC] prpmc2800: clean up dts properties
From: Dale Farnsworth @ 2008-03-28 23:49 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20080328233954.GA29499@farnsworth.org>

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

* [PATCH 7/9] [POWERPC] mv643xx_eth: prepare to support multiple silicon blocks
From: Dale Farnsworth @ 2008-03-28 23:50 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20080328233954.GA29499@farnsworth.org>

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

* [PATCH 8/9] [POWERPC] Document the mv64x60 device tree bindings
From: Dale Farnsworth @ 2008-03-28 23:51 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20080328233954.GA29499@farnsworth.org>

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

* [PATCH 9/9] [POWERPC] prpmc2800 needs a dtbImage
From: Dale Farnsworth @ 2008-03-28 23:52 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20080328233954.GA29499@farnsworth.org>

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

* Re: [PATCH 9/9] [POWERPC] prpmc2800 needs a dtbImage
From: Grant Likely @ 2008-03-28 23:56 UTC (permalink / raw)
  To: Dale Farnsworth; +Cc: linuxppc-dev, paulus
In-Reply-To: <20080328235213.GI30214@farnsworth.org>

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

* Linux 2.6 PCI Device Driver on Virtex 4
From: Huang, Bin @ 2008-03-28 23:42 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 6580 bytes --]

I have spent the past few months slowly trying to get a PCI design
with Linux 2.6 on the Virtex 4. I have been able to overcome some of
the hurdles; however, I am still unable to boot up a working system.

I am using PPC.I have implemented Xilinx's board support  package including
xparameter head file, ml410 early boot files, pci support files,
Board initialization file, did board specific setup, and fixed some
bugs in its call tree.

I have attached my booting message in this mail.  As you can see, I am
stuck at "[   11.805382] Freeing unused kernel memory: 100k init" . Usually
it's the last step before the kernel starts root file system. I am sure my ramdisk and
root file system were both working OK. My naive thought is that the kernel could not
register serial port successfully (see time stamp [ 5.965954]). As a result, ttyS0 was
not able to run and display messages after starting ramdisk. 

It's also interesting to see my ml410 board respond me with a "ml300"
id. My booting message was saying:
         pci_scan: bus 0, device  8, id 030010ee
"10ee" is the vendor id for xilinx while "0300" is the device id which
I think might represent ml300. Does Xilinx forget to refresh its rom? 


Here is my environment and tools:
-- Xilinx ML410 Rev C
-- Xilinx EDK 9.2i
-- Secret lab Linux v2.6 originally configured as platform Xilinx
ML403

And my booting message:
---------------------------------------------------------------------------
Xilinx ML410 Board-Specific Initialization:

ppb_init: dev =  9, id = ac23104c
pci_scan: bus 0, device  1, id 545110b9
pci_scan: bus 0, device  2, id 153310b9
pci_scan: bus 0, device  3, id 545710b9
pci_scan: bus 0, device  8, id 030010ee
pci_scan: bus 0, device  9, id ac23104c
pci_scan: bus 0, device 12, id 710110b9
pci_scan: bus 0, device 15, id 523710b9
sio_init: Device ID = 53 15, Revision = f3.
sio_init: LPT1 base = 0x0378, irq = 5.
sio_init: COM1 base = 0x03f8, irq = 4.
sio_init: COM2 base = 0x02f8, irq = 3.
sio_init: KBC irq = 1, PS2 irq = 1.
sio_init: Super I/O initialization complete.

loaded at:     00400000 006C21B4
board data at: 006C0124 006C01A0
relocated to:  00405154 004051D0
zimage at:     00406215 004EFDAA
initrd at:     004F0000 006BFDB0
avail ram:     006C3000 08000000

Linux/PPC load: console=ttyS0,9600 ip=off root=/dev/ram
Uncompressing Linux...done.
Now booting the kernel
[    0.000000] Linux version 2.6.23-rc2-g0d62d8a8-dirty (bhuang2@rsass-
homer.uncc.edu) (gcc version 4.2.1) #190 Thu Mar 28
[    0.000000] Xilinx ML40x Reference System (Virtex-4 FX)
[    0.000000] Port by MontaVista Software, Inc. (sou...@mvista.com)
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA             0 ->    32768
[    0.000000]   Normal      32768 ->    32768
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[1] active PFN ranges
[    0.000000]     0:        0 ->    32768
[    0.000000] Built 1 zonelists in Zone order.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,9600 ip=off root=/
dev/ram
[    0.000000] Xilinx INTC #0 at 0x41200000 mapped to 0xE7FED000
[    0.000000] PID hash table entries: 512 (order: 9, 2048 bytes)
[    0.000175] Console: colour dummy device 80x25
[    0.000241] console [ttyS0] enabled
[    1.382947] Dentry cache hash table entries: 16384 (order: 4, 65536
bytes)
[    1.466045] Inode-cache hash table entries: 8192 (order: 3, 32768
bytes)
[    1.572643] Memory: 125852k available (1480k kernel code, 496k
data, 100k init, 0k highmem)
[    1.764350] Mount-cache hash table entries: 512
[    1.827727] PCI: Probing PCI hardware
[    1.906477] ppc405_map_irq: bus 0 idsel 1 pin 1, res = 31
[    1.970528] ppc405_map_irq: bus 0 idsel 2 pin 1, res = 31
[    2.035157] ppc405_map_irq: bus 0 idsel 3 pin 1, res = 31
[    2.099646] ppc405_map_irq: bus 0 idsel 8 pin 1, res = 31
[    2.164225] ppc405_map_irq: bus 0 idsel 9 pin 1, res = 31
[    2.228787] ppc405_map_irq: bus 0 idsel 11 pin 1, res = 31
[    2.294400] ppc405_map_irq: bus 0 idsel 12 pin 1, res = 31
[    2.360031] ppc405_map_irq: bus 0 idsel 15 pin 1, res = 31
[    2.441645] SCSI subsystem initialized
[    2.487503] usbcore: registered new interface driver usbfs
[    2.553907] usbcore: registered new interface driver hub
[    2.617790] usbcore: registered new device driver usb
[    2.687574] checking if image is initramfs...it isn't (no cpio
magic); looks like an initrd
[    4.548936] Freeing initrd memory: 1855k freed
[    4.606889] io scheduler noop registered
[    4.653232] io scheduler anticipatory registered (default)
[    4.718790] io scheduler deadline registered
[    4.769907] io scheduler cfq registered
[    4.815634] Activating ISA DMA hang workarounds.
[    5.667502] 0000:00:0f.0 OHCI: BIOS handoff failed (BIOS bug ?)
ffffffff
[    5.798505] Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports,
IRQ sharing disabled
[    5.892194] serial8250: ttyS0 at MMIO 0x0 (irq = 12) is a 16550A
[    5.965954] Couldn't register serial port 0000:00:03.0: -28
[    6.044910] RAMDISK driver initialized: 16 RAM disks of 65536K size
1024 blocksize
[    6.141529] loop: module loaded
[    6.178422] Uniform Multi-Platform E-IDE driver Revision:
7.00alpha2
[    6.254522] ide: Assuming 33MHz system bus speed for PIO modes;
override with idebus=xx
[    6.351314] ALI15X3: IDE controller at PCI slot 0000:00:0b.0
[    6.418510] ALI15X3: chipset revision 196
[    6.466414] ALI15X3: 100% native mode on irq 31
[    6.520489] ALI15X3: simplex device: DMA forced
[    6.574602]     ide0: BM-DMA at 0xdfd0-0xdfd7, BIOS settings:
hda:DMA, hdb:DMA
[    6.660918] ALI15X3: simplex device: DMA forced
[    6.715201]     ide1: BM-DMA at 0xdfd8-0xdfdf, BIOS settings:
hdc:DMA, hdd:DMA
[    9.054991] usbmon: debugfs is not available
[    9.106161] mice: PS/2 mouse device common for all mice
[    9.168819] ali15x3_smbus 0000:00:0c.0: ALI15X3_smb region
uninitialized - upgrade BIOS or use force_addr=0xaddr
[    9.290327] ali15x3_smbus 0000:00:0c.0: ALI15X3 not detected,
module not inserted.
[    9.383605] RAMDISK: Compressed image found at block 0
[   11.704980] VFS: Mounted root (ext2 filesystem) readonly.
[   11.805382] Freeing unused kernel memory: 100k init
................kernel stops here................

---------------------------------------------------------------------------


If anyone has tried to do this (or has already done this) I would
apprecaite any help or suggestions. 

regards,

Bin 

[-- Attachment #2: Type: text/html, Size: 8913 bytes --]

^ permalink raw reply

* Re: [PATCH 1/9] [POWERPC] mv64x60: change FDT compatible prefix to mrvl
From: Dale Farnsworth @ 2008-03-29  0:00 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, paulus
In-Reply-To: <fa686aa40803281647y4ccc4605n1507f9c1868d4c0f@mail.gmail.com>

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

* Re: [PATCH 1/9] [POWERPC] mv64x60: change FDT compatible prefix to mrvl
From: Grant Likely @ 2008-03-29  0:12 UTC (permalink / raw)
  To: Dale Farnsworth; +Cc: linuxppc-dev, paulus
In-Reply-To: <20080329000047.GA31116@farnsworth.org>

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

* Re: [PATCH] Make pasemi_mac.c depend on PPC_PASEMI to prevent link errors
From: Jeff Garzik @ 2008-03-29  1:53 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: Olof Johannsson, linuxppc-dev
In-Reply-To: <c9b4b088d00e37e33907b15ac59450c04ef36112.1206666963.git.michael@ellerman.id.au>

Michael Ellerman wrote:
> drivers/net/pasemi_mac.c is enabled by CONFIG_PASEMI_MAC, which depends on
> PPC64 && PCI. However pasemi_mac.c uses several routines that are only
> built when PPC_PASEMI is selected. This can lead to an unbuildable config:
> 
>  ERROR: ".pasemi_dma_start_chan" [drivers/net/pasemi_mac.ko] undefined!
> 
> So make CONFIG_PASEMI_MAC depend on PPC_PASEMI instead of PPC64.
> 
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> ---
>  drivers/net/Kconfig |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> 
> 
> Jeff, pending Olof's ack, this would be nice for 25, but is obviously
> not super important.
> 
> diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
> index fe7b5ec..3a0b20a 100644
> --- a/drivers/net/Kconfig
> +++ b/drivers/net/Kconfig
> @@ -2635,7 +2635,7 @@ config NIU
>  
>  config PASEMI_MAC
>  	tristate "PA Semi 1/10Gbit MAC"
> -	depends on PPC64 && PCI
> +	depends on PPC_PASEMI && PCI
>  	select PHYLIB

applied

^ permalink raw reply

* Re: [PATCH] ibm_newemac: emac_tx_csum typo fix
From: Jeff Garzik @ 2008-03-29  1:54 UTC (permalink / raw)
  To: Valentine Barshak; +Cc: linuxppc-dev, netdev
In-Reply-To: <20080327144357.GA9111@ru.mvista.com>

Valentine Barshak wrote:
> Move the "&& skb->ip_summed == CHECKSUM_PARTIAL" part out of
> emac_has_feature parameters.
> 
> Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
> ---
>  drivers/net/ibm_newemac/core.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff -pruN linux-2.6.orig/drivers/net/ibm_newemac/core.c linux-2.6/drivers/net/ibm_newemac/core.c
> --- linux-2.6.orig/drivers/net/ibm_newemac/core.c	2008-02-21 16:45:36.000000000 +0300
> +++ linux-2.6/drivers/net/ibm_newemac/core.c	2008-02-22 19:55:29.000000000 +0300
> @@ -1235,8 +1235,8 @@ static int emac_close(struct net_device 
>  static inline u16 emac_tx_csum(struct emac_instance *dev,
>  			       struct sk_buff *skb)
>  {
> -	if (emac_has_feature(dev, EMAC_FTR_HAS_TAH &&
> -			     skb->ip_summed == CHECKSUM_PARTIAL)) {
> +	if (emac_has_feature(dev, EMAC_FTR_HAS_TAH) &&
> +		(skb->ip_summed == CHECKSUM_PARTIAL)) {
>  		++dev->stats.tx_packets_csum;
>  		return EMAC_TX_CTRL_TAH_CSUM;

applied

^ permalink raw reply

* Re: [PATCH 2/2 v2] pasemi_mac: Netpoll support
From: Jeff Garzik @ 2008-03-29  2:11 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev, pasemi-linux, ncase, netdev
In-Reply-To: <20080327224007.GB17980@lixom.net>

Olof Johansson wrote:
> Add netpoll support to allow use of netconsole.
>     
> Signed-off-by: Nate Case <ncase@xes-inc.com>
> Signed-off-by: Olof Johansson <olof@lixom.net>
> 
> ---
> Changed the interrupt handler arguments as found by Valentine. Will push
> through powerpc.git with Jeff's ACKs (that were already given).
> 
> 
> -Olof

ACK

^ permalink raw reply

* Re: [PATCH 1/2] ibm_newemac: PowerPC 440GX EMAC PHY clock workaround
From: Jeff Garzik @ 2008-03-29  2:18 UTC (permalink / raw)
  To: Valentine Barshak; +Cc: linuxppc-dev, netdev
In-Reply-To: <20080327144044.GA8831@ru.mvista.com>

Valentine Barshak wrote:
> The PowerPC 440GX Taishan board fails to reset EMAC3 (reset timeout error)
> if there's no link. Because of that it fails to find PHY chip. The older ibm_emac
> driver had a workaround for that: the EMAC_CLK_INTERNAL/EMAC_CLK_EXTERNAL macros,
> which toggle the Ethernet Clock Select bit in the SDR0_MFR register. This patch
> does the same for "ibm,emac-440gx" compatible chips. The workaround forces
> clock on -all- EMACs, so we select clock under global emac_phy_map_lock.
> 
> Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
> ---
>  drivers/net/ibm_newemac/core.c |   16 +++++++++++++++-
>  drivers/net/ibm_newemac/core.h |    8 ++++++--
>  2 files changed, 21 insertions(+), 3 deletions(-)

is this for 2.6.25-rc?

^ permalink raw reply

* [PATCH] vma_map: use proper pointer types
From: Al Viro @ 2008-03-29  3:08 UTC (permalink / raw)
  To: torvalds; +Cc: linuxppc-dev, linux-kernel


Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 arch/powerpc/oprofile/cell/vma_map.c |   37 ++++++++++++++-------------------
 1 files changed, 16 insertions(+), 21 deletions(-)

diff --git a/arch/powerpc/oprofile/cell/vma_map.c b/arch/powerpc/oprofile/cell/vma_map.c
index 76ec1d1..9a93217 100644
--- a/arch/powerpc/oprofile/cell/vma_map.c
+++ b/arch/powerpc/oprofile/cell/vma_map.c
@@ -92,7 +92,7 @@ vma_map_add(struct vma_to_fileoffset_map *map, unsigned int vma,
  * A pointer to the first vma_map in the generated list
  * of vma_maps is returned.  */
 struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
-					     unsigned long spu_elf_start)
+					     unsigned long __spu_elf_start)
 {
 	static const unsigned char expected[EI_PAD] = {
 		[EI_MAG0] = ELFMAG0,
@@ -107,9 +107,11 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
 
 	int grd_val;
 	struct vma_to_fileoffset_map *map = NULL;
+	void __user *spu_elf_start = (void __user *)__spu_elf_start;
 	struct spu_overlay_info ovly;
 	unsigned int overlay_tbl_offset = -1;
-	unsigned long phdr_start, shdr_start;
+	Elf32_Phdr __user *phdr_start;
+	Elf32_Shdr __user *shdr_start;
 	Elf32_Ehdr ehdr;
 	Elf32_Phdr phdr;
 	Elf32_Shdr shdr, shdr_str;
@@ -121,12 +123,12 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
 	unsigned int ovly_buf_table_sym = 0;
 	unsigned int ovly_table_end_sym = 0;
 	unsigned int ovly_buf_table_end_sym = 0;
-	unsigned long ovly_table;
+	struct spu_overlay_info __user *ovly_table;
 	unsigned int n_ovlys;
 
 	/* Get and validate ELF header.	 */
 
-	if (copy_from_user(&ehdr, (void *) spu_elf_start, sizeof (ehdr)))
+	if (copy_from_user(&ehdr, spu_elf_start, sizeof (ehdr)))
 		goto fail;
 
 	if (memcmp(ehdr.e_ident, expected, EI_PAD) != 0) {
@@ -152,9 +154,7 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
 
 	/* Traverse program headers.  */
 	for (i = 0; i < ehdr.e_phnum; i++) {
-		if (copy_from_user(&phdr,
-				   (void *) (phdr_start + i * sizeof(phdr)),
-				   sizeof(phdr)))
+		if (copy_from_user(&phdr, phdr_start + i, sizeof(phdr)))
 			goto fail;
 
 		if (phdr.p_type != PT_LOAD)
@@ -171,9 +171,7 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
 	pr_debug("SPU_PROF: Created non-overlay maps\n");
 	/* Traverse section table and search for overlay-related symbols.  */
 	for (i = 0; i < ehdr.e_shnum; i++) {
-		if (copy_from_user(&shdr,
-				   (void *) (shdr_start + i * sizeof(shdr)),
-				   sizeof(shdr)))
+		if (copy_from_user(&shdr, shdr_start + i, sizeof(shdr)))
 			goto fail;
 
 		if (shdr.sh_type != SHT_SYMTAB)
@@ -182,8 +180,7 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
 			continue;
 
 		if (copy_from_user(&shdr_str,
-				   (void *) (shdr_start + shdr.sh_link *
-					     sizeof(shdr)),
+				   shdr_start + shdr.sh_link,
 				   sizeof(shdr)))
 			goto fail;
 
@@ -191,15 +188,15 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
 			goto fail;;
 
 		for (j = 0; j < shdr.sh_size / sizeof (sym); j++) {
-			if (copy_from_user(&sym, (void *) (spu_elf_start +
-						       shdr.sh_offset + j *
-							   sizeof (sym)),
+			if (copy_from_user(&sym, spu_elf_start +
+						 shdr.sh_offset +
+						 j * sizeof (sym),
 					   sizeof (sym)))
 				goto fail;
 
-			if (copy_from_user(name, (void *)
-					   (spu_elf_start + shdr_str.sh_offset +
-					    sym.st_name),
+			if (copy_from_user(name, 
+					   spu_elf_start + shdr_str.sh_offset +
+					   sym.st_name,
 					   20))
 				goto fail;
 
@@ -245,9 +242,7 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
 
 	/* Traverse overlay table.  */
 	for (i = 0; i < n_ovlys; i++) {
-		if (copy_from_user(&ovly, (void *)
-				   (ovly_table + i * sizeof (ovly)),
-				   sizeof (ovly)))
+		if (copy_from_user(&ovly, ovly_table + i, sizeof (ovly)))
 			goto fail;
 
 		/* The ovly.vma/size/offset arguments are analogous to the same
-- 
1.5.3.GIT

^ permalink raw reply related

* [PATCH] powerpc/pseries/xcis: ansify
From: Al Viro @ 2008-03-29  3:10 UTC (permalink / raw)
  To: torvalds; +Cc: linuxppc-dev, linux-kernel


Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 arch/powerpc/platforms/pseries/xics.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index ca52b58..a977f20 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -763,7 +763,7 @@ void xics_request_IPIs(void)
 }
 #endif /* CONFIG_SMP */
 
-void xics_teardown_cpu()
+void xics_teardown_cpu(void)
 {
 	int cpu = smp_processor_id();
 
-- 
1.5.3.GIT

^ permalink raw reply related

* Re: [PATCH 1/2] ibm_newemac: PowerPC 440GX EMAC PHY clock workaround
From: Josh Boyer @ 2008-03-29  3:30 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linuxppc-dev, netdev
In-Reply-To: <47EDA6F1.9080206@garzik.org>

On Fri, 28 Mar 2008 22:18:25 -0400
Jeff Garzik <jeff@garzik.org> wrote:

> Valentine Barshak wrote:
> > The PowerPC 440GX Taishan board fails to reset EMAC3 (reset timeout error)
> > if there's no link. Because of that it fails to find PHY chip. The older ibm_emac
> > driver had a workaround for that: the EMAC_CLK_INTERNAL/EMAC_CLK_EXTERNAL macros,
> > which toggle the Ethernet Clock Select bit in the SDR0_MFR register. This patch
> > does the same for "ibm,emac-440gx" compatible chips. The workaround forces
> > clock on -all- EMACs, so we select clock under global emac_phy_map_lock.
> > 
> > Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
> > ---
> >  drivers/net/ibm_newemac/core.c |   16 +++++++++++++++-
> >  drivers/net/ibm_newemac/core.h |    8 ++++++--
> >  2 files changed, 21 insertions(+), 3 deletions(-)
> 
> is this for 2.6.25-rc?

No.  This, and patch 2/2, are for 2.6.26 and depend on a patch in my
tree.  These are the two Ben asked about going through the powerpc tree
but naturally we wanted an Ack from you first.

thx,
josh 

^ permalink raw reply

* Re: [PATCH 1/2] ibm_newemac: PowerPC 440GX EMAC PHY clock workaround
From: Benjamin Herrenschmidt @ 2008-03-29  3:28 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linuxppc-dev, netdev
In-Reply-To: <47EDA6F1.9080206@garzik.org>


On Fri, 2008-03-28 at 22:18 -0400, Jeff Garzik wrote:
> Valentine Barshak wrote:
> > The PowerPC 440GX Taishan board fails to reset EMAC3 (reset timeout error)
> > if there's no link. Because of that it fails to find PHY chip. The older ibm_emac
> > driver had a workaround for that: the EMAC_CLK_INTERNAL/EMAC_CLK_EXTERNAL macros,
> > which toggle the Ethernet Clock Select bit in the SDR0_MFR register. This patch
> > does the same for "ibm,emac-440gx" compatible chips. The workaround forces
> > clock on -all- EMACs, so we select clock under global emac_phy_map_lock.
> > 
> > Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
> > ---
> >  drivers/net/ibm_newemac/core.c |   16 +++++++++++++++-
> >  drivers/net/ibm_newemac/core.h |    8 ++++++--
> >  2 files changed, 21 insertions(+), 3 deletions(-)
> 
> is this for 2.6.25-rc?

Nah, too late imho.

Ben.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox