On 9 January 2015 at 18:16, Vladimir Komendantskiy <komendant...@gmail.com> wrote: > Can you help me understand this strange bug on a10s-olinuxino-m? I guess my > DT record for NAND MTD partitions is somehow incorrect because I happen to > get a kernel panic in the mainline 3.19 kernel that looks like this: > > [ 0.599782] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xde > [ 0.606203] nand: Hynix H27UCG8T2ETR-BC 8GiB 3.3V 8-bit > [ 0.611433] nand: 8192 MiB, MLC, erase size: 4096 KiB, page size: 16384, > OOB size: 1664 > [ 0.628428] Bad block table found at page 524032, version 0x01 > [ 0.650299] Bad block table found at page 523776, version 0x01 > [ 0.664100] nand_bbt: ECC error in BBT at 0x0000ffc00005 > [ 0.677393] nand_bbt: ECC error in BBT at 0x0000ff800005 > [ 0.682711] Scanning device for bad blocks > [ 1.086137] random: nonblocking pool is initialized > [ 1.769233] Bad eraseblock 1992 at 0x0001f23fc000 > [ 1.814688] Bad block table written to 0x0001ffc00000, version 0x01 > [ 1.832192] Bad block table written to 0x0001ff800000, version 0x01 > [ 1.839592] 4 ofpart partitions found on MTD device H27UCG8T2ETR-BC 8GiB > 3.3V 8-bit > [ 1.847297] Creating 4 MTD partitions on "H27UCG8T2ETR-BC 8GiB 3.3V > 8-bit": > [ 1.854275] 0x000000000000-0x000000400000 : "boot0" > [ 1.859622] 0x000000400000-0x000000800000 : "boot1" > [ 1.864877] 0x000000800000-0x000001800000 : "kernel" > [ 1.870197] 0x000001800000-0x000200000000 : "rootfs" > > <...snip...> > > [ 2.124638] Registering SWP/SWPB emulation handler > [ 2.129842] Unable to handle kernel NULL pointer dereference at virtual > address 00000713 > > > SWP/SWPB instruction emulation has nothing to do with the NFC. The kernel > boots OK as soon as I disable the NFC in the device tree. In a successful > boot attempt, this is followed by mmc0 initialisation. So, it looks like the > culprit is mmc0. However, disabling the leaf mmc nodes in the device tree > does not change the outcome. > > Here is my nfc configuration added to the mainline > sunxi-a10s-olinuxino-micro.dts. The pinctrl-0 definitions are standard, same > as in Boris' repo for Cubietruck. > > nfc: nand@01c03000 { compatible = "allwinner,sun4i-a10-nand"; reg = > <0x01c03000 0x1000>; interrupts = <37>; clocks = <&ahb_gates 13>, > <&nand_clk>; clock-names = "ahb", "mod"; #address-cells = <1>; #size-cells = > <0>; pinctrl-names = "default"; pinctrl-0 = <&nand_pins_a &nand_cs0_pins_a > &nand_rb0_pins_a>; status = "okay"; nand@0 { reg = <0>; allwinner,rb = <0>; > #address-cells = <1>; #size-cells = <2>; nand-on-flash-bbt; nand-ecc-mode = > "hw"; boot0@0 { label = "boot0"; reg = <0x0 0x0 0x400000>; }; boot1@400000 { > label = "boot1"; reg = <0x400000 0x0 0x400000>; }; kernel@800000 { label = > "kernel"; reg = <0x800000 0x0 0x1000000>; }; rootfs@1800000 { label = > "rootfs"; reg = <0x1800000 0x1 0xfe800000>; }; }; }; >
Hello, I use this tree with the nand patches and cubieboard DT patches https://github.com/hramrach/linux-sunxi/tree/sunxi-nand-next I can boot this on cubieboard1&2 so you should be able to adapt the cubieboard1 patch to sun5i HTH Michal -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.