Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Alexey Brodkin | 7f6a6db | 2014-05-21 14:39:32 +0400 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2014 Pierrick Hascoet, Abilis Systems |
Alexey Brodkin | 7f6a6db | 2014-05-21 14:39:32 +0400 | [diff] [blame] | 4 | */ |
| 5 | |
Simon Glass | 9a3b4ce | 2019-12-28 10:45:01 -0700 | [diff] [blame] | 6 | #include <cpu_func.h> |
Simon Glass | 90526e9 | 2020-05-10 11:39:56 -0600 | [diff] [blame] | 7 | #include <net.h> |
Alexey Brodkin | 7f6a6db | 2014-05-21 14:39:32 +0400 | [diff] [blame] | 8 | #include <netdev.h> |
| 9 | #include <asm/io.h> |
| 10 | |
Harald Seiler | 35b65dd | 2020-12-15 16:47:52 +0100 | [diff] [blame] | 11 | void reset_cpu(void) |
Alexey Brodkin | 7f6a6db | 2014-05-21 14:39:32 +0400 | [diff] [blame] | 12 | { |
| 13 | #define CRM_SWRESET 0xff101044 |
| 14 | writel(0x1, (void *)CRM_SWRESET); |
| 15 | } |
| 16 | |
Tom Rini | 28388f4 | 2023-12-14 13:16:44 -0500 | [diff] [blame] | 17 | /* |
| 18 | * Ethernet configuration |
| 19 | */ |
| 20 | #define ETH0_BASE_ADDRESS 0xFE100000 |
Masahiro Yamada | b75d8dc | 2020-06-26 15:13:33 +0900 | [diff] [blame] | 21 | int board_eth_init(struct bd_info *bis) |
Alexey Brodkin | 7f6a6db | 2014-05-21 14:39:32 +0400 | [diff] [blame] | 22 | { |
| 23 | if (designware_initialize(ETH0_BASE_ADDRESS, 0) >= 0) |
| 24 | return 1; |
| 25 | |
| 26 | return 0; |
| 27 | } |