All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/5] cpu9260/9G20: fix board support
Date: Tue,  7 Jun 2011 08:35:07 +0200	[thread overview]
Message-ID: <1307428508-26058-4-git-send-email-eric@eukrea.com> (raw)
In-Reply-To: <1307428508-26058-1-git-send-email-eric@eukrea.com>

Signed-off-by: Eric B?nard <eric@eukrea.com>
---
 MAKEALL                        |    2 --
 Makefile                       |    8 --------
 board/eukrea/cpu9260/cpu9260.c |   33 ++++++++++++++++-----------------
 board/eukrea/cpu9260/led.c     |    6 +++---
 include/configs/cpu9260.h      |    7 +++----
 5 files changed, 22 insertions(+), 34 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index d592374..13dde6f 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -455,8 +455,6 @@ LIST_at91="$(boards_by_soc at91)\
 	at91sam9m10g45ek	\
 	at91sam9rlek		\
 	CPUAT91			\
-	CPU9260			\
-	CPU9G20			\
 	pm9g45			\
 	SBC35_A9G20		\
 	TNY_A9260		\
diff --git a/Makefile b/Makefile
index dcf5d93..eb3bda7 100644
--- a/Makefile
+++ b/Makefile
@@ -857,14 +857,6 @@ at91sam9rlek_config	:	unconfig
 	fi;
 	@$(MKCONFIG) -n $@ -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91
 
-CPU9G20_128M_config \
-CPU9G20_config \
-CPU9260_128M_config \
-CPU9260_config	:	unconfig
-	@mkdir -p $(obj)include
-	@echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
-	@$(MKCONFIG) -n $@ -a cpu9260 arm arm926ejs cpu9260 eukrea at91
-
 at91sam9m10g45ek_nandflash_config \
 at91sam9m10g45ek_dataflash_config \
 at91sam9m10g45ek_dataflash_cs0_config \
diff --git a/board/eukrea/cpu9260/cpu9260.c b/board/eukrea/cpu9260/cpu9260.c
index 9ec48a0..0959c5c 100644
--- a/board/eukrea/cpu9260/cpu9260.c
+++ b/board/eukrea/cpu9260/cpu9260.c
@@ -4,7 +4,7 @@
  * Lead Tech Design <www.leadtechdesign.com>
  * Ilko Iliev <www.ronetix.at>
  *
- * (C) Copyright 2009
+ * (C) Copyright 2009-2011
  * Eric Benard <eric@eukrea.com>
  *
  * See file CREDITS for list of people who contributed to this
@@ -27,16 +27,15 @@
  */
 
 #include <common.h>
-#include <asm/sizes.h>
+#include <asm/io.h>
 #include <asm/arch/at91sam9260.h>
 #include <asm/arch/at91sam9_smc.h>
 #include <asm/arch/at91_common.h>
+#include <asm/arch/at91_matrix.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/arch/at91_rstc.h>
-#include <asm/arch/at91_matrix.h>
 #include <asm/arch/at91_pio.h>
 #include <asm/arch/clk.h>
-#include <asm/arch/io.h>
 #include <asm/arch/hardware.h>
 #if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
 #include <net.h>
@@ -54,9 +53,9 @@ DECLARE_GLOBAL_DATA_PTR;
 static void cpu9260_nand_hw_init(void)
 {
 	unsigned long csa;
-	at91_smc_t *smc = (at91_smc_t *) AT91_SMC_BASE;
-	at91_matrix_t *matrix = (at91_matrix_t *) AT91_MATRIX_BASE;
-	at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
+	at91_smc_t *smc = (at91_smc_t *) ATMEL_BASE_SMC;
+	at91_matrix_t *matrix = (at91_matrix_t *) ATMEL_BASE_MATRIX;
+	at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
 
 	/* Enable CS3 */
 	csa = readl(&matrix->csa) | AT91_MATRIX_CSA_EBI_CS3A;
@@ -93,7 +92,7 @@ static void cpu9260_nand_hw_init(void)
 		&smc->cs[3].mode);
 #endif
 
-	writel(1 << AT91SAM9260_ID_PIOC, &pmc->pcer);
+	writel(1 << ATMEL_ID_PIOC, &pmc->pcer);
 
 	/* Configure RDY/BSY */
 	at91_set_pio_input(CONFIG_SYS_NAND_READY_PIN, 1);
@@ -107,11 +106,11 @@ static void cpu9260_nand_hw_init(void)
 static void cpu9260_macb_hw_init(void)
 {
 	unsigned long rstcmr;
-	at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
-	at91_rstc_t *rstc = (at91_rstc_t *) AT91_RSTC_BASE;
+	at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
+	at91_rstc_t *rstc = (at91_rstc_t *) ATMEL_BASE_RSTC;
 
 	/* Enable clock */
-	writel(1 << AT91SAM9260_ID_EMAC, &pmc->pcer);
+	writel(1 << ATMEL_ID_EMAC0, &pmc->pcer);
 
 	at91_set_pio_pullup(AT91_PIO_PORTA, 17, 1);
 
@@ -136,14 +135,14 @@ static void cpu9260_macb_hw_init(void)
 
 int board_early_init_f(void)
 {
-	at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
+	at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
 
-	writel((1 << AT91SAM9260_ID_PIOA) |
-		(1 << AT91SAM9260_ID_PIOC) |
-		(1 << AT91SAM9260_ID_PIOB),
+	writel((1 << ATMEL_ID_PIOA) |
+		(1 << ATMEL_ID_PIOB) |
+		(1 << ATMEL_ID_PIOC),
 		&pmc->pcer);
 
-	at91_serial_hw_init();
+	at91_seriald_hw_init();
 
 	return 0;
 }
@@ -184,7 +183,7 @@ int board_eth_init(bd_t *bis)
 {
 	int rc = 0;
 #ifdef CONFIG_MACB
-	rc = macb_eth_initialize(0, (void *)AT91_EMAC_BASE, 0);
+	rc = macb_eth_initialize(0, (void *)ATMEL_BASE_EMAC0, 0);
 #endif
 	return rc;
 }
diff --git a/board/eukrea/cpu9260/led.c b/board/eukrea/cpu9260/led.c
index d0906bc..8d865eb 100644
--- a/board/eukrea/cpu9260/led.c
+++ b/board/eukrea/cpu9260/led.c
@@ -28,17 +28,17 @@
 #include <asm/arch/at91sam9260.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/arch/gpio.h>
-#include <asm/arch/io.h>
+#include <asm/io.h>
 
 static unsigned int saved_state[4] = {STATUS_LED_OFF, STATUS_LED_OFF,
 		STATUS_LED_OFF, STATUS_LED_OFF};
 
 void coloured_LED_init(void)
 {
-	at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
+	at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
 
 	/* Enable clock */
-	writel(1 << AT91SAM9260_ID_PIOC, &pmc->pcer);
+	writel(1 << ATMEL_ID_PIOC, &pmc->pcer);
 
 	at91_set_pio_output(CONFIG_RED_LED, 1);
 	at91_set_pio_output(CONFIG_GREEN_LED, 1);
diff --git a/include/configs/cpu9260.h b/include/configs/cpu9260.h
index a8ada2d..06268e8 100644
--- a/include/configs/cpu9260.h
+++ b/include/configs/cpu9260.h
@@ -37,6 +37,7 @@
 
 #define CONFIG_SYS_AT91_MAIN_CLOCK	18432000
 #define CONFIG_SYS_HZ		1000
+#define CONFIG_SYS_AT91_SLOW_CLOCK	32768
 
 #define CONFIG_ARM926EJS
 
@@ -251,10 +252,8 @@
 #define CONFIG_AT91SAM9_WATCHDOG
 #define CONFIG_AT91_GPIO
 #define CONFIG_ATMEL_USART
-#undef CONFIG_USART0
-#undef CONFIG_USART1
-#undef CONFIG_USART2
-#define CONFIG_USART3
+#define CONFIG_USART_BASE	ATMEL_BASE_DBGU
+#define CONFIG_USART_ID		ATMEL_ID_SYS
 
 #define CONFIG_BOOTDELAY	3
 
-- 
1.7.4.4

  parent reply	other threads:[~2011-06-07  6:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-07  6:35 [U-Boot] [PATCH 1/5] at91sam9260_devices: fix following atmal rework Eric Bénard
2011-06-07  6:35 ` [U-Boot] [PATCH 2/5] include/asm/arch-at91: update several .h files to ATMEL_xxx name scheme Eric Bénard
2011-06-07  6:35 ` [U-Boot] [PATCH 3/5] arm926ejs/at91/lowlevel_init.S: temporary fix Eric Bénard
2011-06-07  8:04   ` Reinhard Meyer
2011-06-07  8:32     ` Eric Bénard
2011-06-07  6:35 ` Eric Bénard [this message]
2011-06-07  6:35 ` [U-Boot] [PATCH 5/5] cpuat91: fix board support Eric Bénard
2011-06-07  7:56 ` [U-Boot] [PATCH 1/5] at91sam9260_devices: fix following atmal rework Reinhard Meyer

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=1307428508-26058-4-git-send-email-eric@eukrea.com \
    --to=eric@eukrea.com \
    --cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.