2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2011-11-28 06:37:35 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* DaVinci EMAC initialization.
|
|
|
|
*
|
|
|
|
* (C) Copyright 2011, Ilya Yanok, Emcraft Systems
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2020-05-10 17:39:56 +00:00
|
|
|
#include <net.h>
|
2011-11-28 06:37:35 +00:00
|
|
|
#include <asm/io.h>
|
|
|
|
#include <asm/arch/am35x_def.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Initializes on-chip ethernet controllers.
|
|
|
|
* to override, implement board_eth_init()
|
|
|
|
*/
|
2020-06-26 06:13:33 +00:00
|
|
|
int cpu_eth_init(struct bd_info *bis)
|
2011-11-28 06:37:35 +00:00
|
|
|
{
|
|
|
|
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);
|
|
|
|
|
2019-07-24 08:12:07 +00:00
|
|
|
return 0;
|
2011-11-28 06:37:35 +00:00
|
|
|
}
|