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