From a66e4d00df3e0ff64dc65d9618204a91095c27bb Mon Sep 17 00:00:00 2001 From: Wenyou Yang Date: Thu, 23 Mar 2017 14:26:25 +0800 Subject: board: sama5d2_xplained: clean up macb init code Because the MACB driver supports the driver model and device tree, the pins configuration and clock enabling are handled by the pinctrl driver and clock driver, remove this hardcoded init code. The USB Ether init code is removed as well. Signed-off-by: Wenyou Yang --- board/atmel/sama5d2_xplained/sama5d2_xplained.c | 43 ------------------------- 1 file changed, 43 deletions(-) (limited to 'board/atmel/sama5d2_xplained/sama5d2_xplained.c') diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index c5337af4de..5f38ebc2d2 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -12,15 +12,12 @@ #include #include #include -#include -#include #include #include #include #include #include #include -#include #include #include #include @@ -118,22 +115,6 @@ void lcd_show_board_info(void) #endif /* CONFIG_LCD_INFO */ #endif /* CONFIG_LCD */ -static void board_gmac_hw_init(void) -{ - atmel_pio4_set_f_periph(AT91_PIO_PORTB, 14, 0); /* GTXCK */ - atmel_pio4_set_f_periph(AT91_PIO_PORTB, 15, 0); /* GTXEN */ - atmel_pio4_set_f_periph(AT91_PIO_PORTB, 16, 0); /* GRXDV */ - atmel_pio4_set_f_periph(AT91_PIO_PORTB, 17, 0); /* GRXER */ - atmel_pio4_set_f_periph(AT91_PIO_PORTB, 18, 0); /* GRX0 */ - atmel_pio4_set_f_periph(AT91_PIO_PORTB, 19, 0); /* GRX1 */ - atmel_pio4_set_f_periph(AT91_PIO_PORTB, 20, 0); /* GTX0 */ - atmel_pio4_set_f_periph(AT91_PIO_PORTB, 21, 0); /* GTX1 */ - atmel_pio4_set_f_periph(AT91_PIO_PORTB, 22, 0); /* GMDC */ - atmel_pio4_set_f_periph(AT91_PIO_PORTB, 23, 0); /* GMDIO */ - - at91_periph_clk_enable(ATMEL_ID_GMAC); -} - static void board_uart1_hw_init(void) { atmel_pio4_set_a_periph(AT91_PIO_PORTD, 2, 1); /* URXD1 */ @@ -167,18 +148,12 @@ int board_init(void) /* address of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; -#ifdef CONFIG_MACB - board_gmac_hw_init(); -#endif #ifdef CONFIG_LCD board_lcd_hw_init(); #endif #ifdef CONFIG_CMD_USB board_usb_hw_init(); #endif -#ifdef CONFIG_USB_GADGET_ATMEL_USBA - at91_udp_hw_init(); -#endif return 0; } @@ -190,24 +165,6 @@ int dram_init(void) return 0; } -int board_eth_init(bd_t *bis) -{ - int rc = 0; - -#ifdef CONFIG_MACB - rc = macb_eth_initialize(0, (void *)ATMEL_BASE_GMAC, 0x00); -#endif - -#ifdef CONFIG_USB_GADGET_ATMEL_USBA - usba_udc_probe(&pdata); -#ifdef CONFIG_USB_ETH_RNDIS - usb_eth_initialize(bis); -#endif -#endif - - return rc; -} - #ifdef CONFIG_CMD_I2C static int set_ethaddr_from_eeprom(void) { -- cgit From ed03b1ba3c956648f7b4e42978d797c8f1b9f269 Mon Sep 17 00:00:00 2001 From: Wenyou Yang Date: Thu, 23 Mar 2017 14:26:26 +0800 Subject: board: sama5d2_xplained: remove uart1 init Due to the pin configuration and clock enabling is handling by the driver, remove the unneeded hardcode uart1 init during board_early_init_f stage. Signed-off-by: Wenyou Yang --- board/atmel/sama5d2_xplained/sama5d2_xplained.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'board/atmel/sama5d2_xplained/sama5d2_xplained.c') diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index 5f38ebc2d2..c23cb0ecdd 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -115,6 +115,7 @@ void lcd_show_board_info(void) #endif /* CONFIG_LCD_INFO */ #endif /* CONFIG_LCD */ +#ifdef CONFIG_DEBUG_UART_BOARD_INIT static void board_uart1_hw_init(void) { atmel_pio4_set_a_periph(AT91_PIO_PORTD, 2, 1); /* URXD1 */ @@ -123,7 +124,6 @@ static void board_uart1_hw_init(void) at91_periph_clk_enable(ATMEL_ID_UART1); } -#ifdef CONFIG_DEBUG_UART_BOARD_INIT void board_debug_uart_init(void) { board_uart1_hw_init(); @@ -135,8 +135,6 @@ int board_early_init_f(void) { #ifdef CONFIG_DEBUG_UART debug_uart_init(); -#else - board_uart1_hw_init(); #endif return 0; -- cgit From 5521d9e9e7a9360425088bc7f35b337fcf145b1d Mon Sep 17 00:00:00 2001 From: Wenyou Yang Date: Thu, 23 Mar 2017 14:26:27 +0800 Subject: board: sama5d2_xplained: remove unnecessary header files Remove the unnecessary header files. Signed-off-by: Wenyou Yang --- board/atmel/sama5d2_xplained/sama5d2_xplained.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'board/atmel/sama5d2_xplained/sama5d2_xplained.c') diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index c23cb0ecdd..48f45b35ce 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -11,8 +11,6 @@ #include #include #include -#include -#include #include #include #include -- cgit