blob: 132915292ea65b607a27743f5271efe9faa3bba4 [file] [log] [blame]
wdenk3e386912003-04-05 00:53:31 +00001
2Flash programming on the INCA-IP board is complicated because of the
3EBU swapping unit. A BDI2000 can be used for flash programming only
4if the EBU swapping unit is enabled; otherwise it will not detect the
5flash memory. But the EBU swapping unit is disadbled after reset, so
6if you program some code to flash with the swapping unit on, it will
7not be runnable with the swapping unit off.
8
9The consequence is that you have to write a pre-swapped image to
10flash using the BDI2000. A simple host-side tool "inca-swap-bytes" is
11provided in the "tools/" directory. Use it as follows:
12
13 bash$ ./inca-swap-bytes <u-boot.bin >u-boot.bin.swp
14
15Note that the current BDI config file _disables_ the EBU swapping
16unit for the flash bank 0. To enable it, (this is required for the
17BDI flash commands to work) uncomment the following line in the
18config file:
19
20 ;WM32 0xb8000260 0x404161ff ; Swapping unit enabled
21
22and comment out
23
24 WM32 0xb8000260 0x004161ff ; Swapping unit disabled
25
26Alternatively, you can use "mm 0xb8000260 <value>" commands to
27enable/disable the swapping unit manually.
28
29Just for reference, here is the complete sequence of actions we took
30to install a U-Boot image into flash.
31
32 1. ./inca-swap-bytes <u-boot.bin >u-boot.bin.swp
33
34 2. From BDI:
35
36 mm 0xb8000260 0x404161ff
37 erase 0xb0000000
38 erase 0xb0010000
39 prog 0xb0000000 /tftpboot/INCA/u-boot.bin.swp bin
40 mm 0xb8000260 0x004161ff
41 go 0xb0000000
42
43
wdenke0ac62d2003-08-17 18:55:18 +000044Ethernet autonegotiation needs some time to complete. Instead of
45delaying the boot process in all cases, we just start the
46autonegotiation process when U-Boot comes up and that is all. Most
47likely, it will complete by the time the network transfer is
48attempted for the first time. In the worst case, if a transfer is
49attempted before the autonegotiation is complete, just a single
50packet would be lost resulting in a single timeout error, and then
51the transfer would proceed normally. So the time that we would have
52lost unconditionally waiting for the autonegotiation to complete, we
53have to wait only if the file transfer is started immediately after
54reset. We've verified that this works for all the clock
55configurations.
56
wdenk3e386912003-04-05 00:53:31 +000057(C) 2003 Wolfgang Denk