summaryrefslogtreecommitdiff
path: root/drivers/qe
diff options
context:
space:
mode:
authorAndy Fleming <afleming@freescale.com>2007-08-15 20:03:34 -0500
committerWolfgang Denk <wd@denx.de>2007-08-16 12:12:51 +0200
commitb96c83d4ae475a70ef2635cd0e748174c44c8601 (patch)
treeef1782f96eb6f75e8a7ebaeea5b72f89fc07c8ce /drivers/qe
parent3a79013e2adda53332dfd0b511066a805e929a9d (diff)
downloadu-boot-imx-b96c83d4ae475a70ef2635cd0e748174c44c8601.zip
u-boot-imx-b96c83d4ae475a70ef2635cd0e748174c44c8601.tar.gz
u-boot-imx-b96c83d4ae475a70ef2635cd0e748174c44c8601.tar.bz2
Fix numerous bugs in the 8568 UEC support
Actually, fixed a large bug in the UEC for *all* platforms. How did this ever work? uec_init() did not follow the spec for eth_init(), and returned 0 on success. Switch it to return the link like tsec_init() (and 0 on error) The immap for the 8568 was defined based on MPC8568, rather than CONFIG_MPC8568 CONFIG_QE was off CONFIG_ETHPRIME was set to "Freescale GETH". Now is "FSL UEC0" Fixed a comment about the ranges for CONFIG_ETHPRIME if TSEC_ENET is enabled Signed-off-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'drivers/qe')
-rw-r--r--drivers/qe/uec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/qe/uec.c b/drivers/qe/uec.c
index 89a7279..dc2765b 100644
--- a/drivers/qe/uec.c
+++ b/drivers/qe/uec.c
@@ -1110,7 +1110,7 @@ static int uec_init(struct eth_device* dev, bd_t *bd)
if (dev->enetaddr[0] & 0x01) {
printf("%s: MacAddress is multcast address\n",
__FUNCTION__);
- return -EINVAL;
+ return 0;
}
uec_set_mac_address(uec, dev->enetaddr);
uec->the_first_run = 1;
@@ -1119,10 +1119,10 @@ static int uec_init(struct eth_device* dev, bd_t *bd)
err = uec_open(uec, COMM_DIR_RX_AND_TX);
if (err) {
printf("%s: cannot enable UEC device\n", dev->name);
- return err;
+ return 0;
}
- return 0;
+ return uec->mii_info->link;
}
static void uec_halt(struct eth_device* dev)