* Oops with TQM5200 on TQM5200
@ 2008-03-20 14:18 Wolfgang Grandegger
2008-03-20 14:41 ` Grant Likely
2008-03-20 15:24 ` Anatolij Gustschin
0 siblings, 2 replies; 31+ messages in thread
From: Wolfgang Grandegger @ 2008-03-20 14:18 UTC (permalink / raw)
To: ppc-dev
[-- Attachment #1: Type: text/plain, Size: 152 bytes --]
Hello,
I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached
oops. Are there any known patches fixing the problems?
TIA.
Wolfgang.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: oops.log --]
[-- Type: text/x-log; name="oops.log", Size: 6537 bytes --]
## Booting image at 00200000 ...
Image Name: Linux-2.6.25-rc6-01058-gf8937ce-
Created: 2008-03-20 13:19:36 UTC
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 1697503 Bytes = 1.6 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Booting using the fdt at 0x400000
[ 0.000000] Using mpc5200-simple-platform machine description
[ 0.000000] Linux version 2.6.25-rc6-01058-gf8937ce-dirty (wolf@lancy.lan.de) (gcc version 4.0.0 (DENX ELDK 4.1 4.0.0)) #14 Thu Mar 20 14:19:25 CET 2008
[ 0.000000] PCI host bridge /pci@f0000d00 (primary) ranges:
[ 0.000000] MEM 0x0000000080000000..0x000000008fffffff -> 0x0000000080000000 Prefetch
[ 0.000000] MEM 0x0000000090000000..0x000000009fffffff -> 0x0000000090000000
[ 0.000000] IO 0x00000000a0000000..0x00000000a0ffffff -> 0x0000000000000000
[ 0.000000] Zone PFN ranges:
[ 0.000000] DMA 0 -> 16384
[ 0.000000] Normal 16384 -> 16384
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] early_node_map[1] active PFN ranges
[ 0.000000] 0: 0 -> 16384
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: root=/dev/nfs rw nfsroot=10.0.30.2:/opt/eldk/ppc_6xx ip=10.0.30.210:10.0.30.2:::tqm5200:eth0:off panic=1 console=ttyPSC0,115200
[ 0.000000] MPC52xx PIC is up and running!
[ 0.000000] PID hash table entries: 256 (order: 8, 1024 bytes)
[ 0.000014] clocksource: timebase mult[79364d9] shift[22] registered
[ 0.000241] console [ttyPSC0] enabled
[ 0.004376] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.008573] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.021186] Memory: 61236k/65536k available (3328k kernel code, 4236k reserved, 120k data, 149k bss, 180k init)
[ 0.024179] SLUB: Genslabs=12, HWalign=32, Order=0-1, MinObjects=4, CPUs=1, Nodes=1
[ 0.120160] Mount-cache hash table entries: 512
[ 0.128111] net_namespace: 152 bytes
[ 0.133162] NET: Registered protocol family 16
[ 0.150957] PCI: Probing PCI hardware
[ 0.168836] SCSI subsystem initialized
[ 0.174379] usbcore: registered new interface driver usbfs
[ 0.176629] usbcore: registered new interface driver hub
[ 0.180942] usbcore: registered new device driver usb
[ 0.200000] Time: timebase clocksource has been installed.
[ 0.208268] NET: Registered protocol family 2
[ 0.252350] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.260660] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.268181] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.272125] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.276028] TCP reno registered
[ 0.338145] JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 0.342627] io scheduler noop registered
[ 0.344114] io scheduler anticipatory registered (default)
[ 0.348032] io scheduler deadline registered
[ 0.352847] io scheduler cfq registered
[ 0.778513] Generic RTC Driver v1.07
[ 0.780658] Serial: MPC52xx PSC UART driver
[ 0.784474] f0002000.serial: ttyPSC0 at MMIO 0xf0002000 (irq = 129) is a MPC52xx PSC
[ 0.793028] f0002200.serial: ttyPSC1 at MMIO 0xf0002200 (irq = 130) is a MPC52xx PSC
[ 0.797297] f0002400.serial: ttyPSC2 at MMIO 0xf0002400 (irq = 131) is a MPC52xx PSC
[ 0.814501] brd: module loaded
[ 0.823106] loop: module loaded
[ 0.824132] vcan: Virtual CAN interface driver
[ 0.828033] slcan: serial line CAN interface driver
[ 0.832030] slcan: 10 dynamic interface channels.
[ 0.840408] mpc52xx-mscan mpc52xx-mscan.0: probe for port at 0xC5062900 done (irq 145)
[ 0.846001] mpc52xx-mscan mpc52xx-mscan.1: probe for port at 0xC5064980 done (irq 146)
[ 0.852251] Unable to handle kernel paging request for data at address 0x0000000c
[ 0.860026] Faulting instruction address: 0xc0017fec
[ 0.864036] Oops: Kernel access of bad area, sig: 11 [#1]
[ 0.868000] mpc5200-simple-platform
[ 0.868000] Modules linked in:
[ 0.868000] NIP: c0017fec LR: c0019064 CTR: 00000010
[ 0.868000] REGS: c381fd20 TRAP: 0300 Not tainted (2.6.25-rc6-01058-gf8937ce-dirty)
[ 0.868000] MSR: 00009032 <EE,ME,IR,DR> CR: 28000028 XER: 2000005f
[ 0.868000] DAR: 0000000c, DSISR: 20000000
[ 0.868000] TASK = c3812400[1] 'swapper' THREAD: c381e000
[ 0.868000] GPR00: 00000010 c381fdd0 c3812400 00000100 00000008 00000008 fcff7000 c382ca00
[ 0.868000] GPR08: 00002000 00000000 00000000 f00035a9 f0003000 fefd7f7f 07fb3000 04000000
[ 0.868000] GPR16: 00000000 007fff00 00000000 c02c0000 c0340000 c0330000 07fb2678 00000000
[ 0.868000] GPR24: c0330000 00000008 c0360000 00000100 00000008 f0003184 000005f2 00000000
[ 0.868000] NIP [c0017fec] bcom_task_alloc+0x30/0x198
[ 0.868000] LR [c0019064] bcom_fec_rx_init+0x24/0x74
[ 0.868000] Call Trace:
[ 0.868000] [c381fdd0] [c006863c] __get_vm_area_node+0x80/0x1b8 (unreliable)
[ 0.868000] [c381fe00] [c0019064] bcom_fec_rx_init+0x24/0x74
[ 0.868000] [c381fe20] [c028428c] 0xc028428c
[ 0.868000] [c381fe60] [c01ea26c] of_platform_device_probe+0x58/0x80
[ 0.868000] [c381fe80] [c017ddd0] driver_probe_device+0xb8/0x1cc
[ 0.868000] [c381fea0] [c017e0bc] __driver_attach+0xcc/0xf8
[ 0.868000] [c381fec0] [c017c93c] bus_for_each_dev+0x58/0x94
[ 0.868000] [c381fef0] [c017db00] driver_attach+0x24/0x34
[ 0.868000] [c381ff00] [c017d9c0] bus_add_driver+0x188/0x250
[ 0.868000] [c381ff20] [c017e598] driver_register+0x48/0x130
[ 0.868000] [c381ff40] [c01ea48c] of_register_driver+0x54/0x70
[ 0.868000] [c381ff50] [c032c6b4] mpc52xx_fec_init+0x64/0x80
[ 0.868000] [c381ff70] [c0313858] kernel_init+0x98/0x28c
[ 0.868000] [c381fff0] [c001229c] kernel_thread+0x44/0x60
[ 0.868000] Instruction dump:
[ 0.868000] 7c0802a6 9421ffd0 bf210014 3f40c036 7c7b1b78 7c992378 90010034 38000010
[ 0.868000] 7cbc2b78 813a5224 7c0903a6 3be00000 <8129000c> 80090004 57fd2834 2f800000
[ 0.868081] ---[ end trace ab0c326e02602f58 ]---
[ 0.872036] Kernel panic - not syncing: Attempted to kill init!
[ 0.876034] Rebooting in 1 seconds..
U-Boot 1.3.1-g5f7f945a-dirty (Dec 19 2007 - 16:58:01)
CPU: MPC5200B v2.2, Core v1.4 at 396 MHz
Bus 132 MHz, IPB 132 MHz, PCI 66 MHz
Board: TQM5200 (TQ-Components GmbH)
on a STK52xx carrier board
I2C: 85 kHz, ready
DRAM: 128 MB
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Oops with TQM5200 on TQM5200
2008-03-20 14:18 Oops with TQM5200 on TQM5200 Wolfgang Grandegger
@ 2008-03-20 14:41 ` Grant Likely
2008-03-20 15:24 ` Anatolij Gustschin
1 sibling, 0 replies; 31+ messages in thread
From: Grant Likely @ 2008-03-20 14:41 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: ppc-dev
On Thu, Mar 20, 2008 at 8:18 AM, Wolfgang Grandegger <wg@grandegger.com> wrote:
> Hello,
>
> I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached
> oops. Are there any known patches fixing the problems?
>
> TIA.
Hmm, I haven't seen this issue on any of my 5200 boards. To state the
obvious, it's an issue in the bestcomm code. What source line is
"bcom_task_alloc+0x30/0x198" on?
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Oops with TQM5200 on TQM5200
2008-03-20 14:18 Oops with TQM5200 on TQM5200 Wolfgang Grandegger
2008-03-20 14:41 ` Grant Likely
@ 2008-03-20 15:24 ` Anatolij Gustschin
2008-03-20 16:17 ` Bartlomiej Sieka
` (2 more replies)
1 sibling, 3 replies; 31+ messages in thread
From: Anatolij Gustschin @ 2008-03-20 15:24 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: linuxppc-dev
Hello Wolfgang,
Wolfgang Grandegger wrote:
> I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached
> oops. Are there any known patches fixing the problems?
try the patch below for tqm5200.dts, rebuild dtb and boot
again. Not sure if it works for Linux 2.6.25-rc6, but for
2.6.25-rc3 it does.
Anatolij
--
diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
index c86464f..7c23bb3 100644
--- a/arch/powerpc/boot/dts/tqm5200.dts
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -83,6 +83,7 @@
};
dma-controller@1200 {
+ device_type = "dma-controller";
compatible = "fsl,mpc5200-bestcomm";
reg = <1200 80>;
interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
@@ -127,10 +128,25 @@
ethernet@3000 {
device_type = "network";
compatible = "fsl,mpc5200-fec";
- reg = <3000 800>;
+ reg = <3000 400>;
local-mac-address = [ 00 00 00 00 00 00 ];
interrupts = <2 5 0>;
interrupt-parent = <&mpc5200_pic>;
+ phy-handle = <&phy0>;
+ };
+
+ mdio@3000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,mpc5200b-mdio";
+ reg = <3000 400>; // fec range, since we need to setup fec interrupts
+ interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
+ interrupt-parent = <&mpc5200_pic>;
+
+ phy0:ethernet-phy@0 {
+ device_type = "ethernet-phy";
+ reg = <0>;
+ };
};
ata@3a00 {
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: Oops with TQM5200 on TQM5200
2008-03-20 15:24 ` Anatolij Gustschin
@ 2008-03-20 16:17 ` Bartlomiej Sieka
2008-03-20 21:27 ` Grant Likely
2008-03-20 16:29 ` Wolfgang Grandegger
2008-03-20 23:50 ` Grant Likely
2 siblings, 1 reply; 31+ messages in thread
From: Bartlomiej Sieka @ 2008-03-20 16:17 UTC (permalink / raw)
To: Anatolij Gustschin; +Cc: linuxppc-dev
Anatolij Gustschin wrote:
> Hello Wolfgang,
>
> Wolfgang Grandegger wrote:
>
>> I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached
>> oops. Are there any known patches fixing the problems?
>
> try the patch below for tqm5200.dts, rebuild dtb and boot
> again. Not sure if it works for Linux 2.6.25-rc6, but for
> 2.6.25-rc3 it does.
It helps 2.6.25-rc6 too - thanks Anatolij.
>
> Anatolij
> --
> diff --git a/arch/powerpc/boot/dts/tqm5200.dts
> b/arch/powerpc/boot/dts/tqm5200.dts
> index c86464f..7c23bb3 100644
> --- a/arch/powerpc/boot/dts/tqm5200.dts
> +++ b/arch/powerpc/boot/dts/tqm5200.dts
> @@ -83,6 +83,7 @@
> };
>
> dma-controller@1200 {
> + device_type = "dma-controller";
This actually fixes the Oops.
> compatible = "fsl,mpc5200-bestcomm";
> reg = <1200 80>;
> interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
> @@ -127,10 +128,25 @@
> ethernet@3000 {
> device_type = "network";
> compatible = "fsl,mpc5200-fec";
> - reg = <3000 800>;
> + reg = <3000 400>;
> local-mac-address = [ 00 00 00 00 00 00 ];
> interrupts = <2 5 0>;
> interrupt-parent = <&mpc5200_pic>;
> + phy-handle = <&phy0>;
> + };
> +
> + mdio@3000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "fsl,mpc5200b-mdio";
> + reg = <3000 400>; // fec range, since we need to
> setup fec interrupts
> + interrupts = <2 5 0>; // these are for "mii command
> finished", not link changes & co.
> + interrupt-parent = <&mpc5200_pic>;
> +
> + phy0:ethernet-phy@0 {
> + device_type = "ethernet-phy";
> + reg = <0>;
> + };
And this fixes networking issues (NFS-mounted rootfs timeouts, etc).
BTW: it's been posted a while back
(http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197) but
didn't get merged.
Grant -- any chances these fixes could be rushed upstream?
Regards,
Bartlomiej
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Oops with TQM5200 on TQM5200
2008-03-20 15:24 ` Anatolij Gustschin
2008-03-20 16:17 ` Bartlomiej Sieka
@ 2008-03-20 16:29 ` Wolfgang Grandegger
2008-03-20 23:50 ` Grant Likely
2 siblings, 0 replies; 31+ messages in thread
From: Wolfgang Grandegger @ 2008-03-20 16:29 UTC (permalink / raw)
To: Anatolij Gustschin; +Cc: linuxppc-dev
Hi Anatolij,
Anatolij Gustschin wrote:
> Hello Wolfgang,
>
> Wolfgang Grandegger wrote:
>
>> I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached
>> oops. Are there any known patches fixing the problems?
>
> try the patch below for tqm5200.dts, rebuild dtb and boot
> again. Not sure if it works for Linux 2.6.25-rc6, but for
> 2.6.25-rc3 it does.
>
> Anatolij
> --
> diff --git a/arch/powerpc/boot/dts/tqm5200.dts
> b/arch/powerpc/boot/dts/tqm5200.dts
> index c86464f..7c23bb3 100644
> --- a/arch/powerpc/boot/dts/tqm5200.dts
> +++ b/arch/powerpc/boot/dts/tqm5200.dts
> @@ -83,6 +83,7 @@
> };
>
> dma-controller@1200 {
> + device_type = "dma-controller";
This one actually fixes the Oops. I already had the following fixes.
> compatible = "fsl,mpc5200-bestcomm";
> reg = <1200 80>;
> interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
> @@ -127,10 +128,25 @@
> ethernet@3000 {
> device_type = "network";
> compatible = "fsl,mpc5200-fec";
> - reg = <3000 800>;
> + reg = <3000 400>;
This has already been fixed a long time ago, IIRC.
> local-mac-address = [ 00 00 00 00 00 00 ];
> interrupts = <2 5 0>;
> interrupt-parent = <&mpc5200_pic>;
> + phy-handle = <&phy0>;
> + };
> +
> + mdio@3000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "fsl,mpc5200b-mdio";
> + reg = <3000 400>; // fec range, since we need to
> setup fec interrupts
> + interrupts = <2 5 0>; // these are for "mii command
> finished", not link changes & co.
> + interrupt-parent = <&mpc5200_pic>;
> +
> + phy0:ethernet-phy@0 {
> + device_type = "ethernet-phy";
> + reg = <0>;
> + };
Another question. Is it possible to configure Linux without explicit
PHY-handling.
Thanks,
Wolfgang.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Oops with TQM5200 on TQM5200
2008-03-20 16:17 ` Bartlomiej Sieka
@ 2008-03-20 21:27 ` Grant Likely
2008-03-22 10:49 ` Anatolij Gustschin
0 siblings, 1 reply; 31+ messages in thread
From: Grant Likely @ 2008-03-20 21:27 UTC (permalink / raw)
To: Bartlomiej Sieka; +Cc: linuxppc-dev, Anatolij Gustschin
On Thu, Mar 20, 2008 at 10:17 AM, Bartlomiej Sieka <tur@semihalf.com> wrote:
> Anatolij Gustschin wrote:
> > Hello Wolfgang,
> >
> > Wolfgang Grandegger wrote:
> >
> >> I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached
> >> oops. Are there any known patches fixing the problems?
> >
> > try the patch below for tqm5200.dts, rebuild dtb and boot
> > again. Not sure if it works for Linux 2.6.25-rc6, but for
> > 2.6.25-rc3 it does.
>
> It helps 2.6.25-rc6 too - thanks Anatolij.
>
>
> >
> > Anatolij
> > --
> > diff --git a/arch/powerpc/boot/dts/tqm5200.dts
> > b/arch/powerpc/boot/dts/tqm5200.dts
> > index c86464f..7c23bb3 100644
> > --- a/arch/powerpc/boot/dts/tqm5200.dts
> > +++ b/arch/powerpc/boot/dts/tqm5200.dts
> > @@ -83,6 +83,7 @@
> > };
> >
> > dma-controller@1200 {
> > + device_type = "dma-controller";
>
> This actually fixes the Oops.
Hmm, this sounds like a band-aid; the kernel shouldn't oops if this is
missing from the device tree. Fail, perhaps, but oops is worrisome.
Would someone like to investigate?
In fact, device_type should not be necessary at all, but that's beside
the point.
> > @@ -127,10 +128,25 @@
> > ethernet@3000 {
> > device_type = "network";
> > compatible = "fsl,mpc5200-fec";
> > - reg = <3000 800>;
> > + reg = <3000 400>;
> > local-mac-address = [ 00 00 00 00 00 00 ];
> > interrupts = <2 5 0>;
> > interrupt-parent = <&mpc5200_pic>;
> > + phy-handle = <&phy0>;
> > + };
> > +
> > + mdio@3000 {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + compatible = "fsl,mpc5200b-mdio";
> > + reg = <3000 400>; // fec range, since we need to
> > setup fec interrupts
> > + interrupts = <2 5 0>; // these are for "mii command
> > finished", not link changes & co.
> > + interrupt-parent = <&mpc5200_pic>;
> > +
> > + phy0:ethernet-phy@0 {
> > + device_type = "ethernet-phy";
> > + reg = <0>;
> > + };
>
> And this fixes networking issues (NFS-mounted rootfs timeouts, etc).
> BTW: it's been posted a while back
> (http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197) but
> didn't get merged.
>
> Grant -- any chances these fixes could be rushed upstream?
Nuts, I dropped it on the floor. I'll pick this up.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Oops with TQM5200 on TQM5200
2008-03-20 15:24 ` Anatolij Gustschin
2008-03-20 16:17 ` Bartlomiej Sieka
2008-03-20 16:29 ` Wolfgang Grandegger
@ 2008-03-20 23:50 ` Grant Likely
2008-03-21 0:07 ` Bartlomiej Sieka
2 siblings, 1 reply; 31+ messages in thread
From: Grant Likely @ 2008-03-20 23:50 UTC (permalink / raw)
To: Anatolij Gustschin, Paul Mackerras; +Cc: linuxppc-dev
Paul, my git server is down at the moment. Can you please pick this
one up for .25? It is needed to boot the tqm5200 board.
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Cheers,
g.
On Thu, Mar 20, 2008 at 9:24 AM, Anatolij Gustschin <agust@denx.de> wrote:
> Hello Wolfgang,
>
>
> Wolfgang Grandegger wrote:
>
> > I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached
> > oops. Are there any known patches fixing the problems?
>
> try the patch below for tqm5200.dts, rebuild dtb and boot
> again. Not sure if it works for Linux 2.6.25-rc6, but for
> 2.6.25-rc3 it does.
>
> Anatolij
> --
> diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
> index c86464f..7c23bb3 100644
> --- a/arch/powerpc/boot/dts/tqm5200.dts
> +++ b/arch/powerpc/boot/dts/tqm5200.dts
> @@ -83,6 +83,7 @@
> };
>
> dma-controller@1200 {
> + device_type = "dma-controller";
> compatible = "fsl,mpc5200-bestcomm";
> reg = <1200 80>;
> interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
> @@ -127,10 +128,25 @@
> ethernet@3000 {
> device_type = "network";
> compatible = "fsl,mpc5200-fec";
> - reg = <3000 800>;
> + reg = <3000 400>;
> local-mac-address = [ 00 00 00 00 00 00 ];
> interrupts = <2 5 0>;
> interrupt-parent = <&mpc5200_pic>;
> + phy-handle = <&phy0>;
> + };
> +
> + mdio@3000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "fsl,mpc5200b-mdio";
> + reg = <3000 400>; // fec range, since we need to setup fec interrupts
> + interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
> + interrupt-parent = <&mpc5200_pic>;
> +
> + phy0:ethernet-phy@0 {
> + device_type = "ethernet-phy";
> + reg = <0>;
> + };
> };
>
> ata@3a00 {
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Oops with TQM5200 on TQM5200
2008-03-20 23:50 ` Grant Likely
@ 2008-03-21 0:07 ` Bartlomiej Sieka
2008-03-21 0:20 ` Grant Likely
2008-03-21 6:30 ` Oops with TQM5200 on TQM5200 Wolfgang Grandegger
0 siblings, 2 replies; 31+ messages in thread
From: Bartlomiej Sieka @ 2008-03-21 0:07 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, Anatolij Gustschin
Grant Likely wrote:
> Paul, my git server is down at the moment. Can you please pick this
> one up for .25? It is needed to boot the tqm5200 board.
Could we also have similar fixes for cm5200.dts and motionpro.dts picked
up? I could provide the patches within a day -- will this be OK?
Regards,
Bartlomiej
>
> Acked-by: Grant Likely <grant.likely@secretlab.ca>
>
> Cheers,
> g.
>
> On Thu, Mar 20, 2008 at 9:24 AM, Anatolij Gustschin <agust@denx.de> wrote:
>> Hello Wolfgang,
>>
>>
>> Wolfgang Grandegger wrote:
>>
>> > I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached
>> > oops. Are there any known patches fixing the problems?
>>
>> try the patch below for tqm5200.dts, rebuild dtb and boot
>> again. Not sure if it works for Linux 2.6.25-rc6, but for
>> 2.6.25-rc3 it does.
>>
>> Anatolij
>> --
>> diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
>> index c86464f..7c23bb3 100644
>> --- a/arch/powerpc/boot/dts/tqm5200.dts
>> +++ b/arch/powerpc/boot/dts/tqm5200.dts
>> @@ -83,6 +83,7 @@
>> };
>>
>> dma-controller@1200 {
>> + device_type = "dma-controller";
>> compatible = "fsl,mpc5200-bestcomm";
>> reg = <1200 80>;
>> interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
>> @@ -127,10 +128,25 @@
>> ethernet@3000 {
>> device_type = "network";
>> compatible = "fsl,mpc5200-fec";
>> - reg = <3000 800>;
>> + reg = <3000 400>;
>> local-mac-address = [ 00 00 00 00 00 00 ];
>> interrupts = <2 5 0>;
>> interrupt-parent = <&mpc5200_pic>;
>> + phy-handle = <&phy0>;
>> + };
>> +
>> + mdio@3000 {
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> + compatible = "fsl,mpc5200b-mdio";
>> + reg = <3000 400>; // fec range, since we need to setup fec interrupts
>> + interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
>> + interrupt-parent = <&mpc5200_pic>;
>> +
>> + phy0:ethernet-phy@0 {
>> + device_type = "ethernet-phy";
>> + reg = <0>;
>> + };
>> };
>>
>> ata@3a00 {
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Oops with TQM5200 on TQM5200
2008-03-21 0:07 ` Bartlomiej Sieka
@ 2008-03-21 0:20 ` Grant Likely
2008-03-21 23:56 ` [POWERPC] mpc52xx: Amalgamated dts fixes and updates Bartlomiej Sieka
2008-03-21 6:30 ` Oops with TQM5200 on TQM5200 Wolfgang Grandegger
1 sibling, 1 reply; 31+ messages in thread
From: Grant Likely @ 2008-03-21 0:20 UTC (permalink / raw)
To: Bartlomiej Sieka; +Cc: linuxppc-dev, Anatolij Gustschin, Paul Mackerras
On Thu, Mar 20, 2008 at 6:07 PM, Bartlomiej Sieka <tur@semihalf.com> wrote:
> Grant Likely wrote:
> > Paul, my git server is down at the moment. Can you please pick this
> > one up for .25? It is needed to boot the tqm5200 board.
>
> Could we also have similar fixes for cm5200.dts and motionpro.dts picked
> up? I could provide the patches within a day -- will this be OK?
Yes, please do; heck put them all into one patch if you like; and I'll ack them.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Oops with TQM5200 on TQM5200
2008-03-21 0:07 ` Bartlomiej Sieka
2008-03-21 0:20 ` Grant Likely
@ 2008-03-21 6:30 ` Wolfgang Grandegger
2008-03-21 19:02 ` Grant Likely
2008-03-24 6:47 ` Paul Mackerras
1 sibling, 2 replies; 31+ messages in thread
From: Wolfgang Grandegger @ 2008-03-21 6:30 UTC (permalink / raw)
To: Bartlomiej Sieka; +Cc: linuxppc-dev, Anatolij Gustschin, Paul Mackerras
Bartlomiej Sieka wrote:
> Grant Likely wrote:
>> Paul, my git server is down at the moment. Can you please pick this
>> one up for .25? It is needed to boot the tqm5200 board.
>
> Could we also have similar fixes for cm5200.dts and motionpro.dts picked
> up? I could provide the patches within a day -- will this be OK?
At that occasion, could you please also add two CAN nodes to tqm5200.dts
as shown:
s$ diff -u tqm5200.dts tqm5200.dts.CAN
--- tqm5200.dts 2008-03-20 18:44:40.000000000 +0100
+++ tqm5200.dts.CAN 2008-03-21 07:27:49.000000000 +0100
@@ -68,6 +68,22 @@
fsl,has-wdt;
};
+ can@900 {
+ compatible = "fsl,mpc5200-mscan";
+ cell-index = <0>;
+ interrupts = <2 11 0>;
+ interrupt-parent = <&mpc5200_pic>;
+ reg = <900 80>;
+ };
+
+ can@980 {
+ compatible = "fsl,mpc5200-mscan";
+ cell-index = <1>;
+ interrupts = <2 12 0>;
+ interrupt-parent = <&mpc5200_pic>;
+ reg = <980 80>;
+ };
+
gpio@b00 {
compatible = "fsl,mpc5200-gpio";
reg = <b00 40>;
Thanks a lot.
Wolfgang.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Oops with TQM5200 on TQM5200
2008-03-21 6:30 ` Oops with TQM5200 on TQM5200 Wolfgang Grandegger
@ 2008-03-21 19:02 ` Grant Likely
2008-03-24 6:47 ` Paul Mackerras
1 sibling, 0 replies; 31+ messages in thread
From: Grant Likely @ 2008-03-21 19:02 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: linuxppc-dev, Paul Mackerras, Anatolij Gustschin
On Fri, Mar 21, 2008 at 12:30 AM, Wolfgang Grandegger <wg@grandegger.com> wrote:
> Bartlomiej Sieka wrote:
> > Grant Likely wrote:
> >> Paul, my git server is down at the moment. Can you please pick this
> >> one up for .25? It is needed to boot the tqm5200 board.
> >
> > Could we also have similar fixes for cm5200.dts and motionpro.dts picked
> > up? I could provide the patches within a day -- will this be OK?
>
> At that occasion, could you please also add two CAN nodes to tqm5200.dts
> as shown:
Acked-by: Grant Likely <grant.likely@secretlab.ca>
>
> s$ diff -u tqm5200.dts tqm5200.dts.CAN
> --- tqm5200.dts 2008-03-20 18:44:40.000000000 +0100
> +++ tqm5200.dts.CAN 2008-03-21 07:27:49.000000000 +0100
> @@ -68,6 +68,22 @@
> fsl,has-wdt;
> };
>
> + can@900 {
> + compatible = "fsl,mpc5200-mscan";
> + cell-index = <0>;
> + interrupts = <2 11 0>;
> + interrupt-parent = <&mpc5200_pic>;
> + reg = <900 80>;
> + };
> +
> + can@980 {
> + compatible = "fsl,mpc5200-mscan";
> + cell-index = <1>;
> + interrupts = <2 12 0>;
> + interrupt-parent = <&mpc5200_pic>;
> + reg = <980 80>;
> + };
> +
> gpio@b00 {
> compatible = "fsl,mpc5200-gpio";
> reg = <b00 40>;
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [POWERPC] mpc52xx: Amalgamated dts fixes and updates
2008-03-21 0:20 ` Grant Likely
@ 2008-03-21 23:56 ` Bartlomiej Sieka
2008-03-22 0:12 ` David Gibson
` (3 more replies)
0 siblings, 4 replies; 31+ messages in thread
From: Bartlomiej Sieka @ 2008-03-21 23:56 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, Anatolij Gustschin, Paul Mackerras
The bulk of this patch is taken from
http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few
other updates, in particluar one posted by Anatolij Gustschin, which fixes
an Oops during boot.
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
---
Anatolij, would you like to add your S-O-B?
diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
index 30737ea..8b2e8e4 100644
--- a/arch/powerpc/boot/dts/cm5200.dts
+++ b/arch/powerpc/boot/dts/cm5200.dts
@@ -159,6 +159,7 @@
};
dma-controller@1200 {
+ device_type = "dma-controller";
compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
reg = <1200 80>;
interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
@@ -212,13 +213,31 @@
ethernet@3000 {
device_type = "network";
compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
- reg = <3000 800>;
+ reg = <3000 400>;
local-mac-address = [ 00 00 00 00 00 00 ];
interrupts = <2 5 0>;
interrupt-parent = <&mpc5200_pic>;
+ phy-handle = <&phy0>;
+ };
+
+ mdio@3000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ device_type = "mdio";
+ compatible = "fsl,mpc5200b-mdio";
+ reg = <3000 400>; // fec range, since we need to setup fec interrupts
+ interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
+ interrupt-parent = <&mpc5200_pic>;
+
+ phy0:ethernet-phy@0 {
+ device_type = "ethernet-phy";
+ reg = <0>;
+ };
};
i2c@3d40 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
reg = <3d40 40>;
interrupts = <2 10 0>;
@@ -231,4 +250,22 @@
reg = <8000 4000>;
};
};
+
+ lpb {
+ model = "fsl,lpb";
+ compatible = "fsl,lpb";
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 fc000000 2000000>;
+
+ // 16-bit flash device at LocalPlus Bus CS0
+ flash@0,0 {
+ compatible = "cfi-flash";
+ reg = <0 0 2000000>;
+ bank-width = <2>;
+ device-width = <2>;
+ #size-cells = <1>;
+ #address-cells = <1>;
+ };
+ };
};
diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts
index 76951ab..9ca81ff 100644
--- a/arch/powerpc/boot/dts/motionpro.dts
+++ b/arch/powerpc/boot/dts/motionpro.dts
@@ -127,6 +127,13 @@
interrupt-parent = <&mpc5200_pic>;
};
+ mscan@900 {
+ compatible = "mpc5200b-mscan\0mpc5200-mscan";
+ interrupts = <2 11 0>;
+ interrupt-parent = <&mpc5200_pic>;
+ reg = <900 80>;
+ };
+
mscan@980 {
compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
interrupts = <2 12 0>;
@@ -148,7 +155,6 @@
interrupt-parent = <&mpc5200_pic>;
};
-
spi@f00 {
compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
reg = <f00 20>;
@@ -164,6 +170,7 @@
};
dma-controller@1200 {
+ device_type = "dma-controller";
compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
reg = <1200 80>;
interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
@@ -209,10 +216,26 @@
ethernet@3000 {
device_type = "network";
compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
- reg = <3000 800>;
+ reg = <3000 400>;
local-mac-address = [ 00 00 00 00 00 00 ];
interrupts = <2 5 0>;
interrupt-parent = <&mpc5200_pic>;
+ phy-handle = <&phy0>;
+ };
+
+ mdio@3000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ device_type = "mdio";
+ compatible = "fsl,mpc5200b-mdio";
+ reg = <3000 400>; // fec range, since we need to setup fec interrupts
+ interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
+ interrupt-parent = <&mpc5200_pic>;
+
+ phy0:ethernet-phy@0 {
+ device_type = "ethernet-phy";
+ reg = <2>;
+ };
};
ata@3a00 {
@@ -223,11 +246,19 @@
};
i2c@3d40 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
reg = <3d40 40>;
interrupts = <2 10 0>;
interrupt-parent = <&mpc5200_pic>;
fsl5200-clocking;
+
+ rtc@68 {
+ device_type = "rtc";
+ compatible = "dallas,ds1339";
+ reg = <68>;
+ };
};
sram@8000 {
@@ -240,7 +271,8 @@
compatible = "fsl,lpb";
#address-cells = <2>;
#size-cells = <1>;
- ranges = <1 0 50000000 00010000
+ ranges = <0 0 ff000000 01000000
+ 1 0 50000000 00010000
2 0 50010000 00010000
3 0 50020000 00010000>;
@@ -271,31 +303,15 @@
compatible = "promess,pro_module_dio";
reg = <3 800 2>;
};
- };
- pci@f0000d00 {
- #interrupt-cells = <1>;
- #size-cells = <2>;
- #address-cells = <3>;
- device_type = "pci";
- compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci";
- reg = <f0000d00 100>;
- interrupt-map-mask = <f800 0 0 7>;
- interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot
- c000 0 0 2 &mpc5200_pic 1 1 3
- c000 0 0 3 &mpc5200_pic 1 2 3
- c000 0 0 4 &mpc5200_pic 1 3 3
-
- c800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot
- c800 0 0 2 &mpc5200_pic 1 2 3
- c800 0 0 3 &mpc5200_pic 1 3 3
- c800 0 0 4 &mpc5200_pic 0 0 3>;
- clock-frequency = <0>; // From boot loader
- interrupts = <2 8 0 2 9 0 2 a 0>;
- interrupt-parent = <&mpc5200_pic>;
- bus-range = <0 0>;
- ranges = <42000000 0 80000000 80000000 0 20000000
- 02000000 0 a0000000 a0000000 0 10000000
- 01000000 0 00000000 b0000000 0 01000000>;
+ // 16-bit flash device at LocalPlus Bus CS0
+ flash@0,0 {
+ compatible = "cfi-flash";
+ reg = <0 0 01000000>;
+ bank-width = <2>;
+ device-width = <2>;
+ #size-cells = <1>;
+ #address-cells = <1>;
+ };
};
};
diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
index c86464f..bbac984 100644
--- a/arch/powerpc/boot/dts/tqm5200.dts
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -83,6 +83,7 @@
};
dma-controller@1200 {
+ device_type = "dma-controller";
compatible = "fsl,mpc5200-bestcomm";
reg = <1200 80>;
interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
@@ -127,10 +128,26 @@
ethernet@3000 {
device_type = "network";
compatible = "fsl,mpc5200-fec";
- reg = <3000 800>;
+ reg = <3000 400>;
local-mac-address = [ 00 00 00 00 00 00 ];
interrupts = <2 5 0>;
interrupt-parent = <&mpc5200_pic>;
+ phy-handle = <&phy0>;
+ };
+
+ mdio@3000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ device_type = "mdio";
+ compatible = "fsl,mpc5200b-mdio";
+ reg = <3000 400>; // fec range, since we need to setup fec interrupts
+ interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
+ interrupt-parent = <&mpc5200_pic>;
+
+ phy0:ethernet-phy@0 {
+ device_type = "ethernet-phy";
+ reg = <0>;
+ };
};
ata@3a00 {
@@ -141,11 +158,19 @@
};
i2c@3d40 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "fsl,mpc5200-i2c","fsl-i2c";
reg = <3d40 40>;
interrupts = <2 10 0>;
interrupt-parent = <&mpc5200_pic>;
fsl5200-clocking;
+
+ rtc@68 {
+ device_type = "rtc";
+ compatible = "dallas,ds1307";
+ reg = <68>;
+ };
};
sram@8000 {
@@ -154,6 +179,23 @@
};
};
+ lpb {
+ model = "fsl,lpb";
+ compatible = "fsl,lpb";
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 fc000000 02000000>;
+
+ flash@0,0 {
+ compatible = "cfi-flash";
+ reg = <0 0 02000000>;
+ bank-width = <4>;
+ device-width = <2>;
+ #size-cells = <1>;
+ #address-cells = <1>;
+ };
+ };
+
pci@f0000d00 {
#interrupt-cells = <1>;
#size-cells = <2>;
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [POWERPC] mpc52xx: Amalgamated dts fixes and updates
2008-03-21 23:56 ` [POWERPC] mpc52xx: Amalgamated dts fixes and updates Bartlomiej Sieka
@ 2008-03-22 0:12 ` David Gibson
2008-03-22 3:47 ` Grant Likely
2008-03-22 0:41 ` Anatolij Gustschin
` (2 subsequent siblings)
3 siblings, 1 reply; 31+ messages in thread
From: David Gibson @ 2008-03-22 0:12 UTC (permalink / raw)
To: Bartlomiej Sieka; +Cc: linuxppc-dev, Anatolij Gustschin, Paul Mackerras
On Sat, Mar 22, 2008 at 12:56:35AM +0100, Bartlomiej Sieka wrote:
> The bulk of this patch is taken from
> http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few
> other updates, in particluar one posted by Anatolij Gustschin, which fixes
> an Oops during boot.
>
> Signed-off-by: Marian Balakowicz <m8@semihalf.com>
> ---
> Anatolij, would you like to add your S-O-B?
>
> diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
> index 30737ea..8b2e8e4 100644
> --- a/arch/powerpc/boot/dts/cm5200.dts
> +++ b/arch/powerpc/boot/dts/cm5200.dts
> @@ -159,6 +159,7 @@
> };
>
> dma-controller@1200 {
> + device_type = "dma-controller";
This is not right. If adding device_type here fixes something, then
the driver is wrong and should be fixed instead.
[snip]
> + mdio@3000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + device_type = "mdio";
Likewise device_type should not appear here.
[snip]
> i2c@3d40 {
> + #address-cells = <1>;
> + #size-cells = <0>;
Looks like incorrect indentation here.
[snip]
> + mscan@900 {
> + compatible = "mpc5200b-mscan\0mpc5200-mscan";
Use "mpc5200b-mscan", "mpc5200-mscan" instead of the embedded \0.
[snip]
> dma-controller@1200 {
> + device_type = "dma-controller";
As above.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [POWERPC] mpc52xx: Amalgamated dts fixes and updates
2008-03-21 23:56 ` [POWERPC] mpc52xx: Amalgamated dts fixes and updates Bartlomiej Sieka
2008-03-22 0:12 ` David Gibson
@ 2008-03-22 0:41 ` Anatolij Gustschin
2008-03-22 3:14 ` Grant Likely
2008-03-24 16:59 ` [POWERPC] mpc52xx: " Wolfgang Grandegger
3 siblings, 0 replies; 31+ messages in thread
From: Anatolij Gustschin @ 2008-03-22 0:41 UTC (permalink / raw)
To: Bartlomiej Sieka; +Cc: linuxppc-dev, Paul Mackerras
Bartlomiej Sieka wrote:
> The bulk of this patch is taken from
> http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few
> other updates, in particluar one posted by Anatolij Gustschin, which fixes
> an Oops during boot.
>
> Signed-off-by: Marian Balakowicz <m8@semihalf.com>
> ---
> Anatolij, would you like to add your S-O-B?
Signed-off-by: Anatolij Gustschin <agust@denx.de>
>
> diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
> index 30737ea..8b2e8e4 100644
> --- a/arch/powerpc/boot/dts/cm5200.dts
> +++ b/arch/powerpc/boot/dts/cm5200.dts
> @@ -159,6 +159,7 @@
> };
>
> dma-controller@1200 {
> + device_type = "dma-controller";
> compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
> reg = <1200 80>;
> interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
> @@ -212,13 +213,31 @@
> ethernet@3000 {
> device_type = "network";
> compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
> - reg = <3000 800>;
> + reg = <3000 400>;
> local-mac-address = [ 00 00 00 00 00 00 ];
> interrupts = <2 5 0>;
> interrupt-parent = <&mpc5200_pic>;
> + phy-handle = <&phy0>;
> + };
> +
> + mdio@3000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + device_type = "mdio";
> + compatible = "fsl,mpc5200b-mdio";
> + reg = <3000 400>; // fec range, since we need to setup fec interrupts
> + interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
> + interrupt-parent = <&mpc5200_pic>;
> +
> + phy0:ethernet-phy@0 {
> + device_type = "ethernet-phy";
> + reg = <0>;
> + };
> };
>
> i2c@3d40 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
> reg = <3d40 40>;
> interrupts = <2 10 0>;
> @@ -231,4 +250,22 @@
> reg = <8000 4000>;
> };
> };
> +
> + lpb {
> + model = "fsl,lpb";
> + compatible = "fsl,lpb";
> + #address-cells = <2>;
> + #size-cells = <1>;
> + ranges = <0 0 fc000000 2000000>;
> +
> + // 16-bit flash device at LocalPlus Bus CS0
> + flash@0,0 {
> + compatible = "cfi-flash";
> + reg = <0 0 2000000>;
> + bank-width = <2>;
> + device-width = <2>;
> + #size-cells = <1>;
> + #address-cells = <1>;
> + };
> + };
> };
> diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts
> index 76951ab..9ca81ff 100644
> --- a/arch/powerpc/boot/dts/motionpro.dts
> +++ b/arch/powerpc/boot/dts/motionpro.dts
> @@ -127,6 +127,13 @@
> interrupt-parent = <&mpc5200_pic>;
> };
>
> + mscan@900 {
> + compatible = "mpc5200b-mscan\0mpc5200-mscan";
> + interrupts = <2 11 0>;
> + interrupt-parent = <&mpc5200_pic>;
> + reg = <900 80>;
> + };
> +
> mscan@980 {
> compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
> interrupts = <2 12 0>;
> @@ -148,7 +155,6 @@
> interrupt-parent = <&mpc5200_pic>;
> };
>
> -
> spi@f00 {
> compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
> reg = <f00 20>;
> @@ -164,6 +170,7 @@
> };
>
> dma-controller@1200 {
> + device_type = "dma-controller";
> compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
> reg = <1200 80>;
> interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
> @@ -209,10 +216,26 @@
> ethernet@3000 {
> device_type = "network";
> compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
> - reg = <3000 800>;
> + reg = <3000 400>;
> local-mac-address = [ 00 00 00 00 00 00 ];
> interrupts = <2 5 0>;
> interrupt-parent = <&mpc5200_pic>;
> + phy-handle = <&phy0>;
> + };
> +
> + mdio@3000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + device_type = "mdio";
> + compatible = "fsl,mpc5200b-mdio";
> + reg = <3000 400>; // fec range, since we need to setup fec interrupts
> + interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
> + interrupt-parent = <&mpc5200_pic>;
> +
> + phy0:ethernet-phy@0 {
> + device_type = "ethernet-phy";
> + reg = <2>;
> + };
> };
>
> ata@3a00 {
> @@ -223,11 +246,19 @@
> };
>
> i2c@3d40 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
> reg = <3d40 40>;
> interrupts = <2 10 0>;
> interrupt-parent = <&mpc5200_pic>;
> fsl5200-clocking;
> +
> + rtc@68 {
> + device_type = "rtc";
> + compatible = "dallas,ds1339";
> + reg = <68>;
> + };
> };
>
> sram@8000 {
> @@ -240,7 +271,8 @@
> compatible = "fsl,lpb";
> #address-cells = <2>;
> #size-cells = <1>;
> - ranges = <1 0 50000000 00010000
> + ranges = <0 0 ff000000 01000000
> + 1 0 50000000 00010000
> 2 0 50010000 00010000
> 3 0 50020000 00010000>;
>
> @@ -271,31 +303,15 @@
> compatible = "promess,pro_module_dio";
> reg = <3 800 2>;
> };
> - };
>
> - pci@f0000d00 {
> - #interrupt-cells = <1>;
> - #size-cells = <2>;
> - #address-cells = <3>;
> - device_type = "pci";
> - compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci";
> - reg = <f0000d00 100>;
> - interrupt-map-mask = <f800 0 0 7>;
> - interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot
> - c000 0 0 2 &mpc5200_pic 1 1 3
> - c000 0 0 3 &mpc5200_pic 1 2 3
> - c000 0 0 4 &mpc5200_pic 1 3 3
> -
> - c800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot
> - c800 0 0 2 &mpc5200_pic 1 2 3
> - c800 0 0 3 &mpc5200_pic 1 3 3
> - c800 0 0 4 &mpc5200_pic 0 0 3>;
> - clock-frequency = <0>; // From boot loader
> - interrupts = <2 8 0 2 9 0 2 a 0>;
> - interrupt-parent = <&mpc5200_pic>;
> - bus-range = <0 0>;
> - ranges = <42000000 0 80000000 80000000 0 20000000
> - 02000000 0 a0000000 a0000000 0 10000000
> - 01000000 0 00000000 b0000000 0 01000000>;
> + // 16-bit flash device at LocalPlus Bus CS0
> + flash@0,0 {
> + compatible = "cfi-flash";
> + reg = <0 0 01000000>;
> + bank-width = <2>;
> + device-width = <2>;
> + #size-cells = <1>;
> + #address-cells = <1>;
> + };
> };
> };
> diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
> index c86464f..bbac984 100644
> --- a/arch/powerpc/boot/dts/tqm5200.dts
> +++ b/arch/powerpc/boot/dts/tqm5200.dts
> @@ -83,6 +83,7 @@
> };
>
> dma-controller@1200 {
> + device_type = "dma-controller";
> compatible = "fsl,mpc5200-bestcomm";
> reg = <1200 80>;
> interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
> @@ -127,10 +128,26 @@
> ethernet@3000 {
> device_type = "network";
> compatible = "fsl,mpc5200-fec";
> - reg = <3000 800>;
> + reg = <3000 400>;
> local-mac-address = [ 00 00 00 00 00 00 ];
> interrupts = <2 5 0>;
> interrupt-parent = <&mpc5200_pic>;
> + phy-handle = <&phy0>;
> + };
> +
> + mdio@3000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + device_type = "mdio";
> + compatible = "fsl,mpc5200b-mdio";
> + reg = <3000 400>; // fec range, since we need to setup fec interrupts
> + interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
> + interrupt-parent = <&mpc5200_pic>;
> +
> + phy0:ethernet-phy@0 {
> + device_type = "ethernet-phy";
> + reg = <0>;
> + };
> };
>
> ata@3a00 {
> @@ -141,11 +158,19 @@
> };
>
> i2c@3d40 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> compatible = "fsl,mpc5200-i2c","fsl-i2c";
> reg = <3d40 40>;
> interrupts = <2 10 0>;
> interrupt-parent = <&mpc5200_pic>;
> fsl5200-clocking;
> +
> + rtc@68 {
> + device_type = "rtc";
> + compatible = "dallas,ds1307";
> + reg = <68>;
> + };
> };
>
> sram@8000 {
> @@ -154,6 +179,23 @@
> };
> };
>
> + lpb {
> + model = "fsl,lpb";
> + compatible = "fsl,lpb";
> + #address-cells = <2>;
> + #size-cells = <1>;
> + ranges = <0 0 fc000000 02000000>;
> +
> + flash@0,0 {
> + compatible = "cfi-flash";
> + reg = <0 0 02000000>;
> + bank-width = <4>;
> + device-width = <2>;
> + #size-cells = <1>;
> + #address-cells = <1>;
> + };
> + };
> +
> pci@f0000d00 {
> #interrupt-cells = <1>;
> #size-cells = <2>;
>
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [POWERPC] mpc52xx: Amalgamated dts fixes and updates
2008-03-21 23:56 ` [POWERPC] mpc52xx: Amalgamated dts fixes and updates Bartlomiej Sieka
2008-03-22 0:12 ` David Gibson
2008-03-22 0:41 ` Anatolij Gustschin
@ 2008-03-22 3:14 ` Grant Likely
2008-03-26 19:45 ` [RESEND][POWERPC] mpc5200: " Bartlomiej Sieka
2008-03-24 16:59 ` [POWERPC] mpc52xx: " Wolfgang Grandegger
3 siblings, 1 reply; 31+ messages in thread
From: Grant Likely @ 2008-03-22 3:14 UTC (permalink / raw)
To: Bartlomiej Sieka; +Cc: linuxppc-dev, Anatolij Gustschin, Paul Mackerras
On Fri, Mar 21, 2008 at 5:56 PM, Bartlomiej Sieka <tur@semihalf.com> wrote:
> The bulk of this patch is taken from
> http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few
> other updates, in particluar one posted by Anatolij Gustschin, which fixes
> an Oops during boot.
>
> Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Comments below.
> ---
> Anatolij, would you like to add your S-O-B?
>
> diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
> index 30737ea..8b2e8e4 100644
> --- a/arch/powerpc/boot/dts/cm5200.dts
> +++ b/arch/powerpc/boot/dts/cm5200.dts
> @@ -159,6 +159,7 @@
> };
>
> dma-controller@1200 {
> + device_type = "dma-controller";
> compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
> reg = <1200 80>;
> interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
> @@ -212,13 +213,31 @@
> ethernet@3000 {
> device_type = "network";
> compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
> - reg = <3000 800>;
> + reg = <3000 400>;
> local-mac-address = [ 00 00 00 00 00 00 ];
> interrupts = <2 5 0>;
> interrupt-parent = <&mpc5200_pic>;
> + phy-handle = <&phy0>;
> + };
> +
> + mdio@3000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + device_type = "mdio";
Drop device type; it's unneeded and unused.
> + compatible = "fsl,mpc5200b-mdio";
Should technically be "fsl,mpc5200b-mdio", "fsl,mpc5200-mdio"; (I
know the lite5200b.dts doesn't have this either, but I'll write a
patch right now to fix it so that it's correct in .25)
I regret introducing "fsl,mpc5200b-*" at all since the 5200b is really
just a bug fix of the 5200 except for a very few incompatible device
changes. Just the nodes for specific incompatible devices need to
claim 5200b-<blah> in their compatible string (without claiming
5200-<blah>). It seems to me that specific silicon revision
differences by conventional is too fine grained for the compatible
field and if really needed can be discovered from the SVR.
I may even drop it in the .26 series. All device trees in the wild
claim compatibility with both so it won't break any existing boards.
heh; I guess that's just a long winded way to say make sure
fsl,mpc5200-mdio is in there so it remains possible to drop
mpc5200b-mdio in the future.
> + reg = <3000 400>; // fec range, since we need to setup fec interrupts
> + interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
> + interrupt-parent = <&mpc5200_pic>;
> +
> + phy0:ethernet-phy@0 {
> + device_type = "ethernet-phy";
> + reg = <0>;
> + };
> };
>
> i2c@3d40 {
> + #address-cells = <1>;
> + #size-cells = <0>;
inconsistent indentation?
> compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
> reg = <3d40 40>;
> interrupts = <2 10 0>;
> @@ -231,4 +250,22 @@
> reg = <8000 4000>;
> };
> };
> +
> + lpb {
> + model = "fsl,lpb";
> + compatible = "fsl,lpb";
> + #address-cells = <2>;
> + #size-cells = <1>;
> + ranges = <0 0 fc000000 2000000>;
> +
> + // 16-bit flash device at LocalPlus Bus CS0
> + flash@0,0 {
> + compatible = "cfi-flash";
> + reg = <0 0 2000000>;
> + bank-width = <2>;
> + device-width = <2>;
> + #size-cells = <1>;
> + #address-cells = <1>;
> + };
> + };
> };
> diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts
> index 76951ab..9ca81ff 100644
> --- a/arch/powerpc/boot/dts/motionpro.dts
> +++ b/arch/powerpc/boot/dts/motionpro.dts
> @@ -127,6 +127,13 @@
> interrupt-parent = <&mpc5200_pic>;
> };
>
> + mscan@900 {
> + compatible = "mpc5200b-mscan\0mpc5200-mscan";
"mpc5200b-mscan", "mpc5200-mscan"; The '\0' is depreciated.
> + interrupts = <2 11 0>;
> + interrupt-parent = <&mpc5200_pic>;
> + reg = <900 80>;
> + };
> +
> mscan@980 {
> compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
> interrupts = <2 12 0>;
> @@ -148,7 +155,6 @@
> interrupt-parent = <&mpc5200_pic>;
> };
>
> -
> spi@f00 {
> compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
> reg = <f00 20>;
> @@ -164,6 +170,7 @@
> };
>
> dma-controller@1200 {
> + device_type = "dma-controller";
> compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
> reg = <1200 80>;
> interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
> @@ -209,10 +216,26 @@
> ethernet@3000 {
> device_type = "network";
> compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
> - reg = <3000 800>;
> + reg = <3000 400>;
> local-mac-address = [ 00 00 00 00 00 00 ];
> interrupts = <2 5 0>;
> interrupt-parent = <&mpc5200_pic>;
> + phy-handle = <&phy0>;
> + };
> +
> + mdio@3000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + device_type = "mdio";
Drop device type
> + compatible = "fsl,mpc5200b-mdio";
Same here; should include fsl,mpc5200-mdio
> + reg = <3000 400>; // fec range, since we need to setup fec interrupts
> + interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
> + interrupt-parent = <&mpc5200_pic>;
> +
> + phy0:ethernet-phy@0 {
> + device_type = "ethernet-phy";
> + reg = <2>;
> + };
> };
>
> ata@3a00 {
> @@ -223,11 +246,19 @@
> };
>
> i2c@3d40 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
> reg = <3d40 40>;
> interrupts = <2 10 0>;
> interrupt-parent = <&mpc5200_pic>;
> fsl5200-clocking;
> +
> + rtc@68 {
> + device_type = "rtc";
> + compatible = "dallas,ds1339";
> + reg = <68>;
> + };
> };
>
> sram@8000 {
> @@ -240,7 +271,8 @@
> compatible = "fsl,lpb";
> #address-cells = <2>;
> #size-cells = <1>;
> - ranges = <1 0 50000000 00010000
> + ranges = <0 0 ff000000 01000000
> + 1 0 50000000 00010000
> 2 0 50010000 00010000
> 3 0 50020000 00010000>;
>
> @@ -271,31 +303,15 @@
> compatible = "promess,pro_module_dio";
> reg = <3 800 2>;
> };
> - };
>
> - pci@f0000d00 {
> - #interrupt-cells = <1>;
> - #size-cells = <2>;
> - #address-cells = <3>;
> - device_type = "pci";
> - compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci";
> - reg = <f0000d00 100>;
> - interrupt-map-mask = <f800 0 0 7>;
> - interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot
> - c000 0 0 2 &mpc5200_pic 1 1 3
> - c000 0 0 3 &mpc5200_pic 1 2 3
> - c000 0 0 4 &mpc5200_pic 1 3 3
> -
> - c800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot
> - c800 0 0 2 &mpc5200_pic 1 2 3
> - c800 0 0 3 &mpc5200_pic 1 3 3
> - c800 0 0 4 &mpc5200_pic 0 0 3>;
> - clock-frequency = <0>; // From boot loader
> - interrupts = <2 8 0 2 9 0 2 a 0>;
> - interrupt-parent = <&mpc5200_pic>;
> - bus-range = <0 0>;
> - ranges = <42000000 0 80000000 80000000 0 20000000
> - 02000000 0 a0000000 a0000000 0 10000000
> - 01000000 0 00000000 b0000000 0 01000000>;
> + // 16-bit flash device at LocalPlus Bus CS0
> + flash@0,0 {
> + compatible = "cfi-flash";
> + reg = <0 0 01000000>;
> + bank-width = <2>;
> + device-width = <2>;
> + #size-cells = <1>;
> + #address-cells = <1>;
> + };
> };
> };
> diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
> index c86464f..bbac984 100644
> --- a/arch/powerpc/boot/dts/tqm5200.dts
> +++ b/arch/powerpc/boot/dts/tqm5200.dts
> @@ -83,6 +83,7 @@
> };
>
> dma-controller@1200 {
> + device_type = "dma-controller";
> compatible = "fsl,mpc5200-bestcomm";
> reg = <1200 80>;
> interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
> @@ -127,10 +128,26 @@
> ethernet@3000 {
> device_type = "network";
> compatible = "fsl,mpc5200-fec";
> - reg = <3000 800>;
> + reg = <3000 400>;
> local-mac-address = [ 00 00 00 00 00 00 ];
> interrupts = <2 5 0>;
> interrupt-parent = <&mpc5200_pic>;
> + phy-handle = <&phy0>;
> + };
> +
> + mdio@3000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + device_type = "mdio";
ditto
> + compatible = "fsl,mpc5200b-mdio";
ditto
> + reg = <3000 400>; // fec range, since we need to setup fec interrupts
> + interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
> + interrupt-parent = <&mpc5200_pic>;
> +
> + phy0:ethernet-phy@0 {
> + device_type = "ethernet-phy";
> + reg = <0>;
> + };
> };
>
> ata@3a00 {
> @@ -141,11 +158,19 @@
> };
>
> i2c@3d40 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> compatible = "fsl,mpc5200-i2c","fsl-i2c";
> reg = <3d40 40>;
> interrupts = <2 10 0>;
> interrupt-parent = <&mpc5200_pic>;
> fsl5200-clocking;
> +
> + rtc@68 {
> + device_type = "rtc";
> + compatible = "dallas,ds1307";
> + reg = <68>;
> + };
> };
>
> sram@8000 {
> @@ -154,6 +179,23 @@
> };
> };
>
> + lpb {
> + model = "fsl,lpb";
> + compatible = "fsl,lpb";
> + #address-cells = <2>;
> + #size-cells = <1>;
> + ranges = <0 0 fc000000 02000000>;
> +
> + flash@0,0 {
> + compatible = "cfi-flash";
> + reg = <0 0 02000000>;
> + bank-width = <4>;
> + device-width = <2>;
> + #size-cells = <1>;
> + #address-cells = <1>;
> + };
> + };
> +
> pci@f0000d00 {
> #interrupt-cells = <1>;
> #size-cells = <2>;
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [POWERPC] mpc52xx: Amalgamated dts fixes and updates
2008-03-22 0:12 ` David Gibson
@ 2008-03-22 3:47 ` Grant Likely
0 siblings, 0 replies; 31+ messages in thread
From: Grant Likely @ 2008-03-22 3:47 UTC (permalink / raw)
To: Bartlomiej Sieka, Grant Likely, linuxppc-dev, Anatolij Gustschin,
Paul Mackerras
On Fri, Mar 21, 2008 at 6:12 PM, David Gibson
<david@gibson.dropbear.id.au> wrote:
> On Sat, Mar 22, 2008 at 12:56:35AM +0100, Bartlomiej Sieka wrote:
> > diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
> > index 30737ea..8b2e8e4 100644
> > --- a/arch/powerpc/boot/dts/cm5200.dts
> > +++ b/arch/powerpc/boot/dts/cm5200.dts
> > @@ -159,6 +159,7 @@
> > };
> >
> > dma-controller@1200 {
> > + device_type = "dma-controller";
>
> This is not right. If adding device_type here fixes something, then
> the driver is wrong and should be fixed instead.
I just sent a patch that fixes the driver bug.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Oops with TQM5200 on TQM5200
2008-03-20 21:27 ` Grant Likely
@ 2008-03-22 10:49 ` Anatolij Gustschin
2008-03-22 14:39 ` Grant Likely
0 siblings, 1 reply; 31+ messages in thread
From: Anatolij Gustschin @ 2008-03-22 10:49 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
Grant Likely wrote:
> On Thu, Mar 20, 2008 at 10:17 AM, Bartlomiej Sieka <tur@semihalf.com> wrote:
>> Anatolij Gustschin wrote:
>> > Hello Wolfgang,
>> >
>> > Wolfgang Grandegger wrote:
>> >
>> >> I just tried Linux 2.6.25-rc6 on my TQM5200 module and got the attached
>> >> oops. Are there any known patches fixing the problems?
>> >
>> > try the patch below for tqm5200.dts, rebuild dtb and boot
>> > again. Not sure if it works for Linux 2.6.25-rc6, but for
>> > 2.6.25-rc3 it does.
>>
>> It helps 2.6.25-rc6 too - thanks Anatolij.
>>
>>
>> >
>> > Anatolij
>> > --
>> > diff --git a/arch/powerpc/boot/dts/tqm5200.dts
>> > b/arch/powerpc/boot/dts/tqm5200.dts
>> > index c86464f..7c23bb3 100644
>> > --- a/arch/powerpc/boot/dts/tqm5200.dts
>> > +++ b/arch/powerpc/boot/dts/tqm5200.dts
>> > @@ -83,6 +83,7 @@
>> > };
>> >
>> > dma-controller@1200 {
>> > + device_type = "dma-controller";
>>
>> This actually fixes the Oops.
>
> Hmm, this sounds like a band-aid; the kernel shouldn't oops if this is
> missing from the device tree. Fail, perhaps, but oops is worrisome.
> Would someone like to investigate?
results of some further investigation:
the "bestcomm-core" driver defines its of_match table as follows
static struct of_device_id mpc52xx_bcom_of_match[] = {
{ .type = "dma-controller", .compatible = "fsl,mpc5200-bestcomm", },
{ .type = "dma-controller", .compatible = "mpc5200-bestcomm", },
{},
};
so while registering the driver the drivers probe function won't be
called because of_match_node shows unexpected behavior in the case
that device tree node lacks device_type = "dma-controller" definition.
here is the current of_match_node code for quick reference:
drivers/of/base.c:309
const struct of_device_id *of_match_node(const struct of_device_id *matches,
const struct device_node *node)
{
while (matches->name[0] || matches->type[0] || matches->compatible[0]) {
int match = 1;
if (matches->name[0])
match &= node->name
&& !strcmp(matches->name, node->name);
if (matches->type[0])
match &= node->type
&& !strcmp(matches->type, node->type);
if (matches->compatible[0])
match &= of_device_is_compatible(node,
matches->compatible);
if (match)
return matches;
matches++;
}
return NULL;
}
So, the bestcomm-core driver provided the type field, but the
device tree node lacks it. The "if (matches->type[0])" case is true
and "node->type && !strcmp(matches->type, node->type)" evaluates to
zero, so match flag is set to zero. Now there is still a chance that
compatible property will match but even if it is the case, match flag
remains zero:
"match &= of_device_is_compatible(node, matches->compatible)" always
sets match flag to zero if match was zero previously. of_match_node
returns NULL, the bestcomm-core driver probe won't be called and thus
the drivers bcom_engine structure won't be allocated. Referencing this
structure later causes observed Oops.
Checking bcom_eng pointer for NULL before referencing data pointed
by it prevents oopsing, but fec driver still doesn't work (because
of the lost bestcomm match and resulted task allocation failure).
Actually the compatible property exists and should match and so
the fec driver shoud work.
I suggest removing .type = "dma-controller" from the bestcomm driver's
mpc52xx_bcom_of_match table to solve the problem.
What do you think?
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c
index f589999..137d830 100644
--- a/arch/powerpc/sysdev/bestcomm/bestcomm.c
+++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c
@@ -484,8 +484,8 @@ mpc52xx_bcom_remove(struct of_device *op)
}
static struct of_device_id mpc52xx_bcom_of_match[] = {
- { .type = "dma-controller", .compatible = "fsl,mpc5200-bestcomm", },
- { .type = "dma-controller", .compatible = "mpc5200-bestcomm", },
+ { .compatible = "fsl,mpc5200-bestcomm", },
+ { .compatible = "mpc5200-bestcomm", },
{},
};
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: Oops with TQM5200 on TQM5200
2008-03-22 10:49 ` Anatolij Gustschin
@ 2008-03-22 14:39 ` Grant Likely
0 siblings, 0 replies; 31+ messages in thread
From: Grant Likely @ 2008-03-22 14:39 UTC (permalink / raw)
To: Anatolij Gustschin, Paul Mackerras; +Cc: linuxppc-dev
On Sat, Mar 22, 2008 at 4:49 AM, Anatolij Gustschin <agust@denx.de> wrote:
> Checking bcom_eng pointer for NULL before referencing data pointed
> by it prevents oopsing, but fec driver still doesn't work (because
> of the lost bestcomm match and resulted task allocation failure).
> Actually the compatible property exists and should match and so
> the fec driver shoud work.
>
> I suggest removing .type = "dma-controller" from the bestcomm driver's
> mpc52xx_bcom_of_match table to solve the problem.
>
> What do you think?
Yes, I agree. .compatible is completely sufficient to match the
device so .type is superfluous in this case. Removing it is
appropriate.
I've already sent a patch to fix the null pointer deref.
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Paul, here's one more bug fix to pick up for .25. (I think we're done now)
Cheers,
g.
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c
> index f589999..137d830 100644
> --- a/arch/powerpc/sysdev/bestcomm/bestcomm.c
> +++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c
> @@ -484,8 +484,8 @@ mpc52xx_bcom_remove(struct of_device *op)
> }
>
> static struct of_device_id mpc52xx_bcom_of_match[] = {
> - { .type = "dma-controller", .compatible = "fsl,mpc5200-bestcomm", },
> - { .type = "dma-controller", .compatible = "mpc5200-bestcomm", },
> + { .compatible = "fsl,mpc5200-bestcomm", },
> + { .compatible = "mpc5200-bestcomm", },
> {},
> };
>
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Oops with TQM5200 on TQM5200
2008-03-21 6:30 ` Oops with TQM5200 on TQM5200 Wolfgang Grandegger
2008-03-21 19:02 ` Grant Likely
@ 2008-03-24 6:47 ` Paul Mackerras
2008-03-25 9:54 ` Wolfgang Grandegger
1 sibling, 1 reply; 31+ messages in thread
From: Paul Mackerras @ 2008-03-24 6:47 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: linuxppc-dev, Anatolij Gustschin
Wolfgang Grandegger writes:
> Bartlomiej Sieka wrote:
> > Grant Likely wrote:
> >> Paul, my git server is down at the moment. Can you please pick this
> >> one up for .25? It is needed to boot the tqm5200 board.
> >
> > Could we also have similar fixes for cm5200.dts and motionpro.dts picked
> > up? I could provide the patches within a day -- will this be OK?
>
> At that occasion, could you please also add two CAN nodes to tqm5200.dts
> as shown:
Does this really need to go in for 2.6.25 -- i.e., does it fix a
regression or a serious bug (not just a missing feature)? If so,
please send it with a proper subject and patch description, with your
Signed-off-by.
Paul.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [POWERPC] mpc52xx: Amalgamated dts fixes and updates
2008-03-21 23:56 ` [POWERPC] mpc52xx: Amalgamated dts fixes and updates Bartlomiej Sieka
` (2 preceding siblings ...)
2008-03-22 3:14 ` Grant Likely
@ 2008-03-24 16:59 ` Wolfgang Grandegger
3 siblings, 0 replies; 31+ messages in thread
From: Wolfgang Grandegger @ 2008-03-24 16:59 UTC (permalink / raw)
To: Bartlomiej Sieka; +Cc: linuxppc-dev, Anatolij Gustschin, Paul Mackerras
Bartlomiej Sieka wrote:
> The bulk of this patch is taken from
> http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few
> other updates, in particluar one posted by Anatolij Gustschin, which fixes
> an Oops during boot.
>
> Signed-off-by: Marian Balakowicz <m8@semihalf.com>
> ---
> Anatolij, would you like to add your S-O-B?
>
> diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
> index 30737ea..8b2e8e4 100644
> --- a/arch/powerpc/boot/dts/cm5200.dts
> +++ b/arch/powerpc/boot/dts/cm5200.dts
> @@ -159,6 +159,7 @@
> };
>
> dma-controller@1200 {
> + device_type = "dma-controller";
> compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
> reg = <1200 80>;
> interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
> @@ -212,13 +213,31 @@
> ethernet@3000 {
> device_type = "network";
> compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
> - reg = <3000 800>;
> + reg = <3000 400>;
> local-mac-address = [ 00 00 00 00 00 00 ];
> interrupts = <2 5 0>;
> interrupt-parent = <&mpc5200_pic>;
> + phy-handle = <&phy0>;
> + };
> +
> + mdio@3000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + device_type = "mdio";
> + compatible = "fsl,mpc5200b-mdio";
> + reg = <3000 400>; // fec range, since we need to setup fec interrupts
> + interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
> + interrupt-parent = <&mpc5200_pic>;
> +
> + phy0:ethernet-phy@0 {
> + device_type = "ethernet-phy";
> + reg = <0>;
> + };
> };
>
> i2c@3d40 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
> reg = <3d40 40>;
> interrupts = <2 10 0>;
> @@ -231,4 +250,22 @@
> reg = <8000 4000>;
> };
> };
> +
> + lpb {
> + model = "fsl,lpb";
> + compatible = "fsl,lpb";
> + #address-cells = <2>;
> + #size-cells = <1>;
> + ranges = <0 0 fc000000 2000000>;
> +
> + // 16-bit flash device at LocalPlus Bus CS0
> + flash@0,0 {
> + compatible = "cfi-flash";
> + reg = <0 0 2000000>;
> + bank-width = <2>;
> + device-width = <2>;
> + #size-cells = <1>;
> + #address-cells = <1>;
> + };
> + };
> };
> diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts
> index 76951ab..9ca81ff 100644
> --- a/arch/powerpc/boot/dts/motionpro.dts
> +++ b/arch/powerpc/boot/dts/motionpro.dts
> @@ -127,6 +127,13 @@
> interrupt-parent = <&mpc5200_pic>;
> };
>
> + mscan@900 {
> + compatible = "mpc5200b-mscan\0mpc5200-mscan";
> + interrupts = <2 11 0>;
> + interrupt-parent = <&mpc5200_pic>;
> + reg = <900 80>;
> + };
> +
If I remember correctly, the motionpro board has only _one_ MSCAN port
wired. Therefore please discard the above hunk.
Wolfgang.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Oops with TQM5200 on TQM5200
2008-03-24 6:47 ` Paul Mackerras
@ 2008-03-25 9:54 ` Wolfgang Grandegger
0 siblings, 0 replies; 31+ messages in thread
From: Wolfgang Grandegger @ 2008-03-25 9:54 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, Anatolij Gustschin
Paul Mackerras wrote:
> Wolfgang Grandegger writes:
>> Bartlomiej Sieka wrote:
>>> Grant Likely wrote:
>>>> Paul, my git server is down at the moment. Can you please pick this
>>>> one up for .25? It is needed to boot the tqm5200 board.
>>> Could we also have similar fixes for cm5200.dts and motionpro.dts picked
>>> up? I could provide the patches within a day -- will this be OK?
>> At that occasion, could you please also add two CAN nodes to tqm5200.dts
>> as shown:
>
> Does this really need to go in for 2.6.25 -- i.e., does it fix a
> regression or a serious bug (not just a missing feature)? If so,
> please send it with a proper subject and patch description, with your
> Signed-off-by.
It's not a serious bug fix, of course, but the mentioned DTS file needs
fixing anyhow and I asked Bartlomiej to add the two CAN nodes at that
occasion to avoid another round of updates.
Thanks,
Wolfgang.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates
2008-03-22 3:14 ` Grant Likely
@ 2008-03-26 19:45 ` Bartlomiej Sieka
2008-03-26 20:35 ` Grant Likely
2008-03-26 21:02 ` [RESEND][POWERPC] " Matt Sealey
0 siblings, 2 replies; 31+ messages in thread
From: Bartlomiej Sieka @ 2008-03-26 19:45 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, Anatolij Gustschin, Paul Mackerras
The bulk of this patch is taken from
http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few
other updates.
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
---
Addressed comments from the list; would appreciate picking up as the patch
fixes booting issue on TQM5200 and Motion-PRO (cm5200 changes are analogous,
but not tested due to hardware unavailability).
diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
index 30737ea..2d25ca8 100644
--- a/arch/powerpc/boot/dts/cm5200.dts
+++ b/arch/powerpc/boot/dts/cm5200.dts
@@ -212,13 +212,30 @@
ethernet@3000 {
device_type = "network";
compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
- reg = <3000 800>;
+ reg = <3000 400>;
local-mac-address = [ 00 00 00 00 00 00 ];
interrupts = <2 5 0>;
interrupt-parent = <&mpc5200_pic>;
+ phy-handle = <&phy0>;
+ };
+
+ mdio@3000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
+ reg = <3000 400>; // fec range, since we need to setup fec interrupts
+ interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
+ interrupt-parent = <&mpc5200_pic>;
+
+ phy0:ethernet-phy@0 {
+ device_type = "ethernet-phy";
+ reg = <0>;
+ };
};
i2c@3d40 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
reg = <3d40 40>;
interrupts = <2 10 0>;
@@ -231,4 +248,22 @@
reg = <8000 4000>;
};
};
+
+ lpb {
+ model = "fsl,lpb";
+ compatible = "fsl,lpb";
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 fc000000 2000000>;
+
+ // 16-bit flash device at LocalPlus Bus CS0
+ flash@0,0 {
+ compatible = "cfi-flash";
+ reg = <0 0 2000000>;
+ bank-width = <2>;
+ device-width = <2>;
+ #size-cells = <1>;
+ #address-cells = <1>;
+ };
+ };
};
diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts
index 76951ab..f27256b 100644
--- a/arch/powerpc/boot/dts/motionpro.dts
+++ b/arch/powerpc/boot/dts/motionpro.dts
@@ -148,7 +148,6 @@
interrupt-parent = <&mpc5200_pic>;
};
-
spi@f00 {
compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
reg = <f00 20>;
@@ -209,10 +208,25 @@
ethernet@3000 {
device_type = "network";
compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
- reg = <3000 800>;
+ reg = <3000 400>;
local-mac-address = [ 00 00 00 00 00 00 ];
interrupts = <2 5 0>;
interrupt-parent = <&mpc5200_pic>;
+ phy-handle = <&phy0>;
+ };
+
+ mdio@3000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
+ reg = <3000 400>; // fec range, since we need to setup fec interrupts
+ interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
+ interrupt-parent = <&mpc5200_pic>;
+
+ phy0:ethernet-phy@0 {
+ device_type = "ethernet-phy";
+ reg = <2>;
+ };
};
ata@3a00 {
@@ -223,11 +237,19 @@
};
i2c@3d40 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
reg = <3d40 40>;
interrupts = <2 10 0>;
interrupt-parent = <&mpc5200_pic>;
fsl5200-clocking;
+
+ rtc@68 {
+ device_type = "rtc";
+ compatible = "dallas,ds1339";
+ reg = <68>;
+ };
};
sram@8000 {
@@ -240,7 +262,8 @@
compatible = "fsl,lpb";
#address-cells = <2>;
#size-cells = <1>;
- ranges = <1 0 50000000 00010000
+ ranges = <0 0 ff000000 01000000
+ 1 0 50000000 00010000
2 0 50010000 00010000
3 0 50020000 00010000>;
@@ -271,31 +294,15 @@
compatible = "promess,pro_module_dio";
reg = <3 800 2>;
};
- };
- pci@f0000d00 {
- #interrupt-cells = <1>;
- #size-cells = <2>;
- #address-cells = <3>;
- device_type = "pci";
- compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci";
- reg = <f0000d00 100>;
- interrupt-map-mask = <f800 0 0 7>;
- interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot
- c000 0 0 2 &mpc5200_pic 1 1 3
- c000 0 0 3 &mpc5200_pic 1 2 3
- c000 0 0 4 &mpc5200_pic 1 3 3
-
- c800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot
- c800 0 0 2 &mpc5200_pic 1 2 3
- c800 0 0 3 &mpc5200_pic 1 3 3
- c800 0 0 4 &mpc5200_pic 0 0 3>;
- clock-frequency = <0>; // From boot loader
- interrupts = <2 8 0 2 9 0 2 a 0>;
- interrupt-parent = <&mpc5200_pic>;
- bus-range = <0 0>;
- ranges = <42000000 0 80000000 80000000 0 20000000
- 02000000 0 a0000000 a0000000 0 10000000
- 01000000 0 00000000 b0000000 0 01000000>;
+ // 16-bit flash device at LocalPlus Bus CS0
+ flash@0,0 {
+ compatible = "cfi-flash";
+ reg = <0 0 01000000>;
+ bank-width = <2>;
+ device-width = <2>;
+ #size-cells = <1>;
+ #address-cells = <1>;
+ };
};
};
diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
index c86464f..d2dc278 100644
--- a/arch/powerpc/boot/dts/tqm5200.dts
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -127,10 +127,25 @@
ethernet@3000 {
device_type = "network";
compatible = "fsl,mpc5200-fec";
- reg = <3000 800>;
+ reg = <3000 400>;
local-mac-address = [ 00 00 00 00 00 00 ];
interrupts = <2 5 0>;
interrupt-parent = <&mpc5200_pic>;
+ phy-handle = <&phy0>;
+ };
+
+ mdio@3000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
+ reg = <3000 400>; // fec range, since we need to setup fec interrupts
+ interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
+ interrupt-parent = <&mpc5200_pic>;
+
+ phy0:ethernet-phy@0 {
+ device_type = "ethernet-phy";
+ reg = <0>;
+ };
};
ata@3a00 {
@@ -141,11 +156,19 @@
};
i2c@3d40 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "fsl,mpc5200-i2c","fsl-i2c";
reg = <3d40 40>;
interrupts = <2 10 0>;
interrupt-parent = <&mpc5200_pic>;
fsl5200-clocking;
+
+ rtc@68 {
+ device_type = "rtc";
+ compatible = "dallas,ds1307";
+ reg = <68>;
+ };
};
sram@8000 {
@@ -154,6 +177,23 @@
};
};
+ lpb {
+ model = "fsl,lpb";
+ compatible = "fsl,lpb";
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 fc000000 02000000>;
+
+ flash@0,0 {
+ compatible = "cfi-flash";
+ reg = <0 0 02000000>;
+ bank-width = <4>;
+ device-width = <2>;
+ #size-cells = <1>;
+ #address-cells = <1>;
+ };
+ };
+
pci@f0000d00 {
#interrupt-cells = <1>;
#size-cells = <2>;
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates
2008-03-26 19:45 ` [RESEND][POWERPC] mpc5200: " Bartlomiej Sieka
@ 2008-03-26 20:35 ` Grant Likely
2008-03-26 20:48 ` Wolfgang Grandegger
2008-03-26 21:18 ` [RESEND2][POWERPC] " Bartlomiej Sieka
2008-03-26 21:02 ` [RESEND][POWERPC] " Matt Sealey
1 sibling, 2 replies; 31+ messages in thread
From: Grant Likely @ 2008-03-26 20:35 UTC (permalink / raw)
To: Bartlomiej Sieka; +Cc: linuxppc-dev, Anatolij Gustschin, Paul Mackerras
On Wed, Mar 26, 2008 at 1:45 PM, Bartlomiej Sieka <tur@semihalf.com> wrote:
> The bulk of this patch is taken from
> http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few
> other updates.
>
> Signed-off-by: Marian Balakowicz <m8@semihalf.com>
> ---
> Addressed comments from the list; would appreciate picking up as the patch
> fixes booting issue on TQM5200 and Motion-PRO (cm5200 changes are analogous,
> but not tested due to hardware unavailability).
I see one obvious error; but other than that it looks good. Once that
is fixed I can recommend for Paul to pick it up for .25. It's just
dts changes, so I don't expect it to be a problem.
Cheers,
g.
> diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts
> index 76951ab..f27256b 100644
> --- a/arch/powerpc/boot/dts/motionpro.dts
> +++ b/arch/powerpc/boot/dts/motionpro.dts
> @@ -209,10 +208,25 @@
> + mdio@3000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
> + reg = <3000 400>; // fec range, since we need to setup fec interrupts
> + interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
> + interrupt-parent = <&mpc5200_pic>;
> +
> + phy0:ethernet-phy@0 {
> + device_type = "ethernet-phy";
> + reg = <2>;
This doesn't look right. Reg should match the value in "ethernet-phy@0"
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates
2008-03-26 20:35 ` Grant Likely
@ 2008-03-26 20:48 ` Wolfgang Grandegger
2008-03-26 21:32 ` Bartlomiej Sieka
2008-03-26 21:18 ` [RESEND2][POWERPC] " Bartlomiej Sieka
1 sibling, 1 reply; 31+ messages in thread
From: Wolfgang Grandegger @ 2008-03-26 20:48 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, Paul Mackerras, Anatolij Gustschin
Grant Likely wrote:
> On Wed, Mar 26, 2008 at 1:45 PM, Bartlomiej Sieka <tur@semihalf.com> wrote:
>> The bulk of this patch is taken from
>> http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few
>> other updates.
>>
>> Signed-off-by: Marian Balakowicz <m8@semihalf.com>
>> ---
>> Addressed comments from the list; would appreciate picking up as the patch
>> fixes booting issue on TQM5200 and Motion-PRO (cm5200 changes are analogous,
>> but not tested due to hardware unavailability).
>
> I see one obvious error; but other than that it looks good. Once that
> is fixed I can recommend for Paul to pick it up for .25. It's just
> dts changes, so I don't expect it to be a problem.
>
> Cheers,
> g.
>
>> diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts
>> index 76951ab..f27256b 100644
>> --- a/arch/powerpc/boot/dts/motionpro.dts
>> +++ b/arch/powerpc/boot/dts/motionpro.dts
>> @@ -209,10 +208,25 @@
>> + mdio@3000 {
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> + compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
>> + reg = <3000 400>; // fec range, since we need to setup fec interrupts
>> + interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
>> + interrupt-parent = <&mpc5200_pic>;
>> +
>> + phy0:ethernet-phy@0 {
>> + device_type = "ethernet-phy";
>> + reg = <2>;
>
> This doesn't look right. Reg should match the value in "ethernet-phy@0"
And whats about the two CAN nodes for tqm5200.dts? Do we have them already?
Thanks,
Wolfgang.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates
2008-03-26 19:45 ` [RESEND][POWERPC] mpc5200: " Bartlomiej Sieka
2008-03-26 20:35 ` Grant Likely
@ 2008-03-26 21:02 ` Matt Sealey
2008-03-26 21:16 ` Grant Likely
1 sibling, 1 reply; 31+ messages in thread
From: Matt Sealey @ 2008-03-26 21:02 UTC (permalink / raw)
To: Bartlomiej Sieka; +Cc: linuxppc-dev, Anatolij Gustschin, Paul Mackerras
Bartlomiej Sieka wrote:
> +
> + phy0:ethernet-phy@0 {
> + device_type = "ethernet-phy";
> + reg = <0>;
> + };
What's the parsing of this pan out to? What does it mean?
Having colons in device names is totally contrary to OF device naming
spec. Does the part after the colon have a special meaning to the DTC?
I also was under the impression that device_type was invalid in a DTS
file, have we changed our minds again?
--
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates
2008-03-26 21:02 ` [RESEND][POWERPC] " Matt Sealey
@ 2008-03-26 21:16 ` Grant Likely
2008-03-26 22:51 ` David Gibson
0 siblings, 1 reply; 31+ messages in thread
From: Grant Likely @ 2008-03-26 21:16 UTC (permalink / raw)
To: Matt Sealey; +Cc: linuxppc-dev, Paul Mackerras, Anatolij Gustschin
On Wed, Mar 26, 2008 at 3:02 PM, Matt Sealey <matt@genesi-usa.com> wrote:
> Bartlomiej Sieka wrote:
> > +
> > + phy0:ethernet-phy@0 {
> > + device_type = "ethernet-phy";@0"
> > + reg = <0>;
> > + };
>
> What's the parsing of this pan out to? What does it mean?
>
> Having colons in device names is totally contrary to OF device naming
> spec. Does the part after the colon have a special meaning to the DTC?
"phy0:" is a label used by dtc.
"ethernet-phy@0" is the node name.
>
> I also was under the impression that device_type was invalid in a DTS
> file, have we changed our minds again?
No, we haven't. It kind of sneaked back in for ethernet phys. I
don't know why.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [RESEND2][POWERPC] mpc5200: Amalgamated dts fixes and updates
2008-03-26 20:35 ` Grant Likely
2008-03-26 20:48 ` Wolfgang Grandegger
@ 2008-03-26 21:18 ` Bartlomiej Sieka
1 sibling, 0 replies; 31+ messages in thread
From: Bartlomiej Sieka @ 2008-03-26 21:18 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, Anatolij Gustschin, Paul Mackerras
The bulk of this patch is taken from
http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few
other updates.
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
index 30737ea..2d25ca8 100644
--- a/arch/powerpc/boot/dts/cm5200.dts
+++ b/arch/powerpc/boot/dts/cm5200.dts
@@ -212,13 +212,30 @@
ethernet@3000 {
device_type = "network";
compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
- reg = <3000 800>;
+ reg = <3000 400>;
local-mac-address = [ 00 00 00 00 00 00 ];
interrupts = <2 5 0>;
interrupt-parent = <&mpc5200_pic>;
+ phy-handle = <&phy0>;
+ };
+
+ mdio@3000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
+ reg = <3000 400>; // fec range, since we need to setup fec interrupts
+ interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
+ interrupt-parent = <&mpc5200_pic>;
+
+ phy0:ethernet-phy@0 {
+ device_type = "ethernet-phy";
+ reg = <0>;
+ };
};
i2c@3d40 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
reg = <3d40 40>;
interrupts = <2 10 0>;
@@ -231,4 +248,22 @@
reg = <8000 4000>;
};
};
+
+ lpb {
+ model = "fsl,lpb";
+ compatible = "fsl,lpb";
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 fc000000 2000000>;
+
+ // 16-bit flash device at LocalPlus Bus CS0
+ flash@0,0 {
+ compatible = "cfi-flash";
+ reg = <0 0 2000000>;
+ bank-width = <2>;
+ device-width = <2>;
+ #size-cells = <1>;
+ #address-cells = <1>;
+ };
+ };
};
diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts
index 76951ab..d86eba0 100644
--- a/arch/powerpc/boot/dts/motionpro.dts
+++ b/arch/powerpc/boot/dts/motionpro.dts
@@ -148,7 +148,6 @@
interrupt-parent = <&mpc5200_pic>;
};
-
spi@f00 {
compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
reg = <f00 20>;
@@ -209,10 +208,25 @@
ethernet@3000 {
device_type = "network";
compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
- reg = <3000 800>;
+ reg = <3000 400>;
local-mac-address = [ 00 00 00 00 00 00 ];
interrupts = <2 5 0>;
interrupt-parent = <&mpc5200_pic>;
+ phy-handle = <&phy0>;
+ };
+
+ mdio@3000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
+ reg = <3000 400>; // fec range, since we need to setup fec interrupts
+ interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
+ interrupt-parent = <&mpc5200_pic>;
+
+ phy0:ethernet-phy@2 {
+ device_type = "ethernet-phy";
+ reg = <2>;
+ };
};
ata@3a00 {
@@ -223,11 +237,19 @@
};
i2c@3d40 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
reg = <3d40 40>;
interrupts = <2 10 0>;
interrupt-parent = <&mpc5200_pic>;
fsl5200-clocking;
+
+ rtc@68 {
+ device_type = "rtc";
+ compatible = "dallas,ds1339";
+ reg = <68>;
+ };
};
sram@8000 {
@@ -240,7 +262,8 @@
compatible = "fsl,lpb";
#address-cells = <2>;
#size-cells = <1>;
- ranges = <1 0 50000000 00010000
+ ranges = <0 0 ff000000 01000000
+ 1 0 50000000 00010000
2 0 50010000 00010000
3 0 50020000 00010000>;
@@ -271,31 +294,15 @@
compatible = "promess,pro_module_dio";
reg = <3 800 2>;
};
- };
- pci@f0000d00 {
- #interrupt-cells = <1>;
- #size-cells = <2>;
- #address-cells = <3>;
- device_type = "pci";
- compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci";
- reg = <f0000d00 100>;
- interrupt-map-mask = <f800 0 0 7>;
- interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot
- c000 0 0 2 &mpc5200_pic 1 1 3
- c000 0 0 3 &mpc5200_pic 1 2 3
- c000 0 0 4 &mpc5200_pic 1 3 3
-
- c800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot
- c800 0 0 2 &mpc5200_pic 1 2 3
- c800 0 0 3 &mpc5200_pic 1 3 3
- c800 0 0 4 &mpc5200_pic 0 0 3>;
- clock-frequency = <0>; // From boot loader
- interrupts = <2 8 0 2 9 0 2 a 0>;
- interrupt-parent = <&mpc5200_pic>;
- bus-range = <0 0>;
- ranges = <42000000 0 80000000 80000000 0 20000000
- 02000000 0 a0000000 a0000000 0 10000000
- 01000000 0 00000000 b0000000 0 01000000>;
+ // 16-bit flash device at LocalPlus Bus CS0
+ flash@0,0 {
+ compatible = "cfi-flash";
+ reg = <0 0 01000000>;
+ bank-width = <2>;
+ device-width = <2>;
+ #size-cells = <1>;
+ #address-cells = <1>;
+ };
};
};
diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
index c86464f..d2dc278 100644
--- a/arch/powerpc/boot/dts/tqm5200.dts
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -127,10 +127,25 @@
ethernet@3000 {
device_type = "network";
compatible = "fsl,mpc5200-fec";
- reg = <3000 800>;
+ reg = <3000 400>;
local-mac-address = [ 00 00 00 00 00 00 ];
interrupts = <2 5 0>;
interrupt-parent = <&mpc5200_pic>;
+ phy-handle = <&phy0>;
+ };
+
+ mdio@3000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
+ reg = <3000 400>; // fec range, since we need to setup fec interrupts
+ interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
+ interrupt-parent = <&mpc5200_pic>;
+
+ phy0:ethernet-phy@0 {
+ device_type = "ethernet-phy";
+ reg = <0>;
+ };
};
ata@3a00 {
@@ -141,11 +156,19 @@
};
i2c@3d40 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "fsl,mpc5200-i2c","fsl-i2c";
reg = <3d40 40>;
interrupts = <2 10 0>;
interrupt-parent = <&mpc5200_pic>;
fsl5200-clocking;
+
+ rtc@68 {
+ device_type = "rtc";
+ compatible = "dallas,ds1307";
+ reg = <68>;
+ };
};
sram@8000 {
@@ -154,6 +177,23 @@
};
};
+ lpb {
+ model = "fsl,lpb";
+ compatible = "fsl,lpb";
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0 0 fc000000 02000000>;
+
+ flash@0,0 {
+ compatible = "cfi-flash";
+ reg = <0 0 02000000>;
+ bank-width = <4>;
+ device-width = <2>;
+ #size-cells = <1>;
+ #address-cells = <1>;
+ };
+ };
+
pci@f0000d00 {
#interrupt-cells = <1>;
#size-cells = <2>;
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates
2008-03-26 20:48 ` Wolfgang Grandegger
@ 2008-03-26 21:32 ` Bartlomiej Sieka
0 siblings, 0 replies; 31+ messages in thread
From: Bartlomiej Sieka @ 2008-03-26 21:32 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: linuxppc-dev, Anatolij Gustschin, Paul Mackerras
Wolfgang Grandegger wrote:
> Grant Likely wrote:
>> On Wed, Mar 26, 2008 at 1:45 PM, Bartlomiej Sieka <tur@semihalf.com> wrote:
>>> The bulk of this patch is taken from
>>> http://patchwork.ozlabs.org/linuxppc/patch?q=Balakowicz&id=16197, with few
>>> other updates.
>>>
>>> Signed-off-by: Marian Balakowicz <m8@semihalf.com>
>>> ---
>>> Addressed comments from the list; would appreciate picking up as the patch
>>> fixes booting issue on TQM5200 and Motion-PRO (cm5200 changes are analogous,
>>> but not tested due to hardware unavailability).
>> I see one obvious error; but other than that it looks good. Once that
>> is fixed I can recommend for Paul to pick it up for .25. It's just
>> dts changes, so I don't expect it to be a problem.
>>
>> Cheers,
[...]
> And whats about the two CAN nodes for tqm5200.dts? Do we have them already?
Hello Wolfgang,
patchwork shows your updates as "Awaiting Upstream"
(http://patchwork.ozlabs.org/linuxppc/patch?q=Grandegger&id=17444), so I
haven't included them in my patch. I suppose you should follow-up with
Grant/Paulus on the status?
Regards,
Bartlomiej
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates
2008-03-26 21:16 ` Grant Likely
@ 2008-03-26 22:51 ` David Gibson
2008-03-26 22:57 ` Matt Sealey
0 siblings, 1 reply; 31+ messages in thread
From: David Gibson @ 2008-03-26 22:51 UTC (permalink / raw)
To: Grant Likely; +Cc: Anatolij Gustschin, Paul Mackerras, linuxppc-dev
On Wed, Mar 26, 2008 at 03:16:47PM -0600, Grant Likely wrote:
> On Wed, Mar 26, 2008 at 3:02 PM, Matt Sealey <matt@genesi-usa.com> wrote:
> > Bartlomiej Sieka wrote:
> > > +
> > > + phy0:ethernet-phy@0 {
> > > + device_type = "ethernet-phy";@0"
> > > + reg = <0>;
> > > + };
> >
> > What's the parsing of this pan out to? What does it mean?
> >
> > Having colons in device names is totally contrary to OF device naming
> > spec. Does the part after the colon have a special meaning to the DTC?
>
> "phy0:" is a label used by dtc.
> "ethernet-phy@0" is the node name.
I would suggest a space after the colon though, to make this clearer.
That's the style I've been using in all my dts files.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates
2008-03-26 22:51 ` David Gibson
@ 2008-03-26 22:57 ` Matt Sealey
2008-03-26 23:28 ` David Gibson
0 siblings, 1 reply; 31+ messages in thread
From: Matt Sealey @ 2008-03-26 22:57 UTC (permalink / raw)
To: Grant Likely, Matt Sealey, linuxppc-dev, Paul Mackerras,
Anatolij Gustschin
David Gibson wrote:
> On Wed, Mar 26, 2008 at 03:16:47PM -0600, Grant Likely wrote:
>> On Wed, Mar 26, 2008 at 3:02 PM, Matt Sealey <matt@genesi-usa.com> wrote:
>>> Bartlomiej Sieka wrote:
>>> > +
>>> > + phy0:ethernet-phy@0 {
>>> > + device_type = "ethernet-phy";@0"
>>> > + reg = <0>;
>>> > + };
>>>
>>> What's the parsing of this pan out to? What does it mean?
>>>
>>> Having colons in device names is totally contrary to OF device naming
>>> spec. Does the part after the colon have a special meaning to the DTC?
>> "phy0:" is a label used by dtc.
>> "ethernet-phy@0" is the node name.
>
> I would suggest a space after the colon though, to make this clearer.
> That's the style I've been using in all my dts files.
I would suggest taking a hint from C structures...
ethernet-phy@0 {
name = "ethernet-phy";
reg = <0>;
foo = bar;
} phy0;
I mean, this is really intuitive, we all do this every day...
--
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [RESEND][POWERPC] mpc5200: Amalgamated dts fixes and updates
2008-03-26 22:57 ` Matt Sealey
@ 2008-03-26 23:28 ` David Gibson
0 siblings, 0 replies; 31+ messages in thread
From: David Gibson @ 2008-03-26 23:28 UTC (permalink / raw)
To: Matt Sealey; +Cc: linuxppc-dev, Anatolij Gustschin, Paul Mackerras
On Wed, Mar 26, 2008 at 10:57:30PM +0000, Matt Sealey wrote:
> David Gibson wrote:
>> On Wed, Mar 26, 2008 at 03:16:47PM -0600, Grant Likely wrote:
>>> On Wed, Mar 26, 2008 at 3:02 PM, Matt Sealey <matt@genesi-usa.com> wrote:
>>>> Bartlomiej Sieka wrote:
>>>> > +
>>>> > + phy0:ethernet-phy@0 {
>>>> > + device_type = "ethernet-phy";@0"
>>>> > + reg = <0>;
>>>> > + };
>>>>
>>>> What's the parsing of this pan out to? What does it mean?
>>>>
>>>> Having colons in device names is totally contrary to OF device naming
>>>> spec. Does the part after the colon have a special meaning to the DTC?
>>> "phy0:" is a label used by dtc.
>>> "ethernet-phy@0" is the node name.
>> I would suggest a space after the colon though, to make this clearer.
>> That's the style I've been using in all my dts files.
>
> I would suggest taking a hint from C structures...
>
> ethernet-phy@0 {
> name = "ethernet-phy";
> reg = <0>;
> foo = bar;
> } phy0;
>
> I mean, this is really intuitive, we all do this every day...
That's a terrible analogy though. The OF name is in no way like a
structure's type, which is what would go there. Plus it separates the
label from the top of the node which will make it harder to read.
The label syntax is already based on C labels, and can be used more
places than just nodes. Putting a space should make it rather
clearer, and is also closer to normal C style (how many people would
write
out:return(err);
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply [flat|nested] 31+ messages in thread
end of thread, other threads:[~2008-03-26 23:28 UTC | newest]
Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-20 14:18 Oops with TQM5200 on TQM5200 Wolfgang Grandegger
2008-03-20 14:41 ` Grant Likely
2008-03-20 15:24 ` Anatolij Gustschin
2008-03-20 16:17 ` Bartlomiej Sieka
2008-03-20 21:27 ` Grant Likely
2008-03-22 10:49 ` Anatolij Gustschin
2008-03-22 14:39 ` Grant Likely
2008-03-20 16:29 ` Wolfgang Grandegger
2008-03-20 23:50 ` Grant Likely
2008-03-21 0:07 ` Bartlomiej Sieka
2008-03-21 0:20 ` Grant Likely
2008-03-21 23:56 ` [POWERPC] mpc52xx: Amalgamated dts fixes and updates Bartlomiej Sieka
2008-03-22 0:12 ` David Gibson
2008-03-22 3:47 ` Grant Likely
2008-03-22 0:41 ` Anatolij Gustschin
2008-03-22 3:14 ` Grant Likely
2008-03-26 19:45 ` [RESEND][POWERPC] mpc5200: " Bartlomiej Sieka
2008-03-26 20:35 ` Grant Likely
2008-03-26 20:48 ` Wolfgang Grandegger
2008-03-26 21:32 ` Bartlomiej Sieka
2008-03-26 21:18 ` [RESEND2][POWERPC] " Bartlomiej Sieka
2008-03-26 21:02 ` [RESEND][POWERPC] " Matt Sealey
2008-03-26 21:16 ` Grant Likely
2008-03-26 22:51 ` David Gibson
2008-03-26 22:57 ` Matt Sealey
2008-03-26 23:28 ` David Gibson
2008-03-24 16:59 ` [POWERPC] mpc52xx: " Wolfgang Grandegger
2008-03-21 6:30 ` Oops with TQM5200 on TQM5200 Wolfgang Grandegger
2008-03-21 19:02 ` Grant Likely
2008-03-24 6:47 ` Paul Mackerras
2008-03-25 9:54 ` Wolfgang Grandegger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).