diff options
author | Justin Waters <justin.waters@timesys.com> | 2009-01-27 09:24:16 -0500 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2009-01-27 09:43:25 -0500 |
commit | 05c0535449304c64daa0c1aa4a1334f2873a0212 (patch) | |
tree | 563869fe5726fcbb72ec12977b5d2b13a031bf1e | |
parent | 72d15e705bc3983884105cb7755c7ba80e74a0a5 (diff) |
Add support for the AT91RM9200-EK board.
Since there are very few differences between the EK and DK boards,
you simply select the board that you wish to use via the config
line. This simplifies the forward porting effort, while still
maintaining the old build steps.
Signed-off-by: Justin Waters <justin.waters@timesys.com>
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | board/atmel/at91rm9200dk/at91rm9200dk.c | 5 | ||||
-rw-r--r-- | cpu/arm920t/at91rm9200/interrupts.c | 4 | ||||
-rw-r--r-- | include/configs/at91rm9200dk.h | 2 |
4 files changed, 16 insertions, 4 deletions
@@ -2570,8 +2570,15 @@ shannon_config : unconfig ## Atmel AT91RM9200 Systems ######################################################################### +at91rm9200ek_config \ at91rm9200dk_config : unconfig - @$(MKCONFIG) $(@:_config=) arm arm920t at91rm9200dk atmel at91rm9200 + @mkdir -p $(obj)include + @if [ "$(findstring ek_,$@)" ] ; then \ + echo "#define CONFIG_AT91RM9200EK 1" >>$(obj)include/config.h ; \ + else \ + echo "#define CONFIG_AT91RM9200DK 1" >>$(obj)include/config.h ; \ + fi; + @$(MKCONFIG) -a at91rm9200dk arm arm920t at91rm9200dk atmel at91rm9200 cmc_pu2_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200 diff --git a/board/atmel/at91rm9200dk/at91rm9200dk.c b/board/atmel/at91rm9200dk/at91rm9200dk.c index b89a3fd548..b17a61b88b 100644 --- a/board/atmel/at91rm9200dk/at91rm9200dk.c +++ b/board/atmel/at91rm9200dk/at91rm9200dk.c @@ -47,7 +47,12 @@ int board_init (void) /* so we do _nothing_ here */ /* arch number of AT91RM9200DK-Board */ +#if defined(CONFIG_AT91RM9200DK) gd->bd->bi_arch_number = MACH_TYPE_AT91RM9200DK; +#elif defined(CONFIG_AT91RM9200EK) + gd->bd->bi_arch_number = MACH_TYPE_AT91RM9200EK; +#endif + /* adress of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; diff --git a/cpu/arm920t/at91rm9200/interrupts.c b/cpu/arm920t/at91rm9200/interrupts.c index 5f0703c2de..da9bf19721 100644 --- a/cpu/arm920t/at91rm9200/interrupts.c +++ b/cpu/arm920t/at91rm9200/interrupts.c @@ -175,14 +175,14 @@ void reset_cpu (ulong ignored) #ifdef CONFIG_USART1 AT91PS_USART us = AT91C_BASE_US1; #endif -#ifdef CONFIG_AT91RM9200DK +#ifdef CONFIG_AT91RM9200DK || CONFIG_AT91RM9200EK AT91PS_PIO pio = AT91C_BASE_PIOA; #endif /*shutdown the console to avoid strange chars during reset */ us->US_CR = (AT91C_US_RSTRX | AT91C_US_RSTTX); -#ifdef CONFIG_AT91RM9200DK +#ifdef CONFIG_AT91RM9200DK || CONFIG_AT91RM9200EK /* Clear PA19 to trigger the hard reset */ pio->PIO_CODR = 0x00080000; pio->PIO_OER = 0x00080000; diff --git a/include/configs/at91rm9200dk.h b/include/configs/at91rm9200dk.h index c7e83ccfc1..9c873df942 100644 --- a/include/configs/at91rm9200dk.h +++ b/include/configs/at91rm9200dk.h @@ -34,7 +34,7 @@ #define CONFIG_ARM920T 1 /* This is an ARM920T Core */ #define CONFIG_AT91RM9200 1 /* It's an Atmel AT91RM9200 SoC */ -#define CONFIG_AT91RM9200DK 1 /* on an AT91RM9200DK Board */ +/*#define CONFIG_AT91RM9200DK 1 */ /* on an AT91RM9200EK Board (determined by make config */ #undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ #define USE_920T_MMU 1 |