summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-02-07 10:46:56 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-02-19 08:30:31 +0100
commitde73734fcc59aa83c84297f1f3719609e6b72aba (patch)
tree18af4ade689722098f41f94f7f670826fb5c8928 /arch
parent57974c2d8b2c180f51d4fe263b35b2b74478a235 (diff)
downloadbarebox-de73734fcc59aa83c84297f1f3719609e6b72aba.tar.gz
ARM: i.MX8: Move iomux header to make space for i.MX8MM
Parts of iomux-mx8.h are for i.MX8M and others for i.MX8MQ only, but never for i.MX8 in general. Split this up into different file and avoid the imx8_ prefix. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boards/nxp-imx8mq-evk/lowlevel.c2
-rw-r--r--arch/arm/boards/phytec-som-imx8mq/lowlevel.c2
-rw-r--r--arch/arm/boards/zii-imx8mq-dev/lowlevel.c2
-rw-r--r--arch/arm/mach-imx/include/mach/iomux-mx8m.h27
-rw-r--r--arch/arm/mach-imx/include/mach/iomux-mx8mq.h (renamed from arch/arm/mach-imx/include/mach/iomux-mx8.h)22
5 files changed, 31 insertions, 24 deletions
diff --git a/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c
index 101ce60..4443c7d 100644
--- a/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c
+++ b/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c
@@ -6,7 +6,7 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <mach/imx8-ccm-regs.h>
-#include <mach/iomux-mx8.h>
+#include <mach/iomux-mx8mq.h>
#include <mach/imx8-ddrc.h>
#include <mach/xload.h>
#include <io.h>
diff --git a/arch/arm/boards/phytec-som-imx8mq/lowlevel.c b/arch/arm/boards/phytec-som-imx8mq/lowlevel.c
index 4cacabb..e327b8c 100644
--- a/arch/arm/boards/phytec-som-imx8mq/lowlevel.c
+++ b/arch/arm/boards/phytec-som-imx8mq/lowlevel.c
@@ -9,7 +9,7 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <mach/imx8-ccm-regs.h>
-#include <mach/iomux-mx8.h>
+#include <mach/iomux-mx8mq.h>
#include <mach/imx8-ddrc.h>
#include <mach/xload.h>
#include <io.h>
diff --git a/arch/arm/boards/zii-imx8mq-dev/lowlevel.c b/arch/arm/boards/zii-imx8mq-dev/lowlevel.c
index f12d79e..a328699 100644
--- a/arch/arm/boards/zii-imx8mq-dev/lowlevel.c
+++ b/arch/arm/boards/zii-imx8mq-dev/lowlevel.c
@@ -10,7 +10,7 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <mach/imx8-ccm-regs.h>
-#include <mach/iomux-mx8.h>
+#include <mach/iomux-mx8mq.h>
#include <mach/imx8-ddrc.h>
#include <mach/xload.h>
#include <io.h>
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx8m.h b/arch/arm/mach-imx/include/mach/iomux-mx8m.h
new file mode 100644
index 0000000..de66750
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/iomux-mx8m.h
@@ -0,0 +1,27 @@
+#ifndef __MACH_IOMUX_IMX8M_H__
+#define __MACH_IOMUX_IMX8M_H__
+
+#include <mach/iomux-v3.h>
+
+#define PAD_CTL_DSE_3P3V_45_OHM 0b110
+
+static inline void imx8m_setup_pad(void __iomem *iomux, iomux_v3_cfg_t pad)
+{
+ unsigned int flags = 0;
+ uint32_t mode = IOMUX_MODE(pad);
+
+ if (mode & IOMUX_CONFIG_LPSR) {
+ mode &= ~IOMUX_CONFIG_LPSR;
+ flags = ZERO_OFFSET_VALID | IMX7_PINMUX_LPSR;
+ }
+
+ iomux_v3_setup_pad(iomux, flags,
+ IOMUX_CTRL_OFS(pad),
+ IOMUX_PAD_CTRL_OFS(pad),
+ IOMUX_SEL_INPUT_OFS(pad),
+ mode,
+ IOMUX_PAD_CTRL(pad),
+ IOMUX_SEL_INPUT(pad));
+}
+
+#endif /* __MACH_IOMUX_IMX8MQ_H__ */
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx8.h b/arch/arm/mach-imx/include/mach/iomux-mx8mq.h
index 9660697..5c94731 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx8.h
+++ b/arch/arm/mach-imx/include/mach/iomux-mx8mq.h
@@ -8,8 +8,7 @@
#define __MACH_IOMUX_IMX8MQ_H__
#include <mach/iomux-v3.h>
-
-#define PAD_CTL_DSE_3P3V_45_OHM 0b110
+#include <mach/iomux-mx8m.h>
enum {
IMX8MQ_PAD_GPIO1_IO00__GPIO1_IO0 = IOMUX_PAD(0x0290, 0x0028, 0, 0x0000, 0, 0),
@@ -623,23 +622,4 @@ enum {
IMX8MQ_PAD_UART4_TXD__GPIO5_IO29 = IOMUX_PAD(0x04B8, 0x0250, 5, 0x0000, 0, 0),
};
-static inline void mx8_setup_pad(void __iomem *iomux, iomux_v3_cfg_t pad)
-{
- unsigned int flags = 0;
- uint32_t mode = IOMUX_MODE(pad);
-
- if (mode & IOMUX_CONFIG_LPSR) {
- mode &= ~IOMUX_CONFIG_LPSR;
- flags = ZERO_OFFSET_VALID | IMX7_PINMUX_LPSR;
- }
-
- iomux_v3_setup_pad(iomux, flags,
- IOMUX_CTRL_OFS(pad),
- IOMUX_PAD_CTRL_OFS(pad),
- IOMUX_SEL_INPUT_OFS(pad),
- mode,
- IOMUX_PAD_CTRL(pad),
- IOMUX_SEL_INPUT(pad));
-}
-
#endif