summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/include/mach/iomux-v1.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-08-14 09:30:38 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-08-14 09:56:08 +0200
commit23f988e8d9e1f9480adeefc4f5b585f3ec15913f (patch)
tree704de01dbc2b8524a1810d387932c7a4940cf582 /arch/arm/mach-imx/include/mach/iomux-v1.h
parent909934e3a76d665b55565e4f87b1a10c8a3e4b0e (diff)
downloadbarebox-23f988e8d9e1f9480adeefc4f5b585f3ec15913f.tar.gz
barebox-23f988e8d9e1f9480adeefc4f5b585f3ec15913f.tar.xz
pinctrl: i.MX iomux-v1: Make base address initialization unnecessary
So far we have imx_gpio_mode() to configure a pinmux entry for the older i.MX pinmuxes. For this to work imx_iomuxv1_init() must be called beforehand to configure the base address. Simplify this by introducing SoC specific variants of imx_gpio_mode() which also pass the base address. This makes initialization of the base address unnecessary and the functions usable for PBL. Consequently also compile the code for PBL. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/include/mach/iomux-v1.h')
-rw-r--r--arch/arm/mach-imx/include/mach/iomux-v1.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/include/mach/iomux-v1.h b/arch/arm/mach-imx/include/mach/iomux-v1.h
index e822905b77..8f75933e39 100644
--- a/arch/arm/mach-imx/include/mach/iomux-v1.h
+++ b/arch/arm/mach-imx/include/mach/iomux-v1.h
@@ -46,6 +46,25 @@
#define GPIO_GIUS (1 << 16)
void imx_iomuxv1_init(void __iomem *base);
-void imx_gpio_mode(int gpio_mode);
+void imx_gpio_mode(void __iomem *base, int gpio_mode);
+
+#include <mach/imx1-regs.h>
+#include <mach/imx21-regs.h>
+#include <mach/imx27-regs.h>
+
+static inline void imx1_gpio_mode(int gpio_mode)
+{
+ imx_gpio_mode(IOMEM(MX1_GPIO1_BASE_ADDR), gpio_mode);
+}
+
+static inline void imx21_gpio_mode(int gpio_mode)
+{
+ imx_gpio_mode(IOMEM(MX21_GPIO1_BASE_ADDR), gpio_mode);
+}
+
+static inline void imx27_gpio_mode(int gpio_mode)
+{
+ imx_gpio_mode(IOMEM(MX27_GPIO1_BASE_ADDR), gpio_mode);
+}
#endif /* __MACH_IOMUX_V1_H__ */