[PATCH v4] ARM: i.MX8M: separate function call for clock_init
Johannes Schneider
johannes.schneider at leica-geosystems.com
Wed Jan 11 03:37:29 PST 2023
Add a separate function call for imx8mp_early_clock_init, to avoid
confusion with imx8mm.
Signed-off-by: Johannes Schneider <johannes.schneider at leica-geosystems.com>
---
arch/arm/boards/nxp-imx8mp-evk/lowlevel.c | 2 +-
arch/arm/boards/tqma8mpxl/lowlevel.c | 2 +-
arch/arm/mach-imx/imx8m.c | 12 +++++++++---
arch/arm/mach-imx/include/mach/imx8m-ccm-regs.h | 1 +
4 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
index 4f24dd4cd4..3cb24df1ca 100644
--- a/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
+++ b/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
@@ -72,7 +72,7 @@ static void power_init_board(void)
imx8mp_setup_pad(MX8MP_PAD_I2C1_SCL__I2C1_SCL | I2C_PAD_CTRL);
imx8mp_setup_pad(MX8MP_PAD_I2C1_SDA__I2C1_SDA | I2C_PAD_CTRL);
- imx8mm_early_clock_init();
+ imx8mp_early_clock_init();
imx8m_ccgr_clock_enable(IMX8M_CCM_CCGR_I2C1);
i2c = imx8m_i2c_early_init(IOMEM(MX8MP_I2C1_BASE_ADDR));
diff --git a/arch/arm/boards/tqma8mpxl/lowlevel.c b/arch/arm/boards/tqma8mpxl/lowlevel.c
index 0ce0e7a73b..037c7abf4b 100644
--- a/arch/arm/boards/tqma8mpxl/lowlevel.c
+++ b/arch/arm/boards/tqma8mpxl/lowlevel.c
@@ -73,7 +73,7 @@ static void power_init_board(void)
imx8mp_setup_pad(MX8MP_PAD_I2C1_SCL__I2C1_SCL | I2C_PAD_CTRL);
imx8mp_setup_pad(MX8MP_PAD_I2C1_SDA__I2C1_SDA | I2C_PAD_CTRL);
- imx8mm_early_clock_init();
+ imx8mp_early_clock_init();
imx8m_ccgr_clock_enable(IMX8M_CCM_CCGR_I2C1);
i2c = imx8m_i2c_early_init(IOMEM(MX8MP_I2C1_BASE_ADDR));
diff --git a/arch/arm/mach-imx/imx8m.c b/arch/arm/mach-imx/imx8m.c
index 9758525b54..7f3856e545 100644
--- a/arch/arm/mach-imx/imx8m.c
+++ b/arch/arm/mach-imx/imx8m.c
@@ -182,7 +182,7 @@ int imx8mq_init(void)
#define IMX8MM_CCM_ANALOG_SYS_PLL2_GEN_CTRL 0x104
#define IMX8MM_CCM_ANALOG_SYS_PLL3_GEN_CTRL 0x114
-static void __imx8mm_early_clock_init(unsigned long pll3_freq) /* and later */
+static void __imx8m_early_clock_init(unsigned long pll3_freq) /* and later */
{
void __iomem *ana = IOMEM(MX8M_ANATOP_BASE_ADDR);
void __iomem *ccm = IOMEM(MX8M_CCM_BASE_ADDR);
@@ -252,14 +252,20 @@ static void __imx8mm_early_clock_init(unsigned long pll3_freq) /* and later */
void imx8mm_early_clock_init(void)
{
- __imx8mm_early_clock_init(750000000UL);
+ __imx8m_early_clock_init(750000000UL);
}
void imx8mn_early_clock_init(void)
{
- __imx8mm_early_clock_init(600000000UL);
+ __imx8m_early_clock_init(600000000UL);
}
+void imx8mp_early_clock_init(void)
+{
+ __imx8m_early_clock_init(750000000UL);
+}
+
+
#define KEEP_ALIVE 0x18
#define VER_L 0x1c
#define VER_H 0x20
diff --git a/arch/arm/mach-imx/include/mach/imx8m-ccm-regs.h b/arch/arm/mach-imx/include/mach/imx8m-ccm-regs.h
index eeb15f4dd0..659615e1cc 100644
--- a/arch/arm/mach-imx/include/mach/imx8m-ccm-regs.h
+++ b/arch/arm/mach-imx/include/mach/imx8m-ccm-regs.h
@@ -53,6 +53,7 @@
void imx8m_early_setup_uart_clock(void);
void imx8mm_early_clock_init(void);
void imx8mn_early_clock_init(void);
+void imx8mp_early_clock_init(void);
void imx8m_clock_set_target_val(int clock_id, u32 val);
void imx8m_ccgr_clock_enable(int index);
void imx8m_ccgr_clock_disable(int index);
--
2.25.1
More information about the barebox
mailing list