diff options
author | Wolfgang Denk <wd@denx.de> | 2009-03-26 22:27:45 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-03-26 22:27:45 +0100 |
commit | aaa0e0812ffdf861993129f41936eb175a2eaa5f (patch) | |
tree | 2f729e92c83925a5acb9f204e381878928c2c57f /board/atmel/at91sam9261ek/at91sam9261ek.c | |
parent | 99a4ffe202d8bc1d3c4faff9b8258b686ef656ca (diff) | |
parent | df486b1fa3f750b153eac7daa0b3bf1f594e5098 (diff) | |
download | u-boot-imx-aaa0e0812ffdf861993129f41936eb175a2eaa5f.zip u-boot-imx-aaa0e0812ffdf861993129f41936eb175a2eaa5f.tar.gz u-boot-imx-aaa0e0812ffdf861993129f41936eb175a2eaa5f.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-at91
Diffstat (limited to 'board/atmel/at91sam9261ek/at91sam9261ek.c')
-rw-r--r-- | board/atmel/at91sam9261ek/at91sam9261ek.c | 50 |
1 files changed, 5 insertions, 45 deletions
diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c index 14f236d..bae4092 100644 --- a/board/atmel/at91sam9261ek/at91sam9261ek.c +++ b/board/atmel/at91sam9261ek/at91sam9261ek.c @@ -26,6 +26,7 @@ #include <asm/arch/at91sam9261.h> #include <asm/arch/at91sam9261_matrix.h> #include <asm/arch/at91sam9_smc.h> +#include <asm/arch/at91_common.h> #include <asm/arch/at91_pmc.h> #include <asm/arch/at91_rstc.h> #include <asm/arch/gpio.h> @@ -43,33 +44,6 @@ DECLARE_GLOBAL_DATA_PTR; * Miscelaneous platform dependent initialisations */ -static void at91sam9261ek_serial_hw_init(void) -{ -#ifdef CONFIG_USART0 - at91_set_A_periph(AT91_PIN_PC8, 1); /* TXD0 */ - at91_set_A_periph(AT91_PIN_PC9, 0); /* RXD0 */ - at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9261_ID_US0); -#endif - -#ifdef CONFIG_USART1 - at91_set_A_periph(AT91_PIN_PC12, 1); /* TXD1 */ - at91_set_A_periph(AT91_PIN_PC13, 0); /* RXD1 */ - at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9261_ID_US1); -#endif - -#ifdef CONFIG_USART2 - at91_set_A_periph(AT91_PIN_PC14, 1); /* TXD2 */ - at91_set_A_periph(AT91_PIN_PC15, 0); /* RXD2 */ - at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9261_ID_US2); -#endif - -#ifdef CONFIG_USART3 /* DBGU */ - at91_set_A_periph(AT91_PIN_PA9, 0); /* DRXD */ - at91_set_A_periph(AT91_PIN_PA10, 1); /* DTXD */ - at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_SYS); -#endif -} - #ifdef CONFIG_CMD_NAND static void at91sam9261ek_nand_hw_init(void) { @@ -102,30 +76,16 @@ static void at91sam9261ek_nand_hw_init(void) at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9261_ID_PIOC); /* Configure RDY/BSY */ - at91_set_gpio_input(AT91_PIN_PC15, 1); + at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1); /* Enable NandFlash */ - at91_set_gpio_output(AT91_PIN_PC14, 1); + at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1); at91_set_A_periph(AT91_PIN_PC0, 0); /* NANDOE */ at91_set_A_periph(AT91_PIN_PC1, 0); /* NANDWE */ } #endif -#ifdef CONFIG_HAS_DATAFLASH -static void at91sam9261ek_spi_hw_init(void) -{ - at91_set_A_periph(AT91_PIN_PA3, 0); /* SPI0_NPCS0 */ - - at91_set_A_periph(AT91_PIN_PA0, 0); /* SPI0_MISO */ - at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ - at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ - - /* Enable clock */ - at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9261_ID_SPI0); -} -#endif - #ifdef CONFIG_DRIVER_DM9000 static void at91sam9261ek_dm9000_hw_init(void) { @@ -250,12 +210,12 @@ int board_init(void) /* adress of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; - at91sam9261ek_serial_hw_init(); + at91_serial_hw_init(); #ifdef CONFIG_CMD_NAND at91sam9261ek_nand_hw_init(); #endif #ifdef CONFIG_HAS_DATAFLASH - at91sam9261ek_spi_hw_init(); + at91_spi0_hw_init(1 << 0); #endif #ifdef CONFIG_DRIVER_DM9000 at91sam9261ek_dm9000_hw_init(); |