mx6: Fix cacheline size
Subsystems (2)
PATCH 1/1 mx6: Fix cacheline size
mx6 is an armv7 which has 64-byte cacheline size.
Without this fix we are not able to get the FEC driver to work on mx6solox.
64-byte cacheline is also used by the kernel on ARMv7, so fix it accordingly.
--- arch/arm/include/asm/arch-mx6/imx-regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/include/asm/arch-mx6/imx-regs.h +1 -1
@@ -9,7 +9,7 @@#define ARCH_MXC -#define CONFIG_SYS_CACHELINE_SIZE 32 +#define CONFIG_SYS_CACHELINE_SIZE 64#define ROMCP_ARB_BASE_ADDR 0x00000000#define ROMCP_ARB_END_ADDR 0x000FFFFF
Signature · 1 line
1.9.1
PATCH 1/1 mx6: Fix cacheline size
Quoted 6 lines · Fabio Estevam
mx6 is an armv7 which has 64-byte cacheline size.
Without this fix we are not able to get the FEC driver to work on mx6solox.
64-byte cacheline is also used by the kernel on ARMv7, so fix it accordingly.
It's not a kernel thing, it's architecture thing. Otherwise,
Best regards,
Marek Vasut
Fabio Estevam
reviewerPATCH 1/1 mx6: Fix cacheline size
Quoted 11 lines · Marek Vasut
Quoted 6 lines · Fabio Estevam
mx6 is an armv7 which has 64-byte cacheline size.
Without this fix we are not able to get the FEC driver to work on mx6solox.
64-byte cacheline is also used by the kernel on ARMv7, so fix it accordingly.
It's not a kernel thing, it's architecture thing. Otherwise,
Acked-by Marek Vasut <[email protected]>
Yes, I mentioned the kernel just to provide an example.
Maybe Stefano could remove this last sentence from the commit log when applying it, if he is happy with it, of course. Or I can send a v2 without it.
Regards,
Fabio Estevam
Fabio Estevam
reviewerPATCH 1/1 mx6: Fix cacheline size
In reply to Marek VasutQuoted 11 lines · Marek Vasut
Quoted 6 lines · Fabio Estevam
mx6 is an armv7 which has 64-byte cacheline size.
Without this fix we are not able to get the FEC driver to work on mx6solox.
64-byte cacheline is also used by the kernel on ARMv7, so fix it accordingly.
It's not a kernel thing, it's architecture thing. Otherwise,
Acked-by Marek Vasut <[email protected]>
Actually the CortexA9 manual says:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0388f/Caccifbd.html
"The cache line length is eight words."
and the mx6q RM says:
12.5.4.1 L1 features
....
? Eight 32-bit words per cache line
So the current CONFIG_SYS_CACHELINE_SIZE of 32 is correct for mx6.
In kernel we use 64-bytes of cache line for armv7 though:
config ARM_L1_CACHE_SHIFT_6
bool
default y if CPU_V7
help
Setting ARM L1 cache line size to 64 Bytes.
PATCH 1/1 mx6: Fix cacheline size
Hi Fabio,
Quoted 18 lines · Fabio Estevam
Quoted 11 lines · Marek Vasut
Quoted 6 lines · Fabio Estevam
mx6 is an armv7 which has 64-byte cacheline size.
Without this fix we are not able to get the FEC driver to work on mx6solox.
64-byte cacheline is also used by the kernel on ARMv7, so fix it accordingly.
It's not a kernel thing, it's architecture thing. Otherwise,
Acked-by Marek Vasut <[email protected]>Actually the CortexA9 manual says:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0388f/Caccifbd.html"The cache line length is eight words."
Quoted 7 lines
and the mx6q RM says:
12.5.4.1 L1 features
....
? Eight 32-bit words per cache lineSo the current
CONFIG_SYS_CACHELINE_SIZEof 32 is correct for mx6.
Yes, it's always 32 bytes for Cortex-A9. But does mx6solox really have a standard Cortex-A9 core like all the currently released i.MX6 SoCs (which seems to be the case according to
http://lwn.net/Articles/598434/), or a Cortex-A9 implementation with non-standard parameters tuned by Freescale, or even another core like a Cortex-A8?
Quoted 7 lines
In kernel we use 64-bytes of cache line for armv7 though:
config
ARM_L1_CACHE_SHIFT_6
bool
default y ifCPU_V7
help
Setting ARM L1 cache line size to 64 Bytes.
This seems to be used only for alignments, and stuff aligned with 64 bytes is also aligned with 32 bytes, so this should not matter. However, [1] reads the cache line size from the registers, and it does not use this constant.
Regards,
Beno?t
Fabio Estevam
reviewerPATCH 1/1 mx6: Fix cacheline size
Hi Beno?t,
Quoted 6 lines · Beno?t Th?baudeau
Yes, it's always 32 bytes for Cortex-A9. But does mx6solox really have a standard Cortex-A9 core like all the currently released i.MX6 SoCs (which seems to be the case according to
http://lwn.net/Articles/598434/), or a Cortex-A9 implementation with non-standard parameters tuned by Freescale, or even another core like a Cortex-A8?
It is a Cortex-A9 on mx6solox (there is also a Cortex-M4) and its manual also states 32 bytes of cache line.
I am trying to get more information about the 64-bit alignment requirement on FEC RX DMA.
Regards,
Fabio Estevam