[#6262] Default SPI flash device NO. is wrong in u-boot trunk for bf518-ezbrd

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

[#6262] Default SPI flash device NO. is wrong in u-boot trunk for bf518-ezbrd

Submitted By: Vivi Li

Open Date

2010-09-19 01:54:48     Close Date

2010-09-28 00:11:58

Priority:

Medium     Assignee:

Mike Frysinger

Category:

N/A     Fixed In Release:

N/A

Found In Release:

N/A     Status:

Closed

Board:

N/A     Processor:

BF518

Silicon Revision:

    Resolution:

Fixed

Is the bug repeatable?:

N/A     

Summary: Default SPI flash device NO. is wrong in u-boot trunk for bf518-ezbrd

Details:

 

Default SPI flash device number is wrong in u-boot trunk for bf518-ezbrd.

 

--

U-Boot 2010.06-svn2399 (ADI-2010R1-pre) (Sep 18 2010 - 13:22:30)

 

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

Board: ADI BF518F EZ-Board board

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

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

RAM:   64 MiB

Flash: 4 MiB

MMC:  Blackfin SDH: 0

SF: Detected M25P16 with page size 256, total 2 MiB

In:    serial

Out:   serial

Err:   serial

KGDB:  [on serial] ready

Net:   bfin_mac

Hit any key to stop autoboot:  0

bfin> printenv update

update=tftp $(loadaddr) $(ubootfile);sf probe 1;sf erase 0 0x40000;sf write $(loadaddr) 0 $(filesize)

bfin> sf probe 1

SF: Unsupported manufacturer FF

Failed to initialize SPI flash at 0:1

bfin>

bfin> sf probe 2

SF: Detected M25P16 with page size 256, total 2 MiB

2048 KiB M25P16 at 0:2 is now current device

bfin>

--

 

Follow-ups

 

--- Mike Frysinger                                           2010-09-19 14:13:26

are you sure you arent using the old env ?  seems to work fine for me, and your

own output shows that SSEL2 is being use for the environment device (they're

based on the same define).

 

arch/blackfin/include/asm/config.h:# define CONFIG_ENV_SPI_CS

BFIN_BOOT_SPI_SSEL

arch/blackfin/include/asm/config-pre.h:    defined(__ADSPBF51x__)

arch/blackfin/include/asm/config-pre.h:# define BFIN_BOOT_SPI_SSEL 2

 

$ make bf518f-ezbrd -s -j4

Configuring for bf518f-ezbrd board...

 

$ strings u-boot | grep update=

update=tftp $(loadaddr) $(ubootfile);sf probe 2;sf erase 0 0x40000;sf write

$(loadaddr) 0 $(filesize)

 

$  bfin-elf-run --env operating --model bf518 ./u-boot

...

bfin> print update

update=tftp $(loadaddr) $(ubootfile);sf probe 2;sf erase 0 0x40000;sf write

$(loadaddr) 0 $(filesize)

 

--- Vivi Li                                                  2010-09-25 04:50:46

BF533-STAMP has the same problem with BF518F-EZBRD.

 

Bellow are the steps that I update spi u-boot in bf533-stamp. I didn't save the

old environment after finishing update, but it remains "sf probe 1"

after reboot into new u-boot.

--

U-Boot 2010.06-svn2403 (ADI-2010R1-pre) (Sep 25 2010 - 16:31:39)

 

CPU:   ADSP bf533-0.3 (Detected Rev: 0.3) (spi flash boot)

Board: ADI BF533 Stamp board

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

Clock: VCO: 497.664 MHz, Core: 497.664 MHz, System: 82.944 MHz

RAM:   128 MiB

Flash: 4 MiB

SF: Detected M25P64 with page size 256, total 8 MiB

In:    serial

Out:   serial

Err:   serial

KGDB:  [on serial] ready

Net:   SMC91111-0

Hit any key to stop autoboot:  0

bfin> set ipaddr 10.100.4.50

bfin> set serverip 10.100.4.174

bfin> saveenv

Saving Environment to SPI Flash...

Erasing SPI flash...Writing to SPI flash...done

bfin> tftp 0x1000000 u-boot.bin

SMC91111: MAC 00:e0:22:fe:06:1d

Using SMC91111-0 device

TFTP from server 10.100.4.174; our IP address is 10.100.4.50

Filename 'u-boot.bin'.

Load address: 0x1000000

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

done

Bytes transferred = 161160 (27588 hex)

bfin> go 0x1000000

## Starting application at 0x01000000 ...

 

 

U-Boot 2010.06-svn2403 (ADI-2010R1-pre) (Sep 25 2010 - 16:31:39)

 

CPU:   ADSP bf533-0.3 (Detected Rev: 0.3) (spi flash boot)

Board: ADI BF533 Stamp board

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

Clock: VCO: 497.664 MHz, Core: 497.664 MHz, System: 82.944 MHz

RAM:   128 MiB

Flash: 4 MiB

SF: Detected M25P64 with page size 256, total 8 MiB

In:    serial

Out:   serial

Err:   serial

KGDB:  [on serial] ready

Net:   SMC91111-0

Hit any key to stop autoboot:  0

bfin> printenv update

update=tftp $(loadaddr) $(ubootfile);sf probe 1;sf erase 0 0x40000;sf write

$(loadaddr) 0 $(filesize)

bfin> set update 'tftp $(loadaddr) $(ubootfile);sf probe 2;sf erase 0

0x40000;sf write $(loadaddr) 0 $(filesize)'

bfin> saveenv

Saving Environment to SPI Flash...

Erasing SPI flash...Writing to SPI flash...done

bfin> printenv update

update=tftp $(loadaddr) $(ubootfile);sf probe 2;sf erase 0 0x40000;sf write

$(loadaddr) 0 $(filesize)

bfin> run update

SMC91111: MAC 00:e0:22:fe:06:1d

Using SMC91111-0 device

TFTP from server 10.100.4.174; our IP address is 10.100.4.50

Filename 'u-boot.ldr'.

Load address: 0x1000000

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

done

Bytes transferred = 169940 (297d4 hex)

SF: Detected M25P64 with page size 256, total 8 MiB

8192 KiB M25P64 at 0:2 is now current device

bfin> reset

 

U-Boot 2010.06-svn2403 (ADI-2010R1-pre) (Sep 25 2010 - 16:31:39)

 

CPU:   ADSP bf533-0.3 (Detected Rev: 0.3) (spi flash boot)

Board: ADI BF533 Stamp board

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

Clock: VCO: 497.664 MHz, Core: 497.664 MHz, System: 82.944 MHz

RAM:   128 MiB

Flash: 4 MiB

SF: Detected M25P64 with page size 256, total 8 MiB

In:    serial

Out:   serial

Err:   serial

KGDB:  [on serial] ready

Net:   SMC91111-0

Hit any key to stop autoboot:  0

bfin> printenv update

update=tftp $(loadaddr) $(ubootfile);sf probe 1;sf erase 0 0x40000;sf write

$(loadaddr) 0 $(filesize)

bfin>

--

 

--- Mike Frysinger                                           2010-09-26 03:00:49

seems the env built into u-boot is fine.  it's the external one built up with

the host compiler and included with the ldr that is messed up.

 

ive committed a change that should fix this.

 

--- Vivi Li                                                  2010-09-28 00:11:58

OK now. Close it.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes