[U-Boot] [U-Boot, v2, 1/4] board: sama5d2_xplained: Move config options to defconfigs

Andreas Bießmann andreas at biessmann.org
Sun Oct 16 22:11:08 CEST 2016


On Tue, Sep 13, 2016 at 10:49:02AM +0800, Wenyou Yang wrote:
> Move the config options from the include/configs/sama5d2_xplained.h
> to configs/sama5d2_xplained_*_defconfig.
> 
> Signed-off-by: Wenyou Yang <wenyou.yang at atmel.com>

Reviewed-by: Andreas Bießmann <andreas at biessmann.org>

> ---
> 
> Changes in v2: None
> 
>  board/atmel/sama5d2_xplained/sama5d2_xplained.c |  2 ++
>  configs/sama5d2_xplained_mmc_defconfig          | 31 +++++++++++++++++++++++-
>  configs/sama5d2_xplained_spiflash_defconfig     | 32 ++++++++++++++++++++++++-
>  include/configs/sama5d2_xplained.h              | 26 --------------------
>  4 files changed, 63 insertions(+), 28 deletions(-)
> 
> diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
> index 93df7ba..413a000 100644
> --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c
> +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
> @@ -25,10 +25,12 @@
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> +#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/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig
> index 9ca2a9c..ab1b58b 100644
> --- a/configs/sama5d2_xplained_mmc_defconfig
> +++ b/configs/sama5d2_xplained_mmc_defconfig
> @@ -1,6 +1,9 @@
>  CONFIG_ARM=y
>  CONFIG_ARCH_AT91=y
>  CONFIG_TARGET_SAMA5D2_XPLAINED=y
> +CONFIG_DM_GPIO=y
> +CONFIG_DM_SERIAL=y
> +CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"
>  CONFIG_SPL=y
>  CONFIG_FIT=y
>  CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_MMC"
> @@ -13,13 +16,39 @@ CONFIG_CMD_BOOTZ=y
>  # CONFIG_CMD_FLASH is not set
>  CONFIG_CMD_MMC=y
>  CONFIG_CMD_SF=y
> +CONFIG_CMD_I2C=y
>  CONFIG_CMD_USB=y
>  # CONFIG_CMD_FPGA is not set
>  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_BLK=y
> +CONFIG_CLK=y
> +CONFIG_SPL_CLK=y
> +CONFIG_CLK_AT91=y
> +CONFIG_AT91_UTMI=y
> +CONFIG_AT91_H32MX=y
> +CONFIG_AT91_GENERIC_CLK=y
> +CONFIG_ATMEL_PIO4=y
> +CONFIG_DM_I2C=y
> +CONFIG_SYS_I2C_AT91=y
> +CONFIG_DM_MMC=y
> +CONFIG_DM_MMC_OPS=y
> +CONFIG_ATMEL_SDHCI=y
> +CONFIG_DM_SPI_FLASH=y
>  CONFIG_SPI_FLASH=y
> +CONFIG_SPI_FLASH_ATMEL=y
> +CONFIG_PINCTRL=y
> +CONFIG_PINCTRL_AT91PIO4=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_GADGET=y
>  CONFIG_USB_GADGET_ATMEL_USBA=y
> -CONFIG_OF_LIBFDT=y
> diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig
> index 617d73a..ecba5ef 100644
> --- a/configs/sama5d2_xplained_spiflash_defconfig
> +++ b/configs/sama5d2_xplained_spiflash_defconfig
> @@ -1,6 +1,9 @@
>  CONFIG_ARM=y
>  CONFIG_ARCH_AT91=y
>  CONFIG_TARGET_SAMA5D2_XPLAINED=y
> +CONFIG_DM_GPIO=y
> +CONFIG_DM_SERIAL=y
> +CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"
>  CONFIG_SPL=y
>  CONFIG_FIT=y
>  CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_SERIALFLASH"
> @@ -13,13 +16,40 @@ CONFIG_CMD_BOOTZ=y
>  # CONFIG_CMD_FLASH is not set
>  CONFIG_CMD_MMC=y
>  CONFIG_CMD_SF=y
> +CONFIG_CMD_I2C=y
>  CONFIG_CMD_USB=y
>  # CONFIG_CMD_FPGA is not set
>  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_BLK=y
> +CONFIG_CLK=y
> +CONFIG_SPL_CLK=y
> +CONFIG_CLK_AT91=y
> +CONFIG_AT91_UTMI=y
> +CONFIG_AT91_H32MX=y
> +CONFIG_AT91_GENERIC_CLK=y
> +CONFIG_ATMEL_PIO4=y
> +CONFIG_DM_I2C=y
> +CONFIG_SYS_I2C_AT91=y
> +CONFIG_DM_MMC=y
> +CONFIG_DM_MMC_OPS=y
> +CONFIG_ATMEL_SDHCI=y
> +CONFIG_DM_SPI_FLASH=y
>  CONFIG_SPI_FLASH=y
> +CONFIG_SPI_FLASH_ATMEL=y
> +CONFIG_PINCTRL=y
> +CONFIG_PINCTRL_AT91PIO4=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/sama5d2_xplained.h b/include/configs/sama5d2_xplained.h
> index f9a8f6f..77757a3 100644
> --- a/include/configs/sama5d2_xplained.h
> +++ b/include/configs/sama5d2_xplained.h
> @@ -15,11 +15,6 @@
>  
>  #include "at91-sama5_common.h"
>  
> -/* serial console */
> -#define CONFIG_ATMEL_USART
> -#define CONFIG_USART_BASE		ATMEL_BASE_UART1
> -#define CONFIG_USART_ID			ATMEL_ID_UART1
> -
>  /* SDRAM */
>  #define CONFIG_NR_DRAM_BANKS		1
>  #define CONFIG_SYS_SDRAM_BASE           ATMEL_BASE_DDRCS
> @@ -34,14 +29,8 @@
>  
>  #define CONFIG_SYS_LOAD_ADDR		0x22000000 /* load address */
>  
> -#undef CONFIG_AT91_GPIO
> -#define CONFIG_ATMEL_PIO4
> -
>  /* SerialFlash */
>  #ifdef CONFIG_CMD_SF
> -#define CONFIG_ATMEL_SPI
> -#define CONFIG_ATMEL_SPI0
> -#define CONFIG_SPI_FLASH_ATMEL
>  #define CONFIG_SF_DEFAULT_BUS		0
>  #define CONFIG_SF_DEFAULT_CS		0
>  #define CONFIG_SF_DEFAULT_SPEED		30000000
> @@ -51,24 +40,9 @@
>  #undef CONFIG_CMD_NAND
>  
>  /* MMC */
> -
>  #ifdef CONFIG_CMD_MMC
> -#define CONFIG_MMC
>  #define CONFIG_GENERIC_MMC
>  #define CONFIG_SDHCI
> -#define CONFIG_ATMEL_SDHCI
> -#define CONFIG_ATMEL_SDHCI0
> -#define CONFIG_ATMEL_SDHCI1
> -#define CONFIG_SUPPORT_EMMC_BOOT
> -#endif
> -
> -/* USB */
> -
> -#ifdef CONFIG_CMD_USB
> -#define CONFIG_USB_EHCI
> -#define CONFIG_USB_EHCI_ATMEL
> -#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS	3
> -#define CONFIG_USB_STORAGE
>  #endif
>  
>  /* USB device */


More information about the U-Boot mailing list