summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2010-10-22 11:34:01 +0200
committerDaniel Hellstrom <daniel@gaisler.com>2010-11-18 08:33:25 +0100
commit533b67d4bf310c445745bdd605edc2ff9dc6b921 (patch)
tree418f92e8c2c3685161783b892403e2fc5b628440 /drivers/net
parente780d82b96b43a0dafc7b6511127a4c807b80012 (diff)
downloadu-boot-imx-533b67d4bf310c445745bdd605edc2ff9dc6b921.zip
u-boot-imx-533b67d4bf310c445745bdd605edc2ff9dc6b921.tar.gz
u-boot-imx-533b67d4bf310c445745bdd605edc2ff9dc6b921.tar.bz2
GRETH: Added extra RESET, this is needed if GRETH was stopped during an ethernet frame reception.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/greth.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index cb68d45..f081855 100644
--- a/drivers/net/greth.c
+++ b/drivers/net/greth.c
@@ -152,6 +152,16 @@ int greth_init(struct eth_device *dev, bd_t * bis)
debug("greth_init\n");
+ /* Reset core */
+ GRETH_REGSAVE(&regs->control, (GRETH_RESET | (greth->gb << 8) |
+ (greth->sp << 7) | (greth->fd << 4)));
+
+ /* Wait for Reset to complete */
+ while ( GRETH_REGLOAD(&regs->control) & GRETH_RESET) ;
+
+ GRETH_REGSAVE(&regs->control,
+ ((greth->gb << 8) | (greth->sp << 7) | (greth->fd << 4)));
+
if (!greth->rxbd_base) {
/* allocate descriptors */