public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: at91: Change the Chip ID registers' addresses
@ 2015-09-08  6:38 Wenyou Yang
  2015-10-23 21:10 ` Andreas Bießmann
  2015-11-03 13:22 ` [U-Boot] " Andreas Bießmann
  0 siblings, 2 replies; 4+ messages in thread
From: Wenyou Yang @ 2015-09-08  6:38 UTC (permalink / raw)
  To: u-boot

Provide the specific addresses for the Chip ID and Chip ID Extension
registers, instead of the offset, which make it use on other chips.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---

 arch/arm/mach-at91/armv7/cpu.c             |    7 ++++---
 arch/arm/mach-at91/include/mach/at91_dbu.h |    4 ----
 arch/arm/mach-at91/include/mach/sama5d3.h  |    3 +++
 arch/arm/mach-at91/include/mach/sama5d4.h  |    3 +++
 4 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-at91/armv7/cpu.c b/arch/arm/mach-at91/armv7/cpu.c
index 8d86f97..7843aed 100644
--- a/arch/arm/mach-at91/armv7/cpu.c
+++ b/arch/arm/mach-at91/armv7/cpu.c
@@ -12,7 +12,6 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
-#include <asm/arch/at91_dbu.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/arch/at91_pit.h>
 #include <asm/arch/at91_gpbr.h>
@@ -65,12 +64,14 @@ void enable_caches(void)
 	dcache_enable();
 }
 
+#define ATMEL_CHIPID_CIDR_VERSION	0x1f
+
 unsigned int get_chip_id(void)
 {
-	return readl(ATMEL_BASE_DBGU + AT91_DBU_CIDR) & ~AT91_DBU_CIDR_MASK;
+	return readl(ATMEL_CHIPID_CIDR) & ~ATMEL_CHIPID_CIDR_VERSION;
 }
 
 unsigned int get_extension_chip_id(void)
 {
-	return readl(ATMEL_BASE_DBGU + AT91_DBU_EXID);
+	return readl(ATMEL_CHIPID_EXID);
 }
diff --git a/arch/arm/mach-at91/include/mach/at91_dbu.h b/arch/arm/mach-at91/include/mach/at91_dbu.h
index 7346fc0..3181138 100644
--- a/arch/arm/mach-at91/include/mach/at91_dbu.h
+++ b/arch/arm/mach-at91/include/mach/at91_dbu.h
@@ -35,8 +35,4 @@ typedef struct at91_dbu {
 #define AT91_DBU_CID_ARCH_9xx		0x01900000
 #define AT91_DBU_CID_ARCH_9XExx	0x02900000
 
-#define AT91_DBU_CIDR_MASK		0x1f
-#define AT91_DBU_CIDR			0x40
-#define AT91_DBU_EXID			0x44
-
 #endif
diff --git a/arch/arm/mach-at91/include/mach/sama5d3.h b/arch/arm/mach-at91/include/mach/sama5d3.h
index b749cb3..33f6c97 100644
--- a/arch/arm/mach-at91/include/mach/sama5d3.h
+++ b/arch/arm/mach-at91/include/mach/sama5d3.h
@@ -158,6 +158,9 @@
 #define ATMEL_BASE_RTC		0xfffffeb0
 /* Reserved:	0xfffffee0 - 0xffffffff */
 
+#define ATMEL_CHIPID_CIDR	0xffffee40
+#define ATMEL_CHIPID_EXID	0xffffee44
+
 /*
  * Internal Memory.
  */
diff --git a/arch/arm/mach-at91/include/mach/sama5d4.h b/arch/arm/mach-at91/include/mach/sama5d4.h
index 7773ace..3da8aff 100644
--- a/arch/arm/mach-at91/include/mach/sama5d4.h
+++ b/arch/arm/mach-at91/include/mach/sama5d4.h
@@ -144,6 +144,9 @@
 #define ATMEL_BASE_PIOE		0xfc06d000
 #define ATMEL_BASE_AIC		0xfc06e000
 
+#define ATMEL_CHIPID_CIDR	0xfc069040
+#define ATMEL_CHIPID_EXID	0xfc069044
+
 /*
  * Internal Memory.
  */
-- 
1.7.9.5

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

* [U-Boot] [PATCH] arm: at91: Change the Chip ID registers' addresses
  2015-09-08  6:38 [U-Boot] [PATCH] arm: at91: Change the Chip ID registers' addresses Wenyou Yang
@ 2015-10-23 21:10 ` Andreas Bießmann
  2015-10-27  1:22   ` Yang, Wenyou
  2015-11-03 13:22 ` [U-Boot] " Andreas Bießmann
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Bießmann @ 2015-10-23 21:10 UTC (permalink / raw)
  To: u-boot



On 08.09.15 08:38, Wenyou Yang wrote:
> Provide the specific addresses for the Chip ID and Chip ID Extension
> registers, instead of the offset, which make it use on other chips.
> 
> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>

Reviewed-by: Andreas Bie?mann <andreas.devel@googlemail.com>
> ---
> 
>  arch/arm/mach-at91/armv7/cpu.c             |    7 ++++---
>  arch/arm/mach-at91/include/mach/at91_dbu.h |    4 ----
>  arch/arm/mach-at91/include/mach/sama5d3.h  |    3 +++
>  arch/arm/mach-at91/include/mach/sama5d4.h  |    3 +++
>  4 files changed, 10 insertions(+), 7 deletions(-)

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

* [U-Boot] [PATCH] arm: at91: Change the Chip ID registers' addresses
  2015-10-23 21:10 ` Andreas Bießmann
@ 2015-10-27  1:22   ` Yang, Wenyou
  0 siblings, 0 replies; 4+ messages in thread
From: Yang, Wenyou @ 2015-10-27  1:22 UTC (permalink / raw)
  To: u-boot



> -----Original Message-----
> From: Andreas Bie?mann [mailto:andreas.devel at googlemail.com]
> Sent: 2015?10?24? 5:11
> To: Yang, Wenyou; U-Boot Mailing List
> Subject: Re: [PATCH] arm: at91: Change the Chip ID registers' addresses
> 
> 
> 
> On 08.09.15 08:38, Wenyou Yang wrote:
> > Provide the specific addresses for the Chip ID and Chip ID Extension
> > registers, instead of the offset, which make it use on other chips.
> >
> > Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> 
> Reviewed-by: Andreas Bie?mann <andreas.devel@googlemail.com>
Thanks


Best Regards,
Wenyou Yang

> > ---
> >
> >  arch/arm/mach-at91/armv7/cpu.c             |    7 ++++---
> >  arch/arm/mach-at91/include/mach/at91_dbu.h |    4 ----
> >  arch/arm/mach-at91/include/mach/sama5d3.h  |    3 +++
> >  arch/arm/mach-at91/include/mach/sama5d4.h  |    3 +++
> >  4 files changed, 10 insertions(+), 7 deletions(-)

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

* [U-Boot] arm: at91: Change the Chip ID registers' addresses
  2015-09-08  6:38 [U-Boot] [PATCH] arm: at91: Change the Chip ID registers' addresses Wenyou Yang
  2015-10-23 21:10 ` Andreas Bießmann
@ 2015-11-03 13:22 ` Andreas Bießmann
  1 sibling, 0 replies; 4+ messages in thread
From: Andreas Bießmann @ 2015-11-03 13:22 UTC (permalink / raw)
  To: u-boot

Dear Wenyou Yang,

Wenyou Yang <wenyou.yang@atmel.com> writes:
>Provide the specific addresses for the Chip ID and Chip ID Extension
>registers, instead of the offset, which make it use on other chips.
>
>Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
>Reviewed-by: Andreas Bie?mann <andreas.devel@googlemail.com>
>---
>
> arch/arm/mach-at91/armv7/cpu.c             |    7 ++++---
> arch/arm/mach-at91/include/mach/at91_dbu.h |    4 ----
> arch/arm/mach-at91/include/mach/sama5d3.h  |    3 +++
> arch/arm/mach-at91/include/mach/sama5d4.h  |    3 +++
> 4 files changed, 10 insertions(+), 7 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bie?mann

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

end of thread, other threads:[~2015-11-03 13:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-08  6:38 [U-Boot] [PATCH] arm: at91: Change the Chip ID registers' addresses Wenyou Yang
2015-10-23 21:10 ` Andreas Bießmann
2015-10-27  1:22   ` Yang, Wenyou
2015-11-03 13:22 ` [U-Boot] " Andreas Bießmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox