summaryrefslogtreecommitdiff
path: root/cpu/mcf547x_8x/cpu_init.c
diff options
context:
space:
mode:
authorJon Loeliger <jdl@freescale.com>2008-11-10 10:04:51 -0600
committerJon Loeliger <jdl@freescale.com>2008-11-10 10:04:51 -0600
commit33211469f7d7e2afacf103cc55790f734572f7a6 (patch)
tree7c374cde48fba08b52b4f83bdf00aae89d7f85a3 /cpu/mcf547x_8x/cpu_init.c
parent1266df887781c779deaf6d05eea2ef90a470cb34 (diff)
parent1378174a1351c0285736863a665ab758fe8d5f71 (diff)
downloadu-boot-imx-33211469f7d7e2afacf103cc55790f734572f7a6.zip
u-boot-imx-33211469f7d7e2afacf103cc55790f734572f7a6.tar.gz
u-boot-imx-33211469f7d7e2afacf103cc55790f734572f7a6.tar.bz2
Merge commit 'wd/master'
Diffstat (limited to 'cpu/mcf547x_8x/cpu_init.c')
-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 9a0e040..1ba5783 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