linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: Add Cortex A5 proc_info
@ 2011-05-17 16:49 Pawel Moll
  2011-05-18  9:47 ` Pawel Moll
  0 siblings, 1 reply; 14+ messages in thread
From: Pawel Moll @ 2011-05-17 16:49 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds processor info for Cortex A5 (MPCore).

Sadly it's just a clone of A9, but it's impossible to simply
extend the ID mask to cover all ARM Ltd. originating v7
implementations as A15 have slightly different SCU
initialization procedure.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
---
 arch/arm/mm/proc-v7.S |   43 +++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index babfba0..5808d14 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -270,11 +270,15 @@ cpu_resume_l1_flags:
  *	Harvard cache control instructions insead of the unified cache
  *	control instructions.
  *
- *	This should be able to cover all ARMv7 cores.
+ *	This should be able to cover all ARMv7 cores. Some MPCore
+ *	implementations require additional code when SMP is to be
+ *	enabled to activate Snoop Control Unit - this is done prior
+ *	to the __v7_setup.
  *
  *	It is assumed that:
  *	- cache type register is implemented
  */
+__v7_ca5mp_setup:
 __v7_ca9mp_setup:
 #ifdef CONFIG_SMP
 	ALT_SMP(mrc	p15, 0, r0, c1, c0, 1)
@@ -436,6 +440,41 @@ cpu_elf_name:
 
 	.section ".proc.info.init", #alloc, #execinstr
 
+	/*
+	 * Match Cortex A5 MPcore
+	 */
+	.type   __v7_ca5mp_proc_info, #object
+__v7_ca5mp_proc_info:
+	.long	0x410fc050		@ Required ID value
+	.long	0xff0ffff0		@ Mask for ID
+	ALT_SMP(.long \
+		PMD_TYPE_SECT | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ | \
+		PMD_FLAGS_SMP)
+	ALT_UP(.long \
+		PMD_TYPE_SECT | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ | \
+		PMD_FLAGS_UP)
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_XN | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
+	W(b)	__v7_ca5mp_setup
+	.long	cpu_arch_name
+	.long	cpu_elf_name
+	.long	HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_TLS
+	.long	cpu_v7_name
+	.long	v7_processor_functions
+	.long	v7wbi_tlb_fns
+	.long	v6_user_fns
+	.long	v7_cache_fns
+	.size	__v7_ca5mp_proc_info, . - __v7_ca5mp_proc_info
+
+	/*
+	 * Match Cortex A9 MPcore
+	 */
 	.type   __v7_ca9mp_proc_info, #object
 __v7_ca9mp_proc_info:
 	.long	0x410fc090		@ Required ID value
@@ -466,7 +505,7 @@ __v7_ca9mp_proc_info:
 	.size	__v7_ca9mp_proc_info, . - __v7_ca9mp_proc_info
 
 	/*
-	 * Match any ARMv7 processor core.
+	 * Match any other ARMv7 processor core.
 	 */
 	.type	__v7_proc_info, #object
 __v7_proc_info:
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-05-20 14:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-17 16:49 [PATCH] arm: Add Cortex A5 proc_info Pawel Moll
2011-05-18  9:47 ` Pawel Moll
2011-05-18 10:53   ` Dave Martin
2011-05-18 12:06     ` Pawel Moll
2011-05-18 16:44       ` [PATCH v2] arm: Add Cortex A5 proc info Pawel Moll
2011-05-19 14:10         ` Will Deacon
2011-05-19 15:31           ` Pawel Moll
2011-05-19 16:08             ` Dave Martin
2011-05-20  9:14               ` Will Deacon
2011-05-20 11:51               ` Pawel Moll
2011-05-20 13:39                 ` [PATCH v3 1/2] arm: Convert v7 proc infos into a common macro Pawel Moll
2011-05-20 13:39                   ` [PATCH v3 2/2] arm: Add Cortex A5 proc info Pawel Moll
2011-05-20 14:32                     ` Will Deacon
2011-05-20 14:31                   ` [PATCH v3 1/2] arm: Convert v7 proc infos into a common macro Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).