summaryrefslogtreecommitdiff
path: root/arch/m68k/cpu/mcf547x_8x
diff options
context:
space:
mode:
authorAngelo Durgehello <angelo.dureghello@timesys.com>2019-11-16 01:54:16 +0300
committerTom Rini <trini@konsulko.com>2020-01-10 18:25:13 +0300
commitad420937558a9b3bc0e93d9693b34f57cf4480a0 (patch)
treee036131d4e2e6056dcf0398ca51542216e91d954 /arch/m68k/cpu/mcf547x_8x
parentff56f2b7263fae9132c13078ccd8d9604cf1e139 (diff)
downloadu-boot-ad420937558a9b3bc0e93d9693b34f57cf4480a0.tar.xz
m68k: add dm fec support
Add architecture-related code for dm fec support. Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
Diffstat (limited to 'arch/m68k/cpu/mcf547x_8x')
-rw-r--r--arch/m68k/cpu/mcf547x_8x/cpu_init.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/m68k/cpu/mcf547x_8x/cpu_init.c b/arch/m68k/cpu/mcf547x_8x/cpu_init.c
index 3f8c38c520..8779384c0a 100644
--- a/arch/m68k/cpu/mcf547x_8x/cpu_init.c
+++ b/arch/m68k/cpu/mcf547x_8x/cpu_init.c
@@ -17,6 +17,7 @@
#if defined(CONFIG_CMD_NET)
#include <config.h>
#include <net.h>
+#include <asm/fec.h>
#include <asm/fsl_mcdmafec.h>
#endif
@@ -124,18 +125,21 @@ void uart_port_conf(int port)
}
#if defined(CONFIG_CMD_NET)
-int fecpin_setclear(struct eth_device *dev, int setclear)
+int fecpin_setclear(fec_info_t *info, int setclear)
{
gpio_t *gpio = (gpio_t *) MMAP_GPIO;
- struct fec_info_dma *info = (struct fec_info_dma *)dev->priv;
+ u32 fec0_base;
+
+ if (fec_get_base_addr(0, &fec0_base))
+ return -1;
if (setclear) {
- if (info->iobase == CONFIG_SYS_FEC0_IOBASE)
+ if (info->iobase == fec0_base)
setbits_be16(&gpio->par_feci2cirq, 0xf000);
else
setbits_be16(&gpio->par_feci2cirq, 0x0fc0);
} else {
- if (info->iobase == CONFIG_SYS_FEC0_IOBASE)
+ if (info->iobase == fec0_base)
clrbits_be16(&gpio->par_feci2cirq, 0xf000);
else
clrbits_be16(&gpio->par_feci2cirq, 0x0fc0);