summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/omap3/emac.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-11-07 21:34:54 -0500
committerTom Rini <trini@konsulko.com>2016-11-21 14:07:29 -0500
commit983e37007da506e8145f9b3a9e1dce5c11116fb0 (patch)
treec1d5449e1c56e17f22bb4f75b6f11336abca41a4 /arch/arm/mach-omap2/omap3/emac.c
parent272686eb7576c02df4616bcf893fde993e7ba57e (diff)
downloadu-boot-imx-983e37007da506e8145f9b3a9e1dce5c11116fb0.zip
u-boot-imx-983e37007da506e8145f9b3a9e1dce5c11116fb0.tar.gz
u-boot-imx-983e37007da506e8145f9b3a9e1dce5c11116fb0.tar.bz2
arm: Introduce arch/arm/mach-omap2 for OMAP2 derivative platforms
This moves what was in arch/arm/cpu/armv7/omap-common in to arch/arm/mach-omap2 and moves arch/arm/cpu/armv7/{am33xx,omap3,omap4,omap5} in to arch/arm/mach-omap2 as subdirectories. All refernces to the former locations are updated to the current locations. For the logic to decide what our outputs are, consolidate the tests into a single config.mk rather than including 4. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap3/emac.c')
-rw-r--r--arch/arm/mach-omap2/omap3/emac.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap3/emac.c b/arch/arm/mach-omap2/omap3/emac.c
new file mode 100644
index 0000000..37f4b8b
--- /dev/null
+++ b/arch/arm/mach-omap2/omap3/emac.c
@@ -0,0 +1,29 @@
+/*
+ *
+ * DaVinci EMAC initialization.
+ *
+ * (C) Copyright 2011, Ilya Yanok, Emcraft Systems
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <netdev.h>
+#include <asm/io.h>
+#include <asm/arch/am35x_def.h>
+
+/*
+ * Initializes on-chip ethernet controllers.
+ * to override, implement board_eth_init()
+ */
+int cpu_eth_init(bd_t *bis)
+{
+ u32 reset;
+
+ /* ensure that the module is out of reset */
+ reset = readl(&am35x_scm_general_regs->ip_sw_reset);
+ reset &= ~CPGMACSS_SW_RST;
+ writel(reset, &am35x_scm_general_regs->ip_sw_reset);
+
+ return davinci_emac_initialize();
+}