Commit f49638e9f9b8c3fe282c2305a8272944b5debe33
Committed by
Tom Rini
1 parent
9a41746f84
Exists in
smarc_8mq_lf_v2020.04
and in
20 other branches
board: p212: use common ethernet init function
Switch P212 Ethernet init to the common Ethernet init function. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Showing 1 changed file with 2 additions and 12 deletions Side-by-side Diff
board/amlogic/p212/p212.c
| ... | ... | @@ -10,7 +10,7 @@ |
| 10 | 10 | #include <asm/io.h> |
| 11 | 11 | #include <asm/arch/gxbb.h> |
| 12 | 12 | #include <asm/arch/sm.h> |
| 13 | -#include <phy.h> | |
| 13 | +#include <asm/arch/eth.h> | |
| 14 | 14 | |
| 15 | 15 | #define EFUSE_SN_OFFSET 20 |
| 16 | 16 | #define EFUSE_SN_SIZE 16 |
| ... | ... | @@ -28,17 +28,7 @@ |
| 28 | 28 | char serial[EFUSE_SN_SIZE]; |
| 29 | 29 | ssize_t len; |
| 30 | 30 | |
| 31 | - /* Set RMII mode */ | |
| 32 | - out_le32(GXBB_ETH_REG_0, GXBB_ETH_REG_0_INVERT_RMII_CLK | | |
| 33 | - GXBB_ETH_REG_0_CLK_EN); | |
| 34 | - | |
| 35 | - /* Use Internal PHY */ | |
| 36 | - out_le32(GXBB_ETH_REG_2, 0x10110181); | |
| 37 | - out_le32(GXBB_ETH_REG_3, 0xe40908ff); | |
| 38 | - | |
| 39 | - /* Enable power and clock gate */ | |
| 40 | - setbits_le32(GXBB_GCLK_MPEG_1, GXBB_GCLK_MPEG_1_ETH); | |
| 41 | - clrbits_le32(GXBB_MEM_PD_REG_0, GXBB_MEM_PD_REG_0_ETH_MASK); | |
| 31 | + meson_gx_eth_init(PHY_INTERFACE_MODE_RMII, 0); | |
| 42 | 32 | |
| 43 | 33 | if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { |
| 44 | 34 | len = meson_sm_read_efuse(EFUSE_MAC_OFFSET, |