ARM: kirkwood: disable dcache for Kirkwood boards
Subsystems (2)
PATCH v2 1/1 ARM: kirkwood: disable dcache for Kirkwood boards
Prior to commit 93b283d49f93 ("ARM: CPU: arm926ejs: Consolidate cache routines to common file") the kirkwood boards didn't have and dcache support. The network and usb drivers rely on this. Set CONFIG_SYS_DCACHE_OFF in the Kirkwood specific config.h.
---
Changes in v2:
- expand the comment in config.h to provide more info
arch/arm/mach-kirkwood/include/mach/config.h | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/mach-kirkwood/include/mach/config.h +6 -0
@@ -26,6 +26,12 @@#define CONFIG_KIRKWOOD_EGIGA_INIT /* Enable GbePort0/1 for kernel */ #define CONFIG_KIRKWOOD_RGMII_PAD_1V8 /* Set RGMII Pad voltage to 1.8V */ #define CONFIG_KIRKWOOD_PCIE_INIT /* Enable PCIE Port0 for kernel */ +/* +* Disable the dcache. Currently the network driver (mvgbe.c) and USB +* EHCI driver (ehci-marvell.c) and possibly others rely on the data +* cache being disabled. +*/ +#define CONFIG_SYS_DCACHE_OFF /* * By default kwbimage.cfg from board specific folder is used
Signature · 1 line
2.21.0
PATCH v2 1/1 ARM: kirkwood: disable dcache for Kirkwood boards
Quoted 20 lines · Chris Packham
Prior to commit
93b283d49f93("ARM: CPU: arm926ejs: Consolidate cache routines to common file") the kirkwood boards didn't have and dcache support. The network and usb drivers rely on this. SetCONFIG_SYS_DCACHE_OFFin the Kirkwood specificconfig.h.Reported-by Leigh Brown <[email protected]>Signed-off-by Chris Packham <[email protected]>---
Changes in v2:
- expand the comment inconfig.hto provide more infoarch/arm/mach-kirkwood/include/mach/config.h | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm/mach-kirkwood/include/mach/config.h +0
-0
arch/arm/mach-kirkwood/include/mach/config.h line 34
Quoted 9 lines
arch/arm/mach-kirkwood/include/mach/config.h +6
-0@@ -26,6 +26,12 @@#define CONFIG_KIRKWOOD_EGIGA_INIT /* Enable GbePort0/1 for kernel */ #define CONFIG_KIRKWOOD_RGMII_PAD_1V8 /* Set RGMII Pad voltage to 1.8V */ #define CONFIG_KIRKWOOD_PCIE_INIT /* Enable PCIE Port0 for kernel */ +/* +* Disable the dcache. Currently the network driver (mvgbe.c) and USB +* EHCI driver (ehci-marvell.c) and possibly others rely on the data +* cache being disabled. +*/ +#define CONFIG_SYS_DCACHE_OFF
Thanks.
Thanks,
Stefan
PATCH v2 1/1 ARM: kirkwood: disable dcache for Kirkwood boards
In reply to Chris PackhamQuoted 20 lines · Chris Packham
Prior to commit
93b283d49f93("ARM: CPU: arm926ejs: Consolidate cache routines to common file") the kirkwood boards didn't have and dcache support. The network and usb drivers rely on this. SetCONFIG_SYS_DCACHE_OFFin the Kirkwood specificconfig.h.Reported-by Leigh Brown <[email protected]>Signed-off-by Chris Packham <[email protected]>---
Changes in v2:
- expand the comment inconfig.hto provide more infoarch/arm/mach-kirkwood/include/mach/config.h | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm/mach-kirkwood/include/mach/config.h +0
-0
arch/arm/mach-kirkwood/include/mach/config.h line 34
Quoted 9 lines
arch/arm/mach-kirkwood/include/mach/config.h +6
-0@@ -26,6 +26,12 @@#define CONFIG_KIRKWOOD_EGIGA_INIT /* Enable GbePort0/1 for kernel */ #define CONFIG_KIRKWOOD_RGMII_PAD_1V8 /* Set RGMII Pad voltage to 1.8V */ #define CONFIG_KIRKWOOD_PCIE_INIT /* Enable PCIE Port0 for kernel */ +/* +* Disable the dcache. Currently the network driver (mvgbe.c) and USB +* EHCI driver (ehci-marvell.c) and possibly others rely on the data +* cache being disabled. +*/ +#define CONFIG_SYS_DCACHE_OFF
While collecting the queued fixes for the upcoming release, I do have one question regarding this Kirkwood cache issue (I don't have such a board here, so I can't test anything):
Do we need this patch applied [1], if the patch from this thread is applied [2]?
Thanks,
Stefan
[1] http://patchwork.ozlabs.org/patch/1048863/
[2] http://patchwork.ozlabs.org/patch/1057716/
PATCH v2 1/1 ARM: kirkwood: disable dcache for Kirkwood boards
Quoted 40 lines · Stefan Roese,
Quoted 9 lines · Chris Packham
Prior to commit
93b283d49f93("ARM: CPU: arm926ejs: Consolidate cache routines to common file") the kirkwood boards didn't have and dcache support. The network and usb drivers rely on this. SetCONFIG_SYS_DCACHE_OFFin the Kirkwood specificconfig.h.Reported-by Leigh Brown <[email protected]>Signed-off-by Chris Packham <[email protected]>---
Review
Quoted 7 lines
Changes in v2:
- expand the comment inconfig.hto provide more infoarch/arm/mach-kirkwood/include/mach/config.h | 6 ++++++ 1 file changed, 6 insertions(+)(quoted diff) +0
-0
b/arch/arm/mach-kirkwood/include/mach/config.harch/arm/mach-kirkwood/include/mach/config.h line 27
Quoted 6 lines
index
fcd903887bff..aea60688c2d3100644arch/arm/mach-kirkwood/include/mach/config.h +0
-0@@ -26,6 +26,12 @@#define CONFIG_KIRKWOOD_EGIGA_INIT /* Enable GbePort0/1 for kernel */ #define CONFIG_KIRKWOOD_RGMII_PAD_1V8 /* Set RGMII Pad voltage to 1.8V */
arch/arm/mach-kirkwood/include/mach/config.h line 28
Quoted 1 line
arch/arm/mach-kirkwood/include/mach/config.h +0
-0#define CONFIG_KIRKWOOD_PCIE_INIT /* Enable PCIE Port0 for kernel */
arch/arm/mach-kirkwood/include/mach/config.h line 34
Quoted 6 lines
arch/arm/mach-kirkwood/include/mach/config.h +6
-0+/* +* Disable the dcache. Currently the network driver (mvgbe.c) and USB +* EHCI driver (ehci-marvell.c) and possibly others rely on the data +* cache being disabled. +*/ +#define CONFIG_SYS_DCACHE_OFF While collecting the queued fixes for the upcoming release, I do have one question regarding this Kirkwood cache issue (I don't have such a board here, so I can't test anything):
Quoted 8 lines
Do we need this patch applied [1], if the patch from this thread is applied [2]?
Thanks,
Stefan[1] http://patchwork.ozlabs.org/patch/1048863/
[2] http://patchwork.ozlabs.org/patch/1057716/
I'm pretty sure you just need [2]. I've tested with just that on it's own and Ethernet works on the kirkwood db. Functionally it's the same change as Michael's just for more boards.
Leigh, can you see if [2] above works for you?
PATCH v2 1/1 ARM: kirkwood: disable dcache for Kirkwood boards
Quoted 51 lines · Chris Packham
On Tue, 19 Mar 2019, 8:39 PM Stefan Roese, <sr at denx.de <mailto:[email protected]>> wrote:
On 18.03.19 08:51, Chris Packham wrote:
> Prior to commit93b283d49f93("ARM: CPU: arm926ejs: Consolidate cache
> routines to common file") the kirkwood boards didn't have and dcache
> support. The network and usb drivers rely on this. Set
>CONFIG_SYS_DCACHE_OFFin the Kirkwood specificconfig.h.
>
> Reported-by: Leigh Brown <leigh at solinno.co.uk <mailto:[email protected]>>
> Signed-off-by: Chris Packham <judge.packham at gmail.com <mailto:[email protected]>> > ---
>
> Changes in v2:
> - expand the comment inconfig.hto provide more info
>
> arch/arm/mach-kirkwood/include/mach/config.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --gita/arch/arm/mach-kirkwood/include/mach/config.hb/arch/arm/mach-kirkwood/include/mach/config.h> indexfcd903887bff..aea60688c2d3100644
> ---a/arch/arm/mach-kirkwood/include/mach/config.h
> +++b/arch/arm/mach-kirkwood/include/mach/config.h
> @@ -26,6 +26,12 @@
> #define CONFIG_KIRKWOOD_EGIGA_INIT /* Enable GbePort0/1 for kernel */
> #define CONFIG_KIRKWOOD_RGMII_PAD_1V8 /* Set RGMII Pad voltage to 1.8V */
> #define CONFIG_KIRKWOOD_PCIE_INIT /* Enable PCIE Port0 for kernel */
> +/*
> + * Disable the dcache. Currently the network driver (mvgbe.c) and USB
> + * EHCI driver (ehci-marvell.c) and possibly others rely on the data
> + * cache being disabled.
> + */
> +#defineCONFIG_SYS_DCACHE_OFFWhile collecting the queued fixes for the upcoming release, I do have one question regarding this Kirkwood cache issue (I don't have such a board here, so I can't test anything):
Do we need this patch applied [1], if the patch from this thread is applied [2]?
Thanks,
Stefan[1] http://patchwork.ozlabs.org/patch/1048863/
[2] http://patchwork.ozlabs.org/patch/1057716/
Quoted 5 lines
I'm pretty sure you just need [2]. I've tested with just that on it's own and Ethernet works on the kirkwood db. Functionally it's the same change as Michael's just for more boards.
Leigh, can you see if [2] above works for you?
Patch [1] from Leigh also removes icache_enable() in arch/arm/mach-kirkwood/cpu.c.
Not sure if this is still needed? Did any of you run into issues with
[1] not applied but with CONFIG_SYS_DCACHE_OFF set?
Thanks,
Stefan
PATCH v2 1/1 ARM: kirkwood: disable dcache for Kirkwood boards
Hi Stefan,
Quoted 69 lines · Stefan Roese
Quoted 68 lines · Chris Packham
On Tue, 19 Mar 2019, 8:39 PM Stefan Roese, <[email protected] <mailto:[email protected]>> wrote:
On 18.03.19 08:51, Chris Packham wrote: > Prior to commit 93b283d49f93 ("ARM: CPU: arm926ejs: Consolidatecache
> routines to common file") the kirkwood boards didn't have and
dcache
> support. The network and usb drivers rely on this. Set >CONFIG_SYS_DCACHE_OFFin the Kirkwood specificconfig.h. >
> Reported-by: Leigh Brown <[email protected]
<mailto:[email protected]>>
> Signed-off-by: Chris Packham <[email protected]
<mailto:[email protected]>>> --- > > Changes in v2: > - expand the comment in config.h to provide more info > > arch/arm/mach-kirkwood/include/mach/config.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm/mach-kirkwood/include/mach/config.h
b/arch/arm/mach-kirkwood/include/mach/config.h
> indexfcd903887bff..aea60688c2d3100644
> ---a/arch/arm/mach-kirkwood/include/mach/config.h> +++b/arch/arm/mach-kirkwood/include/mach/config.h> @@ -26,6 +26,12 @@
> #define CONFIG_KIRKWOOD_EGIGA_INIT /* Enable GbePort0/1 for
kernel */
> #define CONFIG_KIRKWOOD_RGMII_PAD_1V8 /* Set RGMII Pad
voltage to 1.8V */
> #define CONFIG_KIRKWOOD_PCIE_INIT /* Enable PCIE Port0
for kernel */
> +/*
> + * Disable the dcache. Currently the network driver (mvgbe.c)
and USB
> + * EHCI driver (ehci-marvell.c) and possibly others rely on
the data
> + * cache being disabled.
> + */
> +#defineCONFIG_SYS_DCACHE_OFFWhile collecting the queued fixes for the upcoming release, I do have one question regarding this Kirkwood cache issue (I don't
have
such a board here, so I can't test anything):Do we need this patch applied [1], if the patch from this thread
isapplied [2]? Thanks, Stefan [1] http://patchwork.ozlabs.org/patch/1048863/ [2] http://patchwork.ozlabs.org/patch/1057716/I'm pretty sure you just need [2]. I've tested with just that on it's own and Ethernet works on the kirkwood db. Functionally it's the same change as Michael's just for more boards.
Quoted 7 lines
Quoted 1 line
Leigh, can you see if [2] above works for you?
Patch [1] from Leigh also removes
icache_enable()inarch/arm/mach-kirkwood/cpu.c.Not sure if this is still needed? Did any of you run into issues with
[1] not applied but withCONFIG_SYS_DCACHE_OFFset?
When the cache consolidation patch was applied, it added code to enable the
icache much earlier in the process. Therefore, this line of code to enable
it became superfluous (assuming enabling the icache multiple times does nothing).
I'd suggest removing it if you agree with that statement, to reduce possible future confusion.
Quoted 3 lines
Thanks,
Stefan
Regards,
Leigh.
PATCH v2 1/1 ARM: kirkwood: disable dcache for Kirkwood boards
Hi Leigh,
On 19.03.19 10:29, Leigh Brown wrote:
<snip>
Quoted 35 lines
Quoted 20 lines
Quoted 20 lines
While collecting the queued fixes for the upcoming release, I do have one question regarding this Kirkwood cache issue (I don't
have
such a board here, so I can't test anything):Do we need this patch applied [1], if the patch from this thread
isapplied [2]? Thanks, Stefan [1] http://patchwork.ozlabs.org/patch/1048863/ [2] http://patchwork.ozlabs.org/patch/1057716/I'm pretty sure you just need [2]. I've tested with just that on it's own and Ethernet works on the kirkwood db. Functionally it's the same change as Michael's just for more boards.
Quoted 7 lines
Quoted 1 line
Leigh, can you see if [2] above works for you?
Patch [1] from Leigh also removes
icache_enable()inarch/arm/mach-kirkwood/cpu.c.Not sure if this is still needed? Did any of you run into issues with
[1] not applied but withCONFIG_SYS_DCACHE_OFFset?When the cache consolidation patch was applied, it added code to enable the
icache much earlier in the process. Therefore, this line of code to enable
it became superfluous (assuming enabling the icache multiple times does nothing).
Quoted 2 lines
I'd suggest removing it if you agree with that statement, to reduce possible future confusion.
You mean to remove the icache_enable() call in arch/arm/mach-kirkwood/cpu.c? Yes, with your explanation above I agree with it. Unfortunately your patch also sets CONFIG_SYS_DCACHE_OFF for dreamplug which is not needed any more with Chris's generic approach for Kirkwood. Also I find your patch subject:
Commit "ARM: CPU: arm926ejs: Consolidate cache routines to common file" breaks u-boot on Dreamplug
not optimal. Could you please send a new patch with a short subject and a small commit message with the background (icache is enabled earlier in the common code now) to the list? That would be great.
Thanks,
Stefan
PATCH v2 1/1 ARM: kirkwood: disable dcache for Kirkwood boards
In reply to Chris PackhamQuoted 7 lines · Chris Packham
Prior to commit
93b283d49f93("ARM: CPU: arm926ejs: Consolidate cache routines to common file") the kirkwood boards didn't have and dcache support. The network and usb drivers rely on this. SetCONFIG_SYS_DCACHE_OFFin the Kirkwood specificconfig.h.Reported-by Leigh Brown <[email protected]>Signed-off-by Chris Packham <[email protected]>
Applied to u-boot-marvell/master.
Thanks,
Stefan