diff mbox series

imx8qxp_mek: Run with caches enabled

Message ID 20200420185529.12316-1-festevam@gmail.com
State Accepted
Commit 05ae521cb654eee442fd5ad11eb643bbd1a79178
Headers show
Series imx8qxp_mek: Run with caches enabled | expand

Commit Message

Fabio Estevam April 20, 2020, 6:55 p.m. UTC
There is no need to run with caches disabled.

Signed-off-by: Fabio Estevam <festevam at gmail.com>
---
 configs/imx8qxp_mek_defconfig | 2 --
 1 file changed, 2 deletions(-)

Comments

Peng Fan April 21, 2020, 12:15 p.m. UTC | #1
Hi Fabio,

> -----Original Message-----
> From: Fabio Estevam <festevam at gmail.com>
> Sent: 2020?4?21? 2:55
> To: sbabic at denx.de
> Cc: Peng Fan <peng.fan at nxp.com>; dl-uboot-imx <uboot-imx at nxp.com>;
> u-boot at lists.denx.de; Fabio Estevam <festevam at gmail.com>
> Subject: [PATCH] imx8qxp_mek: Run with caches enabled
> 
> There is no need to run with caches disabled.
> 
> Signed-off-by: Fabio Estevam <festevam at gmail.com>
> ---
>  configs/imx8qxp_mek_defconfig | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/configs/imx8qxp_mek_defconfig b/configs/imx8qxp_mek_defconfig
> index 8a7e9ee9c7..46b8cbf351 100644
> --- a/configs/imx8qxp_mek_defconfig
> +++ b/configs/imx8qxp_mek_defconfig
> @@ -1,6 +1,4 @@
>  CONFIG_ARM=y
> -CONFIG_SPL_SYS_ICACHE_OFF=y
> -CONFIG_SPL_SYS_DCACHE_OFF=y

Currently there is no mmu setup in SPL stage.

Regards,
Peng.

>  CONFIG_ARCH_IMX8=y
>  CONFIG_SYS_TEXT_BASE=0x80020000
>  CONFIG_SPL_GPIO_SUPPORT=y
> --
> 2.17.1
Fabio Estevam April 21, 2020, 12:21 p.m. UTC | #2
Hi Peng,

On Tue, Apr 21, 2020 at 9:15 AM Peng Fan <peng.fan at nxp.com> wrote:

> > -CONFIG_SPL_SYS_ICACHE_OFF=y
> > -CONFIG_SPL_SYS_DCACHE_OFF=y
>
> Currently there is no mmu setup in SPL stage.

Could you please expand the explanation a bit?

Why do we need to select these options only for i.MX8 boards?

What would be the correct fix in your opinion?

Please advise.
Peng Fan April 21, 2020, 12:22 p.m. UTC | #3
Hi Fabio,

> Subject: Re: [PATCH] imx8qxp_mek: Run with caches enabled
> 
> Hi Peng,
> 
> On Tue, Apr 21, 2020 at 9:15 AM Peng Fan <peng.fan at nxp.com> wrote:
> 
> > > -CONFIG_SPL_SYS_ICACHE_OFF=y
> > > -CONFIG_SPL_SYS_DCACHE_OFF=y
> >
> > Currently there is no mmu setup in SPL stage.
> 
> Could you please expand the explanation a bit?
> 
> Why do we need to select these options only for i.MX8 boards?
> 
> What would be the correct fix in your opinion?

As I recall, icache could be enabled, but if enable dcache, we might
need setup mmu for SPL.

Regards,
Peng.

> 
> Please advise.
Fabio Estevam April 21, 2020, 12:28 p.m. UTC | #4
Hi Peng,

On Tue, Apr 21, 2020 at 9:22 AM Peng Fan <peng.fan at nxp.com> wrote:

> As I recall, icache could be enabled, but if enable dcache, we might
> need setup mmu for SPL.

Does this requirement apply only for iMX8? I don't see it for i.MX6/i.MX7.

So still confused about your comment.

With this patch, SPL still loads U-Boot proper, so didn't notice an error.

Thanks
Peng Fan April 21, 2020, 12:43 p.m. UTC | #5
> Subject: Re: [PATCH] imx8qxp_mek: Run with caches enabled
> 
> Hi Peng,
> 
> On Tue, Apr 21, 2020 at 9:22 AM Peng Fan <peng.fan at nxp.com> wrote:
> 
> > As I recall, icache could be enabled, but if enable dcache, we might
> > need setup mmu for SPL.
> 
> Does this requirement apply only for iMX8? I don't see it for i.MX6/i.MX7.
> 
> So still confused about your comment.
> 
> With this patch, SPL still loads U-Boot proper, so didn't notice an error.

Just checked the code. 
In SPL stage dcache is off, icache is enabled with your patch.
So it is ok.

Regards,
Peng.
> 
> Thanks
Peng Fan April 21, 2020, 12:43 p.m. UTC | #6
> Subject: [PATCH] imx8qxp_mek: Run with caches enabled
> 
> There is no need to run with caches disabled.
> 
> Signed-off-by: Fabio Estevam <festevam at gmail.com>

Reviewed-by: Peng Fan <peng.fan at nxp.com>

> ---
>  configs/imx8qxp_mek_defconfig | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/configs/imx8qxp_mek_defconfig b/configs/imx8qxp_mek_defconfig
> index 8a7e9ee9c7..46b8cbf351 100644
> --- a/configs/imx8qxp_mek_defconfig
> +++ b/configs/imx8qxp_mek_defconfig
> @@ -1,6 +1,4 @@
>  CONFIG_ARM=y
> -CONFIG_SPL_SYS_ICACHE_OFF=y
> -CONFIG_SPL_SYS_DCACHE_OFF=y
>  CONFIG_ARCH_IMX8=y
>  CONFIG_SYS_TEXT_BASE=0x80020000
>  CONFIG_SPL_GPIO_SUPPORT=y
> --
> 2.17.1
Fabio Estevam April 21, 2020, 12:45 p.m. UTC | #7
Hi Peng,

On Tue, Apr 21, 2020 at 9:43 AM Peng Fan <peng.fan at nxp.com> wrote:

> Just checked the code.
> In SPL stage dcache is off, icache is enabled with your patch.
> So it is ok.

Thanks, I will send patches doing the same for the other i.MX8 boards.

Thanks
Stefano Babic May 1, 2020, 4:32 p.m. UTC | #8
> There is no need to run with caches disabled.
> Signed-off-by: Fabio Estevam <festevam at gmail.com>
> Reviewed-by: Peng Fan <peng.fan at nxp.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/configs/imx8qxp_mek_defconfig b/configs/imx8qxp_mek_defconfig
index 8a7e9ee9c7..46b8cbf351 100644
--- a/configs/imx8qxp_mek_defconfig
+++ b/configs/imx8qxp_mek_defconfig
@@ -1,6 +1,4 @@ 
 CONFIG_ARM=y
-CONFIG_SPL_SYS_ICACHE_OFF=y
-CONFIG_SPL_SYS_DCACHE_OFF=y
 CONFIG_ARCH_IMX8=y
 CONFIG_SYS_TEXT_BASE=0x80020000
 CONFIG_SPL_GPIO_SUPPORT=y