Menu

#297 nand device fails to be attached.

master head
open
None
low
rejected
BF537-STAMP
2015-04-23
2015-03-20
panmingquan
No

nand device fails to be attached.

dmesg
Linux version 4.0.0-rc3-ADI-2014R1-pre-00465-ga43d96b-dirty (test@uclinux55-bf537-stamp-cf) (gcc version 4.3.5 (ADI-master/git-a2bfd7b) ) #5 Wed Mar 18 20:21:56 CST 2015
register early platform devices
bootconsole [early_shadow0] enabled
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Limiting kernel memory to 56MB due to anomaly 05000263
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x001c65b8
rodata = 0x001c65b8-0x00261334
bss = 0x00262000-0x00277344
data = 0x00277360-0x00292000
stack = 0x00290000-0x00292000
init = 0x00292000-0x00a27000
available = 0x00a27000-0x03800000
DMA Zone = 0x03f00000-0x04000000
Hardware Trace active and enabled
Boot Mode: 0
Reset caused by Software reset
Blackfin support (C) 2004-2010 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 125 MHz System Clock
boot memmap: 0000000000a27000 - 0000000003800000 (usable)
On node 0 totalpages: 14336
free_area_init_node: node 0, pgdat 0028eda8, node_mem_map 00a29000
DMA zone: 112 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 14336 pages, LIFO batch:0
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
External memory: cacheable in instruction cache
Data Cache Enabled for CPU0
External memory: cacheable (write-back) in data cache
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 14224
Kernel command line: root=/dev/mtdblock0 rw ip=10.100.4.50 earlyprintk=serial,uart0,57600 console=ttyBF0,57600 ip=10.100.4.50:10.100.4.174:10.99.24.1:255.255.255.0:bf537-stamp:eth0:off
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Kernel managed physical pages: 14336
Memory: 46340K/57344K available (1813K kernel code, 107K rwdata, 619K rodata, 7764K init, 84K bss, 11004K reserved, 0K cma-reserved, 1024K DMA)
NR_IRQS:146
Configuring Blackfin Priority Driven Interrupts
Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
devtmpfs: initialized
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (16 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (32 KB free)
NET: Registered protocol family 16
Blackfin DMA Controller
stamp_init(): registering device resources
bfin-spi bfin-spi.0: master is unqueued, this is deprecated
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs@ffc00500, dma channel@7
Switched to clocksource bfin_cs_cycles
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
debug-mmrs: setting up Blackfin MMR debugfs
io scheduler noop registered (default)
bfin-uart: Blackfin serial driver
bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 18, base_baud = 7812500) is a BFIN-UART
console [ttyBF0] enabled
bootconsole [early_BFuart0] disabled
bootconsole [early_shadow0] disabled
brd: module loaded
m25p80 spi0.1: found m25p64, expected m25p80
m25p80 spi0.1: m25p64 (8192 Kbytes)
Creating 3 MTD partitions on "m25p80":
0x000000000000-0x000000040000 : "bootloader(spi)"
0x000000040000-0x0000001c0000 : "linux kernel(spi)"
0x0000001c0000-0x000000800000 : "file system(spi)"
nand: device found, Manufacturer ID: 0x20, Chip ID: 0xf1
nand: ST Micro NAND 128MiB 3,3V 8-bit
nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
Scanning device for bad blocks
Bad eraseblock 32 at 0x000000400000
Bad eraseblock 33 at 0x000000420000
Bad eraseblock 35 at 0x000000460000
Bad eraseblock 711 at 0x0000058e0000
Bad eraseblock 778 at 0x000006140000
Creating 2 MTD partitions on "gen_nand":
0x000000000000-0x000000400000 : "linux kernel(nand)"
0x000000400000-0x000008000000 : "file system(nand)"
libphy: bfin_mii_bus: probed
bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=bfin_mii_bus-0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=24)@sclk=125MHz)
bfin_mac bfin_mac.0 eth0: Blackfin on-chip Ethernet MAC driver, Version 1.1
rtc (null): invalid alarm value: 1900-2-1 0:0:0
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
bfin_wdt: initialized: timeout=20 sec (nowayout=0)
TCP: cubic registered
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 2004-05-31 04:00:59 UTC (1085976059)
IP-Config: Gateway not on directly connected network
dma_alloc_init: dma_page @ 0x0262a000 - 256 pages at 0x03f00000
Freeing unused kernel memory: 7764K (00292000 - 00a27000)
bfin_mac bfin_mac.0 eth0: Link is Up - 100Mbps/Full - flow control rx/tx
random: nonblocking pool is initialized
root:/>
ase 1 ...PASS

Case 1 ...PASS

** STEP 4: Show file systems.

6ncat /proc/filesystems
nodev sysfs
nodev rootfs
nodev ramfs
nodev bdev
nodev proc
nodev tmpfs
nodev devtmpfs
nodev debugfs
nodev sockfs
nodev pipefs
nodev devpts
nodev ubifs
root:/>
Case 2 ...PASS

Case 2 ...PASS

** STEP 5: MTD test

cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00010000 "bootloader(spi)"
mtd1: 00180000 00010000 "linux kernel(spi)"
mtd2: 00640000 00010000 "file system(spi)"
mtd3: 00400000 00020000 "linux kernel(nand)"
mtd4: 07c00000 00020000 "file system(nand)"
root:/> and_rootfs_num is 4

Case 3 ...PASS

Case 3 ...PASS

** STEP 6: Detect UBI

[6nubinfo
UBI version: 1
Count of UBI devices: 0
UBI control device major/minor: 10:59
root:/>
ase 4 ...PASS

Case 4 ...PASS

** STEP 7: Format MTD

nubiformat /dev/mtd4 -s 512 -O 512
ubiformat: mtd4 (nand), size 130023424 bytes (124.0 MiB), 992 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 249 -- 25 % complete _nand_correct_data: uncorrectable ECC erroromplete
libscan: scann_nand_correct_data: uncorrectable ECC erroran: scanning eraseblock 251 -- 25 % complete
libscan: scanning eraseblock 396 -- 40 % complete nand_correct_data: uncorrectable ECC error
libscan: scanning eraseblock 803 -- 81 % complete
nand_correct_data: uncorrectable ECC error
libscan: scanning eraseblock 991 -- 100 % complete
ubiformat: 983 eraseblocks have valid erase counter, mean value is 141
ubiformat: 4 corrupted erase counters
ubiformat: 5 bad eraseblocks found, numbers: 0, 1, 3, 679, 746
ubiformat: formatting eraseblock 991 -- 100 % complete
root:/>
Case 5 ...PASS

Case 5 ...PASS

** STEP 8: Attach MTD

ubiattach /dev/ubi_ctrl -m 4
ubi0: attaching mtd4
nand_correct_data: uncorrectable ECC error
ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 562:0, read only 64 bytes, retry
ubi0: scanning is finished
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 22528 bytes from PEB 2:2048, read only 22528 bytes, retry
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 22528 bytes from PEB 4:2048, read only 22528 bytes, retry
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 22528 bytes from PEB 4:2048, read only 22528 bytes, retry
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 22528 bytes from PEB 4:2048, read only 22528 bytes, retry
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
nand_correct_data: uncorrectable ECC error
__nand_correct_data: uncorrectable ECC error
ubi0 error: ubi_io_read: error -74 (ECC error) while reading 22528 bytes from PEB 4:2048, read 22528 bytes
Hardware Trace:
0 Target : <0x001c61f4> { _dump_stack + 0x0 }
Source : <0x00139822> { _ubi_io_read + 0x10e } JUMP.L
1 Target : <0x00139822> { _ubi_io_read + 0x10e }
Source : <0x001c6404> { _printk + 0x1c } RTS
2 Target : <0x001c6400> { _printk + 0x18 }
Source : <0x0002cc70> { _vprintk_default + 0x1c } RTS
3 Target : <0x0002cc6c> { _vprintk_default + 0x18 }
Source : <0x0002cb60> { _vprintk_emit + 0x21c } RTS
4 Target : <0x0002cb56> { _vprintk_emit + 0x212 }
Source : <0x0002cb66> { _vprintk_emit + 0x222 } JUMP.S
5 Target : <0x0002cb66> { _vprintk_emit + 0x222 }
Source : <0x0002ba86> { _wake_up_klogd + 0x3e } RTS
6 Target : <0x0002ba82> { _wake_up_klogd + 0x3a }
Source : <0x0002ba58> { _wake_up_klogd + 0x10 } IF CC JUMP pcrel
7 Target : <0x0002ba48> { _wake_up_klogd + 0x0 }
Source : <0x0002be6e> { _console_unlock + 0x37e } CALL pcrel
8 Target : <0x0002be5a> { _console_unlock + 0x36a }
Source : <0x0002bcb0> { _console_unlock + 0x1c0 } IF CC JUMP pcrel
9 Target : <0x0002bc8e> { _console_unlock + 0x19e }
Source : <0x00027eda> { _up + 0x3e } RTS
10 Target : <0x00027ed4> { _up + 0x38 }
Source : <0x00027ec6> { _up + 0x2a } IF CC JUMP pcrel (BP)
11 Target : <0x00027e9c> { _up + 0x0 }
Source : <0x0002bc8a> { _console_unlock + 0x19a } CALL pcrel
12 Target : <0x0002bc68> { _console_unlock + 0x178 }
Source : <0x0002bdc4> { _console_unlock + 0x2d4 } JUMP.S
13 Target : <0x0002bd9e> { _console_unlock + 0x2ae }
Source : <0x0002be76> { _console_unlock + 0x386 } JUMP.S
14 Target : <0x0002be72> { _console_unlock + 0x382 }
Source : <0x0002bd9c> { _console_unlock + 0x2ac } IF CC JUMP pcrel
15 Target : <0x0002bd9a> { _console_unlock + 0x2aa }
Source : <0x0002bb88> { _console_unlock + 0x98 } IF CC JUMP pcrel (BP)
CPU: 0 PID: 232 Comm: ubiattach Not tainted 4.0.0-rc3-ADI-2014R1-pre-00465-ga43d96b-dirty #5
Stack info:
test@uclinux55-bf537-stamp-cf:~$ ;32R;9R;1R;9R;1R

Discussion

  • Sonic Zhang

    Sonic Zhang - 2015-04-03
    • assigned_to: Hao Liang
    • Resolution: none --> assigned
     
  • Hao Liang

    Hao Liang - 2015-04-23

    The additional debug trace info which might be caused by new bad block looks like a failure. But nand device is already attached successfully.
    Timeout setting in nand_test.exp shall be increase to complete the test.

     
  • Hao Liang

    Hao Liang - 2015-04-23
    • Resolution: assigned --> rejected
     

Log in to post a comment.