mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Bo Shen <voice.shen@atmel.com>
To: s.hauer@pengutronix.de, plagnioj@jcrosoft.com
Cc: barebox@lists.infradead.org
Subject: [PATCH] ARM: atmel: at91sam9n12: add subtype support
Date: Thu, 5 Feb 2015 16:04:05 +0800	[thread overview]
Message-ID: <1423123445-29905-1-git-send-email-voice.shen@atmel.com> (raw)

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

             reply	other threads:[~2015-02-05  8:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05  8:04 Bo Shen [this message]
2015-02-09  7:09 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1423123445-29905-1-git-send-email-voice.shen@atmel.com \
    --to=voice.shen@atmel.com \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox