summaryrefslogtreecommitdiff
path: root/board/sunxi
diff options
context:
space:
mode:
authorMylène Josserand <mylene.josserand@free-electrons.com>2017-04-02 10:59:10 (GMT)
committerMaxime Ripard <maxime.ripard@free-electrons.com>2017-04-20 11:20:31 (GMT)
commitf5fd78860ab4dbb3bc14ead4f14433f04d6e5cea (patch)
tree1c6876714c9911fc80adaa78697f830f133c062f /board/sunxi
parentd7b560e6653b248a1920cbd2c5ac393d42e30b61 (diff)
downloadu-boot-f5fd78860ab4dbb3bc14ead4f14433f04d6e5cea.tar.xz
sunxi: Convert CONFIG_MACPWR to Kconfig
Convert the CONFIG_MACPWR to Kconfig and update all the sunxi defconfigs that used it in SYS_EXTRA_OPTIONS. 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/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 aa6b84b..87f282a 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -345,6 +345,13 @@ config OLD_SUNXI_KERNEL_COMPAT
Set this to enable various workarounds for old kernels, this results in
sub-optimal settings for newer kernels, only enable if needed.
+config MACPWR
+ string "MAC power pin"
+ default ""
+ help
+ Set the pin used to power the MAC. This takes a string in the format
+ understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
+
config MMC0_CD_PIN
string "Card detect pin for mmc0"
default "PF6" if MACH_SUN8I_A83T || MACH_SUNXI_H3_H5 || MACH_SUN50I
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 8043a8d..e2bba9a 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, satapwr_pin;
+ __maybe_unused int id_pfr1, ret, satapwr_pin, macpwr_pin;
gd->bd->bi_boot_params = (PHYS_SDRAM_0 + 0x100);
@@ -123,8 +123,9 @@ int board_init(void)
gpio_direction_output(satapwr_pin, 1);
#endif
#ifdef CONFIG_MACPWR
- gpio_request(CONFIG_MACPWR, "macpwr");
- gpio_direction_output(CONFIG_MACPWR, 1);
+ macpwr_pin = sunxi_name_to_gpio(CONFIG_MACPWR);
+ gpio_request(macpwr_pin, "macpwr");
+ gpio_direction_output(macpwr_pin, 1);
#endif
/* Uses dm gpio code so do this here and not in i2c_init_board() */