Skip to contentSkip to conversation

U-Boot Not Loading Successfully

U-Boot-Users SAM SONG 2 participants 2 messages Jan 3, 2004 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

SAM SONG

author
#1 lore raw

Hi,Jeff,

Quoted 6 lines

I'm not sure what reset vector is. I am assuming that you are talking about CFG_RESET_ADDRESS, which I have set to 0x80000000. I'm not sure exactly what to set that to, since some board configuration files tell you to set it to a known invalid address, and then some have it set to flash base plus 0x100.

To my knowledge,reset vector is decided by Hardware Circuit of Power-on.In PowerPC,only two reset vectors are possible.One is 0x00000100,another 0xFFF00100.So we should program U-Boot code to the beginning of FLASH base address or 0xFFF00000 accordingly and U-Boot adds the 0ffset 0x100 inside.I guess your reset vector is 0x00000100.Your code at 0xFFF80000 is OK.It's not necessary to set CFG_RESET_ADDRESS.At lease,I didn't touch it.Reset vector is critical to boot a board.When power-on or hard reset,PC points at reset vector and run automatically.

Quoted 11 lines

Also, the speed of the flash I am using is a 70ns flash device.

Quoted 8 lines
CPU:   MPC855T
FLASH: AMD AM29LV040B (512kB 8-bit on CS0)
SDRAM: Micron MT48LC4M32 (16MB 32-bit on CS2)
NVRAM: Simtek STK14C88 (32kB 8-bit on CS4)

had the same effect. Or, could this be an issue
with
my BR0 and OR0 settings?

I guess so.

Quoted 11 lines
Quoted 11 lines

Here are my BRx, ORx settings:

#define FLASH_BASE_PRELIM     0xFFF80000
#define CFG_PRELIM_OR_AM      0xFFFF0000
#define CFG_OR_TIMING_FLASH   (OR_CSNT_SAM |

OR_ACS_DIV4 | OR_BI | OR_SCY_3_CLK | OR_TRLX |
OR_EHTR)

#define CFG_OR0_PRELIM (CFG_PRELIM_OR_AM |
CFG_OR_TIMING_FLASH)
#define CFG_BR0_PRELIM ((FLASH_BASE_PRELIM &
BR_BA_MSK) | (BR_PS_8 & BR_PS_MSK) | BR_V)

I think your problems are likely with BR0 and OR0 settings.Assuming bus clock(not system clock) is 50MHz,the settings of OR0/BR0 are following:

SCY=70/20=3.5; Choose 4 for SCY;
TRLX=0,SAM=0

#define CFG_OR_TIMING_FLASH (OR_ACS_DIV4 | OR_BI |
OR_SCY_4_CLK | OR_EHTR)
or try
#define CFG_OR_TIMING_FLASH (OR_BI | OR_SCY_4_CLK)

In addtional,pls change CFG_PRELIM_OR_AM as FLASH_BASE_PRELIM in CFG_OR0_PRELIM SETTING:

#define CFG_OR0_PRELIM (FLASH_BASE_PRELIM |
CFG_OR_TIMING_FLASH)

Quoted 7 lines
Quoted 7 lines

#define SDRAM_BASE_PRELIM 0x00000000
#define SDRAM_MAX_SIZE 0x01000000

#define CFG_OR_TIMING_SDRAM (OR_G5LA | OR_G5LS)
#define CFG_OR2_PRELIM (CFG_PRELIM_OR_AM |
CFG_OR_TIMING_SDRAM )

You'd better change CFG_PRELIM_OR_AM as 0xFF000000 rather than 0xFFFF0000 as above.16MB's OR_PRELIM prefix is 0xFE000000.

Quoted 8 lines
Quoted 8 lines

#define CFG_BR2_PRELIM ((SDRAM_BASE_PRELIM
BR_BA_MSK) | BR_MS_UPMA | BR_V )
#define CFG_NVRAM_BASE 0xFA000000
#define CFG_OR4_PRELIM (CFG_PRELIM_OR_AM |
CFG_OR_TIMING_FLASH)
#define CFG_BR4_PRELIM ((CFG_NVRAM_BASE &
BR_BA_MSK) | (BR_PS_8 & BR_PS_MSK) | BR_V |
OR_EHTR)

If NVRAM isn't for other purpose,pls consider putting ENV in NVRAM.I am a little worry about your FLASH size.ENV will take up one sector of flash for backup if you define CFG_ENV_IN_FLASH.There isn't enough space of FLASH for you to use for application.Oop,maybe I say too much.Stop here!

Best regards,

Sam Song

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#2 lore raw
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 5 lines

I'm not sure what reset vector is. I am assuming that you are talking about CFG_RESET_ADDRESS, which I have set to 0x80000000. I'm not sure exactly what to set that to, since some board configuration files

See in do_reset() [in cpu/*/cpu.c] how CFG_RESET_ADDRESS gets used.

Quoted 3 lines

To my knowledge,reset vector is decided by Hardware Circuit of Power-on.In PowerPC,only two reset vectors are possible.One is 0x00000100,another 0xFFF00100.So

This is correct for the many, but not for all PowerPC processors. The IBM 4xx, for example, starts at 0xFFFFFFFC instead.

Quoted 1 line

OK.It's not necessary to set CFG_RESET_ADDRESS.At

It may be necessary if you want that the "reset" command in U-Boot is working as expected.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Just about every computer on the market today runs Unix,  except  the
Mac (and nobody cares about it).                   - Bill Joy 6/21/85