From d7b560e6653b248a1920cbd2c5ac393d42e30b61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?= Date: Sun, 2 Apr 2017 12:59:09 +0200 Subject: sunxi: Convert CONFIG_SATAPWR to Kconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Maxime Ripard --- board/sunxi/Kconfig | 7 +++++++ board/sunxi/board.c | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'board/sunxi') 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"); -- cgit v1.2.3