summaryrefslogtreecommitdiff
path: root/drivers/gpio/sunxi_gpio.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-10-12 08:58:58 -0400
committerTom Rini <trini@konsulko.com>2021-10-12 11:45:00 -0400
commit2aab77f7263bb6e27120cfea82fc5efa4f625014 (patch)
treee9148490ad695bc33b087a7dcfee45fbdc661085 /drivers/gpio/sunxi_gpio.c
parent4c1996ce374924a226c872e26a42cfcc7bf74da2 (diff)
parentf9437b00c06382d3edc623c10c69901786ad6317 (diff)
Merge https://source.denx.de/u-boot/custodians/u-boot-sunxi
The bulk of it is Samuel's DM_I2C rework, which removes the nasty I2C deprecation warnings for most 32-bit boards. It also includes some smaller refactorings that pave the way for more changes, mostly driven by needing to support the Allwinner RISC-V SoC later on. Board wise we gain support for the FriendlyARM NanoPi R1S H5 router board and official Pinetab support. Build-tested for all 160 sunxi boards, and boot tested on a A64, A20, H3, H6, and H616 board. USB, SD card, eMMC, and Ethernet all work there (where applicable).
Diffstat (limited to 'drivers/gpio/sunxi_gpio.c')
-rw-r--r--drivers/gpio/sunxi_gpio.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c
index 24cb604e3e3..cdbc40d48fd 100644
--- a/drivers/gpio/sunxi_gpio.c
+++ b/drivers/gpio/sunxi_gpio.c
@@ -14,14 +14,11 @@
#include <errno.h>
#include <fdtdec.h>
#include <malloc.h>
-#include <asm/arch/gpio.h>
#include <asm/io.h>
#include <asm/gpio.h>
#include <dm/device-internal.h>
#include <dt-bindings/gpio/gpio.h>
-#define SUNXI_GPIOS_PER_BANK SUNXI_GPIO_A_NR
-
struct sunxi_gpio_plat {
struct sunxi_gpio *regs;
const char *bank_name; /* Name of bank, e.g. "B" */
@@ -118,20 +115,6 @@ int sunxi_name_to_gpio(const char *name)
}
#endif /* DM_GPIO */
-int sunxi_name_to_gpio_bank(const char *name)
-{
- int group = 0;
-
- if (*name == 'P' || *name == 'p')
- name++;
- if (*name >= 'A') {
- group = *name - (*name > 'a' ? 'a' : 'A');
- return group;
- }
-
- return -1;
-}
-
#if CONFIG_IS_ENABLED(DM_GPIO)
/* TODO(sjg@chromium.org): Remove this function and use device tree */
int sunxi_name_to_gpio(const char *name)