diff mbox series

[V2,12/12] imx: imx8m: move CONFIG_SPL_SYS_[I, D]CACHE_OFF to defconfig

Message ID 20210103101144.4375-12-peng.fan@oss.nxp.com
State New
Headers show
Series [V2,01/12] imx: imx8mp_evk: enable eth support | expand

Commit Message

Peng Fan (OSS) Jan. 3, 2021, 10:11 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>


move CONFIG_SPL_SYS_[I,D]CACHE_OFF to defconfig

Signed-off-by: Peng Fan <peng.fan@nxp.com>

---
 configs/imx8mn_ddr4_evk_defconfig | 2 ++
 configs/imx8mn_evk_defconfig      | 2 ++
 configs/imx8mp_evk_defconfig      | 2 ++
 include/configs/imx8mn_evk.h      | 2 --
 include/configs/imx8mp_evk.h      | 2 --
 5 files changed, 6 insertions(+), 4 deletions(-)

-- 
2.28.0

Comments

Fabio Estevam Jan. 3, 2021, 1:11 p.m. UTC | #1
Hi Peng

On Sun, Jan 3, 2021 at 6:43 AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote:

> diff --git a/configs/imx8mn_ddr4_evk_defconfig b/configs/imx8mn_ddr4_evk_defconfig

> index b4b511ed43..d6000d9e87 100644

> --- a/configs/imx8mn_ddr4_evk_defconfig

> +++ b/configs/imx8mn_ddr4_evk_defconfig

> @@ -1,4 +1,6 @@

>  CONFIG_ARM=y

> +CONFIG_SPL_SYS_ICACHE_OFF=y

> +CONFIG_SPL_SYS_DCACHE_OFF=y


I understand that this patch is just moving these symbols from include
file to defconfig, but a more fundamental question: why do we need to
disable caches in the first place?

My understanding is that it is safe to run with caches enabled on
these imx8 platforms.

Please clarify.

Thanks,

Fabio Estevam
Peng Fan Jan. 4, 2021, 2:33 a.m. UTC | #2
> Subject: Re: [PATCH V2 12/12] imx: imx8m: move

> CONFIG_SPL_SYS_[I,D]CACHE_OFF to defconfig

> 

> Hi Peng

> 

> On Sun, Jan 3, 2021 at 6:43 AM Peng Fan (OSS) <peng.fan@oss.nxp.com>

> wrote:

> 

> > diff --git a/configs/imx8mn_ddr4_evk_defconfig

> > b/configs/imx8mn_ddr4_evk_defconfig

> > index b4b511ed43..d6000d9e87 100644

> > --- a/configs/imx8mn_ddr4_evk_defconfig

> > +++ b/configs/imx8mn_ddr4_evk_defconfig

> > @@ -1,4 +1,6 @@

> >  CONFIG_ARM=y

> > +CONFIG_SPL_SYS_ICACHE_OFF=y

> > +CONFIG_SPL_SYS_DCACHE_OFF=y

> 

> I understand that this patch is just moving these symbols from include file to

> defconfig, but a more fundamental question: why do we need to disable

> caches in the first place?


No need to disable icache. Dcache needs to be off, since we not have MMU
setup.

I could use a follow up patch to enable icache, agree?

Thanks,
Peng.

> 

> My understanding is that it is safe to run with caches enabled on these imx8

> platforms.

> 

> Please clarify.

> 

> Thanks,

> 

> Fabio Estevam
Fabio Estevam Jan. 4, 2021, 11:48 a.m. UTC | #3
Hi Peng,

On Sun, Jan 3, 2021 at 11:33 PM Peng Fan <peng.fan@nxp.com> wrote:

> No need to disable icache. Dcache needs to be off, since we not have MMU

> setup.


Is the requirement to disable D-Cache in SPL specific to i.MX8MN and i.MX8MP?

We do not pass CONFIG_SPL_SYS_ICACHE_OFF=y and
CONFIG_SPL_SYS_DCACHE_OFF=y for imx8mq_evk_defconfig, for example.

Regards,

Fabio Estevam
diff mbox series

Patch

diff --git a/configs/imx8mn_ddr4_evk_defconfig b/configs/imx8mn_ddr4_evk_defconfig
index b4b511ed43..d6000d9e87 100644
--- a/configs/imx8mn_ddr4_evk_defconfig
+++ b/configs/imx8mn_ddr4_evk_defconfig
@@ -1,4 +1,6 @@ 
 CONFIG_ARM=y
+CONFIG_SPL_SYS_ICACHE_OFF=y
+CONFIG_SPL_SYS_DCACHE_OFF=y
 CONFIG_ARCH_IMX8M=y
 CONFIG_SYS_TEXT_BASE=0x40200000
 CONFIG_SPL_GPIO_SUPPORT=y
diff --git a/configs/imx8mn_evk_defconfig b/configs/imx8mn_evk_defconfig
index 1b8a971c79..3970cb664f 100644
--- a/configs/imx8mn_evk_defconfig
+++ b/configs/imx8mn_evk_defconfig
@@ -1,4 +1,6 @@ 
 CONFIG_ARM=y
+CONFIG_SPL_SYS_ICACHE_OFF=y
+CONFIG_SPL_SYS_DCACHE_OFF=y
 CONFIG_ARCH_IMX8M=y
 CONFIG_SYS_TEXT_BASE=0x40200000
 CONFIG_SPL_GPIO_SUPPORT=y
diff --git a/configs/imx8mp_evk_defconfig b/configs/imx8mp_evk_defconfig
index 538d0c0ef2..be7f3100eb 100644
--- a/configs/imx8mp_evk_defconfig
+++ b/configs/imx8mp_evk_defconfig
@@ -1,4 +1,6 @@ 
 CONFIG_ARM=y
+CONFIG_SPL_SYS_ICACHE_OFF=y
+CONFIG_SPL_SYS_DCACHE_OFF=y
 CONFIG_ARCH_IMX8M=y
 CONFIG_SYS_TEXT_BASE=0x40200000
 CONFIG_SPL_GPIO_SUPPORT=y
diff --git a/include/configs/imx8mn_evk.h b/include/configs/imx8mn_evk.h
index 92f435f578..369aa538bf 100644
--- a/include/configs/imx8mn_evk.h
+++ b/include/configs/imx8mn_evk.h
@@ -25,8 +25,6 @@ 
 #define CONFIG_SPL_BSS_MAX_SIZE		SZ_8K	/* 8 KB */
 #define CONFIG_SYS_SPL_MALLOC_START	0x42200000
 #define CONFIG_SYS_SPL_MALLOC_SIZE	SZ_512K	/* 512 KB */
-#define CONFIG_SYS_ICACHE_OFF
-#define CONFIG_SYS_DCACHE_OFF
 
 /* For RAW image gives a error info not panic */
 #define CONFIG_SPL_ABORT_ON_RAW_IMAGE
diff --git a/include/configs/imx8mp_evk.h b/include/configs/imx8mp_evk.h
index 7abaf5ff84..f89950f74e 100644
--- a/include/configs/imx8mp_evk.h
+++ b/include/configs/imx8mp_evk.h
@@ -26,8 +26,6 @@ 
 #define CONFIG_SPL_BSS_MAX_SIZE		0x400	/* 1 KB */
 #define CONFIG_SYS_SPL_MALLOC_START	0x42200000
 #define CONFIG_SYS_SPL_MALLOC_SIZE	SZ_512K	/* 512 KB */
-#define CONFIG_SYS_ICACHE_OFF
-#define CONFIG_SYS_DCACHE_OFF
 
 #define CONFIG_SPL_ABORT_ON_RAW_IMAGE