mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: atmel: at91sam9n12: add subtype support
@ 2015-02-05  8:04 Bo Shen
  2015-02-09  7:09 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Bo Shen @ 2015-02-05  8:04 UTC (permalink / raw)
  To: s.hauer, plagnioj; +Cc: barebox

As the at91sam9n12 series includes at91sam9n12, at91sam9cn11,
at91sam9cn12. So, add subtype to distinguish them.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
---

 arch/arm/mach-at91/include/mach/cpu.h |  7 +++++++
 arch/arm/mach-at91/setup.c            | 17 +++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h
index f684d32..def49dc 100644
--- a/arch/arm/mach-at91/include/mach/cpu.h
+++ b/arch/arm/mach-at91/include/mach/cpu.h
@@ -48,6 +48,10 @@
 #define ARCH_EXID_AT91SAM9G25	0x00000003
 #define ARCH_EXID_AT91SAM9X25	0x00000004
 
+#define ARCH_EXID_AT91SAM9N12	0x00000006
+#define ARCH_EXID_AT91SAM9CN11	0x00000009
+#define ARCH_EXID_AT91SAM9CN12	0x00000005
+
 #define ARCH_EXID_SAMA5D3	0x00004300
 #define ARCH_EXID_SAMA5D31	0x00444300
 #define ARCH_EXID_SAMA5D33	0x00414300
@@ -113,6 +117,9 @@ enum at91_soc_subtype {
 	AT91_SOC_SAM9G15, AT91_SOC_SAM9G35, AT91_SOC_SAM9X35,
 	AT91_SOC_SAM9G25, AT91_SOC_SAM9X25,
 
+	/* SAM9N12 */
+	AT91_SOC_SAM9CN11, AT91_SOC_SAM9CN12,
+
 	/* SAMA5D3 */
 	AT91_SOC_SAMA5D31, AT91_SOC_SAMA5D33, AT91_SOC_SAMA5D34,
 	AT91_SOC_SAMA5D35, AT91_SOC_SAMA5D36,
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
index 030b8a2..341979a 100644
--- a/arch/arm/mach-at91/setup.c
+++ b/arch/arm/mach-at91/setup.c
@@ -156,6 +156,20 @@ static void __init soc_detect(u32 dbgu_base)
 		}
 	}
 
+	if (at91_soc_initdata.type == AT91_SOC_SAM9N12) {
+		switch (at91_soc_initdata.exid) {
+		case ARCH_EXID_AT91SAM9N12:
+			at91_soc_initdata.subtype = AT91_SOC_SAM9N12;
+			break;
+		case ARCH_EXID_AT91SAM9CN11:
+			at91_soc_initdata.subtype = AT91_SOC_SAM9CN11;
+			break;
+		case ARCH_EXID_AT91SAM9CN12:
+			at91_soc_initdata.subtype = AT91_SOC_SAM9CN12;
+			break;
+		}
+	}
+
 	if (at91_soc_initdata.type == AT91_SOC_SAMA5D3) {
 		switch (at91_soc_initdata.exid) {
 		case ARCH_EXID_SAMA5D31:
@@ -229,6 +243,9 @@ static const char *soc_subtype_name[] = {
 	[AT91_SOC_SAM9X35]	= "at91sam9x35",
 	[AT91_SOC_SAM9G25]	= "at91sam9g25",
 	[AT91_SOC_SAM9X25]	= "at91sam9x25",
+	[AT91_SOC_SAM9N12]	= "at91sam9n12",
+	[AT91_SOC_SAM9CN11]	= "at91sam9cn11",
+	[AT91_SOC_SAM9CN12]	= "at91sam9cn12",
 	[AT91_SOC_SAMA5D31]	= "sama5d31",
 	[AT91_SOC_SAMA5D33]	= "sama5d33",
 	[AT91_SOC_SAMA5D34]	= "sama5d34",
-- 
2.3.0.rc0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] ARM: atmel: at91sam9n12: add subtype support
  2015-02-05  8:04 [PATCH] ARM: atmel: at91sam9n12: add subtype support Bo Shen
@ 2015-02-09  7:09 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2015-02-09  7:09 UTC (permalink / raw)
  To: Bo Shen; +Cc: barebox

On Thu, Feb 05, 2015 at 04:04:05PM +0800, Bo Shen wrote:
> As the at91sam9n12 series includes at91sam9n12, at91sam9cn11,
> at91sam9cn12. So, add subtype to distinguish them.
> 
> Signed-off-by: Bo Shen <voice.shen@atmel.com>

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2015-02-09  7:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-05  8:04 [PATCH] ARM: atmel: at91sam9n12: add subtype support Bo Shen
2015-02-09  7:09 ` Sascha Hauer

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