On 13.10.2015 12:38, Robert Jarzmik wrote:
Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> writes:
In your temporary patch you have:
@@ -67,6 +71,9 @@ static int zylonite_devices_init(void)
&smsc91x_pdata);
add_generic_device("mrvl_nand", DEVICE_ID_DYNAMIC, NULL,
0x43100000, 0x1000, IORESOURCE_MEM, &nand_pdata);
+ clk = clk_get_sys("nand", NULL);
+ if (!IS_ERR(clk))
+ clkdev_add_physbase(clk, 0x43100000, NULL);
Could it be that you register the clk lookup after the nand driver is probed? This
hunk should be moved before the nand device registration.
That's what I had thought, but changing the order gave me a panic, so I didn't
push forward.
Robert,
I pushed another version of the patch set with the following changes:
- Bail out of mrvl_nand_probe_dt early if
!IS_ENABLED(CONFIG_OFTREE) || host->dev->platform_data
- Move clkdev_add_physbase() before add_generic_device("mrvl_nand")
(Thanks Sascha!)
I hope the issues are resolved now and thanks a lot for testing
again!
Sebastian
This is what I had, decoded in [1].
Cheers.
--
Robert
[1] My backtrace with the inversion :
barebox@Zylonite:/ bootm /mnt/tftp/barebox.bin
bootm /mnt/tftp/barebox.bin
netconsole: netconsole initialized with 255.255.255.255:6662
eth0: 100Mbps full duplex link detected
DHCP client bound to address 192.168.1.232
Loading ARM barebox image '/mnt/tftp/barebox.bin'
commandline: ram=64M console=ttyS0,115200 mtdparts=pxa3xx_nand-0:128k@0(TIMH)ro,128k@128k(OBMI)ro,768k@256k(barebox),256k@1024k(barebox-env),12M@1280k(kernel),38016k@13568k(root)
arch_number: 1233
netconsole: port not set
netconsole: registered as netconsole-1
smc91c111 smc91c1110: chip is revision= 9, version= 2
mdio_bus: miibus0: probed
eth0: got preset MAC address: 00:0e:0c:a7:26:f7
zylonite_devices_init(): clk = 83703328
alloc_nand_resource(): clk_get() -> 83703328
unable to handle NULL pointer dereference at address 0x00000004
pc : [<83f15b9c>] lr : [<83f15b90>]
sp : 83fffed0 ip : 000001b0 fp : 00000000
r10: 00000002 r9 : 83706888 r8 : 83f8c88c
r7 : 00000000 r6 : 00000000 r5 : 83706948 r4 : 00000000
r3 : 83706888 r2 : 43100000 r1 : 83f60783 r0 : 00000000
Flags: nZCv IRQs off FIQs off Mode SVC_32
(mrvl_nand_probe+0x1ac/0x650) from device_probe (/drivers/base/driver.c:93)
(device_probe+0x30/0xb8) from match.part.3 (/drivers/base/driver.c:153)
(match.part.3+0x44/0x54) from register_device (/drivers/base/driver.c:192)
(register_device+0x120/0x15c) from add_generic_device (/drivers/base/resource.c:84)
(add_generic_device+0x3c/0x48) from zylonite_devices_init (/arch/arm/boards/zylonite/board.c:78)
(zylonite_devices_init+0x9c/0x108) from start_barebox (/common/startup.c:101)
(start_barebox+0x30/0xe8) from __start (/arch/arm/cpu/start.c:142)
(__start+0x124/0x13c) from 0x8386c290
(unwind_backtrace+0x0/0x90) from panic (/common/misc.c:209)
(panic+0x28/0x38) from do_exception (/arch/arm/cpu/interrupts.c:85)
(do_exception+0x10/0x14) from do_data_abort (/arch/arm/cpu/interrupts.c:139)
(do_data_abort+0x2c/0x38) from do_abort_6 (:?)
### ERROR ### Please RESET the board ###
And a special gift :
rj@belgarion:~/mio_linux/barebox$ addr2line -i -e barebox 0x83f15b9c
/home/rj/mio_linux/barebox/drivers/mtd/nand/nand_mrvl_nfc.c:1172
/home/rj/mio_linux/barebox/drivers/mtd/nand/nand_mrvl_nfc.c:1202
_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox