]> git.ipfire.org Git - thirdparty/u-boot.git/blob - arch/arm/mach-omap2/omap3/emac.c
fb0c9188f57e0e6839a135c4c266e1bf57eb01d5
[thirdparty/u-boot.git] / arch / arm / mach-omap2 / omap3 / emac.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3 *
4 * DaVinci EMAC initialization.
5 *
6 * (C) Copyright 2011, Ilya Yanok, Emcraft Systems
7 */
8
9 #include <common.h>
10 #include <asm/io.h>
11 #include <asm/arch/am35x_def.h>
12
13 /*
14 * Initializes on-chip ethernet controllers.
15 * to override, implement board_eth_init()
16 */
17 int cpu_eth_init(bd_t *bis)
18 {
19 u32 reset;
20
21 /* ensure that the module is out of reset */
22 reset = readl(&am35x_scm_general_regs->ip_sw_reset);
23 reset &= ~CPGMACSS_SW_RST;
24 writel(reset, &am35x_scm_general_regs->ip_sw_reset);
25
26 return 0;
27 }