AnsweredAssumed Answered

Nand Flash

Question asked by santhku@gmail.com on Jan 2, 2014
Latest reply on Jan 7, 2014 by Aaronwu

Hi

 

I am using BF548 Ezkit blackfin processor MT29F32G08Afaca nand flash but i am getting the following error in MTD while i compile the linux kernel. MTD is getting crashed as

OOB size: 224

No oob scheme defined for oobsize 224

------------[ cut here ]------------

kernel BUG at drivers/mtd/nand/nand_base.c:3442!

 

Please find the kernel below log

 

Welcome to minicom 2.5

Press CTRL-A Z for help on special keys                                            

 

  U-Boot 2013.07 (ADI-2013R1) (Dec 14 2013 - 08:02:55)                               

CPU:   ADSP bf548-0.0 (Detected Rev: 0.4) (parallel flash boot)

Board: ADI BF548 EZ-Kit board

       Support: http://blackfin.uclinux.org/

Clock: VCO: 525 MHz, Core: 525 MHz, System: 131.250 MHz

RAM:   64 MiB

Flash: 16 MiB

MMC:   Blackfin SDH: 0

In:    serial

Out:   serial

Err:   serial

KGDB:  [on serial] ready

Net:   smc911x: Invalid chip endian 0x00000000

No ethernet found.

Hit any key to stop autoboot:  0

bfin>

bfin>

bfin>

bfin> bootm 0x20100000

## Booting kernel from Legacy Image at 20100000 ...

   Image Name:   bf548-0.2-3.10.10-ADI-2013R1

   Created:      2013-12-14   9:26:18 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    1851712 Bytes = 1.8 MiB

   Load Address: 00001000

   Entry Point:  00335df0

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 00335df0

Linux version 3.10.10-ADI-2013R1 (root@ubuntu) (gcc version 4.3.5 (ADI-2013R1-RC1) ) #1 Sat Dec 14 14:56:10 IST 2013

register early platform devices

bootconsole [early_shadow0] enabled

bootconsole [early_BFuart2] enabled

early printk enabled on early_BFuart2

Board Memory: 16MB

Kernel Managed Memory: 16MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x0022a310

  rodata    = 0x0022a310-0x002e3e68

  bss       = 0x002e4000-0x002fb8ec

  data      = 0x002fb900-0x0032c000

    stack   = 0x0032a000-0x0032c000

  init      = 0x0032c000-0x00351000

  available = 0x00351000-0x00e00000

  DMA Zone  = 0x00e00000-0x01000000

Hardware Trace active and enabled

Boot Mode: 1

Blackfin support (C) 2004-2010 Analog Devices, Inc.

Compiled for ADSP-BF548 Rev 0.2

Warning: Compiled for Rev 2, but running on Rev 4

Warning: Unsupported Chip Revision ADSP-BF548 Rev 0.4 detected

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 525 MHz core clock and 131 MHz System Clock

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

  External memory: cacheable in instruction cache

  L2 SRAM        : uncacheable in instruction cache

Data Cache Enabled for CPU0

  External memory: cacheable (write-through) in data cache

  L2 SRAM        : uncacheable in data cache

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 3556

Kernel command line: root=/dev/mtdblock0 mem=16M noinitrd ip=dhcp rw earlyprintk=serial,uart2,115200 console=ttyBF2,115200 rootfstype=jffs2

PID hash table entries: 64 (order: -4, 256 bytes)

Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)

Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)

Sorting __ex_table...

Memory available: 10624k/16384k RAM, (148k init code, 2212k kernel code, 1032k data, 2048k dma, 320k reserved)

NR_IRQS:295

Configuring Blackfin Priority Driven Interrupts

bfin-rtc: invalid date; resetting

Console: colour dummy device 80x25

Calibrating delay loop... 1044.48 BogoMIPS (lpj=2088960)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

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 (42 KB free)

Blackfin L2 SRAM: 128 KB (128 KB free)

pinctrl core: initialized pinctrl subsystem

NET: Registered protocol family 16

Blackfin DMA Controller

ezkit_init(): registering device resources

bio: create slab <bio-0> at 0

SCSI subsystem initialized

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@4

bfin-spi bfin-spi.1: master is unqueued, this is deprecated

bfin-spi bfin-spi.1: Blackfin on-chip SPI Controller Driver, Version 1.0, regs@ffc02300, dma channel@5

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

i2c-bfin-twi i2c-bfin-twi.0: Blackfin on-chip I2C TWI Contoller, regs_base@ffc00700

i2c-bfin-twi i2c-bfin-twi.1: Blackfin on-chip I2C TWI Contoller, regs_base@ffc02200

Advanced Linux Sound Architecture Driver Initialized.

NET: Registered protocol family 2

TCP established hash table entries: 512 (order: 0, 4096 bytes)

TCP bind hash table entries: 512 (order: -1, 2048 bytes)

TCP: Hash tables configured (established 512 bind 512)

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

msgmni has been set to 20

io scheduler noop registered (default)

bf54x-lq043: FrameBuffer initializing...

dma_alloc_init: dma_page @ 0x009e2000 - 512 pages at 0x00e00000

Console: switching to colour frame buffer device 80x24

bfin-uart: Blackfin serial driver

bfin-uart.2: ttyBF2 at MMIO 0xffc02100 (irq = 40) is a BFIN-UART

console [ttyBF2] enabled, bootconsole disabled

console [ttyBF2] enabled, bootconsole disabled

bfin-otp: initialized

brd: module loaded

register bfin atapi driver

pata-bf54x pata-bf54x: Fail to reset ATAPI device

pata-bf54x: probe of pata-bf54x failed with error -14

physmap platform flash device: 02000000 at 20000000

physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000089 Chip ID 0x00881e

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Using buffer write method

Using auto-unlock on power-up/resume

cfi_cmdset_0001: Erase suspend on write enabled

Creating 5 MTD partitions on "physmap-flash.0":

0x000000000000-0x000000080000 : "bootloader(nor)"

0x000000080000-0x000000480000 : "linux kernel(nor)"

0x000000480000-0x000000fe0000 : "file system(nor)"

0x000000fe0000-0x000000ff8000 : "config(nor)"

0x000000ff8000-0x000001000000 : "u-boot env(nor)"

m25p80 spi0.76: found mr25h256, expected m25p16

m25p80 spi0.76: mr25h256 (32 Kbytes)

Creating 2 MTD partitions on "m25p80":

0x000000000000-0x000000080000 : "bootloader(spi)"

mtd: partition "bootloader(spi)" extends beyond the end of device "m25p80" -- size truncated to 0x8000

0x000000008000-0x000000008000 : "linux kernel(spi)"

mtd: partition "linux kernel(spi)" is out of reach -- disabled

bf5xx-nand bf5xx-nand.0: data_width=8, wr_dly=3, rd_dly=3

ONFI param page 0 valid

ONFI flash detected

NAND device: Manufacturer ID: 0x2c, Chip ID: 0x48 (Micron MT29F32G08AFACAWP), 2048MiB, page size: 4096, OOB size: 224

No oob scheme defined for oobsize 224

------------[ cut here ]------------

kernel BUG at drivers/mtd/nand/nand_base.c:3442!

Kernel panic - not syncing: BUG()

Hardware Trace:

   0 Target : <0x00003e0c> { _trap_c + 0x0 }

     Source : <0xffa00630> { _exception_to_level5 + 0xa4 } CALL pcrel

   1 Target : <0xffa0058c> { _exception_to_level5 + 0x0 }

     Source : <0xffa00444> { _bfin_return_from_exception + 0x18 } RTX

   2 Target : <0xffa0042c> { _bfin_return_from_exception + 0x0 }

     Source : <0xffa004e6> { _ex_trap_c + 0x72 } JUMP.S

   3 Target : <0xffa00474> { _ex_trap_c + 0x0 }

     Source : <0xffa006f6> { _trap + 0x5a } JUMP (P4)

   4 Target : <0xffa0069c> { _trap + 0x0 }

      FAULT : <0x0014ef40> { _nand_scan_tail + 0x538 } BUG

     Source : <0x0022875a> { _printk + 0x26 } RTS

   5 Target : <0x00228756> { _printk + 0x22 }

     Source : <0x0000c714> { _vprintk_emit + 0x12c } RTS

   6 Target : <0x0000c70a> { _vprintk_emit + 0x122 }

     Source : <0xffa00b20> { __common_int_entry + 0xcc } RTI

   7 Target : <0xffa00abe> { __common_int_entry + 0x6a }

     Source : <0xffa00904> { _return_from_int + 0x58 } RTS

   8 Target : <0xffa00904> { _return_from_int + 0x58 }

     Source : <0xffa008da> { _return_from_int + 0x2e } IF !CC JUMP pcrel

   9 Target : <0xffa008ac> { _return_from_int + 0x0 }

     Source : <0xffa00aba> { __common_int_entry + 0x66 } JUMP.L

  10 Target : <0xffa00ab8> { __common_int_entry + 0x64 }

     Source : <0xffa002a8> { _asm_do_IRQ + 0x60 } RTS

  11 Target : <0xffa002a0> { _asm_do_IRQ + 0x58 }

     Source : <0x0003c804> { _rcu_irq_exit + 0x4c } RTS

  12 Target : <0x0003c7fe> { _rcu_irq_exit + 0x46 }

     Source : <0x0003c7f0> { _rcu_irq_exit + 0x38 } IF CC JUMP pcrel (BP)

  13 Target : <0x0003c7ea> { _rcu_irq_exit + 0x32 }

     Source : <0x0003c75e> { _rcu_idle_enter_common + 0x56 } RTS

  14 Target : <0x0003c74c> { _rcu_idle_enter_common + 0x44 }

     Source : <0x0003c714> { _rcu_idle_enter_common + 0xc } IF !CC JUMP pcrel

  15 Target : <0x0003c708> { _rcu_idle_enter_common + 0x0 }

     Source : <0x0003c7e6> { _rcu_irq_exit + 0x2e } CALL pcrel

CPU: 0 PID: 1 Comm: swapper Not tainted 3.10.10-ADI-2013R1 #1

Stack info:

SP: [0x00827ba8] <0x00827ba8> /* kernel dynamic memory (maybe user-space) */

Memory from 0x00827ba0 to 00828000

00827ba0: 00827ba8  00000000 [00000000] 002285a2  00827ca0  00286294  002e9568  002e9568

00827bc0: 002e9568  00827bf0  002e4010  0000427c  00827ca0  ffe02014  002f5730  0000ffc0

00827be0: 00000021  00000021  00000013  00000000  0000003f  0000007b  0000001f  00000004

00827c00: 000ddd4e  00827c4c  ffa002a0  00000006  00827c38  00000006  002e9dc4  ffa00ab8

00827c20: 002e9da2  00000025  00000006  00000000  000df916  00000000  0000c70a  00008050

00827c40: 00000026  cc4663bd  00827c4c  0014c4f4  0000c70a  0000c7da  00000006  02003004

00827c60: 000ddc26  000df918  000ddc1c  000df916  00000000  00000000  00000002  ffa00634

00827c80: 002e7000 <00008008> 00000021  00304674  00000000  00000038  00000000  00000480

00827ca0: 00000480 <00008008> 00000021  cc4663bd  00827d7c  00000480  0014ef40  0014ef40

00827cc0: 00000025  02003004  000ddc26  000df918  000ddc1c  000df916  00000000  00000000

00827ce0: 00000002  00000000  00000002  00000000  00000000  0024386c  0000001f  00000038

00827d00: 00000000  00000000  00000000  00000000  00000fff  00000000  00000007  ffffffff

00827d20: 00000078  002ea234  002ec3d8  00305dd0  00000000  002e4010  008bb1c4  008bb00c

00827d40: 002f5730  00302ea0  00305db0  00002144  00000000  008bb00c  00304674  00000000

00827d60: 00000000  00000079  0000ffff  00000025  00000025  00002144  00000006  008bb000

00827d80: 000000e0  008cc000  00154064  008bb1c4  008bb000  00304674  00000001  00000008

00827da0: 00000003  00000003 <001154f2> 00304674  0031d2d8  00000000  00827e10  0031d2d8

00827dc0: 00000000  0028fdfc  00000000  002e4010  00228ee8  001156a4  00304674  0031d2d8

00827de0: 0031d2d8  003046a8  00000000  002a0160  002e4010 <001142f6> 0011563c  00317bfc

00827e00: 00000000  00000000  000da1ca  00a19660  0082360c  00862810  00115386  00a19660

00827e20: 00000007  00000067  0032c258  00114856  00827e50  001148ca  0011563c  001148dc

00827e40: 00855900  00000000  00115ae2  0028fdfc  0028aa14  00115bb4  0034e288  0033f2a0

00827e60: 0031d2d8  00000007  00000067  0014557a  00000000  002aa29c <000010f2> 0034e288

00827e80: 0033f2a0  00345218  00000007  00000067  00000000  00000006  00000006  002e4010

00827ea0: 0032c1c0  0032c1d8  0034e288  00345238  00000007  00000067  0032c258  002e4000

00827ec0: 002b1fdc  55555555  002e37e4  00000067  00000006  00000006  0032c258  0082dec8

00827ee0: 00227872  002f0a18  00824c14  00000000  00824ac0  00824d60  00311304  00307aa8

00827f00: ffa00006  002f0a18  00824ac0 <ffa00014> 002f0a18  00824c14  55555555  00227868

00827f20: 00000000  00000000  00008000  00000000  00000000  00000000  00000000  00000000

00827f40: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

00827f60: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

00827f80: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

00827fa0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

00827fc0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

00827fe0: 00000000  00000000  00000000  00000000  00000000  00000000  ffffffff  00000006

Return addresses in stack:

    address : <0x00008008> { _isram_memcpy + 0x20 }

    address : <0x00008008> { _isram_memcpy + 0x20 }

    address : <0x001154f2> { _driver_probe_device + 0x7a }

    address : <0x001142f6> { _bus_for_each_dev + 0x5a }

    address : <0x000010f2> { _do_one_initcall + 0xf2 }

    address : <0xffa00014> { _ret_from_fork + 0x14 }

Outcomes