diff options
author | Jon Loeliger <jdl@freescale.com> | 2008-11-10 10:04:51 -0600 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2008-11-10 10:04:51 -0600 |
commit | 33211469f7d7e2afacf103cc55790f734572f7a6 (patch) | |
tree | 7c374cde48fba08b52b4f83bdf00aae89d7f85a3 /cpu/mcf523x/cpu_init.c | |
parent | 1266df887781c779deaf6d05eea2ef90a470cb34 (diff) | |
parent | 1378174a1351c0285736863a665ab758fe8d5f71 (diff) | |
download | u-boot-imx-33211469f7d7e2afacf103cc55790f734572f7a6.zip u-boot-imx-33211469f7d7e2afacf103cc55790f734572f7a6.tar.gz u-boot-imx-33211469f7d7e2afacf103cc55790f734572f7a6.tar.bz2 |
Merge commit 'wd/master'
Diffstat (limited to 'cpu/mcf523x/cpu_init.c')
-rw-r--r-- | cpu/mcf523x/cpu_init.c | 24 |
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 |