sunxi: Convert CONFIG_SATAPWR to Kconfig
Convert the CONFIG_SATAPWR into kconfig.
Thanks to that, many SYS_EXTRA_OPTIONS can be removed from some
defconfigs.
Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index b966012..8043a8d 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -80,7 +80,7 @@
/* add board specific code here */
int board_init(void)
{
- __maybe_unused int id_pfr1, ret;
+ __maybe_unused int id_pfr1, ret, satapwr_pin;
gd->bd->bi_boot_params = (PHYS_SDRAM_0 + 0x100);
@@ -118,8 +118,9 @@
return ret;
#ifdef CONFIG_SATAPWR
- gpio_request(CONFIG_SATAPWR, "satapwr");
- gpio_direction_output(CONFIG_SATAPWR, 1);
+ satapwr_pin = sunxi_name_to_gpio(CONFIG_SATAPWR);
+ gpio_request(satapwr_pin, "satapwr");
+ gpio_direction_output(satapwr_pin, 1);
#endif
#ifdef CONFIG_MACPWR
gpio_request(CONFIG_MACPWR, "macpwr");