[PATCH 04/20] ARM: move ARM_CPU_PART_* defines to header
Sascha Hauer
s.hauer at pengutronix.de
Fri Nov 29 03:44:19 PST 2024
Move the ARM_CPU_PART_* defines to arch/arm/include/asm/cputype.h where
they are located in Linux as well so they become reusable by other code.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/cpu/cpuinfo.c | 11 +----------
arch/arm/include/asm/cputype.h | 11 +++++++++++
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/arch/arm/cpu/cpuinfo.c b/arch/arm/cpu/cpuinfo.c
index 7dca57248b..3137b9924f 100644
--- a/arch/arm/cpu/cpuinfo.c
+++ b/arch/arm/cpu/cpuinfo.c
@@ -10,6 +10,7 @@
#include <memory.h>
#include <asm/system.h>
#include <asm/barebox-arm.h>
+#include <asm/cputype.h>
#define CPU_ARCH_UNKNOWN 0
#define CPU_ARCH_ARMv3 1
@@ -23,16 +24,6 @@
#define CPU_ARCH_ARMv7 9
#define CPU_ARCH_ARMv8 10
-#define ARM_CPU_PART_CORTEX_A5 0xC050
-#define ARM_CPU_PART_CORTEX_A7 0xC070
-#define ARM_CPU_PART_CORTEX_A8 0xC080
-#define ARM_CPU_PART_CORTEX_A9 0xC090
-#define ARM_CPU_PART_CORTEX_A15 0xC0F0
-#define ARM_CPU_PART_CORTEX_A53 0xD030
-#define ARM_CPU_PART_CORTEX_A55 0xD050
-#define ARM_CPU_PART_CORTEX_A57 0xD070
-#define ARM_CPU_PART_CORTEX_A72 0xD080
-
static void decode_cache(unsigned long size)
{
int linelen = 1 << ((size & 0x3) + 3);
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
index c3fc057650..38012fb1ec 100644
--- a/arch/arm/include/asm/cputype.h
+++ b/arch/arm/include/asm/cputype.h
@@ -117,4 +117,15 @@ static inline int cpu_is_xsc3(void)
#define cpu_is_xscale() 1
#endif
+#define ARM_CPU_PART_CORTEX_A5 0xC050
+#define ARM_CPU_PART_CORTEX_A7 0xC070
+#define ARM_CPU_PART_CORTEX_A8 0xC080
+#define ARM_CPU_PART_CORTEX_A9 0xC090
+#define ARM_CPU_PART_CORTEX_A15 0xC0F0
+#define ARM_CPU_PART_CORTEX_A53 0xD030
+#define ARM_CPU_PART_CORTEX_A55 0xD050
+#define ARM_CPU_PART_CORTEX_A57 0xD070
+#define ARM_CPU_PART_CORTEX_A72 0xD080
+#define ARM_CPU_PART_CORTEX_R5 0xc150
+
#endif
--
2.39.5
More information about the barebox
mailing list