From: Johannes Schneider <johannes.schneider@leica-geosystems.com>
To: barebox@lists.infradead.org
Cc: Johannes Schneider <johannes.schneider@leica-geosystems.com>
Subject: [PATCH v3] ARM: i.MX8M: separate function call for clock_init
Date: Wed, 11 Jan 2023 12:16:57 +0100 [thread overview]
Message-ID: <20230111111656.757271-1-johannes.schneider@leica-geosystems.com> (raw)
Add a separate function call for imx8mp_early_clock_init, to avoid
confusion with imx8mm.
Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
---
arch/arm/boards/nxp-imx8mp-evk/lowlevel.c | 2 +-
arch/arm/mach-imx/imx8m.c | 12 +++++++++---
arch/arm/mach-imx/include/mach/imx8m-ccm-regs.h | 1 +
3 files changed, 11 insertions(+), 4 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/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
next reply other threads:[~2023-01-11 11:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 11:16 Johannes Schneider [this message]
2023-01-11 11:25 ` Ahmad Fatoum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230111111656.757271-1-johannes.schneider@leica-geosystems.com \
--to=johannes.schneider@leica-geosystems.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox