diff options
author | Mylène Josserand <mylene.josserand@free-electrons.com> | 2017-04-02 12:59:09 +0200 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2017-04-20 13:20:31 +0200 |
commit | d7b560e6653b248a1920cbd2c5ac393d42e30b61 (patch) | |
tree | 07628dd0bcc1b028b41e99f27d2b3b7dc1a4f0cc /board/sunxi | |
parent | 751b0be0a1753bbc2f43c1d32e704bac9412d5af (diff) | |
download | u-boot-d7b560e6653b248a1920cbd2c5ac393d42e30b61.tar.gz |
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>
Diffstat (limited to 'board/sunxi')
-rw-r--r-- | board/sunxi/Kconfig | 7 | ||||
-rw-r--r-- | board/sunxi/board.c | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index a667c9e5c5..aa6b84bbbb 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -706,6 +706,13 @@ config VIDEO_LCD_TL059WV5C0 endchoice +config SATAPWR + string "SATA power pin" + default "" + help + Set the pins used to power the SATA. This takes a string in the + format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of + port H. config GMAC_TX_DELAY int "GMAC Transmit Clock Delay Chain" diff --git a/board/sunxi/board.c b/board/sunxi/board.c index b9660128e5..8043a8dbac 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -80,7 +80,7 @@ DECLARE_GLOBAL_DATA_PTR; /* 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 @@ int board_init(void) 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"); |