diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-04-25 17:25:14 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2015-05-04 16:51:53 +0200 |
commit | 2fcf033d36618da4c86de135a0d447fd3bbaf8ea (patch) | |
tree | 0439c47cc2e63fa98e4c347f233c9dafcaa12c7b /board/sunxi | |
parent | a536077def0295966452f290f7ce8f391e079966 (diff) | |
download | u-boot-imx-2fcf033d36618da4c86de135a0d447fd3bbaf8ea.zip u-boot-imx-2fcf033d36618da4c86de135a0d447fd3bbaf8ea.tar.gz u-boot-imx-2fcf033d36618da4c86de135a0d447fd3bbaf8ea.tar.bz2 |
sunxi: axp: Move axp gpio code to a separate axpi-gpio driver
Move the axp-gpio code out of the drivers/power/axp*.c code, and into
a new separate axpi-gpio driver.
This change drops supports for the gpio3 pin on the axp209, as that requires
special handling, and no boards are using it.
Besides cleaning things up by moving the code to a separate driver, as
a bonus this change also adds support for the (non vusb) gpio pins on the
axp221 and the gpio pins on the axp152.
The new axp-gpio driver gets its own Kconfig option, and is only enabled
on boards which need it. Besides that it only gets enabled in the regular
u-boot build and not for the SPL as we never need it in the SPL.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'board/sunxi')
-rw-r--r-- | board/sunxi/Kconfig | 6 | ||||
-rw-r--r-- | board/sunxi/board.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 6495187..11e14d6 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -340,6 +340,12 @@ config I2C4_ENABLE See I2C0_ENABLE help text. endif +config AXP_GPIO + boolean "Enable support for gpio-s on axp PMICs" + default n + ---help--- + Say Y here to enable support for the gpio pins of the axp PMIC ICs. + config VIDEO boolean "Enable graphical uboot console on HDMI, LCD or VGA" default y diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 9a48639..5052610 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) { - int id_pfr1; + int id_pfr1, ret; gd->bd->bi_boot_params = (PHYS_SDRAM_0 + 0x100); @@ -93,6 +93,10 @@ int board_init(void) asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r"(24000000)); } + ret = axp_gpio_init(); + if (ret) + return ret; + /* Uses dm gpio code so do this here and not in i2c_init_board() */ return soft_i2c_board_init(); } |