From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/2] ARM: i.MX8MM: move system counter enabling into imx8mm_cpu_lowlevel_init
Date: Fri, 29 Jan 2021 16:25:54 +0100 [thread overview]
Message-ID: <20210129152553.15792-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20210129152553.15792-1-a.fatoum@pengutronix.de>
From: Ahmad Fatoum <ahmad@a3f.at>
Other i.MX8MM boards will likely need this as well, so just move it
into the helper and while at it, rewrite it using
imx8m_ccgr_clock_enable, which is defined as:
void __iomem *ccm = IOMEM(MX8M_CCM_BASE_ADDR);
writel(IMX8M_CCM_CCGR_SETTINGn_NEEDED(0),
ccm + IMX8M_CCM_CCGRn_SET(index));
No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/arm/boards/nxp-imx8mm-evk/lowlevel.c | 5 -----
arch/arm/mach-imx/cpu_init.c | 4 ++++
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c
index 2297dc01e77f..4bd29c226912 100644
--- a/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c
+++ b/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c
@@ -172,11 +172,6 @@ static __noreturn noinline void nxp_imx8mm_evk_start(void)
ENTRY_FUNCTION(start_nxp_imx8mm_evk, r0, r1, r2)
{
- void __iomem *ccm = IOMEM(MX8M_CCM_BASE_ADDR);
-
- writel(IMX8M_CCM_CCGR_SETTINGn_NEEDED(0),
- ccm + IMX8M_CCM_CCGRn_SET(IMX8M_CCM_CCGR_SCTR));
-
imx8mm_cpu_lowlevel_init();
relocate_to_current_adr();
diff --git a/arch/arm/mach-imx/cpu_init.c b/arch/arm/mach-imx/cpu_init.c
index cc7a409e373a..9d86353e2255 100644
--- a/arch/arm/mach-imx/cpu_init.c
+++ b/arch/arm/mach-imx/cpu_init.c
@@ -20,6 +20,7 @@
#include <mach/generic.h>
#include <mach/imx7-regs.h>
#include <mach/imx8mq-regs.h>
+#include <mach/imx8m-ccm-regs.h>
#include <common.h>
#include <io.h>
#include <asm/syscounter.h>
@@ -79,6 +80,9 @@ static void imx8m_cpu_lowlevel_init(void)
void imx8mm_cpu_lowlevel_init(void)
{
+ /* ungate system counter */
+ imx8m_ccgr_clock_enable(IMX8M_CCM_CCGR_SCTR);
+
imx8m_cpu_lowlevel_init();
}
--
2.30.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-01-29 15:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-29 15:25 [PATCH 1/2] ARM: i.MX8MM: fix sparse warnings in early clock code Ahmad Fatoum
2021-01-29 15:25 ` Ahmad Fatoum [this message]
2021-02-01 8:45 ` Sascha Hauer
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=20210129152553.15792-2-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--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