Patchwork [U-Boot] ARM: at91sam9x5: Using CPU string directly

login
register
mail settings
Submitter Bo Shen
Date March 8, 2013, 7:23 a.m.
Message ID <1362727402-16710-1-git-send-email-voice.shen@atmel.com>
Download mbox | patch
Permalink /patch/226031/
State Accepted
Delegated to: Andreas Bießmann
Headers show

Comments

Bo Shen - March 8, 2013, 7:23 a.m.
As the CPU name is not configurable, using CPU string directly

Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
 arch/arm/cpu/arm926ejs/at91/at91sam9x5_devices.c |   14 +++++++-------
 arch/arm/include/asm/arch-at91/at91sam9x5.h      |    6 ------
 2 files changed, 7 insertions(+), 13 deletions(-)
Andreas Bießmann - March 12, 2013, 12:03 p.m.
Dear Bo Shen,

Bo Shen <voice.shen@atmel.com> writes:
>As the CPU name is not configurable, using CPU string directly
>
>Signed-off-by: Bo Shen <voice.shen@atmel.com>
>
>---
>arch/arm/cpu/arm926ejs/at91/at91sam9x5_devices.c |   14 +++++++-------
> arch/arm/include/asm/arch-at91/at91sam9x5.h      |    6 ------
> 2 files changed, 7 insertions(+), 13 deletions(-)

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

Best regards,
Andreas Bießmann

Patch

diff --git a/arch/arm/cpu/arm926ejs/at91/at91sam9x5_devices.c b/arch/arm/cpu/arm926ejs/at91/at91sam9x5_devices.c
index 0448c0b..29e8aa4 100644
--- a/arch/arm/cpu/arm926ejs/at91/at91sam9x5_devices.c
+++ b/arch/arm/cpu/arm926ejs/at91/at91sam9x5_devices.c
@@ -61,20 +61,20 @@  char *get_cpu_name()
 	if (cpu_is_at91sam9x5()) {
 		switch (extension_id) {
 		case ARCH_EXID_AT91SAM9G15:
-			return CONFIG_SYS_AT91_G15_CPU_NAME;
+			return "AT91SAM9G15";
 		case ARCH_EXID_AT91SAM9G25:
-			return CONFIG_SYS_AT91_G25_CPU_NAME;
+			return "AT91SAM9G25";
 		case ARCH_EXID_AT91SAM9G35:
-			return CONFIG_SYS_AT91_G35_CPU_NAME;
+			return "AT91SAM9G35";
 		case ARCH_EXID_AT91SAM9X25:
-			return CONFIG_SYS_AT91_X25_CPU_NAME;
+			return "AT91SAM9X25";
 		case ARCH_EXID_AT91SAM9X35:
-			return CONFIG_SYS_AT91_X35_CPU_NAME;
+			return "AT91SAM9X35";
 		default:
-			return CONFIG_SYS_AT91_UNKNOWN_CPU;
+			return "Unknown CPU type";
 		}
 	} else {
-		return CONFIG_SYS_AT91_UNKNOWN_CPU;
+		return "Unknown CPU type";
 	}
 }
 
diff --git a/arch/arm/include/asm/arch-at91/at91sam9x5.h b/arch/arm/include/asm/arch-at91/at91sam9x5.h
index de0f1b1..b7d1932 100644
--- a/arch/arm/include/asm/arch-at91/at91sam9x5.h
+++ b/arch/arm/include/asm/arch-at91/at91sam9x5.h
@@ -140,12 +140,6 @@ 
 /*
  * Cpu Name
  */
-#define CONFIG_SYS_AT91_G15_CPU_NAME	"AT91SAM9G15"
-#define CONFIG_SYS_AT91_G25_CPU_NAME	"AT91SAM9G25"
-#define CONFIG_SYS_AT91_G35_CPU_NAME	"AT91SAM9G35"
-#define CONFIG_SYS_AT91_X25_CPU_NAME	"AT91SAM9X25"
-#define CONFIG_SYS_AT91_X35_CPU_NAME	"AT91SAM9X35"
-#define CONFIG_SYS_AT91_UNKNOWN_CPU	"Unknown CPU type"
 #define ATMEL_CPU_NAME	get_cpu_name()
 
 /*