diff options
author | Andre Przywara <andre.przywara@arm.com> | 2022-09-06 11:50:54 +0100 |
---|---|---|
committer | Andre Przywara <andre.przywara@arm.com> | 2023-10-22 23:40:57 +0100 |
commit | 1da48c99de18490a69c467df6c4a71701ac47fb1 (patch) | |
tree | 9d449aee53b96cdc95cdf70bc81d9c0a2022d149 /include/sunxi_gpio.h | |
parent | 207ed0a3ddcb23fe0a5e8f83b36e6f039270bc46 (diff) | |
download | u-boot-1da48c99de18490a69c467df6c4a71701ac47fb1.tar.gz |
pinctrl: sunxi: move PIO_BASE into sunxi_gpio.h
On the Allwinner platform we were describing a quite comprehensive
memory map in a per-SoC header unser arch/arm.
In the old days that was used by every driver, but nowadays it should
only be needed by SPL drivers (not using the DT). Many addresses in
there were never used, and some are not needed anymore.
To avoid a dependency on CPU specific headers in an arch specific
directory, move the definition of the pinctroller MMIO base address into
the sunxi_gpio.h header, because the SPL routines for GPIO should be the
only one needing this address.
This is a first step towards getting rid of cpu_sun[x]i.h completely,
and allows to remove the inclusion of that file from the sunxi_gpio.h
header.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'include/sunxi_gpio.h')
-rw-r--r-- | include/sunxi_gpio.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/sunxi_gpio.h b/include/sunxi_gpio.h index e0fb5b5da63..c1fdf7ea1d7 100644 --- a/include/sunxi_gpio.h +++ b/include/sunxi_gpio.h @@ -12,7 +12,17 @@ #define _SUNXI_GPIO_H #include <linux/types.h> -#include <asm/arch/cpu.h> + +#if defined(CONFIG_MACH_SUN9I) +#define SUNXI_PIO_BASE 0x06000800 +#define SUNXI_R_PIO_BASE 0x08002c00 +#elif defined(CONFIG_SUN50I_GEN_H6) +#define SUNXI_PIO_BASE 0x0300b000 +#define SUNXI_R_PIO_BASE 0x07022000 +#else +#define SUNXI_PIO_BASE 0x01c20800 +#define SUNXI_R_PIO_BASE 0x01f02c00 +#endif /* * sunxi has 9 banks of gpio, they are: |