diff options
author | Andre Przywara | 2022-06-08 14:56:56 +0100 |
---|---|---|
committer | Andre Przywara | 2023-10-22 23:40:56 +0100 |
commit | 5ad98c57b8dc465b7d1534203b75dc2b35440457 (patch) | |
tree | d5ce421da8f563ba328b47bbc597a5b78106a68e /board | |
parent | 091442993c0f3ac8f34d15099a207a078dc56d0c (diff) |
sunxi: remove CONFIG_MACPWR
The CONFIG_MACPWR Kconfig symbol is used to point to a GPIO that enables
the power for the Ethernet "MAC" (mostly PHY, really).
In the DT this is described with the phy-supply property in the MAC DT
node, pointing to a (GPIO controlled) regulator. Since we need Ethernet
only in U-Boot proper, and use a DM driver there, we should use the DT
instead of hardcoding this.
Add code to the sun8i_emac and sunxi_emac drivers to check the DT for
that regulator and enable it, at probe time. Then drop the current code
from board.c, which was doing that job before.
This allows us to remove the MACPWR Kconfig definition and the respective
values from the defconfigs.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Sam Edwards <CFSworks@gmail.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/sunxi/board.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 50a60e760d4..5cfb33468e5 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -187,7 +187,7 @@ enum env_location env_get_location(enum env_operation op, int prio) /* add board specific code here */ int board_init(void) { - __maybe_unused int id_pfr1, ret, macpwr_pin; + __maybe_unused int id_pfr1, ret; gd->bd->bi_boot_params = (PHYS_SDRAM_0 + 0x100); @@ -224,15 +224,6 @@ int board_init(void) if (ret) return ret; - /* strcmp() would look better, but doesn't get optimised away. */ - if (CONFIG_MACPWR[0]) { - macpwr_pin = sunxi_name_to_gpio(CONFIG_MACPWR); - if (macpwr_pin >= 0) { - gpio_request(macpwr_pin, "macpwr"); - gpio_direction_output(macpwr_pin, 1); - } - } - #if CONFIG_IS_ENABLED(DM_I2C) /* * Temporary workaround for enabling I2C clocks until proper sunxi DM @@ -240,7 +231,6 @@ int board_init(void) */ i2c_init_board(); #endif - eth_init_board(); return 0; |