I am tryin to configure SDHC2 port to be a SPI port on ls1012a(The SDHC2 is a multifunction port). SPI is used to control a KSZ9897 ethernet switch.
I copyed the PBL data from reference board(ls1012ardb).
I made changes on RCW SDHC2_BASE_BASE[374-375] and SDHC2_BASE_BASE[376-377] in code warrior, see below.
And I copied the PBI commands from ls1012ardb reference board, see below:
After that I generate the PBL data file which is 160 bytes. After that I did byte swap on this file and then put it into my FLASH( QSPI flash, the binary is put at the address from 0x40000000 to 0x40000009f), I didn't change other parts of the flash, only the first 160 bytes are replaced by the new generated PBL file. After that I cannot boot my board any more. Once I restore the first 160 bytes using the PBL binary from reference board, it boots up again.
I got SPI related information from ls1012a reference manual, see below.
I am wondering if my changes on the PBL data is correct?
Or do I need to change the PBI commands as well? if true, what PBI commands I need to change?
There are many details which make me feel confused. Any help would be great.