[#5142] dd bfin-otp device with big count has Input/output error

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

[#5142] dd bfin-otp device with big count has Input/output error

Submitted By: Mingquan Pan

Open Date

2009-05-19 04:59:49     Close Date

2009-06-03 06:27:24

Priority:

Medium     Assignee:

Mike Frysinger

Status:

Closed     Fixed In Release:

N/A

Found In Release:

N/A     Release:

Category:

N/A     Board:

N/A

Processor:

BF548     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Assigned (Not Start)

Uboot version or rev.:

    Toolchain version or rev.:

09r1-rc6

App binary format:

N/A     

Summary: dd bfin-otp device with big count has Input/output error

Details:

 

dd bfin-otp device with big count has Input/output error on bf548 ezkit.

 

if use count number bigger than 3, it would repot failure. but it used to be 440 in March 13 last pass testing.

 

root:/> dmesg

Linux version 2.6.28.10-ADI-2009R1-pre-svn6363 (test@uclinux61-bf548-std) (gcc version 4.1.2 (ADI svn)) #224 Sun May 17 21:02:39 GMT 2009

console [early_BFuart0] enabled

early printk enabled on early_BFuart0

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x001923e0

  rodata    = 0x001923e0-0x0021d918

  bss       = 0x0021e000-0x00232150

  data      = 0x00232150-0x0024c000

    stack   = 0x0024a000-0x0024c000

  init      = 0x0024c000-0x009f8000

  available = 0x009f8000-0x03dff000

  DMA Zone  = 0x03e00000-0x04000000

Hardware Trace Active and Enabled

Boot Mode: 3

Reset caused by Software reset

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

Compiled for ADSP-BF548 Rev 0.2

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

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

boot memmap: 00000000009f8000 - 0000000003dff000 (usable)

On node 0 totalpages: 15871

free_area_init_node: node 0, pgdat 00248b18, node_mem_map 009fa000

  DMA zone: 124 pages used for memmap

  DMA zone: 0 pages reserved

  DMA zone: 15747 pages, LIFO batch:3

  Normal zone: 0 pages used for memmap

  Movable zone: 0 pages used for memmap

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

Data Cache Enabled for CPU0 (write-back)

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

Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600 ip=10.100.4.50:10.100.4.174:192.168.0.1:255.255.255.0:bf548-ezkit: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)

Kernel managed physical pages: 15871

Memory available: 52708k/65536k RAM, (7856k init code, 1604k kernel code, 744k data, 2048k dma, 572k reserved)

Calibrating delay loop... 1046.52 BogoMIPS (lpj=2093056)

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

Blackfin L2 SRAM: 128 KB (128 KB free)

PDA for CPU0 reserved at 00221000

net_namespace: 288 bytes

NET: Registered protocol family 16

Blackfin DMA Controller

ezkit_init(): registering device resources

SCSI subsystem initialized

libata version 3.00 loaded.

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

musb_hdrc: version 6.0, musb-dma, host, debug=0

musb_hdrc: ConfigData=0x00 (UTMI-8)

musb_hdrc: HDRC RTL version 0.0

musb_hdrc: hw_ep 0shared, max 64

musb_hdrc: hw_ep 1tx, max 128

musb_hdrc: hw_ep 1rx, max 128

musb_hdrc: hw_ep 2tx, max 128

musb_hdrc: hw_ep 2rx, max 128

musb_hdrc: hw_ep 3tx, max 128

musb_hdrc: hw_ep 3rx, max 128

musb_hdrc: hw_ep 4tx, max 128

musb_hdrc: hw_ep 4rx, max 128

musb_hdrc: hw_ep 5tx, max 1024

musb_hdrc: hw_ep 5rx, max 1024

musb_hdrc: hw_ep 6tx, max 1024

musb_hdrc: hw_ep 6rx, max 1024

musb_hdrc: hw_ep 7tx, max 1024

musb_hdrc: hw_ep 7rx, max 1024

musb_hdrc: USB Host mode controller at ffc03c00 using DMA, IRQ 82

musb_hdrc musb_hdrc.0: MUSB HDRC host driver

musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

dma_alloc_init: dma_page @ 0x00aaf000 - 512 pages at 0x03e00000

hub 1-0:1.0: 1 port detected

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

Setting up Blackfin MMR debugfs

msgmni has been set to 102

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

bf54x-lq043: FrameBuffer initializing...

bfin-otp: initialized

Serial: Blackfin serial driver

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

brd: module loaded

smsc911x: Driver version 2007-07-13.

eth0: SMSC911x MAC Address: 00:e0:22:fe:bf:4e

Driver 'sd' needs updating - please use bus_type methods

register bfin atapi driver

scsi0 : pata-bf54x

ata1: PATA max UDMA/66 irq 68

ata1.00: ATA-6: TOSHIBA MK4032GAX, AD101A, max UDMA/100

ata1.00: 78140160 sectors, multi 16: LBA48

ata1.00: configured for UDMA/66

blk_queue_max_hw_segments: set to minimum 1

scsi 0:0:0:0: Direct-Access     ATA      TOSHIBA MK4032GA AD10 PQ: 0 ANSI: 5

sd 0:0:0:0: [sda] 78140160 512-byte hardware sectors: (40.0 GB/37.2 GiB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00

sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

sd 0:0:0:0: [sda] 78140160 512-byte hardware sectors: (40.0 GB/37.2 GiB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00

sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

sda: sda1 sda2

sd 0:0:0:0: [sda] Attached SCSI disk

physmap platform flash device: 02000000 at 20000000

physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank

physmap-flash.0: Found an alias at 0x1000000 for the chip at 0x0

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

erase region 0: offset=0x0,size=0x20000,blocks=127

erase region 1: offset=0xfe0000,size=0x8000,blocks=4

RedBoot partition parsing not available

Using physmap partition information

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

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

0x00040000-0x00440000 : "linux kernel(nor)"

0x00440000-0x01000000 : "file system(nor)"

BF5xx on-chip NAND FLash Controller Driver, Version 1.2 (c) 2007 Analog Devices, Inc.

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

NAND device: Manufacturer ID: 0x20, Chip ID: 0xda (ST Micro NAND 256MiB 3,3V 8-bit)

Creating 2 MTD partitions on "NAND 256MiB 3,3V 8-bit":

0x00000000-0x00400000 : "linux kernel(nand)"

0x00400000-0x10000000 : "file system(nand)"

m25p80 spi0.1: m25p16 (2048 Kbytes)

Creating 2 MTD partitions on "m25p80":

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

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

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

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

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

input: bf54x-keys as /devices/platform/bf54x-keys/input/input0

bf54x-keys: Blackfin BF54x Keypad registered IRQ 76

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

i2c /dev entries driver

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

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

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

bfin-sdh bfin-sdh.0: unable to request DMA channel

bfin-sdh: probe of bfin-sdh.0 failed with error -16

usbcore: registered new interface driver usbhid

usbhid: v2.6:USB HID core driver

Advanced Linux Sound Architecture Driver Version 1.0.18rc3.

ASoC version 0.13.2

dma rx:0 tx:1, err irq:10, regs:ffc00800

AD1980 SoC Audio Codec

asoc: AC97 <-> bf5xx-ac97 mapping ok

ALSA device list:

  #0: bf5xx-board (AD1980)

TCP cubic registered

NET: Registered protocol family 17

rtc-bfin rtc-bfin: setting system clock to 2004-06-01 00:25:22 UTC (1086049522)

eth0: SMSC911x/921x identified at 0x24000000, IRQ: 175

eth0: link down

usb 1-1: new high speed USB device using musb_hdrc and address 2

usb 1-1: configuration #1 chosen from 1 choice

scsi1 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 2

usb-storage: waiting for device to settle before scanning

IP-Config: Gateway not on directly connected network.

Freeing unused kernel memory: 7856k freed

eth0: link up, 100Mbps, full-duplex, lpa 0x41E1

scsi 1:0:0:0: Direct-Access     SanDisk  U3 Cruzer Micro  6.51 PQ: 0 ANSI: 0 CCS

sd 1:0:0:0: [sdb] 2014271 512-byte hardware sectors: (1.03 GB/983 MiB)

sd 1:0:0:0: [sdb] Write Protect is off

sd 1:0:0:0: [sdb] Mode Sense: 45 00 00 08

sd 1:0:0:0: [sdb] Assuming drive cache: write through

sd 1:0:0:0: [sdb] 2014271 512-byte hardware sectors: (1.03 GB/983 MiB)

sd 1:0:0:0: [sdb] Write Protect is off

sd 1:0:0:0: [sdb] Mode Sense: 45 00 00 08

sd 1:0:0:0: [sdb] Assuming drive cache: write through

sdb: sdb1 sdb2

sd 1:0:0:0: [sdb] Attached SCSI removable disk

usb-storage: device scan complete

root:/>

root:/> dd if=/dev/bfin-otp of=otp_out.bin3 bs=8 count=3

3+0 records in

3+0 records out

root:/> dd if=/dev/bfin-otp of=otp_out.bin3 bs=8 count=30

dd: /dev/bfin-otp: Input/output error

root:/>

 

Last passed time: 2009_Mar_13_04_59, ucdist ver: 7878, kernel ver: 6167

 

Follow-ups

 

--- Mike Frysinger                                           2009-05-19 05:05:22

are you using the exact same board ?  OTP will differ according to the part.

 

another possibility is that some OTP fuse actually blew causing an ECC failure.

nothing can be done in software to work around that.

 

you should enable debugging in the bfin-otp.c driver (add '#define DEBUG' to

the top of it) and then re-run your test and post the output of `dmesg` after

doing so.

 

--- Mingquan Pan                                             2009-05-19 05:59:52

Yeah, it could be two boards. And I enable the debug info, it says:

 

root:/> dd if=/dev/bfin-otp of=otp_out.bin0 bs=8 count=440

dd: /dev/bfin-otp: Input/output error

root:/> dmesg

Linux version 2.6.28.10-ADI-2009R1-pre-svn6364 (test@my-local-machine) (gcc

version 4.1.2 (ADI svn)) #11 Tue May 19 17:55:36 CST 2009

console [early_BFuart0] enabled

early printk enabled on early_BFuart0

Board Memory: 64MB                                                            

                                                                          

...

sd 1:0:0:0: [sdb] Assuming drive cache: write through

sdb: sdb1 sdb2

sd 1:0:0:0: [sdb] Attached SCSI removable disk

usb-storage: device scan complete

bfin_otp_read:46: here i am

bfin_otp_read:59: processing page 0 (0x0:lower)

bfin_otp_read:46: here i am

bfin_otp_read:59: processing page 0 (0x1:upper)

bfin_otp_read:46: here i am

bfin_otp_read:59: processing page 1 (0x0:lower)

bfin_otp_read:46: here i am

bfin_otp_read:59: processing page 1 (0x1:upper)

bfin_otp_read:62: error from otp: 0x11

bfin_otp_read:46: here i am

bfin_otp_read:59: processing page 0 (0x0:lower)

bfin_otp_read:46: here i am

bfin_otp_read:59: processing page 0 (0x1:upper)

bfin_otp_read:46: here i am

bfin_otp_read:59: processing page 1 (0x0:lower)

bfin_otp_read:46: here i am

bfin_otp_read:59: processing page 1 (0x1:upper)

bfin_otp_read:62: error from otp: 0x11

 

 

--- Mike Frysinger                                           2009-05-19 06:26:58

0x11 is OTP_DATA_MULT_ERROR which means the page data is unrecoverable.  nothing

to be done in software -- the driver is operating correctly afaict.

 

--- Mingquan Pan                                             2009-05-19 22:21:01

So I use the small value to test and close this.

 

--- Mingquan Pan                                             2009-06-02 04:11:07

I open this to have one more question found on two bf527 ezkit boards with 0.2

silicon.

 

It both fails even with count=3:

 

root:/>

root:/> dd if=/dev/bfin-otp of=otp_out.bin0 bs=8 count=3

dd: /dev/bfin-otp: Input/output error

root:/> dd if=/dev/bfin-otp of=otp_out.bin0 bs=8 count=1

dd: /dev/bfin-otp: Input/output error

root:/> dd if=/dev/bfin-otp of=otp_out.bin0 bs=8 count=0

0+0 records in

0+0 records out

root:/>

root:/> version

kernel:    Linux release 2.6.28.10-ADI-2009R1-svn6495, build #14 Tue Jun 2

14:56:14 CST 2009

toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)

user-dist: release svn-8160, build #16 Tue Jun 2 14:55:16 CST 2009

root:/>

root:/> cat /proc/cpuinfo

processor       : 0

vendor_id       : Analog Devices

cpu family      : 0x27e0

model name      : ADSP-BF527 525(MHz CCLK) 131(MHz SCLK) (mpu off)

stepping        : 2

cpu MHz         : 525.000/131.250000

bogomips        : 1046.52

Calibration     : 523264000 loops

cache size      : 16 KB(L1 icache) 32 KB(L1 dcache-wb) 0 KB(L2 cache)

dbank-A/B       : cache/cache

icache setup    : 4 Sub-banks/4 Ways, 32 Lines/Way

dcache setup    : 2 Super-banks/4 Sub-banks/2 Ways, 64 Lines/Way

board name      : ADI BF527-EZKIT

board memory    : 65536 kB (0x00000000 -> 0x04000000)

kernel memory   : 63480 kB (0x00001000 -> 0x03dff000)

 

With Debug turned on, the print info is about the same with above.

Freeing unused kernel memory: 7268k freed

bfin_otp_read:46: here i am

bfin_otp_read:59: processing page 0 (0x0:lower)

bfin_otp_read:62: error from otp: 0x11

bfin_otp_read:46: here i am

bfin_otp_read:59: processing page 0 (0x0:lower)

bfin_otp_read:62: error from otp: 0x11

bfin_otp_read:46: here i am

bfin_otp_read:59: processing page 0 (0x0:lower)

bfin_otp_read:62: error from otp: 0x11

bfin_otp_read:46: here i am

bfin_otp_read:59: processing page 0 (0x0:lower)

bfin_otp_read:62: error from otp: 0x11

 

But I still feel strange, these two boards are quite new, if they are fail, so

the case fail with bf527 ezkit.

Is it possible that there are some jumper need to set?

 

--- Mike Frysinger                                           2009-06-02 04:21:09

i'm pretty sure there are no jumpers.  OTP is all internal to the part and there

is no external access to it.

 

the first 4 pages are protection bits, so any bad programming in the rest of

the OTP region could cause problems there.

 

you can use u-boot to double check things.  the interface is a bit more compact

and easier to use:

bfin> otp read 0 0 16

 

one test you should be able to do is read page 7 -- it'll be an ascii string

representing the part you're running on followed by an ID for the variant:

 

bfin> otp read 0 7 2

OTP memory read: addr 0x00000000  page 0x007  count 2 ... .. done

bfin> md.b 0

00000000: 41 44 53 50 2d 42 46 35 34 39 00 00 00 00 25 02    ADSP-BF549....%.

 

0x0225 == BF549

 

--- Mingquan Pan                                             2009-06-02 23:08:59

On one of the bf527 board ,I run above command in uboot:

 

U-Boot 2008.10-svn1896 (ADI-2009R1-rc1) (May 27 2009 - 20:40:23)

 

CPU:   ADSP bf527-0.0 (Detected Rev: 0.2) (parallel flash boot)

Board: ADI BF527 EZ-Kit board

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

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

RAM:   64 MB

Flash:  4 MB

In:    serial

Out:   serial

Err:   serial

Net:   Blackfin EMAC

MAC:   00:E0:22:FE:BD:7C

Hit any key to stop autoboot:  0

bfin>  otp read 0 0 16

OTP memory read: addr 0x00000000  page 0x000  count 22 ...

E...W.................. done

bfin> otp read 0 7 2

OTP memory read: addr 0x00000000  page 0x007  count 2 ... .. done

bfin> md.b 0

00000000: 41 44 53 50 2d 42 46 35 32 37 43 32 58 00 0f 42    ADSP-BF527C2X..B

00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

bfin>

 

--- Mike Frysinger                                           2009-06-03 03:29:01

that first read command shows that there is an unrecoverable error in the first

page.  nothing i can do about that.  i'd suggest you adjust your script to read

page 7 and check those values.

 

--- Mingquan Pan                                             2009-06-03 05:02:27

How can I specify to use page 7 ? I only operate on device /dev/bfin-otp.

 

--- Mike Frysinger                                           2009-06-03 05:07:00

use the skip= option with dd to ignore the first few pages.  one page is 128bits

(or 16 bytes).

 

--- Mingquan Pan                                             2009-06-03 06:27:24

Yes, it can dd right now on bf527 ezkit.

 

root:/> dd if=/dev/bfin-otp of=otp bs=8 count=3 skip=112

3+0 records in

3+0 records out

 

Thanks and close.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

config.otpmem    application/octet-stream    40730    Mingquan Pan

Attachments

Outcomes