blob: d0d0b7a75a610db70f535b25b03ef02c1db07faa [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Ilya Yanokb9e65a72011-11-28 06:37:35 +00002/*
3 *
4 * DaVinci EMAC initialization.
5 *
6 * (C) Copyright 2011, Ilya Yanok, Emcraft Systems
Ilya Yanokb9e65a72011-11-28 06:37:35 +00007 */
8
9#include <common.h>
Simon Glass90526e92020-05-10 11:39:56 -060010#include <net.h>
Ilya Yanokb9e65a72011-11-28 06:37:35 +000011#include <asm/io.h>
12#include <asm/arch/am35x_def.h>
13
14/*
15 * Initializes on-chip ethernet controllers.
16 * to override, implement board_eth_init()
17 */
Masahiro Yamadab75d8dc2020-06-26 15:13:33 +090018int cpu_eth_init(struct bd_info *bis)
Ilya Yanokb9e65a72011-11-28 06:37:35 +000019{
20 u32 reset;
21
22 /* ensure that the module is out of reset */
23 reset = readl(&am35x_scm_general_regs->ip_sw_reset);
24 reset &= ~CPGMACSS_SW_RST;
25 writel(reset, &am35x_scm_general_regs->ip_sw_reset);
26
Bartosz Golaszewskie8092852019-07-24 10:12:07 +020027 return 0;
Ilya Yanokb9e65a72011-11-28 06:37:35 +000028}