diff mbox series

[03/16] mips: mtmips: add predefined i-cache/d-cache size and linesize

Message ID 1578452463-6796-1-git-send-email-weijie.gao@mediatek.com
State Superseded
Delegated to: Daniel Schwierzeck
Headers show
Series [01/16] configs: mtmips: add missing board selection for gardena-smart-gateway-mt7688 | expand

Commit Message

Weijie Gao (高惟杰) Jan. 8, 2020, 3:01 a.m. UTC
Both mt7620 and mt7628 has the same cache configuration. There is no need
to use CONFIG_SYS_CACHE_SIZE_AUTO to probe it at runtime.

Add them into Kconfig to reduce some code size.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
 arch/mips/mach-mtmips/Kconfig | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Stefan Roese Jan. 10, 2020, 2:05 p.m. UTC | #1
On 08.01.20 04:01, Weijie Gao wrote:
> Both mt7620 and mt7628 has the same cache configuration. There is no need
> to use CONFIG_SYS_CACHE_SIZE_AUTO to probe it at runtime.
> 
> Add them into Kconfig to reduce some code size.
> 
> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan
diff mbox series

Patch

diff --git a/arch/mips/mach-mtmips/Kconfig b/arch/mips/mach-mtmips/Kconfig
index c8dcf19c0d..8e10719b27 100644
--- a/arch/mips/mach-mtmips/Kconfig
+++ b/arch/mips/mach-mtmips/Kconfig
@@ -7,6 +7,18 @@  config SYS_MALLOC_F_LEN
 config SYS_SOC
 	default "mt7628" if SOC_MT7628
 
+config SYS_DCACHE_SIZE
+	default 32768
+
+config SYS_DCACHE_LINE_SIZE
+	default 32
+
+config SYS_ICACHE_SIZE
+	default 65536
+
+config SYS_ICACHE_LINE_SIZE
+	default 32
+
 choice
 	prompt "MediaTek MIPS SoC select"