Ilya Yanok | d2452ea | 2011-11-28 06:37:35 +0000 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * DaVinci EMAC initialization. |
| 4 | * |
| 5 | * (C) Copyright 2011, Ilya Yanok, Emcraft Systems |
| 6 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | * SPDX-License-Identifier: GPL-2.0+ |
Ilya Yanok | d2452ea | 2011-11-28 06:37:35 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #include <common.h> |
| 11 | #include <netdev.h> |
| 12 | #include <asm/io.h> |
| 13 | #include <asm/arch/am35x_def.h> |
| 14 | |
| 15 | /* |
| 16 | * Initializes on-chip ethernet controllers. |
| 17 | * to override, implement board_eth_init() |
| 18 | */ |
| 19 | int cpu_eth_init(bd_t *bis) |
| 20 | { |
| 21 | u32 reset; |
| 22 | |
| 23 | /* ensure that the module is out of reset */ |
| 24 | reset = readl(&am35x_scm_general_regs->ip_sw_reset); |
| 25 | reset &= ~CPGMACSS_SW_RST; |
| 26 | writel(reset, &am35x_scm_general_regs->ip_sw_reset); |
| 27 | |
| 28 | return davinci_emac_initialize(); |
| 29 | } |