URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/trunk/bootloaders/orpmon/drivers
- from Rev 405 to Rev 406
- ↔ Reverse comparison
Rev 405 → Rev 406
/eth.c
387,22 → 387,31
|
retry_eth_send: |
bd[tx_last].len_status &= 0x0000ffff & ~ETH_TX_BD_STATS; |
|
if (eth_monitor_enabled) // enable IRQ when sending |
bd[tx_last].len_status |= ETH_TX_BD_IRQ; |
|
bd[tx_last].len_status |= len << 16 | ETH_TX_BD_READY; |
|
/* |
while (bd[tx_last].len_status & ETH_TX_BD_READY); |
printf("packet tx\n"); |
// Check it was sent OK |
if ( bd[tx_last].len_status & 0x2) |
if (!eth_monitor_enabled) // If we're not running the network sniffer... |
{ |
printf("eth_send: carrier sense lost (txbd: 0x%x), deferred, retrying\n", |
bd[tx_last].len_status); |
sleep(1000); |
goto retry_eth_send; |
while (bd[tx_last].len_status & ETH_TX_BD_READY); |
|
//printf("packet tx\n"); |
// Check it was sent OK |
/* |
BUG with current implementation - constantly getting carrier sense |
lost, and deferred indication, so ignore it for now. |
if ( bd[tx_last].len_status & 0xf) |
{ |
printf("eth_send: carrier sense lost (txbd: 0x%x), deferred, retrying\n", |
bd[tx_last].len_status); |
sleep(1); |
goto retry_eth_send; |
} |
*/ |
} |
*/ |
|
tx_last++; |
|
if (tx_last == ETH_TXBD_NUM) |
/int.c
72,5 → 72,41
i++; |
} |
} |
|
|
void |
int_error(int vect) |
{ |
printf("\n\nERROR - "); |
switch(vect) |
{ |
case 2: |
printf("BUS ERROR (0x200)\n"); |
break; |
case 6: |
printf("ALIGN ERROR (0x600)\n"); |
break; |
case 7: |
printf("ILLEGAL INSN ERROR (0x700)\n"); |
break; |
default: |
printf("UNKNOWN ERROR (%d)\n",vect); |
break; |
} |
|
printf("\n"); |
|
// TODO - print some more diagnostics here |
|
printf("Attemping to reset...\n\n"); |
|
asm volatile("l.ori r3, r0, 0x100"); |
asm volatile("l.jr r3"); |
asm volatile("l.nop"); |
|
// Stay here forever. |
//while(1); |
|
} |
|
#endif |