Firmware
Code Examples
PPC/PMC-8260/DS1
4 - 33
Starting the Primary Booter
/* Reset module and start firmware.
* Returns 0 on error, 1 on success
*/
int pmc8260_fw_start (
char *csrBase, /* CSR Base address */
char *memBase /* PCI window base address */
)
{
int seconds = 0;
int done = 0;
UINT32 dummy;
/* reset the module */
printf (“resetting module ..\n”);
pmc8260_reset_control (csrBase, 1);
/* Clear PSR and set INI and ROMSKIP in PCR */
RWRITE(PMC8260_FW_PSR, 0);
RWRITE(PMC8260_FW_PCR, PMC8260_FW_PCR_INI |
PMC8260_FW_PCR_ROMSKIP);
/* Re-start the module */
pmc8260_reset_control(csrBase, 0);
/* Wait for firmware to come up */
printf (“waiting for firmware “);
while (!done)
{
RREAD(PMC8260_FW_PSR, dummy);
switch (dummy)
{
case 0: printf (“.”); break;
case PMC8260_FW_PSR_POST:
printf (“POST “); break;
case PMC8260_FW_PSR_ROMEX:
printf (“ROM Image execution\n”);
return 0;
case PMC8260_FW_PSR_RDY:
printf (“OK\n”);
done = 1;
}
sleep(1);
if (+ > 20)
{
printf(“Timeout\n”);
return 0;
}
}
Summary of Contents for PPC/PMC-8260/DS1
Page 1: ...PPC PMC 8260 DS1 Reference Guide P N 6806800B10A July 2006 ...
Page 8: ...viii PPC PMC 8260 DS1 ...
Page 22: ...xxii PPC PMC 8260 DS1 ...
Page 26: ...xxvi PPC PMC 8260 DS1 ...
Page 30: ...xxx PPC PMC 8260 DS1 ...
Page 31: ...1 Introduction ...
Page 32: ......
Page 39: ...2 Installation ...
Page 40: ......
Page 53: ...3 Indicators and Connectors ...
Page 54: ......
Page 64: ...On Board Connectors Indicators and Connectors 3 12 PPC PMC 8260 DS1 ...
Page 65: ...4 Firmware ...
Page 66: ......
Page 104: ...Code Examples Firmware 4 40 PPC PMC 8260 DS1 ...
Page 105: ...5 Memory Map and Devices ...
Page 106: ......
Page 132: ...Resetting the Devices Memory Map and Devices 5 28 PPC PMC 8260 DS1 ...
Page 133: ...6 TDM Channel Configuration ...
Page 134: ......
Page 145: ...A Troubleshooting ...
Page 146: ......
Page 148: ...A 4 PPC PMC 8260 DS1 ...
Page 150: ...I 2 PPC PMC 8260 DS1 ...