[#5282] SST spi flashes have wrong sector size recorded in driver

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

[#5282] SST spi flashes have wrong sector size recorded in driver

Submitted By: Vivi Li

Open Date

2009-06-19 02:03:34     Close Date

2009-06-19 05:20:41

Priority:

Medium High     Assignee:

Mike Frysinger

Category:

N/A     Fixed In Release:

N/A

Found In Release:

2009R1     Status:

Closed

Board:

N/A     Processor:

BF526

Silicon Revision:

    Resolution:

Fixed

Is the bug repeatable?:

N/A     

Summary: SST spi flashes have wrong sector size recorded in driver

Details:

 

For bf526-ezbrd, write to spi flash with some error data. And it fails to reset after that.

 

Bellow is the log:

--

U-Boot 2008.10-svn1937 (ADI-2009R1-rc2) (Jun 19 2009 - 13:49:49)

 

CPU:   ADSP bf526-0.0 (Detected Rev: 0.0) (spi flash boot)

Board: ADI BF526 EZ-Board board

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

Clock: VCO: 400 MHz, Core: 400 MHz, System: 80 MHz

RAM:   64 MB

Flash:  4 MB

SF: Got idcode bf 25 04

In:    serial

Out:   serial

Err:   serial

Net:   Blackfin EMAC

MAC:   7E:34:23:79:54:48

Hit any key to stop autoboot:  0

bfin>

bfin> sf probe 1

SF: Got idcode bf 25 04

4096 KiB SST25WF040 at 0:1 is now current device

bfin> tftpboot 0x1000000 uImage

Using Blackfin EMAC device

TFTP from server 10.100.4.174; our IP address is 10.100.4.50

Filename 'uImage'.

Load address: 0x1000000

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

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

done

Bytes transferred = 1558366 (17c75e hex)

bfin> sf erase 0x40000 0x1C0000

bfin> sf write 0x1000000 0x40000 $(filesize)

bfin> sf read 0x2000000 0x40000 $(filesize)

bfin> cmp.b 0x1000000 0x2000000 $(filesize)

byte at 0x01040000 (0x91) != byte at 0x02040000 (0xff)

Total of 262144 bytes were the same

bfin> bootm 0x2000000

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

   Image Name:   Linux-2.6.28.10-ADI-2009R1-svn67

   Created:      2009-06-18  11:13:45 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    1558302 Bytes =  1.5 MB

   Load Address: 00001000

   Entry Point:  0017d6bc

   Verifying Checksum ... Bad Data CRC

ERROR: can't get kernel image!

bfin> reset

(can not boot up now)

--

 

Follow-ups

 

--- Mike Frysinger                                           2009-06-19 02:53:58

umm, the SST25WF040 SPI flash is only 512 kilobytes.  i dont think a 1.5

megabyte file is going to fit.

 

--- Vivi Li                                                  2009-06-19 03:06:57

When sf probe, it says "4096 KiB". It means Kbit not KByte?

 

--- Mike Frysinger                                           2009-06-19 03:18:14

KiB means kibibyte.  looks like the SST driver has the wrong number of sectors

encoded in the driver -- they all need to be divided by 8.

 

--- Mike Frysinger                                           2009-06-19 03:34:19

should be fixed now in trunk & branch

 

--- Vivi Li                                                  2009-06-19 03:35:41

So only for bf526, we need to divide by 8 because of the error in SST driver.

For other board with different spi chip, for example bf518f-ezbrd, we don't need

to divide by 8, 4096 KiB means 4 MegaBytes.

 

Is that right?

 

--- Vivi Li                                                  2009-06-19 05:20:41

The size of spi flash is right now.

So close this bug.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes