This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x Android NAND Boot issue

Other Parts Discussed in Thread: AM3358, DA8XX

Hi,

I am working on a custom design based on AM3358 running android ICS. Followed the steps mentioned in http://processors.wiki.ti.com/index.php/TI-Android-ICS-4.0.3-DevKit-3.0.1_UserGuide#NAND_Booting  to flash and found different behavior on 2 similar NAND  part from different vendors,

1. Micron MT29F4G08 ABADAWP - Works fine.

2. Hynix H27U4G8F2D - Roofs filesystem mount fails giving following error

Uncompressing Linux... done, booting the kernel.
[    0.000000] Linux version 3.2.0-g85125c2-dirty (dilip@pc50) (gcc version 4.4.3 (GCC) ) #1 Thu Jan 3 17:29:26 IST 2013
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: am335xevm
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] AM335X ES1.0 (sgx neon )
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyO0,115200n8 androidboot.console=ttyO0 mem=256M root=ubi0:rootfs rootfstype=ubifs ubi.mtd=7,2048 rw rootwait init=/init if
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 256MB = 256MB total
[    0.000000] Memory: 250772k/250772k available, 11372k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc06b6000   (6840 kB)
[    0.000000]       .init : 0xc06b6000 - 0xc0750000   ( 616 kB)
[    0.000000]       .data : 0xc0750000 - 0xc07aae80   ( 364 kB)
[    0.000000]        .bss : 0xc07aaea4 - 0xc08deb10   (1232 kB)
[    0.000000] NR_IRQS:396
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] Total of 128 interrupts on 1 active controller
[    0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
[    0.000000] OMAP clocksource: GPTIMER1 at 32768 Hz
[    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
[    0.000000] Console: colour dummy device 80x30
[    0.000152] Calibrating delay loop... 718.02 BogoMIPS (lpj=3590144)
[    0.058929] pid_max: default: 32768 minimum: 301
[    0.059051] Security Framework initialized
[    0.059112] Mount-cache hash table entries: 512
[    0.059478] CPU: Testing write buffer coherency: ok
[    0.079376] omap_hwmod: pruss: failed to hardreset
[    0.080139] print_constraints: dummy:
[    0.080383] NET: Registered protocol family 16
[    0.081481] OMAP GPIO hardware version 0.1
[    0.082366] am335x_evm_init start
[    0.082519] omap_mux_init: Add partition: #1: core, flags: 0
[    0.083679]  omap_i2c.1: alias fck already exists
[    0.084045] calling setup_allgo_etab
[    0.084045] setup_allgo_etab
[    0.084045]
[    0.084075]  gpio_init
[    0.084533]  da8xx_lcdc.0: alias fck already exists
[    0.084686]  davinci-mcasp.0: alias fck already exists
[    0.084808] _omap_mux_get_by_name: Could not find signal spi_cs0.gpio0_5
[    0.085510]  omap_hsmmc.0: alias fck already exists
[    0.085632]  omap_hsmmc.2: alias fck already exists
[    0.085754] am335xevm: bt init
[    0.086273]  omap_i2c.2: alias fck already exists
[    0.086639] am335x_evm_init end
[    0.086791]  omap2_mcspi.1: alias fck already exists
[    0.086914]  omap2_mcspi.2: alias fck already exists
[    0.087066]  edma.0: alias fck already exists
[    0.087066]  edma.0: alias fck already exists
[    0.087097]  edma.0: alias fck already exists
[    0.097045] bio: create slab <bio-0> at 0
[    0.098052] SCSI subsystem initialized
[    0.098907] usbcore: registered new interface driver usbfs
[    0.099090] usbcore: registered new interface driver hub
[    0.099243] usbcore: registered new device driver usb
[    0.099365] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
[    0.099517] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
[    0.119018] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
[    0.138977] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 100 kHz
[    0.139556] Advanced Linux Sound Architecture Driver Version 1.0.24.
[    0.140136] Bluetooth: Core ver 2.16
[    0.140197] NET: Registered protocol family 31
[    0.140228] Bluetooth: HCI device and connection manager initialized
[    0.140228] Bluetooth: HCI socket layer initialized
[    0.140228] Bluetooth: L2CAP socket layer initialized
[    0.140258] Bluetooth: SCO socket layer initialized
[    0.140441] Switching to clocksource gp timer
[    0.148223] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[    0.148406] musb-hdrc musb-hdrc.0: dma type: pio
[    0.148590] MUSB0 controller's USBSS revision = 4ea20800
[    0.149108] musb-hdrc musb-hdrc.0: USB OTG mode controller at d083c000 using PIO, IRQ 18
[    0.149353] musb-hdrc musb-hdrc.1: dma type: pio
[    0.149505] MUSB1 controller's USBSS revision = 4ea20800
[    0.149627] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[    0.149688] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[    0.149841] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.149841] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.149871] usb usb1: Product: MUSB HDRC host driver
[    0.149871] usb usb1: Manufacturer: Linux 3.2.0-g85125c2-dirty musb-hcd
[    0.149902] usb usb1: SerialNumber: musb-hdrc.1
[    0.150360] hub 1-0:1.0: USB hub found
[    0.150390] hub 1-0:1.0: 1 port detected
[    0.150848] musb-hdrc musb-hdrc.1: USB Host mode controller at d083e800 using PIO, IRQ 19
[    0.151184] NET: Registered protocol family 2
[    0.151397] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.151763] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.151916] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[    0.152008] TCP: Hash tables configured (established 8192 bind 8192)
[    0.152038] TCP reno registered
[    0.152038] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.152069] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.152282] NET: Registered protocol family 1
[    0.152557] RPC: Registered named UNIX socket transport module.
[    0.152557] RPC: Registered udp transport module.
[    0.152587] RPC: Registered tcp transport module.
[    0.152587] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.152862] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.153076] omap-gpmc omap-gpmc: GPMC revision 6.0
[    0.153106] Registering NAND on CS0
[    0.283416] ashmem: initialized
[    0.283691] VFS: Disk quotas dquot_6.5.2
[    0.283752] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.284637] msgmni has been set to 489
[    0.285705] io scheduler noop registered
[    0.285705] io scheduler deadline registered
[    0.285797] io scheduler cfq registered (default)
[    0.286529] da8xx_lcdc da8xx_lcdc.0: GLCD: Found INNOLUX_AT070TN92 panel
[    0.286529] innolux_panel_power_ctrl state 1
[    0.302185] Console: switching to colour frame buffer device 100x30
[    0.315795] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[    0.974731] console [ttyO0] enabled
[    0.978790] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[    0.986511] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[    0.994171] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[    1.001831] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[    1.009460] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
[    1.023223] brd: module loaded
[    1.029541] loop: module loaded
[    1.033081] i2c-core: driver [tsl2550] using legacy suspend method
[    1.039550] i2c-core: driver [tsl2550] using legacy resume method
[    1.046051] (stk) :sysfs entries created
[    1.050170] (stk) : debugfs entries created
[    1.054565] _regulator_get: 1-0019 supply Vdd not found, using dummy regulator
[    1.062347] _regulator_get: 1-0019 supply Vdd_IO not found, using dummy regulator
[    1.090972] lis3lv02d: 8 bits 3DLH sensor found
[    1.181365] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input0
[    1.191619] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.198608] omap2-nand driver initializing
[    1.203216] ONFI flash detected
[    1.206634] ONFI param page 0 valid
[    1.210266] NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix H27U4G8F2DTR-BC)
[    1.218933] Creating 8 MTD partitions on "omap2-nand.0":
[    1.224517] 0x000000000000-0x000000020000 : "SPL"
[    1.230499] 0x000000020000-0x000000040000 : "SPL.backup1"
[    1.237091] 0x000000040000-0x000000060000 : "SPL.backup2"
[    1.243621] 0x000000060000-0x000000080000 : "SPL.backup3"
[    1.250152] 0x000000080000-0x000000260000 : "U-Boot"
[    1.256927] 0x000000260000-0x000000280000 : "U-Boot Env"
[    1.263305] 0x000000280000-0x000000780000 : "Kernel"
[    1.271362] 0x000000780000-0x000020000000 : "File System"
[    1.488067] usb 1-1: new high-speed USB device number 2 using musb-hdrc
[    1.495697] OneNAND driver initializing
[    1.500152] UBI: attaching mtd7 to ubi0
[    1.504180] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[    1.510711] UBI: logical eraseblock size:    126976 bytes
[    1.516357] UBI: smallest flash I/O unit:    2048
[    1.521270] UBI: sub-page size:              512
[    1.526092] UBI: VID header offset:          2048 (aligned 2048)
[    1.532348] UBI: data offset:                4096
[    1.672149] usb 1-1: New USB device found, idVendor=0424, idProduct=2512
[    1.679168] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    1.687225] hub 1-1:1.0: USB hub found
[    1.691833] hub 1-1:1.0: 2 ports detected
[    1.971649] usb 1-1.2: new high-speed USB device number 4 using musb-hdrc
[    2.114044] usb 1-1.2: New USB device found, idVendor=0ac8, idProduct=3450
[    2.121246] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.128845] usb 1-1.2: Product: Venus USB2.0 Camera
[    2.133941] usb 1-1.2: Manufacturer: Vimicro Corp.
[    4.510070] UBI: max. sequence number:       0
[    4.528228] UBI error: vtbl_check: bad CRC at record 8: 0x4b8de38, not 0xf116c36b
[    4.536102] UBI error: vtbl_check: bad CRC at record 8: 0x4b8de38, not 0xf116c36b
[    4.543914] UBI error: process_lvol: both volume tables are corrupted
[    4.551971] UBI error: ubi_init: cannot attach mtd7
[    4.557342] CAN device driver interface
[    4.561370] CAN bus driver for Bosch D_CAN controller 1.0
[    4.611145] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
[    4.617614] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
[    4.624938] davinci_mdio.0: probed
[    4.628540] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver SMSC LAN8710/LAN8720
[    4.637145] PPP generic driver version 2.4.2
[    4.641815] PPP BSD Compression module registered
[    4.646728] PPP Deflate Compression module registered
[    4.652160] usbcore: registered new interface driver cdc_ether
[    4.658294] usbcore: registered new interface driver cdc_eem
[    4.664276] usbcore: registered new interface driver dm9601
[    4.670135] usbcore: registered new interface driver cdc_subset
[    4.676361] cdc_ncm: 04-Aug-2011
[    4.679779] usbcore: registered new interface driver cdc_ncm
[    4.685821] usbcore: registered new interface driver cdc_acm
[    4.691741] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    4.700073] Initializing USB Mass Storage driver...
[    4.705352] usbcore: registered new interface driver usb-storage
[    4.711639] USB Mass Storage support registered.
[    4.716613] usbcore: registered new interface driver usbserial
[    4.722747] USB Serial support registered for generic
[    4.728179] usbcore: registered new interface driver usbserial_generic
[    4.734985] usbserial: USB Serial Driver core
[    4.739562] USB Serial support registered for GSM modem (1-port)
[    4.746124] usbcore: registered new interface driver option
[    4.751953] option: v0.7.2:USB Driver for GSM modems
[    4.758972]  gadget: Mass Storage Function, version: 2009/09/11
[    4.765197]  gadget: Number of LUNs=1
[    4.769012]  lun0: LUN: removable file: (no medium)
[    4.774353]  gadget: android_usb ready
[    4.778289] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
[    4.783905] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 2
[    4.791748] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    4.798828] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.806365] usb usb2: Product: MUSB HDRC host driver
[    4.811553] usb usb2: Manufacturer: Linux 3.2.0-g85125c2-dirty musb-hcd
[    4.818450] usb usb2: SerialNumber: musb-hdrc.0
[    4.823669] hub 2-0:1.0: USB hub found
[    4.827606] hub 2-0:1.0: 1 port detected
[    4.832336] mousedev: PS/2 mouse device common for all mice
[    4.838836] ts_dev is cf35b740 cf35b768
[    4.843750] using rtc device, omap_rtc, for alarms
[    4.848602] omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
[    4.855499] omap_rtc: already running
[    4.859375] i2c /dev entries driver
[    4.863311] Linux video capture interface: v2.00
[    4.868316] uvcvideo: Found UVC 1.00 device Venus USB2.0 Camera (0ac8:3450)
[    4.877685] input: Venus USB2.0 Camera as /devices/platform/omap/musb-ti81xx/musb-hdrc.1/usb1/1-1/1-1.2/1-1.2:1.0/input/input1
[    4.889892] usbcore: registered new interface driver uvcvideo
[    4.895904] USB Video Class driver (1.1.1)
[    4.903686] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    4.910217] device-mapper: uevent: version 1.0.3
[    4.915283] device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: dm-devel@redhat.com
[    4.924102] Bluetooth: HCI UART driver ver 2.2
[    4.928741] Bluetooth: HCI H4 protocol initialized
[    4.933746] Bluetooth: HCILL protocol initialized
[    4.938659] Bluetooth: Bluetooth Driver for TI WiLink - Version 1.0
[    4.946105] _regulator_get: deviceless supply vdd_mpu not found, using dummy regulator
[    4.954589] cpuidle: using governor ladder
[    4.959014] cpuidle: using governor menu
[    4.966796] usbcore: registered new interface driver usbhid
[    4.972686] usbhid: USB HID core driver
[    4.977172] logger: created 256K log 'log_main'
[    4.982055] logger: created 256K log 'log_events'
[    4.987060] logger: created 256K log 'log_radio'
[    4.992004] logger: created 256K log 'log_system'
[    4.997467] usbcore: registered new interface driver snd-usb-audio
[    5.273437] Completed adding dapm widgets size = 24
[    5.283447] Completed adding DAPM routes = 32
[    5.296020] widgets updated
[    5.301513] asoc: tlv320aic31xx-dai <-> davinci-mcasp.0 mapping ok
[    5.308715] ALSA device list:
[    5.311859]   #0: AM335X EVM
[    5.314849] oprofile: hardware counters not available
[    5.320098] oprofile: using timer interrupt.
[    5.324737] Netfilter messages via NETLINK v0.30.
[    5.329772] nf_conntrack version 0.5.0 (3918 buckets, 15672 max)
[    5.336395] ctnetlink v0.93: registering with nfnetlink.
[    5.342010] NF_TPROXY: Transparent proxy support initialized, version 4.1.0
[    5.349273] NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd.
[    5.355712] xt_time: kernel timezone is -0000
[    5.360473] ip_tables: (C) 2000-2006 Netfilter Core Team
[    5.366241] arp_tables: (C) 2002 David S. Miller
[    5.371185] TCP cubic registered
[    5.374725] NET: Registered protocol family 10
[    5.380157] Mobile IPv6
[    5.382781] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    5.388641] IPv6 over IPv4 tunneling driver
[    5.393646] NET: Registered protocol family 17
[    5.398315] NET: Registered protocol family 15
[    5.402954] can: controller area network core (rev 20090105 abi 8)
[    5.409545] NET: Registered protocol family 29
[    5.414184] can: raw protocol (rev 20090105)
[    5.418640] can: broadcast manager protocol (rev 20090105 t)
[    5.424804] Bluetooth: RFCOMM TTY layer initialized
[    5.429901] Bluetooth: RFCOMM socket layer initialized
[    5.435302] Bluetooth: RFCOMM ver 1.11
[    5.439208] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    5.444732] Bluetooth: BNEP filters: protocol multicast
[    5.450195] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    5.456512] Registering the dns_resolver key type
[    5.461517] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    5.469512] ThumbEE CPU extension supported.
[    5.474029] mux: Failed to setup hwmod io irq -22
[    5.479644] Power Management for AM33XX family
[    5.484527] Trying to load am335x-pm-firmware.bin (60 secs timeout)
[    5.491210] Copied the M3 firmware to UMEM
[    5.500335] clock: disabling unused clocks to save power
[    5.507446] Detected MACID=0:18:31:8d:c8:b4
[    5.513824] input: gpio-keys as /devices/platform/gpio-keys/input/input2
[    5.521209]
[    5.521209]
[    5.521240]  goodix_ts_init
[    5.521240]
[    5.539459] mmc0: host does not support reading read-only switch. assuming write-enable.
[    5.547973] mmc0: new SDHC card at address aaaa
[    5.553283] mmcblk0: mmc0:aaaa SU04G 3.69 GiB
[    5.558868] input: Goodix TouchScreen of GT80X as /devices/virtual/input/input3
[    5.568298]  mmcblk0: p1 p2
[    5.661132] enabling irq
[    5.661132]
[    5.685638] mmc1: card claims to support voltages below the defined range. These will be ignored.
[    5.702239] Goodix-TS 2-0055:  Guitar Version: GT801_1R07_2011081501_Goodix_Tech      
[    5.713043] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
[    5.719940] mmc1: new SDIO card at address 0001
[    6.101135] (stk) :line disc installation timed out
[    6.211120] Goodix-TS 2-0055: Start  Goodix TouchScreen of GT80X in Interrupt mode
[    6.219299] omap_rtc omap_rtc: setting system clock to 2000-01-01 00:04:10 UTC (946685050)
[    6.228424] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
[    6.235809] Please append a correct "root=" boot option; here are the available partitions:
[    6.244598] 1f00             128 mtdblock0  (driver?)
[    6.249877] 1f01             128 mtdblock1  (driver?)
[    6.255157] 1f02             128 mtdblock2  (driver?)
[    6.260437] 1f03             128 mtdblock3  (driver?)
[    6.265716] 1f04            1920 mtdblock4  (driver?)
[    6.270965] 1f05             128 mtdblock5  (driver?)
[    6.276275] 1f06            5120 mtdblock6  (driver?)
[    6.281555] 1f07          516608 mtdblock7  (driver?)
[    6.286804] b300         3872256 mmcblk0  driver: mmcblk
[    6.292388]   b301          200781 mmcblk0p1 00000000-0000-0000-0000-000000000000mmcblk0p1
[    6.300994]   b302         3670852 mmcblk0p2 00000000-0000-0000-0000-000000000000mmcblk0p2
[    6.309631] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    6.318267] Backtrace:
[    6.320831] [<c00180dc>] (dump_backtrace+0x0/0x10c) from [<c05185fc>] (dump_stack+0x18/0x1c)
[    6.329650]  r7:c06e6910 r6:00008000 r5:c07abe50 r4:c07abe50
[    6.335571] [<c05185e4>] (dump_stack+0x0/0x1c) from [<c0518664>] (panic+0x64/0x198)
[    6.343597] [<c0518600>] (panic+0x0/0x198) from [<c06b6d80>] (mount_block_root+0x174/0x228)
[    6.352294]  r3:00000000 r2:00000000 r1:cf81df78 r0:c06126a8
[    6.358245] [<c06b6c0c>] (mount_block_root+0x0/0x228) from [<c06b6f94>] (prepare_namespace+0x94/0x1c0)
[    6.367950] [<c06b6f00>] (prepare_namespace+0x0/0x1c0) from [<c06b62f8>] (kernel_init+0xf0/0x124)
[    6.377227]  r5:c074fc58 r4:c07aaec0
[    6.380981] [<c06b6208>] (kernel_init+0x0/0x124) from [<c003ffc4>] (do_exit+0x0/0x6ac)
[    6.389221]  r5:c06b6208 r4:00000000
[    7.851654] battery adc: failed to queue the work
[    8.851715] battery adc: failed to queue the work

Both NAND are similar part with only change in vendor. Any idea what is going wrong?

Regards,

Dilip

  • Hi, Dilip,

    Please check the AM335x TRM if the Hynix H27U4G8F2D NAND chip is supported. The table you will be looking for is Table 26-13. Supported NAND Devices on page 4072.

    Best regards,

    Miroslav

  • Hi Dilip,
     
    I want to add that from a quick check of datasheets Micron part supports 4-bit ECC, while Hynix supports 1-bit ECC.
     
  • Miroslav Kiradzhiyski XID said:

    Hi, Dilip,

    Please check the AM335x TRM if the Hynix H27U4G8F2D NAND chip is supported. The table you will be looking for is Table 26-13. Supported NAND Devices on page 4072.

    Best regards,

    Miroslav

    Hi Miroslav,

    I checked the device of id's of NAND part. Both are supported.

    Regards,

    Dilip

  • Hi Dilip,

    Would you please describe, step-by-step, exactly how you are creating the ubifs.img and ubi.img files, and please post the contents of the ubinize.cfg file used to create the ubi.img. It would be best if you provide full logs of your shell while creating those files. Also please copy and paste the contents of your shell while flashing the NAND with the SPL, the SPL backups, U-Boot, Kernel and UBI FS.

    I'm assuming the whole process is the same for both the NAND chips?

    Best regards,
    Miroslav
  • Miroslav Kiradzhiyski XID said:

    Hi Dilip,

    Would you please describe, step-by-step, exactly how you are creating the ubifs.img and ubi.img files, and please post the contents of the ubinize.cfg file used to create the ubi.img. It would be best if you provide full logs of your shell while creating those files. Also please copy and paste the contents of your shell while flashing the NAND with the SPL, the SPL backups, U-Boot, Kernel and UBI FS.

    I'm assuming the whole process is the same for both the NAND chips?

    Best regards,
    Miroslav

    Hi Miroslav,

    Following is the  image creation and flashing steps followed. boot.scr used for flashing is also pasted. I don't have shell outputs at this point, but all were okay without errors,

    ####################################################################################################################################

    Overview
    --------
    To flash images on to NAND, follwing steps are followed
    1. Create UBIFS images that has to flashed on NAND.
    2. Prepare the MMC/SD card with pre-built images
    3. Boot from SD card
    4. Flash images on to NAND

    1. Creating ubifs images
       ---------------------

    1.1 Install the following packages, required for building mtd-utils:

    $ sudo apt-get install uuid-dev libacl1-dev liblzo2-dev zlibc zlib1g-dev

    Download and build mtd-utils. For more information on mtd-utils, follow the link: http://processors.wiki.ti.com/index.php/MTD_Utilities

    $ git clone git://git.infradead.org/mtd-utils.git
    $ cd mtd-utils/
    $ git checkout v1.5.0
    $ make


    1.2 Creating ubifs image:

    $ sudo mkfs.ubifs/mkfs.ubifs -r <path-to-rootfs>/ -F -m 2048 -e 126976 -c 1580 -o ubifs.img

    1.3 Create/Edit ubinize.cfg:

    $ gvim ubinize.cfg
        [ubifs]
        mode=ubi
        image=ubifs.img
        vol_id=0
        vol_size=192MiB
        vol_type=dynamic
        vol_name=rootfs
        vol_flags=autoresize

    1.4 Creating ubi.img to be flashed:

    $ sudo ubi-utils/ubinize -o ubi.img -m 2048 -p 128KiB -s 512 -O 2048 ubinize.cfg

    2. Prepare SD/MMC Card
    --------------------
    The mkmmc-android-ubifs.sh partitions the MMC/SD card into two partiions namely boot and data.
    The script will then put the boot images, START_HERE folder, UBI FS image on boot partition and copy Media files to the data partition.
    This script will also set the NAND bootargs to let the system boot from NAND images from next boot onwards.

    #> sudo ./mkmmc-android-ubifs.sh <mmc/sd device>

    NOTE: MMC/SD Device can be /dev/sdc on your host machine

    3. Booting from SD and Flashing to NAND
    ---------------------------------------

    3.1 Boot AM335x tablet using MMC card

    3.2 On u-boot prompt stop the booting by pressing any key.

    3.3 Run the boot command on u-boot console to flash NAND with the kernel, bootloader, and UBIFS root filesystem, by following the below commands

    U-Boot> boot

    NOTE: Flashing NAND will take few minutes, please wait

    The boad will then automatically boot over NAND instead of MMC/SD over UBIFS.

    Following is the boot.scr file used for flashing

    <------------------------Boot.scr----------------------------------------------------------->
    echo Loading MLO from mmc ...
    if fatload mmc 0:1 0x81000000 MLO
    then
     echo Erasing x-loader NAND partition ...
     nandecc hw 2
     nand erase 0x00000000 0x00020000
     echo Writing MLO on NAND x-loader partition ...
     nand write 0x81000000 0x00000000 0x00020000
    fi
    echo Loading u-boot.img from mmc ...
    if fatload mmc 0 0x81000000 u-boot.img
    then
     echo Erasing u-boot NAND partition ...
     nandecc hw 2
     nand erase 0x00080000 0x001E0000
     echo Writing u-boot.img on NAND bootloader partition ...
     nand write 0x81000000 0x00080000 0x001E0000
    fi
    echo Loading uImage from mmc ...
    if fatload mmc 0 0x81000000 uImage
    then
     echo Erasing linux NAND partition ...
     nandecc hw 2
     nand erase 0x00280000 0x00500000
     echo Writing uImage on NAND linux partition ...
     nand write.i 0x81000000 0x00280000 0x00500000
    fi
    echo Loading ubi.img from mmc ...
    echo it will take some 10 minutes ... ... ... ...
    if fatload mmc 0 0x81000000 ubi.img
    then
     echo Erasing NAND rootfs partition ...
     nandecc hw 2
     nand erase 0x00780000 0x07460000
     echo Writing ubi.img on NAND rootfs partition ...
     nand write.i 0x81000000 0x00780000 0x07460000
    fi
    setenv nandboot 'echo Booting from nand ... ; nandecc hw 2;nand read 0x81000000 0x00280000 0x00500000 ; bootm 0x81000000;'
    setenv bootcmd 'run nandboot'
    setenv bootargs 'console=ttyO0,115200n8 androidboot.console=ttyO0 mem=256M root=ubi0:rootfs rootfstype=ubifs ubi.mtd=7,2048 rw rootwait init=/init ip=off'
    nandecc hw 0
    saveenv
    boot
    ##################################################################################################################################

    Regards,

    Dilip

  • Biser Gatchev-XID said:
    Hi Dilip,
     
    I want to add that from a quick check of datasheets Micron part supports 4-bit ECC, while Hynix supports 1-bit ECC.
     

    Hi Biser,

    Yes. I checked the datasheet of Hynix and as you said it support 1 bit ECC. While flashing to nand using boot.scr " nandecc hw 2" command is used which sets ecc to BCH4. Following link says AM335x BSP supports ong BCH8 on SPL, u-boot and Linux.

    http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User%27s_Guide#NAND_ECC_algorithm_selection

    So how BCH4 is working fine? Also, Does this mean I can't use 1 bit ECC Hynix nand on AM335x?

    Regards,

    DIlip

  • Hi Dilip,

    Actually "nandecc hw 2" sets ecc to BCH8, not BCH4. Here is an extract from the link you posted:

    0 for Hamming code
    1 for bch4
    2 for bch8
    3 for bch16
    Currently we support only Software, Hamming Code and BCH8. We do not support BCH4 and BCH16

    Please try using software ecc: "nandecc sw"

    Best regards,
    Miroslav
  • Hi

    I am also facing the same issue. Is there any solution? I am using Hynix H27U2G8F2CTR.

    Boot log:

    Uncompressing Linux... done, booting the kernel.
    [    0.000000] Linux version 3.2.0 (pradeep@ubuntu) (gcc version 4.4.3 (GCC) ) #53 Wed Feb 6 15:19:22 IST 2013
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] Machine: am335xevm
    [    0.000000] Memory policy: ECC disabled, Data cache writeback
    [    0.000000] AM335X ES1.0 (sgx neon )
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
    [    0.000000] Kernel command line: console=ttyO0,115200n8 androidboot.console=ttyO0 mem=256M root=ubi0:rootfs rootfstype=ubifs ubi.mtd=7,2048 rw rootwait init=/init ip=off
    [    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    [    0.000000] Memory: 256MB = 256MB total
    [    0.000000] Memory: 251176k/251176k available, 10968k reserved, 0K highmem
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    [    0.000000]     vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc06b0000   (6816 kB)
    [    0.000000]       .init : 0xc06b0000 - 0xc06ec000   ( 240 kB)
    [    0.000000]       .data : 0xc06ec000 - 0xc0746480   ( 362 kB)
    [    0.000000]        .bss : 0xc07464a4 - 0xc0879510   (1229 kB)
    [    0.000000] NR_IRQS:396
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [    0.000000] Total of 128 interrupts on 1 active controller
    [    0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
    [    0.000000] OMAP clocksource: GPTIMER1 at 32768 Hz
    [    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
    [    0.000000] Console: colour dummy device 80x30
    [    0.000152] Calibrating delay loop... 718.02 BogoMIPS (lpj=3590144)
    [    0.058959] pid_max: default: 32768 minimum: 301
    [    0.059082] Security Framework initialized
    [    0.059143] Mount-cache hash table entries: 512
    [    0.059509] CPU: Testing write buffer coherency: ok
    [    0.079406] omap_hwmod: pruss: failed to hardreset
    [    0.080169] print_constraints: dummy:
    [    0.080413] NET: Registered protocol family 16
    [    0.081451] OMAP GPIO hardware version 0.1
    [    0.082489] omap_mux_init: Add partition: #1: core, flags: 0
    [    0.084136]  da8xx_lcdc.0: alias fck already exists
    [    0.084228] Setup LCD display
    [    0.084320]  omap_hsmmc.0: alias fck already exists
    [    0.084472]  davinci-mcasp.0: alias fck already exists
    [    0.085083]  omap2_mcspi.1: alias fck already exists
    [    0.085205]  omap2_mcspi.2: alias fck already exists
    [    0.085357]  edma.0: alias fck already exists
    [    0.085357]  edma.0: alias fck already exists
    [    0.085388]  edma.0: alias fck already exists
    [    0.095092] bio: create slab <bio-0> at 0
    [    0.096069] SCSI subsystem initialized
    [    0.096923] usbcore: registered new interface driver usbfs
    [    0.097045] usbcore: registered new interface driver hub
    [    0.097167] usbcore: registered new device driver usb
    [    0.097320] musb-ti81xx musb-ti81xx: musb0, board_mode=0x31, plat_mode=0x1
    [    0.097442] musb-ti81xx musb-ti81xx: musb1, board_mode=0x31, plat_mode=0x3
    [    0.098083] Advanced Linux Sound Architecture Driver Version 1.0.24.
    [    0.098632] Bluetooth: Core ver 2.16
    [    0.098724] NET: Registered protocol family 31
    [    0.098724] Bluetooth: HCI device and connection manager initialized
    [    0.098754] Bluetooth: HCI socket layer initialized
    [    0.098754] Bluetooth: L2CAP socket layer initialized
    [    0.098785] Bluetooth: SCO socket layer initialized
    [    0.098968] Switching to clocksource gp timer
    [    0.106658] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
    [    0.106842] musb-hdrc musb-hdrc.0: dma type: pio
    [    0.107055] MUSB0 controller's USBSS revision = 4ea20800
    [    0.107177] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [    0.107269] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    [    0.107421] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [    0.107421] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    0.107452] usb usb1: Product: MUSB HDRC host driver
    [    0.107452] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd
    [    0.107452] usb usb1: SerialNumber: musb-hdrc.0
    [    0.108001] hub 1-0:1.0: USB hub found
    [    0.108032] hub 1-0:1.0: 1 port detected
    [    0.108489] musb-hdrc musb-hdrc.0: USB Host mode controller at d083c000 using PIO, IRQ 18
    [    0.108764] musb-hdrc musb-hdrc.1: dma type: pio
    [    0.108947] MUSB1 controller's USBSS revision = 4ea20800
    [    0.109436] musb-hdrc musb-hdrc.1: USB OTG mode controller at d083e800 using PIO, IRQ 19
    [    0.109741] NET: Registered protocol family 2
    [    0.109954] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.110321] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
    [    0.110473] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.110565] TCP: Hash tables configured (established 8192 bind 8192)
    [    0.110595] TCP reno registered
    [    0.110595] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.110626] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.110839] NET: Registered protocol family 1
    [    0.111114] RPC: Registered named UNIX socket transport module.
    [    0.111114] RPC: Registered udp transport module.
    [    0.111114] RPC: Registered tcp transport module.
    [    0.111145] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.111389] NetWinder Floating Point Emulator V0.97 (double precision)
    [    0.111602] omap-gpmc omap-gpmc: GPMC revision 6.0
    [    0.111633] Registering NAND on CS0
    [    0.242706] ashmem: initialized
    [    0.242950] VFS: Disk quotas dquot_6.5.2
    [    0.243011] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [    0.243896] msgmni has been set to 490
    [    0.244934] io scheduler noop registered
    [    0.244934] io scheduler deadline registered
    [    0.245025] io scheduler cfq registered (default)
    [    0.245635] da8xx_lcdc da8xx_lcdc.0: GLCD: Found LCD10 panel
    [    0.257080] Console: switching to colour frame buffer device 100x37
    [    0.265167] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
    [    0.870178] console [ttyO0] enabled
    [    0.874176] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    [    0.881866] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    [    0.889495] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
    [    0.897155] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
    [    0.904785] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
    [    0.918304] brd: module loaded
    [    0.924743] loop: module loaded
    [    0.928222] i2c-core: driver [tsl2550] using legacy suspend method
    [    0.934692] i2c-core: driver [tsl2550] using legacy resume method
    [    0.941955] mtdoops: mtd device (mtddev=name/number) must be supplied
    [    0.948944] omap2-nand driver initializing
    [    0.953552] ONFI flash detected
    [    0.956970] ONFI param page 0 valid
    [    0.960632] NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix H27U2G8F2CTR-BC)
    [    0.969299] Creating 8 MTD partitions on "omap2-nand.0":
    [    0.974884] 0x000000000000-0x000000020000 : "SPL"
    [    0.980773] 0x000000020000-0x000000040000 : "SPL.backup1"
    [    0.987426] 0x000000040000-0x000000060000 : "SPL.backup2"
    [    0.993988] 0x000000060000-0x000000080000 : "SPL.backup3"
    [    1.000518] 0x000000080000-0x000000260000 : "U-Boot"
    [    1.007324] 0x000000260000-0x000000280000 : "U-Boot Env"
    [    1.013793] 0x000000280000-0x000000780000 : "Kernel"
    [    1.021911] 0x000000780000-0x000010000000 : "File System"
    [    1.132324] OneNAND driver initializing
    [    1.136749] UBI: attaching mtd7 to ubi0
    [    1.140808] UBI: physical eraseblock size:   131072 bytes (128 KiB)
    [    1.147338] UBI: logical eraseblock size:    126976 bytes
    [    1.152954] UBI: smallest flash I/O unit:    2048
    [    1.157867] UBI: sub-page size:              512
    [    1.162689] UBI: VID header offset:          2048 (aligned 2048)
    [    1.168945] UBI: data offset:                4096
    [    1.249664] usb 1-1: new low-speed USB device number 2 using musb-hdrc
    [    1.395080] usb 1-1: New USB device found, idVendor=046d, idProduct=c016
    [    1.402069] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [    1.409515] usb 1-1: Product: Optical USB Mouse
    [    1.414245] usb 1-1: Manufacturer: Logitech
    [    2.979553] UBI: max. sequence number:       0
    [    2.997650] UBI error: vtbl_check: bad CRC at record 8: 0x4b8de38, not 0xf116c36b
    [    3.005493] UBI error: vtbl_check: bad CRC at record 8: 0x4b8de38, not 0xf116c36b
    [    3.013305] UBI error: process_lvol: both volume tables are corrupted
    [    3.020660] UBI error: ubi_init: cannot attach mtd7
    [    3.026000] CAN device driver interface
    [    3.030029] CAN bus driver for Bosch D_CAN controller 1.0
    [    3.035919] PPP generic driver version 2.4.2
    [    3.040618] PPP BSD Compression module registered
    [    3.045501] PPP Deflate Compression module registered
    [    3.050903] usbcore: registered new interface driver cdc_ether
    [    3.057037] usbcore: registered new interface driver cdc_eem
    [    3.063018] usbcore: registered new interface driver dm9601
    [    3.068878] usbcore: registered new interface driver cdc_subset
    [    3.075103] cdc_ncm: 04-Aug-2011
    [    3.078521] usbcore: registered new interface driver cdc_ncm
    [    3.084533] usbcore: registered new interface driver cdc_acm
    [    3.090423] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
    [    3.098785] Initializing USB Mass Storage driver...
    [    3.104003] usbcore: registered new interface driver usb-storage
    [    3.110260] USB Mass Storage support registered.
    [    3.115234] usbcore: registered new interface driver usbserial
    [    3.121368] USB Serial support registered for generic
    [    3.126739] usbcore: registered new interface driver usbserial_generic
    [    3.133575] usbserial: USB Serial Driver core
    [    3.138153] USB Serial support registered for GSM modem (1-port)
    [    3.144622] usbcore: registered new interface driver option
    [    3.150451] option: v0.7.2:USB Driver for GSM modems
    [    3.157714]  gadget: Mass Storage Function, version: 2009/09/11
    [    3.163940]  gadget: Number of LUNs=1
    [    3.167755]  lun0: LUN: removable file: (no medium)
    [    3.173095]  gadget: android_usb ready
    [    3.177062] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [    3.182647] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    [    3.190490] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    [    3.197570] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    3.205108] usb usb2: Product: MUSB HDRC host driver
    [    3.210296] usb usb2: Manufacturer: Linux 3.2.0 musb-hcd
    [    3.215820] usb usb2: SerialNumber: musb-hdrc.1
    [    3.221069] hub 2-0:1.0: USB hub found
    [    3.224975] hub 2-0:1.0: 1 port detected
    [    3.229797] mousedev: PS/2 mouse device common for all mice
    [    3.243652] using rtc device, omap_rtc, for alarms
    [    3.248504] omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
    [    3.255432] i2c /dev entries driver
    [    3.259124] Linux video capture interface: v2.00
    [    3.264099] usbcore: registered new interface driver uvcvideo
    [    3.270111] USB Video Class driver (1.1.1)
    [    3.275024] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    3.281524] device-mapper: uevent: version 1.0.3
    [    3.286499] device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: dm-devel@redhat.com
    [    3.295349] Bluetooth: HCI UART driver ver 2.2
    [    3.299987] Bluetooth: HCI H4 protocol initialized
    [    3.304992] Bluetooth: HCILL protocol initialized
    [    3.309875] Bluetooth: Bluetooth Driver for TI WiLink - Version 1.0
    [    3.316589] _regulator_get: deviceless supply vdd_mpu not found, using dummy regulator
    [    3.325103] cpuidle: using governor ladder
    [    3.329498] cpuidle: using governor menu
    [    3.338562] input: Logitech Optical USB Mouse as /devices/platform/omap/musb-ti81xx/musb-hdrc.0/usb1/1-1/1-1:1.0/input/input0
    [    3.350677] generic-usb 0003:046D:C016.0001: input: USB HID v1.10 Mouse [Logitech Optical USB Mouse] on usb-musb-hdrc.0-1/input0
    [    3.362854] usbcore: registered new interface driver usbhid
    [    3.368652] usbhid: USB HID core driver
    [    3.373291] logger: created 256K log 'log_main'
    [    3.378112] logger: created 256K log 'log_events'
    [    3.383148] logger: created 256K log 'log_radio'
    [    3.388031] logger: created 256K log 'log_system'
    [    3.393463] usbcore: registered new interface driver snd-usb-audio
    [    3.400756] ALSA device list:
    [    3.403869]   No soundcards found.
    [    3.407409] oprofile: hardware counters not available
    [    3.412689] oprofile: using timer interrupt.
    [    3.417297] Netfilter messages via NETLINK v0.30.
    [    3.422332] nf_conntrack version 0.5.0 (3924 buckets, 15696 max)
    [    3.428924] ctnetlink v0.93: registering with nfnetlink.
    [    3.434570] NF_TPROXY: Transparent proxy support initialized, version 4.1.0
    [    3.441833] NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd.
    [    3.448242] xt_time: kernel timezone is -0000
    [    3.453002] ip_tables: (C) 2000-2006 Netfilter Core Team
    [    3.458770] arp_tables: (C) 2002 David S. Miller
    [    3.463684] TCP cubic registered
    [    3.467224] NET: Registered protocol family 10
    [    3.472625] Mobile IPv6
    [    3.475219] ip6_tables: (C) 2000-2006 Netfilter Core Team
    [    3.481079] IPv6 over IPv4 tunneling driver
    [    3.486053] NET: Registered protocol family 17
    [    3.490753] NET: Registered protocol family 15
    [    3.495391] can: controller area network core (rev 20090105 abi 8)
    [    3.501953] NET: Registered protocol family 29
    [    3.506591] can: raw protocol (rev 20090105)
    [    3.511047] can: broadcast manager protocol (rev 20090105 t)
    [    3.517333] Bluetooth: RFCOMM TTY layer initialized
    [    3.522521] Bluetooth: RFCOMM socket layer initialized
    [    3.527862] Bluetooth: RFCOMM ver 1.11
    [    3.531768] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [    3.537322] Bluetooth: BNEP filters: protocol multicast
    [    3.542785] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
    [    3.549102] Registering the dns_resolver key type
    [    3.554107] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    3.562103] ThumbEE CPU extension supported.
    [    3.566619] mux: Failed to setup hwmod io irq -22
    [    3.572204] Power Management for AM33XX family
    [    3.577026] Trying to load am335x-pm-firmware.bin (60 secs timeout)
    [    3.583709] Copied the M3 firmware to UMEM
    [    3.591827] clock: disabling unused clocks to save power
    [    3.598907] omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
    [    3.608062] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
    [    3.615447] Please append a correct "root=" boot option; here are the available partitions:
    [    3.624206] 1f00             128 mtdblock0  (driver?)
    [    3.629486] 1f01             128 mtdblock1  (driver?)
    [    3.634765] 1f02             128 mtdblock2  (driver?)
    [    3.640045] 1f03             128 mtdblock3  (driver?)
    [    3.645324] 1f04            1920 mtdblock4  (driver?)
    [    3.650604] 1f05             128 mtdblock5  (driver?)
    [    3.655883] 1f06            5120 mtdblock6  (driver?)
    [    3.661163] 1f07          254464 mtdblock7  (driver?)
    [    3.666442] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [    3.675079] Backtrace:
    [    3.677673] [<c00180dc>] (dump_backtrace+0x0/0x10c) from [<c0512dd8>] (dump_stack+0x18/0x1c)
    [    3.686492]  r7:c06e06e8 r6:00008000 r5:c0747410 r4:c0747410
    [    3.692413] [<c0512dc0>] (dump_stack+0x0/0x1c) from [<c0512e40>] (panic+0x64/0x198)
    [    3.700439] [<c0512ddc>] (panic+0x0/0x198) from [<c06b0d80>] (mount_block_root+0x174/0x228)
    [    3.709136]  r3:00000000 r2:00000000 r1:cf81df78 r0:c060e298
    [    3.715057] [<c06b0c0c>] (mount_block_root+0x0/0x228) from [<c06b0f94>] (prepare_namespace+0x94/0x1c0)
    [    3.724792] [<c06b0f00>] (prepare_namespace+0x0/0x1c0) from [<c06b02f8>] (kernel_init+0xf0/0x124)
    [    3.734039]  r5:c06ebac8 r4:c07464c0
    [    3.737792] [<c06b0208>] (kernel_init+0x0/0x124) from [<c003fa70>] (do_exit+0x0/0x6ac)
    [    3.746032]  r5:c06b0208 r4:00000000

  • Miroslav Kiradzhiyski XID said:

    Hi Dilip,

    Actually "nandecc hw 2" sets ecc to BCH8, not BCH4. Here is an extract from the link you posted:

    0 for Hamming code
    1 for bch4
    2 for bch8
    3 for bch16
    Currently we support only Software, Hamming Code and BCH8. We do not support BCH4 and BCH16

    Please try using software ecc: "nandecc sw"

    Best regards,
    Miroslav

    [/quote]

    Hi Miroslav,

    Sorry, I didn't understand why the ecc has to be set to BCH4. BTW, I tried replacing nandecc hw 2 to nandecc sw 1 in boot.scr. But the booting didn't proceed after flashing and gave following error,

    UBI: logical eraseblock size:    126976 bytes
    [    1.516387] UBI: smallest flash I/O unit:    2048
    [    1.521301] UBI: sub-page size:              512
    [    1.526123] UBI: VID header offset:          2048 (aligned 2048)
    [    1.532379] UBI: data offset:                4096
    [    1.539978] UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes
    [    1.552703] UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes from PEB 0:2048, read 512 bytes
    [    1.565917] UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 1:0, read 64 bytes

    Regards,

    Dilip

  • Hi all,

    Would you please check which version of U-Boot you are using. It should be at least u-boot-2012.10.

    Also:

    Dilip M said:
    Sorry, I didn't understand why the ecc has to be set to BCH4.

    Nowhere it is said that the ecc has to be set to BCH4. BCH4 and BCH16 are not supported.

    Dilip M said:
    BTW, I tried replacing nandecc hw 2 to nandecc sw 1 in boot.scr. But the booting didn't proceed after flashing and gave following error,

    I'm not sure if "nandecc sw 1" is a valid syntax. The correct "nandecc" command usage is: nandecc [sw | hw <hw_type>] - there is no second argument if you are using SW ecc. 

  • Hi,

    The version of U-Boot used is "U-Boot SPL 2011.09-00000". Does this version misses some critical NAND fixes?

    As per AM335xTRM, GPMC supports BCH8 in hardware. Hynix part DS suggest 1 bit ECC and Micron part doesn't specify the ECC requirement in their DS. As per my understanding  BCH8 can be used for Hynix even though the ECC requirement is only 1bit.

    Yeah. "nandecc sw" is enough. But "nandecc sw 1" doesn't give any error as u-boot graciously handles it.

    Regards,

    Dilip

  • Hi Dilip,

    With few fixes in these files (modifications are in bold). Its working for me now. Thanks to Renjith Thomas for help.

    Modifications:

    1. In arch/arm/mach-omap2/gpmc.c

    int gpmc_enable_hwecc(int ecc_type, int cs, int mode,
                int dev_width, int ecc_size)
    {
        .....

        switch (mode) {
        case GPMC_ECC_READ:
            if (ecc_type == OMAP_ECC_BCH4_CODE_HW) {
                .....
            } else if (ecc_type == OMAP_ECC_BCH8_CODE_HW) {
                eccsize1 = 0x10; eccsize0 = 0x0;
                ..........
            } else
                eccsize1 = ((ecc_size >> 1) - 1);
            break;
        case GPMC_ECC_READSYN:
            break;
        case GPMC_ECC_WRITE:
            if (ecc_type == OMAP_ECC_BCH4_CODE_HW) {
                ..........
            } else if (ecc_type == OMAP_ECC_BCH8_CODE_HW) {
                eccsize1 = 0x10; eccsize0 = 0x0;
               .......
            } else
               .......
        }

    2. In drivers/mtd/nand/

    a. omap2.c

    static int omap_correct_data(struct mtd_info *mtd, u_char *dat,
                    u_char *read_ecc, u_char *calc_ecc)
    {
        ......

        switch (info->ecc_opt) {
            ......
        case OMAP_ECC_BCH8_CODE_HW:
            eccsize = BCH8_ECC_OOB_BYTES;

            for (i = 0; i < blockCnt; i++) {
                if (memcmp(read_ecc, calc_ecc, 13) == 0) {
                    continue;
                }
                eccflag = 0;
                .......
        return stat;
    }
    .

    .

    .

    static int __devinit omap_nand_probe(struct platform_device *pdev)
    {
        ...
        case NAND_OMAP_PREFETCH_IRQ:
            ........
        else {
            if (pdata->ecc_opt == OMAP_ECC_BCH4_CODE_HW) {
                info->nand.ecc.bytes    = 4*7;
                info->nand.ecc.size     = 4*512;
            } else if (pdata->ecc_opt == OMAP_ECC_BCH8_CODE_HW) {
                info->nand.ecc.bytes     = OMAP_BCH8_ECC_SECT_BYTES;
                info->nand.ecc.size      = 512;
                //info->nand.ecc.read_page = omap_read_page_bch; /*Remove this line*/

             } else {
                info->nand.ecc.bytes    = 3;
                info->nand.ecc.size     = 512;
            }

    b. nand_base.c

    int nand_scan_tail(struct mtd_info *mtd)
    {
        ....

        switch (chip->ecc.mode) {
        ....

        case NAND_ECC_NONE:
            ........

        /* Allow subpage writes up to ecc.steps. Not possible for MLC flash */
        if (!(chip->options & NAND_NO_SUBPAGE_WRITE) &&
            !(chip->cellinfo & NAND_CI_CELLTYPE_MSK)) {
            switch (chip->ecc.steps) {
            case 2:
                mtd->subpage_sft = 1;
                break;
            case 4:
            case 8:
            case 16:
                mtd->subpage_sft = 2;
                break;
            }
        }
        mtd->subpage_sft = 0;

       chip->subpagesize = mtd->writesize >> mtd->subpage_sft;
    .......


    In addition to these modifications i used -s 2048 instead of -s 512 while creating ubi.img as my nand device data sheet mentioned page size as 2k as suggested this here http://e2e.ti.com/support/embedded/android/f/509/t/202971.aspx?pi239031349=2

  • Hi Pradeep,

    Thanks. That fixed the issue and am able to boot from Hynix NAND. But I didn't understand why the same code and ubifs image creation worked for Micron NAND.

    Can you explain what is the problem?

    Regards,

    Dilip

  • Hi Dilip,

    I just followed what Renjith suggested.

    Hi Renjith,

    Can you brief us what was the issue?

    Thanks for your time in advance.

    Regards,

    Pradeep

  • Dilip & Pradeep,

    There are couple of issues here. 

    1. BCH8 implementation was incorrect. read_page_bch function implementation was incorrect, whereas write was correct. I just commented out read_page_bch function usage to go with the default read_page function, which was more than enough to support the use case.

    2. Also it was using sub-page of 512 bytes, where as sub-page write is not taken care in the write page function properly. So, I forced it not to use sub-page. 

    These are the changes from a high-level.

  • Thanks Renjith.