Serge,
Last year I had a similar problem. I don't have notes on how I got to having that problem, but I did take some notes on how I recovered from it. Hopefully it may help you as well.
For the Vitesse Switch to work on the MPC8313E-RDB board, it must be loaded and initialized by u-boot before booting linux. If you boot Linux without having it properly loaded and started under U-boot, the Freescal Linux distribution will not initialize the switch as it will initialize the ETSECs, but not the switch.
For the switch to be loaded properly, you must have both the switch firmware and the switch firmware loader setup properly for U-boot to load and start the switch. I am guessing that your switch chip is not coming up because the firmware and/or the firmware loader are not setup in Flash memory.
Here are my log notes on how I loaded the vsc7385.bin file to flash (these were done using ETSEC2 and tftp to get the necessary Vitesse Switch files from my Linux how machine):
6/16/2007, 3:25 PM Looks like I found the key missing step.
Here are the relevant environment variable commands:
=> printenv bootcmd
bootcmd=run run_vscld1; run ramargs addtty;bootm fe100000 fe300000 fe700000
=> printenv run_vscld1
run_vscld1=cp.b fe710000 40000 11000; go 40004
In looking at the memory map in the documentation
- fe710000 is the base address for the VSC7385 firmware loader (vsc7385_load.bin)
- fe7fe000 is the base address for the VSC7385 firmware
Both the firmware and the firmware loader must be copied into Flash
.
- Instructions show steps for loading firmware @ fe7fe000 - fe7fffff
- They do not show steps for loading firmware loader @ fe710000 - fe72ffff
Instructions for loading the Firmware loader into flash memory should be something like:
=> tftp 1000000 /tftpboot/vsc7385_load.bin
=> protect off fe710000 fe72ffff
=> erase fe710000 fe72ffff
=> cp.b 1000000 fe710000 $filesize
=> protect on all
6/16/2007, 3:37 PM Looks like it worked, here is the actual capture
=> protect on all
Protect Flash Bank # 1
=> tftp 1000000 /tftpboot/vsc7385_load.bin
Speed: 1000, full duplex
Using TSEC0 device
TFTP from server 192.168.2.129; our IP address is 192.168.2.193
Filename '/tftpboot/vsc7385_load.bin'.
Load address: 0x1000000
Loading: #############
done
Bytes transferred = 66536 (103e8 hex)
=> protect off fe710000 fe72ffff
Un-Protected 2 sectors
=> erase fe710000 fe72ffff
.. done
Erased 2 sectors
=> cp.b 1000000 fe710000 $filesize
Copy to Flash... done
=> protect on all
Protect Flash Bank # 1
To make sure it loaded OK (and also previous load of firmware was OK), run_vscld1 is run to make sure that it loads OK.
=> run run_vscld1
## Starting application at 0x00040004 ...
VSC7385 Version = 0x273850e9
Value in IRAM matches binary, total bytes 0x2000 loaded
## Application terminated, rc = 0x0
=>
Next I set TSEC0 (ETSEC1) to be active and pinged the host to make sure everything was working:
=> setenv ethact TSEC0
=> ping 192.168.2.129
Speed: 1000, full duplex
Using TSEC0 device
host 192.168.2.129 is alive
=>
If you need to setup the actual firmware to flash (again assuming you have TFTP working OK) you can do the following command to tftp the file and burn it to Flash memory:
=> run burn_vscfw
Speed: 1000, full duplex
Using TSEC1 device
TFTP from server 192.168.2.129; our IP address is 192.168.2.193
Filename '/tftpboot/vsc2bin'.
Load address: 0x100000
Loading: ##
done
Bytes transferred = 8184 (1ff8 hex)
Error: start address not on sector boundary
Error: start address not on sector boundary
Copy to Flash... done
Hope this helps,
Cheers,
abartky