summaryrefslogtreecommitdiff
path: root/cpu/mcf523x/cpu_init.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-11-09 00:01:42 +0100
committerWolfgang Denk <wd@denx.de>2008-11-09 00:01:42 +0100
commitc06d9bbbeb0416f189e841ffb214ada6194ed874 (patch)
tree07ffabf1f239a50bb5a0d6d77745d9e83ad0c9d4 /cpu/mcf523x/cpu_init.c
parenta80b21d5127583171d6e9bc7f722947641898012 (diff)
parente4f69d1bd21a12049744989d2dd6b5199c9b8f23 (diff)
downloadu-boot-imx-c06d9bbbeb0416f189e841ffb214ada6194ed874.zip
u-boot-imx-c06d9bbbeb0416f189e841ffb214ada6194ed874.tar.gz
u-boot-imx-c06d9bbbeb0416f189e841ffb214ada6194ed874.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-coldfire
Diffstat (limited to 'cpu/mcf523x/cpu_init.c')
-rw-r--r--cpu/mcf523x/cpu_init.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/cpu/mcf523x/cpu_init.c b/cpu/mcf523x/cpu_init.c
index 6520944..3c04fd4 100644
--- a/cpu/mcf523x/cpu_init.c
+++ b/cpu/mcf523x/cpu_init.c
@@ -27,9 +27,14 @@
#include <common.h>
#include <watchdog.h>
-
#include <asm/immap.h>
+#if defined(CONFIG_CMD_NET)
+#include <config.h>
+#include <net.h>
+#include <asm/fec.h>
+#endif
+
/*
* Breath some life into the CPU...
*
@@ -143,3 +148,20 @@ void uart_port_conf(void)
break;
}
}
+
+#if defined(CONFIG_CMD_NET)
+int fecpin_setclear(struct eth_device *dev, int setclear)
+{
+ volatile gpio_t *gpio = (gpio_t *) MMAP_GPIO;
+
+ if (setclear) {
+ gpio->par_feci2c |=
+ (GPIO_PAR_FECI2C_EMDC_FECEMDC | GPIO_PAR_FECI2C_EMDIO_FECEMDIO);
+ } else {
+ gpio->par_feci2c &=
+ ~(GPIO_PAR_FECI2C_EMDC_MASK | GPIO_PAR_FECI2C_EMDIO_MASK);
+ }
+
+ return 0;
+}
+#endif