GRETH: Added extra RESET, this is needed if GRETH was stopped during an ethernet frame reception.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
This commit is contained in:
parent
e780d82b96
commit
533b67d4bf
|
@ -152,6 +152,16 @@ int greth_init(struct eth_device *dev, bd_t * bis)
|
|||
|
||||
debug("greth_init\n");
|
||||
|
||||
/* Reset core */
|
||||
GRETH_REGSAVE(®s->control, (GRETH_RESET | (greth->gb << 8) |
|
||||
(greth->sp << 7) | (greth->fd << 4)));
|
||||
|
||||
/* Wait for Reset to complete */
|
||||
while ( GRETH_REGLOAD(®s->control) & GRETH_RESET) ;
|
||||
|
||||
GRETH_REGSAVE(®s->control,
|
||||
((greth->gb << 8) | (greth->sp << 7) | (greth->fd << 4)));
|
||||
|
||||
if (!greth->rxbd_base) {
|
||||
|
||||
/* allocate descriptors */
|
||||
|
|
Loading…
Reference in New Issue