From 1332a2a0694c8e10a5bade397cf83645b2c3fd7e Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 21 Mar 2009 21:07:59 +0100 Subject: at91sam9/at91cap: move common serial initialisation to cpu Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- board/atmel/at91sam9263ek/at91sam9263ek.c | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) (limited to 'board/atmel/at91sam9263ek/at91sam9263ek.c') diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c index ebd4649..37634a8 100644 --- a/board/atmel/at91sam9263ek/at91sam9263ek.c +++ b/board/atmel/at91sam9263ek/at91sam9263ek.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -46,33 +47,6 @@ DECLARE_GLOBAL_DATA_PTR; * Miscelaneous platform dependent initialisations */ -static void at91sam9263ek_serial_hw_init(void) -{ -#ifdef CONFIG_USART0 - at91_set_A_periph(AT91_PIN_PA26, 1); /* TXD0 */ - at91_set_A_periph(AT91_PIN_PA27, 0); /* RXD0 */ - at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_US0); -#endif - -#ifdef CONFIG_USART1 - at91_set_A_periph(AT91_PIN_PD0, 1); /* TXD1 */ - at91_set_A_periph(AT91_PIN_PD1, 0); /* RXD1 */ - at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_US1); -#endif - -#ifdef CONFIG_USART2 - at91_set_A_periph(AT91_PIN_PD2, 1); /* TXD2 */ - at91_set_A_periph(AT91_PIN_PD3, 0); /* RXD2 */ - at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_US2); -#endif - -#ifdef CONFIG_USART3 /* DBGU */ - at91_set_A_periph(AT91_PIN_PC30, 0); /* DRXD */ - at91_set_A_periph(AT91_PIN_PC31, 1); /* DTXD */ - at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_SYS); -#endif -} - #ifdef CONFIG_CMD_NAND static void at91sam9263ek_nand_hw_init(void) { @@ -301,7 +275,7 @@ int board_init(void) /* adress of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; - at91sam9263ek_serial_hw_init(); + at91_serial_hw_init(); #ifdef CONFIG_CMD_NAND at91sam9263ek_nand_hw_init(); #endif -- cgit v1.1 From 7ebafb7ec1a0285af8380623c009576f92583b98 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 21 Mar 2009 21:07:59 +0100 Subject: at91sam9/at91cap: move common spi initialisation to cpu Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- board/atmel/at91sam9263ek/at91sam9263ek.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'board/atmel/at91sam9263ek/at91sam9263ek.c') diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c index 37634a8..1a3e39c 100644 --- a/board/atmel/at91sam9263ek/at91sam9263ek.c +++ b/board/atmel/at91sam9263ek/at91sam9263ek.c @@ -87,20 +87,6 @@ static void at91sam9263ek_nand_hw_init(void) } #endif -#ifdef CONFIG_HAS_DATAFLASH -static void at91sam9263ek_spi_hw_init(void) -{ - at91_set_B_periph(AT91_PIN_PA5, 0); /* SPI0_NPCS0 */ - - at91_set_B_periph(AT91_PIN_PA0, 0); /* SPI0_MISO */ - at91_set_B_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ - at91_set_B_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ - - /* Enable clock */ - at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_SPI0); -} -#endif - #ifdef CONFIG_MACB static void at91sam9263ek_macb_hw_init(void) { @@ -280,7 +266,8 @@ int board_init(void) at91sam9263ek_nand_hw_init(); #endif #ifdef CONFIG_HAS_DATAFLASH - at91sam9263ek_spi_hw_init(); + at91_set_gpio_output(AT91_PIN_PE20, 1); /* select spi0 clock */ + at91_spi0_hw_init(1 << 0); #endif #ifdef CONFIG_MACB at91sam9263ek_macb_hw_init(); -- cgit v1.1 From f3f91f886bc8927fd692ac411b7423a87ffec532 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 21 Mar 2009 21:08:00 +0100 Subject: at91sam9/at91cap: move common usb host initialisation to cpu Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- board/atmel/at91sam9263ek/at91sam9263ek.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'board/atmel/at91sam9263ek/at91sam9263ek.c') diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c index 1a3e39c..59ace17 100644 --- a/board/atmel/at91sam9263ek/at91sam9263ek.c +++ b/board/atmel/at91sam9263ek/at91sam9263ek.c @@ -154,15 +154,6 @@ static void at91sam9263ek_macb_hw_init(void) } #endif -#ifdef CONFIG_USB_OHCI_NEW -static void at91sam9263ek_uhp_hw_init(void) -{ - /* Enable VBus on UHP ports */ - at91_set_gpio_output(AT91_PIN_PA21, 0); - at91_set_gpio_output(AT91_PIN_PA24, 0); -} -#endif - #ifdef CONFIG_LCD vidinfo_t panel_info = { vl_col: 240, @@ -273,7 +264,7 @@ int board_init(void) at91sam9263ek_macb_hw_init(); #endif #ifdef CONFIG_USB_OHCI_NEW - at91sam9263ek_uhp_hw_init(); + at91_uhp_hw_init(); #endif #ifdef CONFIG_LCD at91sam9263ek_lcd_hw_init(); -- cgit v1.1 From e2c0476f958f8e0b269a1118f4ba4a5cd475aa56 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 21 Mar 2009 21:08:00 +0100 Subject: at91sam9/at91cap: move common macb initialisation to cpu Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- board/atmel/at91sam9263ek/at91sam9263ek.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'board/atmel/at91sam9263ek/at91sam9263ek.c') diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c index 59ace17..9110e9e 100644 --- a/board/atmel/at91sam9263ek/at91sam9263ek.c +++ b/board/atmel/at91sam9263ek/at91sam9263ek.c @@ -129,28 +129,7 @@ static void at91sam9263ek_macb_hw_init(void) pin_to_mask(AT91_PIN_PE26), pin_to_controller(AT91_PIN_PE0) + PIO_PUER); - at91_set_A_periph(AT91_PIN_PE21, 0); /* ETXCK_EREFCK */ - at91_set_B_periph(AT91_PIN_PC25, 0); /* ERXDV */ - at91_set_A_periph(AT91_PIN_PE25, 0); /* ERX0 */ - at91_set_A_periph(AT91_PIN_PE26, 0); /* ERX1 */ - at91_set_A_periph(AT91_PIN_PE27, 0); /* ERXER */ - at91_set_A_periph(AT91_PIN_PE28, 0); /* ETXEN */ - at91_set_A_periph(AT91_PIN_PE23, 0); /* ETX0 */ - at91_set_A_periph(AT91_PIN_PE24, 0); /* ETX1 */ - at91_set_A_periph(AT91_PIN_PE30, 0); /* EMDIO */ - at91_set_A_periph(AT91_PIN_PE29, 0); /* EMDC */ - -#ifndef CONFIG_RMII - at91_set_A_periph(AT91_PIN_PE22, 0); /* ECRS */ - at91_set_B_periph(AT91_PIN_PC26, 0); /* ECOL */ - at91_set_B_periph(AT91_PIN_PC22, 0); /* ERX2 */ - at91_set_B_periph(AT91_PIN_PC23, 0); /* ERX3 */ - at91_set_B_periph(AT91_PIN_PC27, 0); /* ERXCK */ - at91_set_B_periph(AT91_PIN_PC20, 0); /* ETX2 */ - at91_set_B_periph(AT91_PIN_PC21, 0); /* ETX3 */ - at91_set_B_periph(AT91_PIN_PC24, 0); /* ETXER */ -#endif - + at91_macb_hw_init(); } #endif -- cgit v1.1 From 74c076d6c33d6d42ab065541a38383587879e7b7 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sun, 22 Mar 2009 10:22:34 +0100 Subject: at91sam9/at91cap: move nand drivers to drivers/mtd/nand Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- board/atmel/at91sam9263ek/at91sam9263ek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'board/atmel/at91sam9263ek/at91sam9263ek.c') diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c index 9110e9e..1d52845 100644 --- a/board/atmel/at91sam9263ek/at91sam9263ek.c +++ b/board/atmel/at91sam9263ek/at91sam9263ek.c @@ -80,10 +80,10 @@ static void at91sam9263ek_nand_hw_init(void) 1 << AT91SAM9263_ID_PIOCDE); /* Configure RDY/BSY */ - at91_set_gpio_input(AT91_PIN_PA22, 1); + at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1); /* Enable NandFlash */ - at91_set_gpio_output(AT91_PIN_PD15, 1); + at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1); } #endif -- cgit v1.1