summaryrefslogtreecommitdiff
path: root/cpu/mcf547x_8x
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-11-09 00:01:59 +0100
committerWolfgang Denk <wd@denx.de>2008-11-09 00:01:59 +0100
commitac4aeb1735404d2d331bd018e8c709e17c7392ad (patch)
tree00b8e8044f5b1d9e78b15ad116c1703854a08e64 /cpu/mcf547x_8x
parent0829323073c505556ed5f5073f91adb504584d45 (diff)
parentc06d9bbbeb0416f189e841ffb214ada6194ed874 (diff)
Merge branch 'master' of /home/wd/git/u-boot/custodians
Diffstat (limited to 'cpu/mcf547x_8x')
-rw-r--r--cpu/mcf547x_8x/cpu_init.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/cpu/mcf547x_8x/cpu_init.c b/cpu/mcf547x_8x/cpu_init.c
index 9a0e04083c..1ba57835e5 100644
--- a/cpu/mcf547x_8x/cpu_init.c
+++ b/cpu/mcf547x_8x/cpu_init.c
@@ -29,6 +29,12 @@
#include <MCD_dma.h>
#include <asm/immap.h>
+#if defined(CONFIG_CMD_NET)
+#include <config.h>
+#include <net.h>
+#include <asm/fsl_mcdmafec.h>
+#endif
+
/*
* Breath some life into the CPU...
*
@@ -130,3 +136,24 @@ void uart_port_conf(void)
*pscsicr &= 0xF8;
}
+
+#if defined(CONFIG_CMD_NET)
+int fecpin_setclear(struct eth_device *dev, int setclear)
+{
+ volatile gpio_t *gpio = (gpio_t *) MMAP_GPIO;
+ struct fec_info_dma *info = (struct fec_info_dma *)dev->priv;
+
+ if (setclear) {
+ if (info->iobase == CONFIG_SYS_FEC0_IOBASE)
+ gpio->par_feci2cirq |= 0xF000;
+ else
+ gpio->par_feci2cirq |= 0x0FC0;
+ } else {
+ if (info->iobase == CONFIG_SYS_FEC0_IOBASE)
+ gpio->par_feci2cirq &= 0x0FFF;
+ else
+ gpio->par_feci2cirq &= 0xF03F;
+ }
+ return 0;
+}
+#endif