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 <[email protected]>
---
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
On Thu, Apr 01, 2010 at 11:48:56AM +0200, Nicolas Ferre wrote:
> 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 <[email protected]>
An ack from Andrew would be nice to have.
hi Nicolas,
> A bit in the at91sam9g10 identification number changed between Engineering
> Sample and final product. This patch will identify both as being at91sam9g10.
> -#define ARCH_ID_AT91SAM9G10 ? ?0x819903a0
> +#define ARCH_ID_AT91SAM9G10 ? ?0x019903a0
> -#define cpu_is_at91sam9g10() ? (at91_cpu_identify() == ARCH_ID_AT91SAM9G10)
> +#define cpu_is_at91sam9g10() ? ((at91_cpu_identify() & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10)
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
Le 13/04/2010 09:42, Andrew Victor :
> hi Nicolas,
>
>> A bit in the at91sam9g10 identification number changed between Engineering
>> Sample and final product. This patch will identify both as being at91sam9g10.
>
>> -#define ARCH_ID_AT91SAM9G10 0x819903a0
>> +#define ARCH_ID_AT91SAM9G10 0x019903a0
>
>> -#define cpu_is_at91sam9g10() (at91_cpu_identify() == ARCH_ID_AT91SAM9G10)
>> +#define cpu_is_at91sam9g10() ((at91_cpu_identify() & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10)
>
>
> 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)
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
hi Nicolas,
> I do not think it is a good idea:
Ok. Then we'll go with your original patch.
Acked-by: Andrew Victor <[email protected]>
Le 14/04/2010 17:01, Andrew Victor :
> hi Nicolas,
>
>> I do not think it is a good idea:
>
> Ok. Then we'll go with your original patch.
>
> Acked-by: Andrew Victor <[email protected]>
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