Nand flash issue on imx6ul with mainline kernel

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Nand flash issue on imx6ul with mainline kernel

1,485 Views
pietercardoen
Contributor II

I am trying to boot the mainline kernel which I configured using make tinyconfig (and enabled necessary tools). However when my board starts to mount the nand flash, I get:

ubi0 warning: 0xc024b758: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry
ubi0 error: 0xc024b7e8: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes

(see complete log below)

The boot arguments are:

bootargs = 'console=${console},${baudrate} ubi.mtd=0 root=ubi0:rootfs rootfstype=ubifs ${mtdparts}'

mtdparts = 'mtdparts=gpmi-nand:-(nandflash)'

Does someone knows whats the reason of this error?

Thanks in advance

Pieter

## Booting kernel from Legacy Image at 80800000 ...
   Image Name:   Linux-4.15.0+
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    781336 Bytes = 763 KiB
   Load Address: 80800000
   Entry Point:  80800000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Loading Kernel Image ... OK
   Loading Device Tree to 9f716000, end 9f71f3cb ... OK
ft_system_setup for mx6

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.15.0+ (pic@PIC) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4)) #26 Wed Feb 7 07:30:00 CET 2018
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
CPU: div instructions available: patching division code
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: iMX6ul 33.96.7951 (LED displays)
Memory policy: Data cache writeback
CPU: All CPU(s) started in SVC mode.
random: fast init done
Built 1 zonelists, mobility grouping on.  Total pages: 130048
Kernel command line: version=DEV_33968056_1-01-01 console=ttymxc0,115200 ubi.mtd=0 root=ubi0:rootfsB rootfstype=ubifs mtdparts=gpmi-nand:-(nandflash)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 515316K/524288K available (2048K kernel code, 87K rwdata, 208K rodata, 1024K init, 184K bss, 8972K reserved, 0K cma-reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
      .text : 0x(ptrval) - 0x(ptrval)   (3040 kB)
      .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
      .data : 0x(ptrval) - 0x(ptrval)   (  88 kB)
       .bss : 0x(ptrval) - 0x(ptrval)   ( 185 kB)
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
Switching to timer-based delay loop, resolution 41ns
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
pid_max: default: 4096 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x80100000 - 0x8010003c
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
DMA: preallocated 256 KiB pool for atomic coherent allocations
imx6ul-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
mxs-dma 1804000.dma-apbh: initialized
clocksource: Switched to clocksource mxc_timer1
workingset: timestamp_bits=30 max_order=17 bucket_order=0
imx-sdma 20ec000.sdma: failed to get firmware from device tree
2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 21, base_baud = 5000000) is a IMX
console [ttymxc0] enabled
nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xdc
nand: Micron MT29F4G08ABADAH4
nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
gpmi-nand 1806000.gpmi-nand: enable the asynchronous EDO mode 5
Bad block table not found for chip 0
Bad block table not found for chip 0
Scanning device for bad blocks
Bad block table written to 0x00001ffe0000, version 0x01
Bad block table written to 0x00001ffc0000, version 0x01
1 cmdlinepart partitions found on MTD device gpmi-nand
Creating 1 MTD partitions on "gpmi-nand":
0x000000000000-0x000020000000 : "nandflash"
gpmi-nand 1806000.gpmi-nand: driver registered.
ubi0: attaching mtd0
ubi0 warning: 0xc024b758: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry
ubi0 warning: 0xc024b758: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry
ubi0 warning: 0xc024b758: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry
ubi0 error: 0xc024b7e8: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes
CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0+ #26
Hardware name: Freescale i.MX6 Ultralite (Device Tree)
Function entered at [<c01061b8>] from [<c01052a0>]
Function entered at [<c01052a0>] from [<c024b7ec>]
Function entered at [<c024b7ec>] from [<c024bae0>]
Function entered at [<c024bae0>] from [<c024fe68>]
Function entered at [<c024fe68>] from [<c0246844>]
Function entered at [<c0246844>] from [<c0412910>]
Function entered at [<c0412910>] from [<c0400b9c>]
Function entered at [<c0400b9c>] from [<c0400d08>]
Function entered at [<c0400d08>] from [<c028ad48>]
Function entered at [<c028ad48>] from [<c01010e8>]
Exception stack(0xdf04dfb0 to 0xdf04dff8)
dfa0:                                     00000000 00000000 00000000 00000000
dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
ubi0 warning: 0xc024b758: error -74 (ECC error) while reading 64 bytes from PEB 1:0, read only 64 bytes, retry
ubi0 warning: 0xc024b758: error -74 (ECC error) while reading 64 bytes from PEB 1:0, read only 64 bytes, retry
ubi0 warning: 0xc024b758: error -74 (ECC error) while reading 64 bytes from PEB 1:0, read only 64 bytes, retry
ubi0 error: 0xc024b7e8: error -74 (ECC error) while reading 64 bytes from PEB 1:0, read 64 bytes
CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0+ #26
Hardware name: Freescale i.MX6 Ultralite (Device Tree)
Function entered at [<c01061b8>] from [<c01052a0>]
Function entered at [<c01052a0>] from [<c024b7ec>]
Function entered at [<c024b7ec>] from [<c024bae0>]
Function entered at [<c024bae0>] from [<c024fe68>]
Function entered at [<c024fe68>] from [<c0246844>]

0 Kudos
3 Replies

875 Views
fabio_estevam
NXP Employee
NXP Employee

Hi Pieter,

Please report this error to the linux-mtd folks.

./scripts/get_maintainer.pl drivers/mtd/nand/gpmi-nand/ gives you the correct list address and driver maintainers' email.

Thanks

0 Kudos

875 Views
pietercardoen
Contributor II

Igor

Thanks for the reply. However I want to use the mainline kernel. The rootfs has been flashed on the board using MFG tools.

BR

Pieter

0 Kudos

875 Views
igorpadykov
NXP Employee
NXP Employee

Hi Pieter

one can try to flash image using mfg tools from

https://www.nxp.com/support/developer-resources/run-time-software/i.mx-developer-resources/i.mx-6ser...

and try with nxp L4.1.15

linux-imx.git - i.MX Linux Kernel 

How-To use NAND boot on i.MX6UL EVK board 

In general (as nxp does not support mainline kernel) also it may be posted on kernel mail list

Majordomo Lists at VGER.KERNEL.ORG 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos