mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: i.MX8MP: move SCTR enabling into imx8mp_cpu_lowlevel_init
@ 2021-08-30 11:53 Ahmad Fatoum
  2021-10-04 12:14 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2021-08-30 11:53 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

We already do this SCTR poking in imx8mm_cpu_lowlevel_init. If the EVK
needs it, other boards should as well, thus move it to a more generic
place.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/boards/nxp-imx8mp-evk/lowlevel.c | 5 -----
 arch/arm/mach-imx/cpu_init.c              | 4 +---
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
index 3298ded5866d..6cb109ae1675 100644
--- a/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
+++ b/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
@@ -179,11 +179,6 @@ static __noreturn noinline void nxp_imx8mp_evk_start(void)
 
 ENTRY_FUNCTION(start_nxp_imx8mp_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));
-
 	imx8mp_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 a034b5a9a500..ea1c67469122 100644
--- a/arch/arm/mach-imx/cpu_init.c
+++ b/arch/arm/mach-imx/cpu_init.c
@@ -76,9 +76,7 @@ void imx8mm_cpu_lowlevel_init(void)
 }
 
 void imx8mp_cpu_lowlevel_init(void)
-{
-	imx8m_cpu_lowlevel_init();
-}
+	__alias(imx8mm_cpu_lowlevel_init);
 
 void imx8mq_cpu_lowlevel_init(void)
 {
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: i.MX8MP: move SCTR enabling into imx8mp_cpu_lowlevel_init
  2021-08-30 11:53 [PATCH] ARM: i.MX8MP: move SCTR enabling into imx8mp_cpu_lowlevel_init Ahmad Fatoum
@ 2021-10-04 12:14 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2021-10-04 12:14 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Mon, Aug 30, 2021 at 01:53:25PM +0200, Ahmad Fatoum wrote:
> We already do this SCTR poking in imx8mm_cpu_lowlevel_init. If the EVK
> needs it, other boards should as well, thus move it to a more generic
> place.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  arch/arm/boards/nxp-imx8mp-evk/lowlevel.c | 5 -----
>  arch/arm/mach-imx/cpu_init.c              | 4 +---
>  2 files changed, 1 insertion(+), 8 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
> index 3298ded5866d..6cb109ae1675 100644
> --- a/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
> +++ b/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
> @@ -179,11 +179,6 @@ static __noreturn noinline void nxp_imx8mp_evk_start(void)
>  
>  ENTRY_FUNCTION(start_nxp_imx8mp_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));
> -
>  	imx8mp_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 a034b5a9a500..ea1c67469122 100644
> --- a/arch/arm/mach-imx/cpu_init.c
> +++ b/arch/arm/mach-imx/cpu_init.c
> @@ -76,9 +76,7 @@ void imx8mm_cpu_lowlevel_init(void)
>  }
>  
>  void imx8mp_cpu_lowlevel_init(void)
> -{
> -	imx8m_cpu_lowlevel_init();
> -}
> +	__alias(imx8mm_cpu_lowlevel_init);
>  
>  void imx8mq_cpu_lowlevel_init(void)
>  {
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-04 12:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30 11:53 [PATCH] ARM: i.MX8MP: move SCTR enabling into imx8mp_cpu_lowlevel_init Ahmad Fatoum
2021-10-04 12:14 ` Sascha Hauer

mail archive of the barebox mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lore.barebox.org/barebox/0 barebox/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 barebox barebox/ https://lore.barebox.org/barebox \
		barebox@lists.infradead.org
	public-inbox-index barebox

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git