[U-Boot] [PATCH v1 0/8] board: sama5d4: convert boards to support DM/DT

The purpose of patch set is to convert the board to support Device Tree and Driver Model.
They are based on the following patches: 1./ [PATCH v3 0/2] pinctrl: at91: Add pinctrl driver http://lists.denx.de/pipermail/u-boot/2016-October/270991.html 2./ [PATCH v1 0/2] ARM: dts: at91: add dts files for the boards of SAMA5D4 http://lists.denx.de/pipermail/u-boot/2016-October/271004.html 3./ [PATCH v3 0/2] serial: atmel_usart: Support to enable an early debug UART http://lists.denx.de/pipermail/u-boot/2016-October/270250.html 4./ [PATCH v1 0/3] gpio: at91_gpio: Add option and clock support http://lists.denx.de/pipermail/u-boot/2016-October/270687.html 5./ [PATCH v10] dm: at91: Add driver model support for the spi driver http://lists.denx.de/pipermail/u-boot/2016-October/270516.html
Wenyou Yang (8): configs: at91-sama5_common: fix for CONFIG_AT91_GPIO board: sama5d4_xplained: move config options to *_defconfig board: sama5d4_xplained: clean up code board: sama5d4_xplained: enable early debug UART board: sama5d4ek: move config options to *_defconfig board: sama5d4ek: clean up code board: sama5d4ek: enable early debug UART configs: sama5d4: move CONFIG_SYS_NO_FLASH to *defconfig
board/atmel/sama5d4_xplained/sama5d4_xplained.c | 122 +++-------------------- board/atmel/sama5d4ek/sama5d4ek.c | 124 +++--------------------- configs/sama5d4_xplained_mmc_defconfig | 31 +++++- configs/sama5d4_xplained_nandflash_defconfig | 33 ++++++- configs/sama5d4_xplained_spiflash_defconfig | 31 +++++- configs/sama5d4ek_mmc_defconfig | 31 +++++- configs/sama5d4ek_nandflash_defconfig | 31 +++++- configs/sama5d4ek_spiflash_defconfig | 31 +++++- include/configs/at91-sama5_common.h | 2 + include/configs/sama5d4_xplained.h | 33 +------ include/configs/sama5d4ek.h | 38 +------- 11 files changed, 216 insertions(+), 291 deletions(-)

If enabled Driver Model for GPIO, CONFIG_AT91_GPIO should be defined by configs/*_defconfig file.
Signed-off-by: Wenyou Yang wenyou.yang@atmel.com ---
include/configs/at91-sama5_common.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/configs/at91-sama5_common.h b/include/configs/at91-sama5_common.h index b09ef33..98e3f0e 100644 --- a/include/configs/at91-sama5_common.h +++ b/include/configs/at91-sama5_common.h @@ -29,7 +29,9 @@ #define CONFIG_ENV_VARS_UBOOT_CONFIG
/* general purpose I/O */ +#ifndef CONFIG_DM_GPIO #define CONFIG_AT91_GPIO +#endif
/*

Move the config options to configs/sama5d4_xplained_*_defconfig files.
Signed-off-by: Wenyou Yang wenyou.yang@atmel.com ---
board/atmel/sama5d4_xplained/sama5d4_xplained.c | 2 ++ configs/sama5d4_xplained_mmc_defconfig | 24 +++++++++++++++++++- configs/sama5d4_xplained_nandflash_defconfig | 26 ++++++++++++++++++++- configs/sama5d4_xplained_spiflash_defconfig | 24 +++++++++++++++++++- include/configs/sama5d4_xplained.h | 30 ------------------------- 5 files changed, 73 insertions(+), 33 deletions(-)
diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c index 47f0bae..6684276 100644 --- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c +++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c @@ -28,10 +28,12 @@ DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_ATMEL_SPI +#ifndef CONFIG_DM_SPI int spi_cs_is_valid(unsigned int bus, unsigned int cs) { return bus == 0 && cs == 0; } +#endif
void spi_cs_activate(struct spi_slave *slave) { diff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig index 5ff4688..e25b26a 100644 --- a/configs/sama5d4_xplained_mmc_defconfig +++ b/configs/sama5d4_xplained_mmc_defconfig @@ -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-sama5d4_xplained" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC" CONFIG_BOOTDELAY=3 @@ -26,10 +27,31 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=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_OF_LIBFDT=y diff --git a/configs/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig index 800a8b2..53dfdd6 100644 --- a/configs/sama5d4_xplained_nandflash_defconfig +++ b/configs/sama5d4_xplained_nandflash_defconfig @@ -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-sama5d4_xplained" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH" CONFIG_BOOTDELAY=3 @@ -21,13 +22,36 @@ CONFIG_CMD_MMC=y CONFIG_CMD_SF=y CONFIG_CMD_USB=y # CONFIG_CMD_FPGA is not set +CONFIG_CMD_GPIO=y CONFIG_CMD_DHCP=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_OHCI_HCD=y CONFIG_USB_STORAGE=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_ATMEL_USBA=y -CONFIG_OF_LIBFDT=y diff --git a/configs/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig index e5d2f54..17fd9a2 100644 --- a/configs/sama5d4_xplained_spiflash_defconfig +++ b/configs/sama5d4_xplained_spiflash_defconfig @@ -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="at91-sama5d4_xplained" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH" CONFIG_BOOTDELAY=3 @@ -25,10 +26,31 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=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_OF_LIBFDT=y diff --git a/include/configs/sama5d4_xplained.h b/include/configs/sama5d4_xplained.h index c90e1e6..be2eca3 100644 --- a/include/configs/sama5d4_xplained.h +++ b/include/configs/sama5d4_xplained.h @@ -15,11 +15,6 @@
#include "at91-sama5_common.h"
-/* serial console */ -#define CONFIG_ATMEL_USART -#define CONFIG_USART_BASE ATMEL_BASE_USART3 -#define CONFIG_USART_ID ATMEL_ID_USART3 - /* SDRAM */ #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_DDRCS @@ -34,16 +29,6 @@
#define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
-/* SerialFlash */ - -#ifdef CONFIG_CMD_SF -#define CONFIG_ATMEL_SPI -#define CONFIG_ATMEL_SPI0 -#define CONFIG_SF_DEFAULT_BUS 0 -#define CONFIG_SF_DEFAULT_CS 0 -#define CONFIG_SF_DEFAULT_SPEED 30000000 -#endif - /* NAND flash */ #define CONFIG_CMD_NAND
@@ -66,23 +51,8 @@ #ifdef CONFIG_CMD_MMC #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_GENERIC_ATMEL_MCI -#define ATMEL_BASE_MMCI ATMEL_BASE_MCI1 #endif
-/* USB */ - -#ifdef CONFIG_CMD_USB -#define CONFIG_USB_EHCI -#define CONFIG_USB_EHCI_ATMEL -#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3 -#endif - -/* USB device */ -#define CONFIG_USB_ETHER -#define CONFIG_USB_ETH_RNDIS -#define CONFIG_USBNET_MANUFACTURER "Atmel SAMA5D4EK" - #if defined(CONFIG_CMD_USB) || defined(CONFIG_CMD_MMC) #define CONFIG_DOS_PARTITION #endif

Since the introduction of pinctrl and clk driver, and the dts file, remove unneeded the pin configurations and the clock enabling code.
Signed-off-by: Wenyou Yang wenyou.yang@atmel.com ---
board/atmel/sama5d4_xplained/sama5d4_xplained.c | 109 +----------------------- 1 file changed, 1 insertion(+), 108 deletions(-)
diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c index 6684276..f93bed8 100644 --- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c +++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c @@ -10,54 +10,19 @@ #include <asm/arch/at91_common.h> #include <asm/arch/at91_rstc.h> #include <asm/arch/atmel_mpddrc.h> -#include <asm/arch/atmel_usba_udc.h> #include <asm/arch/gpio.h> #include <asm/arch/clk.h> #include <asm/arch/sama5d3_smc.h> #include <asm/arch/sama5d4.h> #include <atmel_hlcdc.h> -#include <atmel_mci.h> #include <lcd.h> -#include <mmc.h> #include <net.h> #include <netdev.h> #include <nand.h> -#include <spi.h> #include <version.h>
DECLARE_GLOBAL_DATA_PTR;
-#ifdef CONFIG_ATMEL_SPI -#ifndef CONFIG_DM_SPI -int spi_cs_is_valid(unsigned int bus, unsigned int cs) -{ - return bus == 0 && cs == 0; -} -#endif - -void spi_cs_activate(struct spi_slave *slave) -{ - at91_set_pio_output(AT91_PIO_PORTC, 3, 0); -} - -void spi_cs_deactivate(struct spi_slave *slave) -{ - at91_set_pio_output(AT91_PIO_PORTC, 3, 1); -} - -static void sama5d4_xplained_spi0_hw_init(void) -{ - at91_pio3_set_a_periph(AT91_PIO_PORTC, 0, 0); /* SPI0_MISO */ - at91_pio3_set_a_periph(AT91_PIO_PORTC, 1, 0); /* SPI0_MOSI */ - at91_pio3_set_a_periph(AT91_PIO_PORTC, 2, 0); /* SPI0_SPCK */ - - at91_set_pio_output(AT91_PIO_PORTC, 3, 1); /* SPI0_CS0 */ - - /* Enable clock */ - at91_periph_clk_enable(ATMEL_ID_SPI0); -} -#endif /* CONFIG_ATMEL_SPI */ - #ifdef CONFIG_NAND_ATMEL static void sama5d4_xplained_nand_hw_init(void) { @@ -101,14 +66,6 @@ static void sama5d4_xplained_nand_hw_init(void) } #endif
-#ifdef CONFIG_CMD_USB -static void sama5d4_xplained_usb_hw_init(void) -{ - at91_set_pio_output(AT91_PIO_PORTE, 11, 1); - at91_set_pio_output(AT91_PIO_PORTE, 14, 1); -} -#endif - #ifdef CONFIG_LCD vidinfo_t panel_info = { .vl_col = 480, @@ -202,41 +159,6 @@ void lcd_show_board_info(void)
#endif /* CONFIG_LCD */
-#ifdef CONFIG_GENERIC_ATMEL_MCI -void sama5d4_xplained_mci1_hw_init(void) -{ - at91_pio3_set_c_periph(AT91_PIO_PORTE, 19, 1); /* MCI1 CDA */ - at91_pio3_set_c_periph(AT91_PIO_PORTE, 20, 1); /* MCI1 DA0 */ - at91_pio3_set_c_periph(AT91_PIO_PORTE, 21, 1); /* MCI1 DA1 */ - at91_pio3_set_c_periph(AT91_PIO_PORTE, 22, 1); /* MCI1 DA2 */ - at91_pio3_set_c_periph(AT91_PIO_PORTE, 23, 1); /* MCI1 DA3 */ - at91_pio3_set_c_periph(AT91_PIO_PORTE, 18, 0); /* MCI1 CLK */ - - /* - * As the mci io internal pull down is too strong, so if the io needs - * external pull up, the pull up resistor will be very small, if so - * the power consumption will increase, so disable the interanl pull - * down to save the power. - */ - at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 18, 0); - at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 19, 0); - at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 20, 0); - at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 21, 0); - at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 22, 0); - at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 23, 0); - - /* Enable clock */ - at91_periph_clk_enable(ATMEL_ID_MCI1); -} - -int board_mmc_init(bd_t *bis) -{ - /* Enable the power supply */ - at91_set_pio_output(AT91_PIO_PORTE, 4, 0); - - return atmel_mci_init((void *)ATMEL_BASE_MCI1); -} -#endif /* CONFIG_GENERIC_ATMEL_MCI */
#ifdef CONFIG_MACB void sama5d4_xplained_macb0_hw_init(void) @@ -268,12 +190,6 @@ static void sama5d4_xplained_serial3_hw_init(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); - sama5d4_xplained_serial3_hw_init();
return 0; @@ -284,27 +200,15 @@ int board_init(void) /* adress of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
-#ifdef CONFIG_ATMEL_SPI - sama5d4_xplained_spi0_hw_init(); -#endif #ifdef CONFIG_NAND_ATMEL sama5d4_xplained_nand_hw_init(); #endif -#ifdef CONFIG_GENERIC_ATMEL_MCI - sama5d4_xplained_mci1_hw_init(); -#endif #ifdef CONFIG_MACB sama5d4_xplained_macb0_hw_init(); #endif #ifdef CONFIG_LCD sama5d4_xplained_lcd_hw_init(); #endif -#ifdef CONFIG_CMD_USB - sama5d4_xplained_usb_hw_init(); -#endif -#ifdef CONFIG_USB_GADGET_ATMEL_USBA - at91_udp_hw_init(); -#endif
return 0; } @@ -324,13 +228,6 @@ int board_eth_init(bd_t *bis) rc = macb_eth_initialize(0, (void *)ATMEL_BASE_GMAC0, 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; }
@@ -338,12 +235,8 @@ int board_eth_init(bd_t *bis) #ifdef CONFIG_SPL_BUILD void spl_board_init(void) { -#ifdef CONFIG_SYS_USE_MMC - sama5d4_xplained_mci1_hw_init(); -#elif CONFIG_SYS_USE_NANDFLASH +#if CONFIG_SYS_USE_NANDFLASH sama5d4_xplained_nand_hw_init(); -#elif CONFIG_SYS_USE_SERIALFLASH - sama5d4_xplained_spi0_hw_init(); #endif }

Enable early debug UART to debug problems when an ICE or other debug mechanism is not available.
Signed-off-by: Wenyou Yang wenyou.yang@atmel.com ---
board/atmel/sama5d4_xplained/sama5d4_xplained.c | 15 ++++++++++++++- configs/sama5d4_xplained_mmc_defconfig | 6 ++++++ configs/sama5d4_xplained_nandflash_defconfig | 6 ++++++ configs/sama5d4_xplained_spiflash_defconfig | 6 ++++++ include/configs/sama5d4_xplained.h | 2 ++ 5 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c index f93bed8..d02e227 100644 --- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c +++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c @@ -15,6 +15,7 @@ #include <asm/arch/sama5d3_smc.h> #include <asm/arch/sama5d4.h> #include <atmel_hlcdc.h> +#include <debug_uart.h> #include <lcd.h> #include <net.h> #include <netdev.h> @@ -188,12 +189,24 @@ static void sama5d4_xplained_serial3_hw_init(void) at91_periph_clk_enable(ATMEL_ID_USART3); }
-int board_early_init_f(void) +#ifdef CONFIG_DEBUG_UART_BOARD_INIT +void board_debug_uart_init(void) { sama5d4_xplained_serial3_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(); +#endif return 0; } +#endif
int board_init(void) { diff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig index e25b26a..e7518e8 100644 --- a/configs/sama5d4_xplained_mmc_defconfig +++ b/configs/sama5d4_xplained_mmc_defconfig @@ -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=0xfc00c000 +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 diff --git a/configs/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig index 53dfdd6..790d7d1 100644 --- a/configs/sama5d4_xplained_nandflash_defconfig +++ b/configs/sama5d4_xplained_nandflash_defconfig @@ -45,6 +45,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=0xfc00c000 +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 diff --git a/configs/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig index 17fd9a2..af6263f 100644 --- a/configs/sama5d4_xplained_spiflash_defconfig +++ b/configs/sama5d4_xplained_spiflash_defconfig @@ -45,6 +45,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=0xfc00c000 +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 diff --git a/include/configs/sama5d4_xplained.h b/include/configs/sama5d4_xplained.h index be2eca3..55f3770 100644 --- a/include/configs/sama5d4_xplained.h +++ b/include/configs/sama5d4_xplained.h @@ -15,6 +15,8 @@
#include "at91-sama5_common.h"
+#define CONFIG_BOARD_EARLY_INIT_F + /* SDRAM */ #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_DDRCS

Move the config options to configs/sama5d4ek_*_defconfig files.
Signed-off-by: Wenyou Yang wenyou.yang@atmel.com ---
board/atmel/sama5d4ek/sama5d4ek.c | 2 ++ configs/sama5d4ek_mmc_defconfig | 24 +++++++++++++++++++++++- configs/sama5d4ek_nandflash_defconfig | 24 +++++++++++++++++++++++- configs/sama5d4ek_spiflash_defconfig | 24 +++++++++++++++++++++++- include/configs/sama5d4ek.h | 35 ----------------------------------- 5 files changed, 71 insertions(+), 38 deletions(-)
diff --git a/board/atmel/sama5d4ek/sama5d4ek.c b/board/atmel/sama5d4ek/sama5d4ek.c index d1b5ff5..a0e4bb7 100644 --- a/board/atmel/sama5d4ek/sama5d4ek.c +++ b/board/atmel/sama5d4ek/sama5d4ek.c @@ -28,10 +28,12 @@ DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_ATMEL_SPI +#ifndef CONFIG_DM_SPI int spi_cs_is_valid(unsigned int bus, unsigned int cs) { return bus == 0 && cs == 0; } +#endif
void spi_cs_activate(struct spi_slave *slave) { diff --git a/configs/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig index a3ffdd3..6396c09 100644 --- a/configs/sama5d4ek_mmc_defconfig +++ b/configs/sama5d4ek_mmc_defconfig @@ -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-sama5d4ek" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC" CONFIG_BOOTDELAY=3 @@ -26,10 +27,31 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=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_OF_LIBFDT=y diff --git a/configs/sama5d4ek_nandflash_defconfig b/configs/sama5d4ek_nandflash_defconfig index d49645e..83b54dc 100644 --- a/configs/sama5d4ek_nandflash_defconfig +++ b/configs/sama5d4ek_nandflash_defconfig @@ -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-sama5d4ek" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH" CONFIG_BOOTDELAY=3 @@ -24,10 +25,31 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=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_OF_LIBFDT=y diff --git a/configs/sama5d4ek_spiflash_defconfig b/configs/sama5d4ek_spiflash_defconfig index db243af..b2906c7 100644 --- a/configs/sama5d4ek_spiflash_defconfig +++ b/configs/sama5d4ek_spiflash_defconfig @@ -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="at91-sama5d4ek" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH" CONFIG_BOOTDELAY=3 @@ -25,10 +26,31 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=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_OF_LIBFDT=y diff --git a/include/configs/sama5d4ek.h b/include/configs/sama5d4ek.h index b9927e9..8ec17cc 100644 --- a/include/configs/sama5d4ek.h +++ b/include/configs/sama5d4ek.h @@ -15,11 +15,6 @@
#include "at91-sama5_common.h"
-/* serial console */ -#define CONFIG_ATMEL_USART -#define CONFIG_USART_BASE ATMEL_BASE_USART3 -#define CONFIG_USART_ID ATMEL_ID_USART3 - /* SDRAM */ #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_DDRCS @@ -34,16 +29,6 @@
#define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
-/* SerialFlash */ - -#ifdef CONFIG_CMD_SF -#define CONFIG_ATMEL_SPI -#define CONFIG_ATMEL_SPI0 -#define CONFIG_SF_DEFAULT_BUS 0 -#define CONFIG_SF_DEFAULT_CS 0 -#define CONFIG_SF_DEFAULT_SPEED 30000000 -#endif - /* NAND flash */ #define CONFIG_CMD_NAND
@@ -62,29 +47,9 @@ #endif
/* MMC */ - #ifdef CONFIG_CMD_MMC #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_GENERIC_ATMEL_MCI -#define ATMEL_BASE_MMCI ATMEL_BASE_MCI1 -#endif - -/* USB */ - -#ifdef CONFIG_CMD_USB -#define CONFIG_USB_EHCI -#define CONFIG_USB_EHCI_ATMEL -#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3 -#endif - -/* USB device */ -#define CONFIG_USB_ETHER -#define CONFIG_USB_ETH_RNDIS -#define CONFIG_USBNET_MANUFACTURER "Atmel SAMA5D4EK" - -#if defined(CONFIG_CMD_USB) || defined(CONFIG_CMD_MMC) -#define CONFIG_DOS_PARTITION #endif
/* Ethernet Hardware */

Since the introduction of pinctrl and clk driver, and the dts file, remove unneeded the pin configurations and the clock enabling code.
Signed-off-by: Wenyou Yang wenyou.yang@atmel.com ---
board/atmel/sama5d4ek/sama5d4ek.c | 111 +------------------------------------- 1 file changed, 1 insertion(+), 110 deletions(-)
diff --git a/board/atmel/sama5d4ek/sama5d4ek.c b/board/atmel/sama5d4ek/sama5d4ek.c index a0e4bb7..db24072 100644 --- a/board/atmel/sama5d4ek/sama5d4ek.c +++ b/board/atmel/sama5d4ek/sama5d4ek.c @@ -10,54 +10,19 @@ #include <asm/arch/at91_common.h> #include <asm/arch/at91_rstc.h> #include <asm/arch/atmel_mpddrc.h> -#include <asm/arch/atmel_usba_udc.h> #include <asm/arch/gpio.h> #include <asm/arch/clk.h> #include <asm/arch/sama5d3_smc.h> #include <asm/arch/sama5d4.h> #include <atmel_hlcdc.h> -#include <atmel_mci.h> #include <lcd.h> -#include <mmc.h> #include <net.h> #include <netdev.h> #include <nand.h> -#include <spi.h> #include <version.h>
DECLARE_GLOBAL_DATA_PTR;
-#ifdef CONFIG_ATMEL_SPI -#ifndef CONFIG_DM_SPI -int spi_cs_is_valid(unsigned int bus, unsigned int cs) -{ - return bus == 0 && cs == 0; -} -#endif - -void spi_cs_activate(struct spi_slave *slave) -{ - at91_set_pio_output(AT91_PIO_PORTC, 3, 0); -} - -void spi_cs_deactivate(struct spi_slave *slave) -{ - at91_set_pio_output(AT91_PIO_PORTC, 3, 1); -} - -static void sama5d4ek_spi0_hw_init(void) -{ - at91_pio3_set_a_periph(AT91_PIO_PORTC, 0, 0); /* SPI0_MISO */ - at91_pio3_set_a_periph(AT91_PIO_PORTC, 1, 0); /* SPI0_MOSI */ - at91_pio3_set_a_periph(AT91_PIO_PORTC, 2, 0); /* SPI0_SPCK */ - - at91_set_pio_output(AT91_PIO_PORTC, 3, 1); /* SPI0_CS0 */ - - /* Enable clock */ - at91_periph_clk_enable(ATMEL_ID_SPI0); -} -#endif /* CONFIG_ATMEL_SPI */ - #ifdef CONFIG_NAND_ATMEL static void sama5d4ek_nand_hw_init(void) { @@ -101,15 +66,6 @@ static void sama5d4ek_nand_hw_init(void) } #endif
-#ifdef CONFIG_CMD_USB -static void sama5d4ek_usb_hw_init(void) -{ - at91_set_pio_output(AT91_PIO_PORTE, 11, 0); - at91_set_pio_output(AT91_PIO_PORTE, 12, 0); - at91_set_pio_output(AT91_PIO_PORTE, 10, 0); -} -#endif - #ifdef CONFIG_LCD vidinfo_t panel_info = { .vl_col = 800, @@ -198,42 +154,6 @@ void lcd_show_board_info(void)
#endif /* CONFIG_LCD */
-#ifdef CONFIG_GENERIC_ATMEL_MCI -void sama5d4ek_mci1_hw_init(void) -{ - at91_pio3_set_c_periph(AT91_PIO_PORTE, 19, 1); /* MCI1 CDA */ - at91_pio3_set_c_periph(AT91_PIO_PORTE, 20, 1); /* MCI1 DA0 */ - at91_pio3_set_c_periph(AT91_PIO_PORTE, 21, 1); /* MCI1 DA1 */ - at91_pio3_set_c_periph(AT91_PIO_PORTE, 22, 1); /* MCI1 DA2 */ - at91_pio3_set_c_periph(AT91_PIO_PORTE, 23, 1); /* MCI1 DA3 */ - at91_pio3_set_c_periph(AT91_PIO_PORTE, 18, 0); /* MCI1 CLK */ - - /* - * As the mci io internal pull down is too strong, so if the io needs - * external pull up, the pull up resistor will be very small, if so - * the power consumption will increase, so disable the interanl pull - * down to save the power. - */ - at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 18, 0); - at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 19, 0); - at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 20, 0); - at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 21, 0); - at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 22, 0); - at91_pio3_set_pio_pulldown(AT91_PIO_PORTE, 23, 0); - - /* Enable clock */ - at91_periph_clk_enable(ATMEL_ID_MCI1); -} - -int board_mmc_init(bd_t *bis) -{ - /* Enable power for MCI1 interface */ - at91_set_pio_output(AT91_PIO_PORTE, 15, 0); - - return atmel_mci_init((void *)ATMEL_BASE_MCI1); -} -#endif /* CONFIG_GENERIC_ATMEL_MCI */ - #ifdef CONFIG_MACB void sama5d4ek_macb0_hw_init(void) { @@ -264,12 +184,6 @@ static void sama5d4ek_serial3_hw_init(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); - sama5d4ek_serial3_hw_init();
return 0; @@ -280,27 +194,15 @@ int board_init(void) /* adress of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
-#ifdef CONFIG_ATMEL_SPI - sama5d4ek_spi0_hw_init(); -#endif #ifdef CONFIG_NAND_ATMEL sama5d4ek_nand_hw_init(); #endif -#ifdef CONFIG_GENERIC_ATMEL_MCI - sama5d4ek_mci1_hw_init(); -#endif #ifdef CONFIG_MACB sama5d4ek_macb0_hw_init(); #endif #ifdef CONFIG_LCD sama5d4ek_lcd_hw_init(); #endif -#ifdef CONFIG_CMD_USB - sama5d4ek_usb_hw_init(); -#endif -#ifdef CONFIG_USB_GADGET_ATMEL_USBA - at91_udp_hw_init(); -#endif
return 0; } @@ -320,13 +222,6 @@ int board_eth_init(bd_t *bis) rc = macb_eth_initialize(0, (void *)ATMEL_BASE_GMAC0, 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; }
@@ -334,12 +229,8 @@ int board_eth_init(bd_t *bis) #ifdef CONFIG_SPL_BUILD void spl_board_init(void) { -#ifdef CONFIG_SYS_USE_MMC - sama5d4ek_mci1_hw_init(); -#elif CONFIG_SYS_USE_NANDFLASH +#if CONFIG_SYS_USE_NANDFLASH sama5d4ek_nand_hw_init(); -#elif CONFIG_SYS_USE_SERIALFLASH - sama5d4ek_spi0_hw_init(); #endif }

Enable early debug UART to debug problems when an ICE or other debug mechanism is not available.
Signed-off-by: Wenyou Yang wenyou.yang@atmel.com ---
board/atmel/sama5d4ek/sama5d4ek.c | 15 ++++++++++++++- configs/sama5d4ek_mmc_defconfig | 6 ++++++ configs/sama5d4ek_nandflash_defconfig | 6 ++++++ configs/sama5d4ek_spiflash_defconfig | 6 ++++++ include/configs/sama5d4ek.h | 2 ++ 5 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/board/atmel/sama5d4ek/sama5d4ek.c b/board/atmel/sama5d4ek/sama5d4ek.c index db24072..5b45dcc 100644 --- a/board/atmel/sama5d4ek/sama5d4ek.c +++ b/board/atmel/sama5d4ek/sama5d4ek.c @@ -16,6 +16,7 @@ #include <asm/arch/sama5d4.h> #include <atmel_hlcdc.h> #include <lcd.h> +#include <debug_uart.h> #include <net.h> #include <netdev.h> #include <nand.h> @@ -182,12 +183,24 @@ static void sama5d4ek_serial3_hw_init(void) at91_periph_clk_enable(ATMEL_ID_USART3); }
-int board_early_init_f(void) +#ifdef CONFIG_DEBUG_UART_BOARD_INIT +void board_debug_uart_init(void) { sama5d4ek_serial3_hw_init(); +} +#endif
+#ifdef CONFIG_BOARD_EARLY_INIT_F +int board_early_init_f(void) +{ +#ifdef CONFIG_DEBUG_UART + debug_uart_init(); +#else + sama5d4ek_serial3_hw_init(); +#endif return 0; } +#endif
int board_init(void) { diff --git a/configs/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig index 6396c09..629c254 100644 --- a/configs/sama5d4ek_mmc_defconfig +++ b/configs/sama5d4ek_mmc_defconfig @@ -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=0xfc00c000 +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 diff --git a/configs/sama5d4ek_nandflash_defconfig b/configs/sama5d4ek_nandflash_defconfig index 83b54dc..9b5e756 100644 --- a/configs/sama5d4ek_nandflash_defconfig +++ b/configs/sama5d4ek_nandflash_defconfig @@ -44,6 +44,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=0xfc00c000 +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 diff --git a/configs/sama5d4ek_spiflash_defconfig b/configs/sama5d4ek_spiflash_defconfig index b2906c7..8b3a3ea 100644 --- a/configs/sama5d4ek_spiflash_defconfig +++ b/configs/sama5d4ek_spiflash_defconfig @@ -45,6 +45,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=0xfc00c000 +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 diff --git a/include/configs/sama5d4ek.h b/include/configs/sama5d4ek.h index 8ec17cc..3025373 100644 --- a/include/configs/sama5d4ek.h +++ b/include/configs/sama5d4ek.h @@ -15,6 +15,8 @@
#include "at91-sama5_common.h"
+#define CONFIG_BOARD_EARLY_INIT_F + /* SDRAM */ #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_DDRCS

Move CONFIG_SYS_NO_FLASH to the configs/sama5d4*_defconfig file.
Signed-off-by: Wenyou Yang wenyou.yang@atmel.com ---
configs/sama5d4_xplained_mmc_defconfig | 1 + configs/sama5d4_xplained_nandflash_defconfig | 1 + configs/sama5d4_xplained_spiflash_defconfig | 1 + configs/sama5d4ek_mmc_defconfig | 1 + configs/sama5d4ek_nandflash_defconfig | 1 + configs/sama5d4ek_spiflash_defconfig | 1 + include/configs/sama5d4_xplained.h | 3 --- include/configs/sama5d4ek.h | 3 --- 8 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig index e7518e8..dfd6070 100644 --- a/configs/sama5d4_xplained_mmc_defconfig +++ b/configs/sama5d4_xplained_mmc_defconfig @@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4_xplained" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC" CONFIG_BOOTDELAY=3 +CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y CONFIG_HUSH_PARSER=y diff --git a/configs/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig index 790d7d1..3ac745c 100644 --- a/configs/sama5d4_xplained_nandflash_defconfig +++ b/configs/sama5d4_xplained_nandflash_defconfig @@ -10,6 +10,7 @@ CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4_xplained" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH" CONFIG_BOOTDELAY=3 +CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y CONFIG_HUSH_PARSER=y diff --git a/configs/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig index af6263f..bd3353b 100644 --- a/configs/sama5d4_xplained_spiflash_defconfig +++ b/configs/sama5d4_xplained_spiflash_defconfig @@ -11,6 +11,7 @@ CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4_xplained" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH" CONFIG_BOOTDELAY=3 +CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y CONFIG_HUSH_PARSER=y diff --git a/configs/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig index 629c254..f4bcf29 100644 --- a/configs/sama5d4ek_mmc_defconfig +++ b/configs/sama5d4ek_mmc_defconfig @@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4ek" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC" CONFIG_BOOTDELAY=3 +CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y CONFIG_HUSH_PARSER=y diff --git a/configs/sama5d4ek_nandflash_defconfig b/configs/sama5d4ek_nandflash_defconfig index 9b5e756..d3c808f 100644 --- a/configs/sama5d4ek_nandflash_defconfig +++ b/configs/sama5d4ek_nandflash_defconfig @@ -10,6 +10,7 @@ CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4ek" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH" CONFIG_BOOTDELAY=3 +CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y CONFIG_HUSH_PARSER=y diff --git a/configs/sama5d4ek_spiflash_defconfig b/configs/sama5d4ek_spiflash_defconfig index 8b3a3ea..5a8bf3a 100644 --- a/configs/sama5d4ek_spiflash_defconfig +++ b/configs/sama5d4ek_spiflash_defconfig @@ -11,6 +11,7 @@ CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4ek" CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH" CONFIG_BOOTDELAY=3 +CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y CONFIG_HUSH_PARSER=y diff --git a/include/configs/sama5d4_xplained.h b/include/configs/sama5d4_xplained.h index 55f3770..202138b 100644 --- a/include/configs/sama5d4_xplained.h +++ b/include/configs/sama5d4_xplained.h @@ -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"
#define CONFIG_BOARD_EARLY_INIT_F diff --git a/include/configs/sama5d4ek.h b/include/configs/sama5d4ek.h index 3025373..5f8e837 100644 --- a/include/configs/sama5d4ek.h +++ b/include/configs/sama5d4ek.h @@ -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"
#define CONFIG_BOARD_EARLY_INIT_F
participants (1)
-
Wenyou Yang