[#4665] read spi flash has error

Document created by Aaronwu Employee on Aug 29, 2013
Version 1Show Document
  • View in full screen mode

[#4665] read spi flash has error

Submitted By: Mingquan Pan

Open Date

2008-11-21 04:03:47     Close Date

2008-12-04 04:55:59

Priority:

Medium High     Assignee:

Yi Li

Status:

Closed     Fixed In Release:

N/A

Found In Release:

N/A     Release:

Category:

N/A     Board:

N/A

Processor:

N/A     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Assigned (Not Start)

Uboot version or rev.:

    Toolchain version or rev.:

Nov 11

App binary format:

N/A     

Summary: read spi flash has error

Details:

 

read spi flash has error on trunk now.

 

U-Boot 1.1.6-svn1273 (ADI-2008R1.5) (Jul 21 2008 - 00:33:04)

 

CPU:   ADSP bf537-0.2 (Detected Rev: 0.2)

Board: ADI BF537 stamp board

       Support:   blackfin.uclinux.org/

Clock: VCO: 500 MHz, Core: 500 MHz, System: 100 MHz

RAM:   64 MB

Flash:  4 MB

In:    serial

Out:   serial

Err:   serial

Net:   Blackfin EMAC

MAC:   00:EA:BC:80:02:00

Hit any key to stop autoboot:  0

bfin> tftp 0x2000000 linux

Using Blackfin EMAC device

TFTP from server 10.100.4.174; our IP address is 10.100.4.50

Filename 'linux'.

Load address: 0x2000000

Loading: #################################################################

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

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

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

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

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

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

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

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

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

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

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

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

done

Bytes transferred = 4067685 (3e1165 hex)

bfin> boote

Loading .text @ 0x00001000 (1129344 bytes)

Loading .rodata @ 0x00114b80 (279184 bytes)

Loading __ksymtab @ 0x00158e10 (15696 bytes)

Loading __ksymtab_gpl @ 0x0015cb60 (4728 bytes)

Loading __ksymtab_strings @ 0x0015ddd8 (45586 bytes)

Loading __param @ 0x00168fec (340 bytes)

Clearing .bss @ 0x00169140 (67636 bytes)

Loading .data @ 0x00179974 (67212 bytes)

Loading .init.text @ 0x0018a000 (100976 bytes)

Loading .init.data @ 0x001a2a70 (13600 bytes)

Loading .init.setup @ 0x001a5f90 (588 bytes)

Loading .initcall.init @ 0x001a61dc (532 bytes)

Loading .con_initcall.init @ 0x001a63f0 (4 bytes)

Loading .init.ramfs @ 0x001a63f4 (1799828 bytes)

Loading .text_l1 @ 0xffa00000 (6472 bytes)

sh_addr: FFA00000, p_paddr: 0035DA88

Loading from: 0234E000 to 0035DA88, size: 6472

Loading .data_l1 @ 0xff800000 (192 bytes)

sh_addr: FF800000, p_paddr: 0035F3D0

Loading from: 02350000 to 0035F3D0, size: 192

## Starting application at 0x001982b8 ...

Linux version 2.6.28-rc2-ADI-2009R1-pre-svn5724 (test@uclinux55-bf537-cf-spi) (gcc version 4.1.2 (ADI svn)) #10 Thu Nov 20 14:32:49 MST 2008

console [early_BFuart0] enabled

early printk enabled on early_BFuart0

Warning: limiting memory to 56MB due to hardware anomaly 05000263

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x00114b80

  rodata    = 0x00114b80-0x00169140

  bss       = 0x00169140-0x00179974

  data      = 0x00179974-0x0018a000

    stack   = 0x00188000-0x0018a000

  init      = 0x0018a000-0x00360000

  available = 0x00360000-0x037ff000

  DMA Zone  = 0x03f00000-0x04000000

Hardware Trace Active and Enabled

Reset caused by Software reset

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

Compiled for ADSP-BF537 Rev 0.2

Blackfin Linux support by   blackfin.uclinux.org/

Processor Speed: 500 MHz core clock and 100 MHz System Clock

NOMPU: setting up cplb tables for global access

Instruction Cache Enabled for CPU0

Data Cache Enabled for CPU0 (write-through)

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

Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 earlyprintk=serial,uart0,57600

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

console handover: boot [early_BFuart0] -> real [ttyBF0]

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory available: 53304k/65536k RAM, (1880k init code, 1102k kernel code, 470k data, 1024k dma, 7756k reserved)

Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)

Security Framework initialized

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Data A SRAM: 16 KB (15 KB free)

Blackfin L1 Data B SRAM: 16 KB (16 KB free)

Blackfin L1 Instruction SRAM: 48 KB (41 KB free)

PDA for CPU0 reserved at 0016a408

net_namespace: 288 bytes

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

stamp_init(): registering device resources

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

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

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

NET: Registered protocol family 1

JFFS2 version 2.2. (NAND) .. 2001-2006 Red Hat, Inc.

msgmni has been set to 104

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART

brd: module loaded

bfin_mac_mdio: probed

bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=19)@sclk=100MHz)

bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1

m25p80 spi0.1: m25p64 (8192 Kbytes)

Creating 3 MTD partitions on "m25p80":

0x00000000-0x00040000 : "bootloader(spi)"

0x00040000-0x00120000 : "linux kernel(spi)"

0x00120000-0x00800000 : "file system(spi)"

bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7

TCP cubic registered

NET: Registered protocol family 17

Freeing unused kernel memory: 1880k freed

dma_alloc_init: dma_page @ 0x0035d000 - 256 pages at 0x03f00000

                           _____________________________________

        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            -   blackfin.uclinux.org/

\    YP"    `| 8P  `.          -   docs.blackfin.uclinux.org/

/     \.___.d|    .'           -   www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    -   www.analog.com/blackfin

 

Have a lot of fun...

 

 

BusyBox v1.12.2 (2008-11-20 09:17:46 MST) built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

root:/> init: /bin/watchdogd respawning too fast

init: /bin/watchdogd respawning too fast

 

root:/>

root:/> cat /proc/mtd

dev:    size   erasesize  name

mtd0: 00040000 00010000 "bootloader(spi)"

mtd1: 000e0000 00010000 "linux kernel(spi)"

mtd2: 006e0000 00010000 "file system(spi)"

root:/>

root:/> flash_eraseall /dev/mtd2

Erasing 64 Kibyte @ 90000 --  8 % complete.init: /bin/watchdogd respawning too fast

Erasing 64 Kibyte @ 4d0000 -- 70 % complete.init: /bin/watchdogd respawning too fast

Erasing 64 Kibyte @ 6d0000 -- 99 % complete.

root:/> init: /bin/watchdogd respawning too fast

root:/> mkdir -p rootfs

root:/> ls

bin     etc     init    mnt     root    rootfs  sys     usr

dev     home    lib     proc    rootf   sbin    tmp     var

root:/> ls rootfs/

root:/> echo This is test for mtd driver > rootfs/test

root:/> cat rootfs/test

This is test for mtd driver

root:/> mkfs.jffs2 -r rootfs -o mtd.img

root:/> cp mtd.img /dev/mtd2

root:/> mount -t jffs2 /dev/mtdblock2 /mnt

root:/> ls /mnt/

test

root:/> ls /mnt/test

/mnt/test

root:/> cat /mnt/test

Read of newly-erased block at 0x00698000 failed: 1. Putting on bad_list

This is test for mtd driver

root:/> Read of newly-erased block at 0x00672000 failed: 1. Putting on bad_list

Read of newly-erased block at 0x00664000 failed: 1. Putting on bad_list

Read of newly-erased block at 0x00651000 failed: 1. Putting on bad_list

 

Follow-ups

 

--- Mingquan Pan                                             2008-12-04 04:55:59

It looks not reproduced on trunk now and working ok on the same board.

 

bfin> bootelf

Loading .text @ 0x00001000 (1126256 bytes)

Loading .rodata @ 0x00113f70 (279512 bytes)

Loading __ksymtab @ 0x00158348 (15696 bytes)

Loading __ksymtab_gpl @ 0x0015c098 (4712 bytes)

Loading __ksymtab_strings @ 0x0015d300 (45538 bytes)

Loading __param @ 0x001684e4 (340 bytes)

Clearing .bss @ 0x00168640 (67216 bytes)

Loading .data @ 0x00178cd0 (62256 bytes)

Loading .init.text @ 0x00188000 (101012 bytes)

Loading .init.data @ 0x001a0a94 (13612 bytes)

Loading .init.setup @ 0x001a3fc0 (588 bytes)

Loading .initcall.init @ 0x001a420c (532 bytes)

Loading .con_initcall.init @ 0x001a4420 (4 bytes)

Loading .init.ramfs @ 0x001a4424 (3312364 bytes)

Loading .text_l1 @ 0xffa00000 (6456 bytes)

sh_addr: FFA00000, p_paddr: 004CCF10

Loading from: 024BD000 to 004CCF10, size: 6456

Loading .data_l1 @ 0xff800000 (192 bytes)

sh_addr: FF800000, p_paddr: 004CE848

Loading from: 024BF000 to 004CE848, size: 192

## Starting application at 0x00196340 ...

Linux version 2.6.28-rc2-ADI-2009R1-pre-svn5799 (test@uclinux55-bf537-cf-spi)

(gcc version 4.1.2 (ADI svn)) #54 Thu Dec 4 15:19:09 MST 2008

console [early_BFuart0] enabled

early printk enabled on early_BFuart0

Warning: limiting memory to 56MB due to hardware anomaly 05000263

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x00113f70

  rodata    = 0x00113f70-0x00168638

  bss       = 0x00168640-0x00178cd0

  data      = 0x00178cd0-0x00188000

    stack   = 0x00186000-0x00188000

  init      = 0x00188000-0x004cf000

  available = 0x004cf000-0x037ff000

  DMA Zone  = 0x03f00000-0x04000000

Hardware Trace Active and Enabled

Reset caused by Software reset

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

Compiled for ADSP-BF537 Rev 0.2

Blackfin Linux support by   blackfin.uclinux.org/

Processor Speed: 500 MHz core clock and 100 MHz System Clock

NOMPU: setting up cplb tables for global access

Instruction Cache Enabled for CPU0

Data Cache Enabled for CPU0 (write-through)

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

Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600

ip=10.100.4.50:10.100.4.174:10.100.4.174:255.255.255.0:1:eth0:off

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

console handover: boot [early_BFuart0] -> real [ttyBF0]

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory available: 51836k/65536k RAM, (3356k init code, 1099k kernel code, 465k

data, 1024k dma, 7756k reserved)

Calibrating delay loop... 997.37 BogoMIPS (lpj=1994752)

Security Framework initialized

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Data A SRAM: 16 KB (15 KB free)

Blackfin L1 Data B SRAM: 16 KB (16 KB free)

Blackfin L1 Instruction SRAM: 48 KB (41 KB free)

PDA for CPU0 reserved at 00169778

net_namespace: 288 bytes

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

stamp_init(): registering device resources

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

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

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

NET: Registered protocol family 1

JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.

msgmni has been set to 101

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART

brd: module loaded

bfin_mac_mdio: probed

bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1,

mdc_clk=2500000Hz(mdc_div=19)@sclk=100MHz)

bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1

m25p80 spi0.1: m25p64 (8192 Kbytes)

Creating 3 MTD partitions on "m25p80":

0x00000000-0x00040000 : "bootloader(spi)"

0x00040000-0x00120000 : "linux kernel(spi)"

0x00120000-0x00800000 : "file system(spi)"

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0,

regs_base@ffc00500, dma channel@7

TCP cubic registered

NET: Registered protocol family 17

IP-Config: Complete:

     device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,

     host=1, domain=, nis-domain=(none),

     bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=

Freeing unused kernel memory: 3356k freed

dma_alloc_init: dma_page @ 0x004cc000 - 256 pages at 0x03f00000

                           _____________________________________

        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            -   blackfin.uclinux.org/

\    YP"    `| 8P  `.          -   docs.blackfin.uclinux.org/

/     \.___.d|    .'           -   www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    -   www.analog.com/blackfin

 

Have a lot of fun...

 

 

BusyBox v1.13.1 (2008-12-04 06:21:53 MST) built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

root:/> successful boot attempt

 

*******************************************************************

STEP 3: MTD test

 

 

catPHY: 0:01 - Link is Up - 100/Full

/proc/mtd

dev:    size   erasesize  name

mtd0: 00040000 00010000 "bootloader(spi)"

mtd1: 000e0000 00010000 "linux kernel(spi)"

mtd2: 006e0000 00010000 "file system(spi)"

root:/>

Case 1 ...PASS

 

*******************************************************************

STEP 4: Mount MTD

 

 

mount -t jffs2 /dev/mtdblock2 /mnt

root:/>

Case 2 ...PASS

 

*******************************************************************

STEP 5: Reading MTD

 

 

ls /mnt

pwd   test

root:/>

*******************************************************************

STEP 6: Reading MTD

 

 

umount /mnt

root:/>

Case 3 ...PASS

 

*******************************************************************

STEP 7: Erase MTD

 

 

flash_eraseall /dev/mtd2

Erasing 64 Kibyte @ 160000 -- 20 % complete.init: /bin/watchdogd respawning too

fast

Erasing 64 Kibyte @ 2d0000 -- 40 % complete.init: /bin/watchdogd respawning too

fast

Erasing 64 Kibyte @ 540000 -- 76 % complete.init: /bin/watchdogd respawning too

fast

Erasing 64 Kibyte @ 6d0000 -- 99 % complete.

root:/>

Case 4 ...PASS

 

*******************************************************************

STEP 8: Make jffs2 image

 

 

mkdir -p rootfs

root:/> echo This is test for mtd driver > rootfs/test

root:/> mkfs.jffs2 -r rootfs -s 4096 -e 65536 -o mtd.img

root:/>

*******************************************************************

STEP 9: Writing MTD

 

 

cp mtd.img /dev/mtd2

root:/>

Case 5 ...PASS

 

*******************************************************************

STEP 10: Reading MTD

 

 

mount -t jffs2 /dev/mtdblock2 /mnt

root:/>

Case 6 ...PASS

 

*******************************************************************

STEP 11: cp pwd to JFFS.

 

 

cp /bin/pwd /mnt

init: /bin/watchdogd respawning too fast

root:/>

Case 7 ...PASS

 

*******************************************************************

STEP 12: JFFS Validating data integrity

 

 

while [ 1 ]; md5sum /mnt/pwd ; done

674de30d443e034a49f5be27a3a508af  /mnt/pwd

 

Case 8 ...PASS

674de30d443e034a49f5be27a3a508af  /mnt/pwd

674de30d443e034a49f5be27a3a508af  /mnt/pwd

674de30d443e034a49f5be27a3a508af  /mnt/pwd

674de30d443e034a49f5be27a3a508af  /mnt/pwd

674de30d443e034a49f5be27a3a508af  /mnt/pwd

^Croot:/>

*******************************************************************

STEP 13: Verify

 

 

cmp /rootfs/test /mnt/test

root:/>

Case 9 ...PASS

umount /mnt

root:/> ls /mnt

root:/> mount -t jffs2 /dev/mtdblock2 /mnt

root:/> ls /mnt/

pwd   test

root:/> cat /mnt/test

This is test for mtd driver

root:/>                                                                    

                                                                             

 

Close.

 

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

config.snormtd_mount    application/octet-stream    28106    Mingquan Pan

Attachments

Outcomes