]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
arc: add more flavours of ARC700 series CPU
authorAlexey Brodkin <abrodkin@synopsys.com>
Tue, 3 Feb 2015 10:58:11 +0000 (13:58 +0300)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 10:59:15 +0000 (12:59 +0200)
Now we may select a particular version of ARC700:
 * ARC750D or
 * ARC770D

It allows more flexible (or more fine tuned) configuration of U-Boot.
Before that change we relied on minimal configuration but now we may
use specific features of each CPU.

Moreover allows us to escape manual selection of options that
exist in both CPUs but may have say different version like MMUv2 in
ARC750D vs MMUv3 in ARC770D.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
arch/arc/Kconfig
arch/arc/config.mk
arch/arc/include/asm/arcregs.h
arch/arc/include/asm/cache.h
include/configs/arcangel4-be.h
include/configs/arcangel4.h
include/configs/axs101.h
include/configs/tb100.h

index c6b1efeb8bf9acb06a8cb66a79a8733c1468ccf3..f7d29641441409c7610eddc07980e22d1eddb329 100644 (file)
@@ -7,6 +7,46 @@ config SYS_ARCH
 config SYS_CPU
        default "arcv1"
 
+choice
+       prompt "CPU selection"
+       default CPU_ARC770D
+
+config CPU_ARC750D
+       bool "ARC 750D"
+       select ARC_MMU_V2
+       help
+         Choose this option to build an U-Boot for ARC750D CPU.
+
+config CPU_ARC770D
+       bool "ARC 770D"
+       select ARC_MMU_V3
+       help
+         Choose this option to build an U-Boot for ARC770D CPU.
+
+endchoice
+
+choice
+       prompt "MMU Version"
+       default ARC_MMU_V3 if CPU_ARC770D
+       default ARC_MMU_V2 if CPU_ARC750D
+
+config ARC_MMU_V2
+       bool "MMU v2"
+       depends on CPU_ARC750D
+       help
+         Fixed the deficiency of v1 - possible thrashing in memcpy sceanrio
+         when 2 D-TLB and 1 I-TLB entries index into same 2way set.
+
+config ARC_MMU_V3
+       bool "MMU v3"
+       depends on CPU_ARC770D
+       help
+         Introduced with ARC700 4.10: New Features
+         Variable Page size (1k-16k), var JTLB size 128 x (2 or 4)
+         Shared Address Spaces (SASID)
+
+endchoice
+
 choice
        prompt "Target select"
 
index 5321987a566387ffcaeae4c0d51dfa8801f75351..dd180ef1874f57a5271e705418322604d178670c 100644 (file)
@@ -25,6 +25,10 @@ ifdef CONFIG_ARC_MMU_VER
 CONFIG_MMU = 1
 endif
 
+ifdef CONFIG_CPU_ARC770D
+PLATFORM_CPPFLAGS += -mlock -mswape
+endif
+
 PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2
 
 # Needed for relocation
index 8ace87fa0f25953a910161c8c9eaf4e845822b9f..31627e65b93837cefd9d5f2904f5cada3401f535 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef _ASM_ARC_ARCREGS_H
 #define _ASM_ARC_ARCREGS_H
 
+#include <asm/cache.h>
+
 /*
  * ARC architecture has additional address space - auxiliary registers.
  * These registers are mostly used for configuration purposes.
index 16e7568ef04bed4f7d51a19dbc269e4d3b950252..368d1f016ec9d1adbe14b521c28a6fc4ad795e2e 100644 (file)
 #define ARCH_DMA_MINALIGN      128
 #endif
 
+#if defined(CONFIG_ARC_MMU_V2)
+#define CONFIG_ARC_MMU_VER 2
+#elif defined(CONFIG_ARC_MMU_V3)
+#define CONFIG_ARC_MMU_VER 3
+#endif
+
 #endif /* __ASM_ARC_CACHE_H */
index 2ca209e1e456a0f7e1eae93bcf4225aa563124d0..a43590bef5e9049a65b6efc8b56725d6d90cdb7a 100644 (file)
@@ -11,7 +11,6 @@
  *  CPU configuration
  */
 #define CONFIG_SYS_BIG_ENDIAN
-#define CONFIG_ARC_MMU_VER             3
 #define CONFIG_SYS_CACHELINE_SIZE      64
 #define CONFIG_SYS_TIMER_RATE          CONFIG_SYS_CLK_FREQ
 
index 2afb63d80d4d96d1daebcc2068e9ab01e33dba98..565f70e165e84d082f9305b91d91d29de72dbc97 100644 (file)
@@ -10,7 +10,6 @@
 /*
  *  CPU configuration
  */
-#define CONFIG_ARC_MMU_VER             3
 #define CONFIG_SYS_CACHELINE_SIZE      64
 #define CONFIG_SYS_TIMER_RATE          CONFIG_SYS_CLK_FREQ
 
index a8a9cb3cbab5d071b0094da3aa5106b929014f27..b94687c230cb1e94512dba750a2efce2cbd73e3d 100644 (file)
@@ -10,7 +10,6 @@
 /*
  *  CPU configuration
  */
-#define CONFIG_ARC_MMU_VER             3
 #define CONFIG_SYS_CACHELINE_SIZE      32
 #define CONFIG_SYS_TIMER_RATE          CONFIG_SYS_CLK_FREQ
 
index a59834383a73fa931843d4a6e6b03cbe006512d9..f3539506c2a148480eb2fd388f12540ea28e3443 100644 (file)
@@ -12,7 +12,6 @@
 /*
  *  CPU configuration
  */
-#define CONFIG_ARC_MMU_VER             3
 #define CONFIG_SYS_CACHELINE_SIZE      32
 #define CONFIG_SYS_TIMER_RATE          CONFIG_SYS_CLK_FREQ