board: sama5d3: convert boards to support DM/DT
v2 cover board: sama5d3: convert boards to support DM/DT
The purpose of patch set is to convert the board to support Device Tree and Driver Model.
It is based on the patch set:
[PATCH v5 0/2] pinctrl: at91: Add pinctrl driver http://lists.denx.de/pipermail/u-boot/2017-February/280463.htm
Changes in v2:
- rebase on the patch set:
[PATCH v3 0/8] board: sama5d4: convert boards to support DM/DT
http://lists.denx.de/pipermail/u-boot/2017-February/280506.html
Wenyou Yang (7):
board: sama5d3xek: move config options to defconfig
board: sama5d3xek: clean up code
board: sama5d3xek: enable early debug UART
board: sama5d3_xplained: move config options to defconfig
board: sama5d3_xplained: clean up code
board: sama5d3_xplained: enable early debug UART
configs: sama5d3_xplained: move CONFIG_SYS_NO_FLASH to defconfig
board/atmel/sama5d3_xplained/sama5d3_xplained.c | 35 +++++----- board/atmel/sama5d3xek/sama5d3xek.c | 86 +++++-------------------- configs/sama5d3_xplained_mmc_defconfig | 28 +++++++- configs/sama5d3_xplained_nandflash_defconfig | 28 +++++++- configs/sama5d3xek_mmc_defconfig | 30 ++++++++- configs/sama5d3xek_nandflash_defconfig | 31 ++++++++- configs/sama5d3xek_spiflash_defconfig | 30 ++++++++- include/configs/sama5d3_xplained.h | 15 ----- include/configs/sama5d3xek.h | 20 ------ 9 files changed, 172 insertions(+), 131 deletions(-)
Signature · 1 line
2.11.0
PATCH v2 1/7 board: sama5d3xek: move config options to defconfig
Enable CONFIG_CLK and CONFIG_PINCTRL to support at91 clock driver and at91 pinctrl driver.
Move some config options to configs/sama5d3xek_*_defconfig.
---
Changes in v2: None
board/atmel/sama5d3xek/sama5d3xek.c | 2 ++ configs/sama5d3xek_mmc_defconfig | 24 +++++++++++++++++++++++- configs/sama5d3xek_nandflash_defconfig | 25 ++++++++++++++++++++++++- configs/sama5d3xek_spiflash_defconfig | 24 +++++++++++++++++++++++- include/configs/sama5d3xek.h | 20 -------------------- 5 files changed, 72 insertions(+), 23 deletions(-)
board/atmel/sama5d3xek/sama5d3xek.c +2 -0
@@ -331,6 +331,7 @@ int board_mmc_init(bd_t *bis) #ifdef CONFIG_ATMEL_SPI #include <spi.h> +#ifndef CONFIG_DM_SPI int spi_cs_is_valid(unsigned int bus, unsigned int cs) { return bus == 0 && cs < 4;
@@ -367,6 +368,7 @@ void spi_cs_deactivate(struct spi_slave *slave)break ; } } +#endif #endif /* CONFIG_ATMEL_SPI */ #ifdef CONFIG_BOARD_LATE_INIT
configs/sama5d3xek_mmc_defconfig +23 -1
@@ -8,6 +8,7 @@ CONFIG_SPL_FAT_SUPPORT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y +CONFIG_DEFAULT_DEVICE_TREE="sama5d36ek" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_MMC" CONFIG_BOOTDELAY=3
@@ -27,11 +28,32 @@ CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_FAT=y +CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_DM=y +CONFIG_SPL_DM=y +CONFIG_CLK=y +CONFIG_SPL_CLK=y +CONFIG_CLK_AT91=y +CONFIG_AT91_UTMI=y +CONFIG_AT91_H32MX=y +CONFIG_DM_GPIO=y +CONFIG_AT91_GPIO=y +CONFIG_DM_MMC=y +CONFIG_GENERIC_ATMEL_MCI=y +CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_ATMEL=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_AT91=y +CONFIG_DM_SERIAL=y +CONFIG_ATMEL_USART=y +CONFIG_DM_SPI=y +CONFIG_ATMEL_SPI=y CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_ATMEL_USBA=y CONFIG_LCD=y -CONFIG_OF_LIBFDT=y
configs/sama5d3xek_nandflash_defconfig +24 -1
@@ -6,6 +6,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_SPL_NAND_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y +CONFIG_DEFAULT_DEVICE_TREE="sama5d36ek" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_NANDFLASH" CONFIG_BOOTDELAY=3
@@ -25,11 +26,33 @@ CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_FAT=y +CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clocks clock-names interrupt-parent" +CONFIG_DM=y +CONFIG_SPL_DM=y +CONFIG_CLK=y +CONFIG_SPL_CLK=y +CONFIG_CLK_AT91=y +CONFIG_AT91_UTMI=y +CONFIG_AT91_H32MX=y +CONFIG_DM_GPIO=y +CONFIG_AT91_GPIO=y +CONFIG_DM_MMC=y +CONFIG_GENERIC_ATMEL_MCI=y +CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_ATMEL=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_AT91=y +CONFIG_DM_SERIAL=y +CONFIG_ATMEL_USART=y +CONFIG_DM_SPI=y +CONFIG_ATMEL_SPI=y CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_ATMEL_USBA=y CONFIG_LCD=y -CONFIG_OF_LIBFDT=y
configs/sama5d3xek_spiflash_defconfig +23 -1
@@ -7,6 +7,7 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y +CONFIG_DEFAULT_DEVICE_TREE="sama5d36ek" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_SERIALFLASH" CONFIG_BOOTDELAY=3
@@ -26,11 +27,32 @@ CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_FAT=y +CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_DM=y +CONFIG_SPL_DM=y +CONFIG_CLK=y +CONFIG_SPL_CLK=y +CONFIG_CLK_AT91=y +CONFIG_AT91_UTMI=y +CONFIG_AT91_H32MX=y +CONFIG_DM_GPIO=y +CONFIG_AT91_GPIO=y +CONFIG_DM_MMC=y +CONFIG_GENERIC_ATMEL_MCI=y +CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_ATMEL=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_AT91=y +CONFIG_DM_SERIAL=y +CONFIG_ATMEL_USART=y +CONFIG_DM_SPI=y +CONFIG_ATMEL_SPI=y CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_ATMEL_USBA=y CONFIG_LCD=y -CONFIG_OF_LIBFDT=y
include/configs/sama5d3xek.h +0 -20
@@ -21,11 +21,6 @@#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG -/* serial console */ -#define CONFIG_ATMEL_USART -#define CONFIG_USART_BASE ATMEL_BASE_DBGU -#define CONFIG_USART_ID ATMEL_ID_DBGU -/* * This needs to be defined for the OHCI code to work but it is defined as * ATMEL_ID_UHPHS in the CPU specific header files.
@@ -72,13 +67,6 @@ (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)#endif -/* SerialFlash */ - -#ifdef CONFIG_CMD_SF -#define CONFIG_ATMEL_SPI -#define CONFIG_SF_DEFAULT_SPEED 30000000 -#endif -/* NAND flash */ #define CONFIG_CMD_NAND
@@ -109,17 +97,9 @@#define CONFIG_PHY_MICREL #define CONFIG_PHY_MICREL_KSZ9021 -/* MMC */ - -#ifdef CONFIG_CMD_MMC -#define CONFIG_GENERIC_ATMEL_MCI -#define ATMEL_BASE_MMCI ATMEL_BASE_MCI0 -#endif -/* USB */ #ifdef CONFIG_CMD_USB -#define CONFIG_USB_ATMEL #define CONFIG_USB_ATMEL_CLK_SEL_UPLL #define CONFIG_USB_OHCI_NEW #define CONFIG_SYS_USB_OHCI_CPU_INIT
Signature · 1 line
2.11.0
PATCH v2 2/7 board: sama5d3xek: clean up code
In reply to Wenyou YangSince the introduction of the pinctrl and clk driver and the dts file, remove unneeded hard coded related code from the board file.
---
Changes in v2: None
board/atmel/sama5d3xek/sama5d3xek.c | 73 +------------------------------------ 1 file changed, 1 insertion(+), 72 deletions(-)
board/atmel/sama5d3xek/sama5d3xek.c +1 -72
@@ -16,7 +16,6 @@#include <lcd.h> #include <linux/ctype.h> #include <atmel_hlcdc.h> -#include <atmel_mci.h> #include <phy.h> #include <micrel.h> #include <net.h>
@@ -135,8 +134,6 @@ static void sama5d3xek_usb_hw_init(void)#ifdef CONFIG_GENERIC_ATMEL_MCI static void sama5d3xek_mci_hw_init (void ) { -at91_mci_hw_init (); -at91_set_pio_output (AT91_PIO_PORTB ,10 ,0 );/* MCI0 Power */ }#endif
@@ -217,12 +214,6 @@ void lcd_show_board_info(void)int board_early_init_f (void ) { -at91_periph_clk_enable (ATMEL_ID_PIOA ); -at91_periph_clk_enable (ATMEL_ID_PIOB ); -at91_periph_clk_enable (ATMEL_ID_PIOC ); -at91_periph_clk_enable (ATMEL_ID_PIOD ); -at91_periph_clk_enable (ATMEL_ID_PIOE ); -at91_seriald_hw_init ();return 0 ;
@@ -248,9 +239,6 @@ int board_init(void)#ifdef CONFIG_GENERIC_ATMEL_MCI sama5d3xek_mci_hw_init ();#endif -#ifdef CONFIG_ATMEL_SPI -at91_spi0_hw_init (1 <<0 ); -#endif #ifdef CONFIG_MACB if (has_emac ())at91_macb_hw_init ();
@@ -316,61 +304,6 @@ int board_eth_init(bd_t *bis)return rc; } -#ifdef CONFIG_GENERIC_ATMEL_MCI -int board_mmc_init (bd_t *bis) -{ -int rc =0 ; - - rc =atmel_mci_init ((void *)ATMEL_BASE_MCI0 ); - -return rc; -} -#endif - -/* SPI chip select control */ -#ifdef CONFIG_ATMEL_SPI -#include <spi.h> - -#ifndef CONFIG_DM_SPI -int spi_cs_is_valid (unsigned int bus,unsigned int cs) -{ -return bus ==0 && cs <4 ; -} - -void spi_cs_activate (struct spi_slave *slave) -{ -switch (slave->cs) { -case 0 : -at91_set_pio_output (AT91_PIO_PORTD ,13 ,0 ); -case 1 : -at91_set_pio_output (AT91_PIO_PORTD ,14 ,0 ); -case 2 : -at91_set_pio_output (AT91_PIO_PORTD ,15 ,0 ); -case 3 : -at91_set_pio_output (AT91_PIO_PORTD ,16 ,0 ); -default : -break ; - } -} - -void spi_cs_deactivate (struct spi_slave *slave) -{ -switch (slave->cs) { -case 0 : -at91_set_pio_output (AT91_PIO_PORTD ,13 ,1 ); -case 1 : -at91_set_pio_output (AT91_PIO_PORTD ,14 ,1 ); -case 2 : -at91_set_pio_output (AT91_PIO_PORTD ,15 ,1 ); -case 3 : -at91_set_pio_output (AT91_PIO_PORTD ,16 ,1 ); -default : -break ; - } -} -#endif -#endif /* CONFIG_ATMEL_SPI */ -#ifdef CONFIG_BOARD_LATE_INIT int board_late_init (void ) {
@@ -394,12 +327,8 @@ int board_late_init(void)#ifdef CONFIG_SPL_BUILD void spl_board_init (void ) { -#ifdef CONFIG_SYS_USE_MMC -sama5d3xek_mci_hw_init (); -#elif CONFIG_SYS_USE_NANDFLASH +#if CONFIG_SYS_USE_NANDFLASH sama5d3xek_nand_hw_init (); -#elif CONFIG_SYS_USE_SERIALFLASH -at91_spi0_hw_init (1 <<0 );#endif }
Signature · 1 line
2.11.0
PATCH v2 3/7 board: sama5d3xek: enable early debug UART
In reply to Wenyou YangEnable early debug UART to debug problems when an ICE or other debug mechanism is not available.
---
Changes in v2: None
board/atmel/sama5d3xek/sama5d3xek.c | 15 ++++++++++++++- configs/sama5d3xek_mmc_defconfig | 6 ++++++ configs/sama5d3xek_nandflash_defconfig | 6 ++++++ configs/sama5d3xek_spiflash_defconfig | 6 ++++++ 4 files changed, 32 insertions(+), 1 deletion(-)
board/atmel/sama5d3xek/sama5d3xek.c +14 -1
@@ -13,6 +13,7 @@#include <asm/arch/at91_rstc.h> #include <asm/arch/gpio.h> #include <asm/arch/clk.h> +#include <debug_uart.h> #include <lcd.h> #include <linux/ctype.h> #include <atmel_hlcdc.h>
@@ -212,12 +213,24 @@ void lcd_show_board_info(void)#endif /* CONFIG_LCD_INFO */ #endif /* CONFIG_LCD */ -int board_early_init_f (void ) +#ifdef CONFIG_DEBUG_UART_BOARD_INIT +void board_debug_uart_init (void ) {at91_seriald_hw_init (); +} +#endif +#ifdef CONFIG_BOARD_EARLY_INIT_F +int board_early_init_f (void ) +{ +#ifdef CONFIG_DEBUG_UART +debug_uart_init (); +#else +at91_seriald_hw_init (); +#endif return 0 ; } +#endif int board_init (void ) {
configs/sama5d3xek_mmc_defconfig +6 -0
@@ -47,6 +47,12 @@ CONFIG_SPI_FLASH_ATMEL=y CONFIG_PINCTRL=y CONFIG_PINCTRL_AT91=y CONFIG_DM_SERIAL=y +CONFIG_DEBUG_UART=y +CONFIG_DEBUG_UART_ATMEL=y +CONFIG_DEBUG_UART_BASE=0xffffee00 +CONFIG_DEBUG_UART_CLOCK=0 +CONFIG_DEBUG_UART_BOARD_INIT=y +CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_DM_SPI=y CONFIG_ATMEL_SPI=y
configs/sama5d3xek_nandflash_defconfig +6 -0
@@ -46,6 +46,12 @@ CONFIG_SPI_FLASH_ATMEL=y CONFIG_PINCTRL=y CONFIG_PINCTRL_AT91=y CONFIG_DM_SERIAL=y +CONFIG_DEBUG_UART=y +CONFIG_DEBUG_UART_ATMEL=y +CONFIG_DEBUG_UART_BASE=0xffffee00 +CONFIG_DEBUG_UART_CLOCK=0 +CONFIG_DEBUG_UART_BOARD_INIT=y +CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_DM_SPI=y CONFIG_ATMEL_SPI=y
configs/sama5d3xek_spiflash_defconfig +6 -0
@@ -46,6 +46,12 @@ CONFIG_SPI_FLASH_ATMEL=y CONFIG_PINCTRL=y CONFIG_PINCTRL_AT91=y CONFIG_DM_SERIAL=y +CONFIG_DEBUG_UART=y +CONFIG_DEBUG_UART_ATMEL=y +CONFIG_DEBUG_UART_BASE=0xffffee00 +CONFIG_DEBUG_UART_CLOCK=0 +CONFIG_DEBUG_UART_BOARD_INIT=y +CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_DM_SPI=y CONFIG_ATMEL_SPI=y
Signature · 1 line
2.11.0
PATCH v2 4/7 board: sama5d3_xplained: move config options to defconfig
In reply to Wenyou YangEnable CONFIG_CLK and CONFIG_PINCTRL to support at91 clock driver and at91 pinctrl driver.
Move some config options to configs/sama5d3xek_*_defconfig.
---
Changes in v2: None
configs/sama5d3_xplained_mmc_defconfig | 21 ++++++++++++++++++++- configs/sama5d3_xplained_nandflash_defconfig | 21 ++++++++++++++++++++- include/configs/sama5d3_xplained.h | 12 ------------ 3 files changed, 40 insertions(+), 14 deletions(-)
configs/sama5d3_xplained_mmc_defconfig +20 -1
@@ -8,6 +8,7 @@ CONFIG_SPL_FAT_SUPPORT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y +CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d3_xplained" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_MMC" CONFIG_BOOTDELAY=3
@@ -29,6 +30,24 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_UBI=y +CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_DM=y +CONFIG_SPL_DM=y +CONFIG_CLK=y +CONFIG_SPL_CLK=y +CONFIG_CLK_AT91=y +CONFIG_AT91_UTMI=y +CONFIG_AT91_H32MX=y +CONFIG_DM_GPIO=y +CONFIG_AT91_GPIO=y +CONFIG_DM_MMC=y +CONFIG_GENERIC_ATMEL_MCI=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_AT91=y +CONFIG_DM_SERIAL=y +CONFIG_ATMEL_USART=y CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y -CONFIG_OF_LIBFDT=y
configs/sama5d3_xplained_nandflash_defconfig +20 -1
@@ -6,6 +6,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_SPL_NAND_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y +CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d3_xplained" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_NANDFLASH" CONFIG_BOOTDELAY=3
@@ -27,6 +28,24 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_UBI=y +CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_DM=y +CONFIG_SPL_DM=y +CONFIG_CLK=y +CONFIG_SPL_CLK=y +CONFIG_CLK_AT91=y +CONFIG_AT91_UTMI=y +CONFIG_AT91_H32MX=y +CONFIG_DM_GPIO=y +CONFIG_AT91_GPIO=y +CONFIG_DM_MMC=y +CONFIG_GENERIC_ATMEL_MCI=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_AT91=y +CONFIG_DM_SERIAL=y +CONFIG_ATMEL_USART=y CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y -CONFIG_OF_LIBFDT=y
include/configs/sama5d3_xplained.h +0 -12
@@ -15,11 +15,6 @@#include "at91-sama5_common.h" -/* serial console */ -#define CONFIG_ATMEL_USART -#define CONFIG_USART_BASE ATMEL_BASE_DBGU -#define CONFIG_USART_ID ATMEL_ID_DBGU -/* * This needs to be defined for the OHCI code to work but it is defined as * ATMEL_ID_UHPHS in the CPU specific header files.
@@ -78,13 +73,6 @@#define CONFIG_RGMII #define CONFIG_PHYLIB -/* MMC */ - -#ifdef CONFIG_CMD_MMC -#define CONFIG_GENERIC_ATMEL_MCI -#define CONFIG_ATMEL_MCI_8BIT -#endif -/* USB */ #ifdef CONFIG_CMD_USB
Signature · 1 line
2.11.0
PATCH v2 5/7 board: sama5d3_xplained: clean up code
In reply to Wenyou YangSince the introduction of the pinctrl and clk driver and the dts file, remove unneeded hard coded related code from the board file.
---
Changes in v2: None
board/atmel/sama5d3_xplained/sama5d3_xplained.c | 19 ------------------- 1 file changed, 19 deletions(-)
board/atmel/sama5d3_xplained/sama5d3_xplained.c +0 -19
@@ -6,14 +6,12 @@*/ #include <common.h> -#include <mmc.h> #include <asm/io.h> #include <asm/arch/sama5d3_smc.h> #include <asm/arch/at91_common.h> #include <asm/arch/at91_rstc.h> #include <asm/arch/gpio.h> #include <asm/arch/clk.h> -#include <atmel_mci.h> #include <net.h> #include <netdev.h> #include <spl.h>
@@ -65,20 +63,12 @@ static void sama5d3_xplained_usb_hw_init(void)#ifdef CONFIG_GENERIC_ATMEL_MCI static void sama5d3_xplained_mci0_hw_init (void ) { -at91_mci_hw_init (); -at91_set_pio_output (AT91_PIO_PORTE ,2 ,0 );/* MCI0 Power */ }#endif int board_early_init_f (void ) { -at91_periph_clk_enable (ATMEL_ID_PIOA ); -at91_periph_clk_enable (ATMEL_ID_PIOB ); -at91_periph_clk_enable (ATMEL_ID_PIOC ); -at91_periph_clk_enable (ATMEL_ID_PIOD ); -at91_periph_clk_enable (ATMEL_ID_PIOE ); -at91_seriald_hw_init ();return 0 ;
@@ -122,15 +112,6 @@ int board_eth_init(bd_t *bis)return 0 ; } -#ifdef CONFIG_GENERIC_ATMEL_MCI -int board_mmc_init (bd_t *bis) -{ -atmel_mci_init ((void *)ATMEL_BASE_MCI0 ); - -return 0 ; -} -#endif -/* SPL */ #ifdef CONFIG_SPL_BUILD void spl_board_init (void )
Signature · 1 line
2.11.0
PATCH v2 6/7 board: sama5d3_xplained: enable early debug UART
In reply to Wenyou YangEnable early debug UART to debug problems when an ICE or other debug mechanism is not available.
---
Changes in v2: None
board/atmel/sama5d3_xplained/sama5d3_xplained.c | 16 +++++++++++++++- configs/sama5d3_xplained_mmc_defconfig | 6 ++++++ configs/sama5d3_xplained_nandflash_defconfig | 6 ++++++ 3 files changed, 27 insertions(+), 1 deletion(-)
board/atmel/sama5d3_xplained/sama5d3_xplained.c +15 -1
@@ -12,6 +12,7 @@#include <asm/arch/at91_rstc.h> #include <asm/arch/gpio.h> #include <asm/arch/clk.h> +#include <debug_uart.h> #include <net.h> #include <netdev.h> #include <spl.h>
@@ -67,12 +68,25 @@ static void sama5d3_xplained_mci0_hw_init(void) }#endif -int board_early_init_f (void ) +#ifdef CONFIG_DEBUG_UART_BOARD_INIT +void board_debug_uart_init (void ) {at91_seriald_hw_init (); +} +#endif +#ifdef CONFIG_BOARD_EARLY_INIT_F +int board_early_init_f (void ) +{ +#ifdef CONFIG_DEBUG_UART +debug_uart_init (); +#else +sama5d4_xplained_serial3_hw_init (); +at91_seriald_hw_init (); +#endif return 0 ; } +#endif int board_init (void ) {
configs/sama5d3_xplained_mmc_defconfig +6 -0
@@ -46,6 +46,12 @@ CONFIG_GENERIC_ATMEL_MCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_AT91=y CONFIG_DM_SERIAL=y +CONFIG_DEBUG_UART=y +CONFIG_DEBUG_UART_ATMEL=y +CONFIG_DEBUG_UART_BASE=0xffffee00 +CONFIG_DEBUG_UART_CLOCK=0 +CONFIG_DEBUG_UART_BOARD_INIT=y +CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_USB=y CONFIG_DM_USB=y
configs/sama5d3_xplained_nandflash_defconfig +6 -0
@@ -44,6 +44,12 @@ CONFIG_GENERIC_ATMEL_MCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_AT91=y CONFIG_DM_SERIAL=y +CONFIG_DEBUG_UART=y +CONFIG_DEBUG_UART_ATMEL=y +CONFIG_DEBUG_UART_BASE=0xffffee00 +CONFIG_DEBUG_UART_CLOCK=0 +CONFIG_DEBUG_UART_BOARD_INIT=y +CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_USB=y CONFIG_DM_USB=y
Signature · 1 line
2.11.0
PATCH v2 7/7 configs: sama5d3_xplained: move CONFIG_SYS_NO_FLASH to defconfig
In reply to Wenyou YangMove CONFIG_SYS_NO_FLASH to the configs/sama5d3x_xplained_*_defconfig files.
---
Changes in v2:
- rebase on the patch set:
[PATCH v3 0/8] board: sama5d4: convert boards to support DM/DT
http://lists.denx.de/pipermail/u-boot/2017-February/280506.html
configs/sama5d3_xplained_mmc_defconfig | 1 + configs/sama5d3_xplained_nandflash_defconfig | 1 + include/configs/sama5d3_xplained.h | 3 --- 3 files changed, 2 insertions(+), 3 deletions(-)
configs/sama5d3_xplained_mmc_defconfig +1 -0
@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d3_xplained" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_MMC" CONFIG_BOOTDELAY=3 +CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y CONFIG_HUSH_PARSER=y
configs/sama5d3_xplained_nandflash_defconfig +1 -0
@@ -10,6 +10,7 @@ CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d3_xplained" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_NANDFLASH" CONFIG_BOOTDELAY=3 +CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y CONFIG_HUSH_PARSER=y
include/configs/sama5d3_xplained.h +0 -3
@@ -10,9 +10,6 @@#ifndef __CONFIG_H#define __CONFIG_H -/* No NOR flash, this definition should put before common header */ -#define CONFIG_SYS_NO_FLASH -#include "at91-sama5_common.h" /*
Signature · 1 line
2.11.0
PATCH v2 7/7 configs: sama5d3_xplained: move CONFIG_SYS_NO_FLASH to defconfig
Quoted 2 lines · Wenyou Yang
Move
CONFIG_SYS_NO_FLASHto the configs/sama5d3x_xplained_*_defconfig files.
this one conflicts with e856bdcfb49291d30b19603fc101bea096c48196, just drop it from the series.
Andreas
Quoted 52 lines
Signed-off-by Wenyou Yang <[email protected]>---
Changes in v2:
- rebase on the patch set:
[PATCH v3 0/8] board: sama5d4: convert boards to support DM/DT
http://lists.denx.de/pipermail/u-boot/2017-February/280506.htmlconfigs/sama5d3_xplained_mmc_defconfig | 1 + configs/sama5d3_xplained_nandflash_defconfig | 1 + include/configs/sama5d3_xplained.h | 3 --- 3 files changed, 2 insertions(+), 3 deletions(-)configs/sama5d3_xplained_mmc_defconfig +1
-0@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d3_xplained" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_MMC" CONFIG_BOOTDELAY=3 +CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y CONFIG_HUSH_PARSER=yconfigs/sama5d3_xplained_nandflash_defconfig +1
-0@@ -10,6 +10,7 @@ CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d3_xplained" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_NANDFLASH" CONFIG_BOOTDELAY=3 +CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y CONFIG_HUSH_PARSER=yinclude/configs/sama5d3_xplained.h +0
-3@@ -10,9 +10,6 @@#ifndef __CONFIG_H#define __CONFIG_H -/* No NOR flash, this definition should put before common header */ -#define CONFIG_SYS_NO_FLASH -#include "at91-sama5_common.h" /*