All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] AT91: at91sam9g10 chip identification changed
@ 2010-04-01  9:48 ` Nicolas Ferre
  0 siblings, 0 replies; 12+ messages in thread
From: Nicolas Ferre @ 2010-04-01  9:48 UTC (permalink / raw)
  To: linux-arm-kernel, avictor.za; +Cc: linux-kernel, Nicolas Ferre

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


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

* [PATCH] AT91: at91sam9g10 chip identification changed
@ 2010-04-01  9:48 ` Nicolas Ferre
  0 siblings, 0 replies; 12+ messages in thread
From: Nicolas Ferre @ 2010-04-01  9:48 UTC (permalink / raw)
  To: linux-arm-kernel

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

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

* Re: [PATCH] AT91: at91sam9g10 chip identification changed
  2010-04-01  9:48 ` Nicolas Ferre
@ 2010-04-12 18:44   ` Russell King - ARM Linux
  -1 siblings, 0 replies; 12+ messages in thread
From: Russell King - ARM Linux @ 2010-04-12 18:44 UTC (permalink / raw)
  To: Nicolas Ferre; +Cc: linux-arm-kernel, avictor.za, linux-kernel

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 <nicolas.ferre@atmel.com>

An ack from Andrew would be nice to have.

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

* [PATCH] AT91: at91sam9g10 chip identification changed
@ 2010-04-12 18:44   ` Russell King - ARM Linux
  0 siblings, 0 replies; 12+ messages in thread
From: Russell King - ARM Linux @ 2010-04-12 18:44 UTC (permalink / raw)
  To: linux-arm-kernel

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 <nicolas.ferre@atmel.com>

An ack from Andrew would be nice to have.

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

* Re: [PATCH] AT91: at91sam9g10 chip identification changed
  2010-04-01  9:48 ` Nicolas Ferre
@ 2010-04-13  7:42   ` Andrew Victor
  -1 siblings, 0 replies; 12+ messages in thread
From: Andrew Victor @ 2010-04-13  7:42 UTC (permalink / raw)
  To: Nicolas Ferre; +Cc: linux-arm-kernel, linux-kernel

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

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

* [PATCH] AT91: at91sam9g10 chip identification changed
@ 2010-04-13  7:42   ` Andrew Victor
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew Victor @ 2010-04-13  7:42 UTC (permalink / raw)
  To: linux-arm-kernel

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

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

* Re: [PATCH] AT91: at91sam9g10 chip identification changed
  2010-04-13  7:42   ` Andrew Victor
@ 2010-04-14  8:14     ` Nicolas Ferre
  -1 siblings, 0 replies; 12+ messages in thread
From: Nicolas Ferre @ 2010-04-14  8:14 UTC (permalink / raw)
  To: Andrew Victor; +Cc: linux-arm-kernel, linux-kernel

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


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

* [PATCH] AT91: at91sam9g10 chip identification changed
@ 2010-04-14  8:14     ` Nicolas Ferre
  0 siblings, 0 replies; 12+ messages in thread
From: Nicolas Ferre @ 2010-04-14  8:14 UTC (permalink / raw)
  To: linux-arm-kernel

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

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

* Re: [PATCH] AT91: at91sam9g10 chip identification changed
  2010-04-14  8:14     ` Nicolas Ferre
@ 2010-04-14 15:01       ` Andrew Victor
  -1 siblings, 0 replies; 12+ messages in thread
From: Andrew Victor @ 2010-04-14 15:01 UTC (permalink / raw)
  To: Nicolas Ferre; +Cc: linux-arm-kernel, linux-kernel

hi Nicolas,

> I do not think it is a good idea:

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

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

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

* [PATCH] AT91: at91sam9g10 chip identification changed
@ 2010-04-14 15:01       ` Andrew Victor
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew Victor @ 2010-04-14 15:01 UTC (permalink / raw)
  To: linux-arm-kernel

hi Nicolas,

> I do not think it is a good idea:

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

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

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

* Re: [PATCH] AT91: at91sam9g10 chip identification changed
  2010-04-14 15:01       ` Andrew Victor
@ 2010-04-14 15:40         ` Nicolas Ferre
  -1 siblings, 0 replies; 12+ messages in thread
From: Nicolas Ferre @ 2010-04-14 15:40 UTC (permalink / raw)
  To: Andrew Victor; +Cc: linux-arm-kernel, linux-kernel

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 <linux@maxim.org.za>

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


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

* [PATCH] AT91: at91sam9g10 chip identification changed
@ 2010-04-14 15:40         ` Nicolas Ferre
  0 siblings, 0 replies; 12+ messages in thread
From: Nicolas Ferre @ 2010-04-14 15:40 UTC (permalink / raw)
  To: linux-arm-kernel

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 <linux@maxim.org.za>

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

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

end of thread, other threads:[~2010-04-14 15:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-01  9:48 [PATCH] AT91: at91sam9g10 chip identification changed Nicolas Ferre
2010-04-01  9:48 ` Nicolas Ferre
2010-04-12 18:44 ` Russell King - ARM Linux
2010-04-12 18:44   ` Russell King - ARM Linux
2010-04-13  7:42 ` Andrew Victor
2010-04-13  7:42   ` Andrew Victor
2010-04-14  8:14   ` Nicolas Ferre
2010-04-14  8:14     ` Nicolas Ferre
2010-04-14 15:01     ` Andrew Victor
2010-04-14 15:01       ` Andrew Victor
2010-04-14 15:40       ` Nicolas Ferre
2010-04-14 15:40         ` Nicolas Ferre

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.