Skip to contentSkip to conversation

at91: move cpu name define to arm/arch/ cpu header

PATCH New Jean-Christophe PLAGNIOL-VILLARD 1 participant 2 messages May 22, 2009 Arm/Microchip (AT91) SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 at91: move cpu name define to arm/arch/ cpu header

---
 include/asm-arm/arch-at91/at91cap9.h    |    5 +++++
 include/asm-arm/arch-at91/at91sam9260.h |    9 +++++++++
 include/asm-arm/arch-at91/at91sam9261.h |    4 ++++
 include/asm-arm/arch-at91/at91sam9263.h |    4 ++++
 include/asm-arm/arch-at91/at91sam9rl.h  |    5 +++++
 include/configs/at91cap9adk.h           |    1 -
 include/configs/at91sam9260ek.h         |    2 --
 include/configs/at91sam9261ek.h         |    1 -
 include/configs/at91sam9263ek.h         |    1 -
 include/configs/at91sam9rlek.h          |    1 -
 include/configs/pm9263.h                |    2 --
 11 files changed, 27 insertions(+), 8 deletions(-)
include/asm-arm/arch-at91/at91cap9.h +5 -0
index 0b52228..b128ac5 100644
@@ -134,4 +134,9 @@
 
 #define CONFIG_DRAM_BASE	AT91_CHIPSELECT_6
 
+/*
+ * Cpu Name
+ */
+#define AT91_CPU_NAME	"AT91CAP9"
+
 #endif
include/asm-arm/arch-at91/at91sam9260.h +9 -0
index 920a7f3..707d7bc 100644
@@ -121,4 +121,13 @@
 #define AT91SAM9XE_FLASH_BASE	0x00200000	/* Internal FLASH base address */
 #define AT91SAM9XE_SRAM_BASE	0x00300000	/* Internal SRAM base address */
 
+/*
+ * Cpu Name
+ */
+#if defined(CONFIG_AT91SAM9260)
+#define AT91_CPU_NAME	"AT91SAM9260"
+#if defined(CONFIG_AT91SAM9G20)
+#define AT91_CPU_NAME	"AT91SAM9G20"
+#endif
+
 #endif
include/asm-arm/arch-at91/at91sam9261.h +4 -0
index 752d81d..b303e07 100644
@@ -101,5 +101,9 @@
 #define AT91SAM9261_UHP_BASE	0x00500000	/* USB Host controller */
 #define AT91SAM9261_LCDC_BASE	0x00600000	/* LDC controller */
 
+/*
+ * Cpu Name
+ */
+#define AT91_CPU_NAME	"AT91SAM9261"
 
 #endif
include/asm-arm/arch-at91/at91sam9263.h +4 -0
index 07b265f..966a683 100644
@@ -124,5 +124,9 @@
 #define AT91SAM9263_DMAC_BASE	0x00800000	/* DMA Controller */
 #define AT91SAM9263_UHP_BASE	0x00a00000	/* USB Host controller */
 
+/*
+ * Cpu Name
+ */
+#define AT91_CPU_NAME	"AT91SAM9263"
 
 #endif
include/asm-arm/arch-at91/at91sam9rl.h +5 -0
index 215bbc8..4dd8037 100644
@@ -112,4 +112,9 @@
 #define AT91SAM9RL_LCDC_BASE	0x00500000	/* LCD Controller */
 #define AT91SAM9RL_UDPHS_BASE	0x00600000	/* USB Device HS controller */
 
+/*
+ * Cpu Name
+ */
+#define AT91_CPU_NAME	"AT91SAM9RL"
+
 #endif
include/configs/at91cap9adk.h +0 -1
index b2e6d7d..526cd60 100644
@@ -28,7 +28,6 @@
 #define __CONFIG_H
 
 /* ARM asynchronous clock */
-#define AT91_CPU_NAME		"AT91CAP9"
 #define AT91_MAIN_CLOCK		12000000	/* 12 MHz crystal */
 #define CONFIG_SYS_HZ		1000
 
include/configs/at91sam9260ek.h +0 -2
index e46c9d6..1828c63 100644
@@ -34,10 +34,8 @@
 #define CONFIG_ARM926EJS	1	/* This is an ARM926EJS Core	*/
 
 #ifdef CONFIG_AT91SAM9G20EK
-#define AT91_CPU_NAME		"AT91SAM9G20"
 #define CONFIG_AT91SAM9G20	1	/* It's an Atmel AT91SAM9G20 SoC*/
 #else
-#define AT91_CPU_NAME		"AT91SAM9260"
 #define CONFIG_AT91SAM9260	1	/* It's an Atmel AT91SAM9260 SoC*/
 #endif
 
include/configs/at91sam9261ek.h +0 -1
index fdaa71c..b84e361 100644
@@ -28,7 +28,6 @@
 #define __CONFIG_H
 
 /* ARM asynchronous clock */
-#define AT91_CPU_NAME		"AT91SAM9261"
 #define AT91_MAIN_CLOCK		18432000	/* 18.432 MHz crystal */
 #define CONFIG_SYS_HZ		1000
 
include/configs/at91sam9263ek.h +0 -1
index d03ecee..c212d11 100644
@@ -28,7 +28,6 @@
 #define __CONFIG_H
 
 /* ARM asynchronous clock */
-#define AT91_CPU_NAME		"AT91SAM9263"
 #define AT91_MAIN_CLOCK		16367660	/* 16.367 MHz crystal */
 #define CONFIG_SYS_HZ		1000
 
include/configs/at91sam9rlek.h +0 -1
index 846d165..c466823 100644
@@ -28,7 +28,6 @@
 #define __CONFIG_H
 
 /* ARM asynchronous clock */
-#define AT91_CPU_NAME		"AT91SAM9RL"
 #define AT91_MAIN_CLOCK		12000000	/* 12 MHz crystal */
 #define CONFIG_SYS_HZ		1000
 
include/configs/pm9263.h +0 -2
index 0db17b3..d60c417 100644
@@ -29,8 +29,6 @@
 #define __CONFIG_H
 
 /* ARM asynchronous clock */
-#define AT91_CPU_NAME		"AT91SAM9263"
-
 #define CONFIG_DISPLAY_BOARDINFO
 
 #define MASTER_PLL_DIV		15
Signature · 1 line
1.6.2.4
#1 lore raw

PATCH v2 1/1 at91: move cpu info print to cpu

---
Fix a typo

 board/ronetix/pm9263/pm9263.c |    7 -------
 cpu/arm926ejs/at91/cpu.c      |   17 +++++++++++++++++
 include/configs/pm9263.h      |    1 +
 3 files changed, 18 insertions(+), 7 deletions(-)
board/ronetix/pm9263/pm9263.c +0 -7
index d24ef9a..d2598a0 100644
@@ -382,15 +382,8 @@ int board_eth_init(bd_t *bis)
 int checkboard (void)
 {
 	char *ss;
-	char buf[32];
 
 	printf ("Board : Ronetix PM9263\n");
-	printf ("Crystal frequency: %8s MHz\n",
-					strmhz(buf, get_main_clk_rate()));
-	printf ("CPU clock        : %8s MHz\n",
-					strmhz(buf, get_cpu_clk_rate()));
-	printf ("Master clock     : %8s MHz\n",
-					strmhz(buf, get_mck_clk_rate()));
 
 	switch (gd->fb_base) {
 	case PHYS_PSRAM:
cpu/arm926ejs/at91/cpu.c +17 -0
index a9705cf..594103e 100644
@@ -12,3 +12,20 @@ int arch_cpu_init(void)
 	return at91_clock_init(0);
 #endif
 }
+
+#if defined(CONFIG_DISPLAY_CPUINFO)
+int print_cpuinfo(void)
+{
+	char buf[32];
+
+	printf("CPU: %s\n", AT91_CPU_NAME);
+	printf("Crystal frequency: %8s MHz\n",
+					strmhz(buf, get_main_clk_rate()));
+	printf("CPU clock        : %8s MHz\n",
+					strmhz(buf, get_cpu_clk_rate()));
+	printf("Master clock     : %8s MHz\n",
+					strmhz(buf, get_mck_clk_rate()));
+
+	return 0;
+}
+#endif
include/configs/pm9263.h +1 -0
index d60c417..f0dbe81 100644
@@ -29,6 +29,7 @@
 #define __CONFIG_H
 
 /* ARM asynchronous clock */
+#define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
 
 #define MASTER_PLL_DIV		15
Signature · 1 line
1.6.2.4