07-03-2013 06:54 AM
we have a small problem in combination with NAND and SD card boot.
We use NAND as primary boot source and it works well as long as we do not plug in a SD card and change bootargs in UBOOT to boot from SD card.
bootargs=console=ttyPS1,115200 root=/dev/mmcblk0p2 rootfstype=ext2 rw rootwait
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron MT29F4G08ABADAH4), 512MiB, page size: 2048, OOB size: 64 Bad block table found at page 262080, version 0x01 Bad block table found at page 262016, version 0x01 5 ofpart partitions found on MTD device xilinx_nand Creating 5 MTD partitions on "xilinx_nand": 0x000000000000-0x000000500000 : "uboot" 0x000000500000-0x000000600000 : "uboot-env" 0x000000600000-0x000000a00000 : "kernel" 0x000000a00000-0x000000b00000 : "devicetree" 0x000000b00000-0x00001ff00000 : "root" TCP: cubic registered NET: Registered protocol family 17 VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4 Registering SWP/SWPB emulation handler drivers/rtc/hctosys.c: unable to open rtc device (rtc0) Waiting for root device /dev/mmcblk0p2... usb 1-1: new high-speed USB device number 2 using xusbps-ehci mmc0: new high speed SDHC card at address 0002 mmcblk0: mmc0:0002 00000 3.70 GiB (ro) mmcblk0: p1 p2 VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -30 Please append a correct "root=" boot option; here are the available partitions: 1f00 5120 mtdblock0 (driver?) 1f01 1024 mtdblock1 (driver?) 1f02 4096 mtdblock2 (driver?) 1f03 1024 mtdblock3 (driver?) 1f04 512000 mtdblock4 (driver?) b300 3880960 mmcblk0 driver: mmcblk b301 487840 mmcblk0p1 000e0aff-01 b302 3390912 mmcblk0p2 000e0aff-02 Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2) CPU1: stopping Backtrace: [<c001177c>] (dump_backtrace+0x0/0x10c) from [<c03fec70>] (dump_stack+0x18/0x1c) r6:c057e44c r5:00000000 r4:00000001 r3:60000193 [<c03fec58>] (dump_stack+0x0/0x1c) from [<c00134e8>] (ipi_cpu_stop+0x44/0x74) [<c00134a4>] (ipi_cpu_stop+0x0/0x74) from [<c001378c>] (handle_IPI+0x64/0x84) r4:c0581ccc r3:c00134a4 [<c0013728>] (handle_IPI+0x0/0x84) from [<c0008570>] (gic_handle_irq+0x60/0x68) r5:ee075f68 r4:f8f00100 [<c0008510>] (gic_handle_irq+0x0/0x68) from [<c000dd80>] (__irq_svc+0x40/0x70) Exception stack(0xee075f68 to 0xee075fb0) 5f60: c05a7d10 a0000193 00000001 00000000 ee074000 c0407ecc 5f80: ee074000 c05a7b78 0000406a 413fc090 00000000 ee075fbc ee075fc0 ee075fb0 5fa0: c000ece4 c000ece8 60000113 ffffffff r6:ffffffff r5:60000113 r4:c000ece8 r3:c000ece4 [<c000ecbc>] (default_idle+0x0/0x34) from [<c000eeb4>] (cpu_idle+0xac/0xfc) [<c000ee08>] (cpu_idle+0x0/0xfc) from [<c03fc11c>] (secondary_start_kernel+0xdc/0xf0) r5:00000001 r4:c0588810 [<c03fc040>] (secondary_start_kernel+0x0/0xf0) from [<003fb70c>] (0x3fb70c) r6:10c0387d r5:00000015 r4:2e06006a r3:c03fb6f4
The point is disabling the NAND controller in our device tree let's it boot and work like a charm.
07-04-2013 05:18 AM
Configure and enable the "card detect" (CD pin) of the SD card. The default devicetree does NOT enable it, the SD driver seems to probe a bit too early without it, and then the SD doesn't work correctly.
07-07-2013 11:43 PM
Sorry for my late response.
The CD Pin is enabled in our devicetree:
xlnx,has-cd = <0x1>;
The Card detect works under Linux. The Kernel prints a message if we remove or insert the Card.
I forgot to say that the SD Card Slot is a "microSD Slot".
We also tried to activate the WP "Feature"
xlnx,has-wp = <0x1>;
and set it via the PL to Logic 0 or Logic 1. The appropriate register bit was alway 0.
After removing the Nand Controller from the devicetree the WP Bit was 1 and we had write access.
07-14-2013 11:14 PM
Was this issue resolved I am facing the same issue, I am missing some configurations.
07-16-2013 06:55 AM
My boards don't have any nand flash, so I can't really help with that. I can only suggest to double-check the pin assignments, it sounds like you have a conflict there. The "cd" missing has bit me once, so that's where my advice came from.
07-17-2013 01:27 AM
my college and me had to tweak the kernel a bit. Without tweaking we dind't get it to work.
Attached you will find a patch against the Xilinx Master Tree (3.9.0). As described above we are using micro sd card which don't have a "Lock Switch" so we disabled this function in the kernel.
r_vivek, hope that will help you too
05-08-2014 11:16 AM
The patch worked for me.
In 3.12.0 you'll find that sdhci-of-xilinxps.c was renamed to sdhci-of-arasan.c.