summaryrefslogtreecommitdiff
path: root/board/sunxi
diff options
context:
space:
mode:
Diffstat (limited to 'board/sunxi')
-rw-r--r--board/sunxi/Kconfig7
-rw-r--r--board/sunxi/board.c7
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");