[U-Boot-Users] Au1500 second UART

Marco Braga marco.braga at gmail.com
Thu Mar 15 00:57:36 CET 2007


2007/3/14, Andrew Dyer <amdyer at gmail.com>:
>
> Unless you have something weird going on (NAND or some weird address
> remapping or banking), it should be at virtual address 0xbfc00000
> (physical address 0x1fc00000).  For mips u-boot is linked to the FLASH
> address and then will later copy itself up into high memory (IIRC this
> happens in lib_mips/board.c).
>

In fact my situation is  weird: the current board boots from a socketed ROM
memory with Yamon. So at address 0xBFC00000 there's Yamon's code. The idea
is to write the flash using Yamon, then remove the ROM chip and solder the
chip select pin to the flash. So after this modify the flash should appear
instead of the ROM. This is how I am going to proceed:

1) Compile u-boot to start ad address 0xBFC00000

2) Calculate where in the flash will address 0x1FC00000 go:

Flash memory is composed of 2 16bit flash chips, sending the data in
parallel to form a 32 bit data line. We have 32Mb total flash, so the last
relative flash address is 0x1FFFFFF. Since we are addressing 32 bits, the
lowest 2 bits in the address are always 0, so 0x1FC00000 will reach the
flash as 0x7F00000 (shift by 2). Now, since we have only 25 address lines on
the flash, the high bits will be ignored. AND'ing 0x7F00000 with 0x1FFFFFF
gives me the flash relative address where the first instruction must be
present: 0x1F00000.
This is nice, since will leave the last 1MB of the flash available for
u-boot.

3) Calculate where we must write u-boot, considering that flash address is
0xBA000000: 0xBA000000 + 0x1F00000 = 0xBBF00000

Now, if everything above is correct (I am not sure), I must compile u-boot
to run from address 0xBFC00000, but I must write it's binary data at address
0xBBF00000. When the Yamon ROM is removed and the CS pin is connected to the
flash, then the flash will be mapped at the right address and at 0xBFC00000
will appear the first instruction of u-boot.

I need a bit of luck, I fear.. :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20070315/3ae4f6aa/attachment.htm 


More information about the U-Boot mailing list