Re: [PATCH] AT91: at91sam9g10 chip identification changed

Previous thread: Re: [PATCH 12/24] media/video: fix dangling pointers by Hans Verkuil on Thursday, April 1, 2010 - 1:32 am. (1 message)

Next thread: [PATCH 1/2] KVM MMU: cleanup/fix mmu audit code by Xiao Guangrong on Thursday, April 1, 2010 - 1:50 am. (4 messages)
From: Nicolas Ferre
Date: Thursday, April 1, 2010 - 2:48 am

A bit in the at91sam9g10 identification number changed between Engineering
Sample and final product. This patch will identify both as being at91sam9g10.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 arch/arm/mach-at91/include/mach/cpu.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h
index 5a06501..833659d 100644
--- a/arch/arm/mach-at91/include/mach/cpu.h
+++ b/arch/arm/mach-at91/include/mach/cpu.h
@@ -21,7 +21,7 @@
 #define ARCH_ID_AT91SAM9260	0x019803a0
 #define ARCH_ID_AT91SAM9261	0x019703a0
 #define ARCH_ID_AT91SAM9263	0x019607a0
-#define ARCH_ID_AT91SAM9G10	0x819903a0
+#define ARCH_ID_AT91SAM9G10	0x019903a0
 #define ARCH_ID_AT91SAM9G20	0x019905a0
 #define ARCH_ID_AT91SAM9RL64	0x019b03a0
 #define ARCH_ID_AT91SAM9G45	0x819b05a0
@@ -108,7 +108,7 @@ static inline unsigned long at91cap9_rev_identify(void)
 #endif
 
 #ifdef CONFIG_ARCH_AT91SAM9G10
-#define cpu_is_at91sam9g10()	(at91_cpu_identify() == ARCH_ID_AT91SAM9G10)
+#define cpu_is_at91sam9g10()	((at91_cpu_identify() & ~AT91_CIDR_EXT)	== ARCH_ID_AT91SAM9G10)
 #else
 #define cpu_is_at91sam9g10()	(0)
 #endif
-- 
1.5.6.5

--

From: Russell King - ARM Linux
Date: Monday, April 12, 2010 - 11:44 am

An ack from Andrew would be nice to have.
--

From: Andrew Victor
Date: Tuesday, April 13, 2010 - 12:42 am

Wouldn't it be better to just mask out the AT91_CIDR_EXT bit in
at91_cpu_identify()?
That bit isn't really useful for "version" information.

We'd then just need to modify:
  #define ARCH_ID_AT91SAM9G10          0x019903a0
  #define ARCH_ID_AT91SAM9G45          0x019b05a0
  #define ARCH_ID_AT91SAM9G45MRL  0x019b05a2      /* aka 9G45-ES2 &
non ES lots */
  #define ARCH_ID_AT91SAM9G45ES     0x019b05a1      /* 9G45-ES
(Engineering Sample) */
(ie, drop bit AT91_CIDR_EXT)


Regards,
  Andrew Victor
--

From: Nicolas Ferre
Date: Wednesday, April 14, 2010 - 1:14 am

I do not think it is a good idea:
1/ a little issue appears with AT91SAM9G45ES that is using the
at91_cpu_fully_identify() functions.
2/ we do not exclude raising the extended bit after a chip has been
created to introduce a variant of this chip. If we mask out the
AT91_CIDR_EXT bit in at91_cpu_identify() we will not be able to identify
this new variant as being different from the original chip.

Best regards,
-- 
Nicolas Ferre

--

From: Andrew Victor
Date: Wednesday, April 14, 2010 - 8:01 am

Ok.  Then we'll go with your original patch.

 Acked-by: Andrew Victor <linux@maxim.org.za>
--

From: Nicolas Ferre
Date: Wednesday, April 14, 2010 - 8:40 am

Queued in patch tracking system as 6056/1:

http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=6056/1

Thanks, bye,
-- 
Nicolas Ferre

--

Previous thread: Re: [PATCH 12/24] media/video: fix dangling pointers by Hans Verkuil on Thursday, April 1, 2010 - 1:32 am. (1 message)

Next thread: [PATCH 1/2] KVM MMU: cleanup/fix mmu audit code by Xiao Guangrong on Thursday, April 1, 2010 - 1:50 am. (4 messages)