[U-Boot] [PATCH v1 0/4] board: sama5d2_xplained: Convert to use device tree and drivers with DM

Convert to use the drivers which support the driver model and use the device tree. And add the support to enable an early debug UART for debugging.
It is based on the following patches: - [PATCH v1] i2c: at91_i2c: Fix the wrong include file http://lists.denx.de/pipermail/u-boot/2016-August/265265.html - [PATCH v1 0/2] clk: at91: Fix the wrong used class ID http://lists.denx.de/pipermail/u-boot/2016-August/265266.html - [PATCH v1] mmc: mmc-uclass: Add mmc_init() in mmc preinit phrase http://lists.denx.de/pipermail/u-boot/2016-August/265269.html - [PATCH v1 0/2] serial: atmel_usart: Support to enable an early debug UART http://lists.denx.de/pipermail/u-boot/2016-August/265270.html - [PATCH v8] dm: at91: Add driver model support for the spi driver http://lists.denx.de/pipermail/u-boot/2016-August/264484.html - [PATCH] sf: fix sf probe http://lists.denx.de/pipermail/u-boot/2016-August/264104.html
Wenyou Yang (4): board: sama5d2_xplained: Move config options to defconfigs board: sama5d2_xplained: Clean up code board: sama5d2_xplained: Set 'ethaddr' got from AT24MAC board: sama5d2_xplained: Enable an early debug UART
board/atmel/sama5d2_xplained/sama5d2_xplained.c | 167 +++++++++--------------- configs/sama5d2_xplained_mmc_defconfig | 37 +++++- configs/sama5d2_xplained_spiflash_defconfig | 38 +++++- include/configs/sama5d2_xplained.h | 32 +---- 4 files changed, 145 insertions(+), 129 deletions(-)

Move the config options from the include/configs/sama5d2_xplained.h to configs/sama5d2_xplained_*_defconfig.
Signed-off-by: Wenyou Yang wenyou.yang@atmel.com ---
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 */

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/sama5d2_xplained/sama5d2_xplained.c | 104 ------------------------ 1 file changed, 104 deletions(-)
diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index 413a000..7ccadf2 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -25,34 +25,6 @@
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) -{ - atmel_pio4_set_pio_output(AT91_PIO_PORTA, 17, 0); -} - -void spi_cs_deactivate(struct spi_slave *slave) -{ - atmel_pio4_set_pio_output(AT91_PIO_PORTA, 17, 1); -} - -static void board_spi0_hw_init(void) -{ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 14, 0); - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 15, 0); - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 16, 0); - - atmel_pio4_set_pio_output(AT91_PIO_PORTA, 17, 1); - - at91_periph_clk_enable(ATMEL_ID_SPI0); -} - static void board_usb_hw_init(void) { atmel_pio4_set_pio_output(AT91_PIO_PORTB, 10, 1); @@ -159,55 +131,6 @@ static void board_gmac_hw_init(void) at91_periph_clk_enable(ATMEL_ID_GMAC); }
-static void board_sdhci0_hw_init(void) -{ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 0, 0); /* SDMMC0_CK */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 1, 0); /* SDMMC0_CMD */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 2, 0); /* SDMMC0_DAT0 */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 3, 0); /* SDMMC0_DAT1 */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 4, 0); /* SDMMC0_DAT2 */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 5, 0); /* SDMMC0_DAT3 */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 6, 0); /* SDMMC0_DAT4 */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 7, 0); /* SDMMC0_DAT5 */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 8, 0); /* SDMMC0_DAT6 */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 9, 0); /* SDMMC0_DAT7 */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 10, 0); /* SDMMC0_RSTN */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 11, 0); /* SDMMC0_VDDSEL */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 13, 0); /* SDMMC0_CD */ - - at91_periph_clk_enable(ATMEL_ID_SDMMC0); - at91_enable_periph_generated_clk(ATMEL_ID_SDMMC0, - GCK_CSS_UPLL_CLK, 1); -} - -static void board_sdhci1_hw_init(void) -{ - atmel_pio4_set_e_periph(AT91_PIO_PORTA, 18, 0); /* SDMMC1_DAT0 */ - atmel_pio4_set_e_periph(AT91_PIO_PORTA, 19, 0); /* SDMMC1_DAT1 */ - atmel_pio4_set_e_periph(AT91_PIO_PORTA, 20, 0); /* SDMMC1_DAT2 */ - atmel_pio4_set_e_periph(AT91_PIO_PORTA, 21, 0); /* SDMMC1_DAT3 */ - atmel_pio4_set_e_periph(AT91_PIO_PORTA, 22, 0); /* SDMMC1_CK */ - atmel_pio4_set_e_periph(AT91_PIO_PORTA, 27, 0); /* SDMMC1_RSTN */ - atmel_pio4_set_e_periph(AT91_PIO_PORTA, 28, 0); /* SDMMC1_CMD */ - atmel_pio4_set_e_periph(AT91_PIO_PORTA, 30, 0); /* SDMMC1_CD */ - - at91_periph_clk_enable(ATMEL_ID_SDMMC1); - at91_enable_periph_generated_clk(ATMEL_ID_SDMMC1, - GCK_CSS_UPLL_CLK, 1); -} - -int board_mmc_init(bd_t *bis) -{ -#ifdef CONFIG_ATMEL_SDHCI0 - atmel_sdhci_init((void *)ATMEL_BASE_SDMMC0, ATMEL_ID_SDMMC0); -#endif -#ifdef CONFIG_ATMEL_SDHCI1 - atmel_sdhci_init((void *)ATMEL_BASE_SDMMC1, ATMEL_ID_SDMMC1); -#endif - - return 0; -} - static void board_uart1_hw_init(void) { atmel_pio4_set_a_periph(AT91_PIO_PORTD, 2, 1); /* URXD1 */ @@ -218,11 +141,6 @@ static void board_uart1_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); - board_uart1_hw_init();
return 0; @@ -233,17 +151,6 @@ int board_init(void) /* address of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
-#ifdef CONFIG_ATMEL_SPI - board_spi0_hw_init(); -#endif -#ifdef CONFIG_ATMEL_SDHCI -#ifdef CONFIG_ATMEL_SDHCI0 - board_sdhci0_hw_init(); -#endif -#ifdef CONFIG_ATMEL_SDHCI1 - board_sdhci1_hw_init(); -#endif -#endif #ifdef CONFIG_MACB board_gmac_hw_init(); #endif @@ -289,17 +196,6 @@ int board_eth_init(bd_t *bis) #ifdef CONFIG_SPL_BUILD void spl_board_init(void) { -#ifdef CONFIG_SYS_USE_SERIALFLASH - board_spi0_hw_init(); -#endif -#ifdef CONFIG_ATMEL_SDHCI -#ifdef CONFIG_ATMEL_SDHCI0 - board_sdhci0_hw_init(); -#endif -#ifdef CONFIG_ATMEL_SDHCI1 - board_sdhci1_hw_init(); -#endif -#endif }
static void ddrc_conf(struct atmel_mpddrc_config *ddrc)

On 30 August 2016 at 03:18, Wenyou Yang wenyou.yang@atmel.com wrote:
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/sama5d2_xplained/sama5d2_xplained.c | 104 ------------------------ 1 file changed, 104 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
Nice!

If 'ethaddr' is not set, we will get the ethernet address from AT24MAC, and set it to 'ethaddr' variable.
Signed-off-by: Wenyou Yang wenyou.yang@atmel.com Signed-off-by: Songjun Wu songjun.wu@microchip.com ---
board/atmel/sama5d2_xplained/sama5d2_xplained.c | 51 +++++++++++++++++++++++++ include/configs/sama5d2_xplained.h | 6 +++ 2 files changed, 57 insertions(+)
diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index 7ccadf2..c94574b 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -7,6 +7,8 @@
#include <common.h> #include <atmel_hlcdc.h> +#include <dm.h> +#include <i2c.h> #include <lcd.h> #include <mmc.h> #include <net.h> @@ -192,6 +194,55 @@ int board_eth_init(bd_t *bis) return rc; }
+#ifdef CONFIG_CMD_I2C +static int set_ethaddr_from_eeprom(void) +{ + const int ETH_ADDR_LEN = 6; + unsigned char ethaddr[ETH_ADDR_LEN]; + const char *ETHADDR_NAME = "ethaddr"; + struct udevice *bus, *dev; + + if (getenv(ETHADDR_NAME)) + return 0; + + if (uclass_get_device_by_seq(UCLASS_I2C, 1, &bus)) { + printf("Cannot find I2C bus 1\n"); + return -1; + } + + if (dm_i2c_probe(bus, CONFIG_AT24MAC_ADDR, 0, &dev)) { + printf("Failed to probe I2C chip\n"); + return -1; + } + + if (dm_i2c_read(dev, CONFIG_AT24MAC_REG, ethaddr, ETH_ADDR_LEN)) { + printf("Failed to read ethernet address from EEPROM\n"); + return -1; + } + + if (!is_valid_ethaddr(ethaddr)) { + printf("The ethernet address read from EEPROM is not valid!\n"); + return -1; + } + + return eth_setenv_enetaddr(ETHADDR_NAME, ethaddr); +} +#else +static int set_ethaddr_from_eeprom(void) +{ + return 0; +} +#endif + +#ifdef CONFIG_MISC_INIT_R +int misc_init_r(void) +{ + set_ethaddr_from_eeprom(); + + return 0; +} +#endif + /* SPL */ #ifdef CONFIG_SPL_BUILD void spl_board_init(void) diff --git a/include/configs/sama5d2_xplained.h b/include/configs/sama5d2_xplained.h index 77757a3..cada04f 100644 --- a/include/configs/sama5d2_xplained.h +++ b/include/configs/sama5d2_xplained.h @@ -15,6 +15,8 @@
#include "at91-sama5_common.h"
+#define CONFIG_MISC_INIT_R + /* SDRAM */ #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_DDRCS @@ -54,6 +56,10 @@ #define CONFIG_DOS_PARTITION #endif
+/* I2C */ +#define CONFIG_AT24MAC_ADDR 0x5c +#define CONFIG_AT24MAC_REG 0x9a + /* Ethernet Hardware */ #define CONFIG_MACB #define CONFIG_RMII

Enable an 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/sama5d2_xplained/sama5d2_xplained.c | 14 ++++++++++++++ configs/sama5d2_xplained_mmc_defconfig | 6 ++++++ configs/sama5d2_xplained_spiflash_defconfig | 6 ++++++ include/configs/sama5d2_xplained.h | 2 ++ 4 files changed, 28 insertions(+)
diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index c94574b..0ae6a7d 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -7,6 +7,7 @@
#include <common.h> #include <atmel_hlcdc.h> +#include <debug_uart.h> #include <dm.h> #include <i2c.h> #include <lcd.h> @@ -141,12 +142,25 @@ 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(); +} +#endif + +#ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { +#ifdef CONFIG_DEBUG_UART + debug_uart_init(); +#else board_uart1_hw_init(); +#endif
return 0; } +#endif
int board_init(void) { diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig index ab1b58b..ba36c8f 100644 --- a/configs/sama5d2_xplained_mmc_defconfig +++ b/configs/sama5d2_xplained_mmc_defconfig @@ -44,6 +44,12 @@ CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_ATMEL=y CONFIG_PINCTRL=y CONFIG_PINCTRL_AT91PIO4=y +CONFIG_DEBUG_UART=y +CONFIG_DEBUG_UART_ATMEL=y +CONFIG_DEBUG_UART_BASE=0xf8020000 +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/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig index ecba5ef..85f3f9c 100644 --- a/configs/sama5d2_xplained_spiflash_defconfig +++ b/configs/sama5d2_xplained_spiflash_defconfig @@ -44,6 +44,12 @@ CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_ATMEL=y CONFIG_PINCTRL=y CONFIG_PINCTRL_AT91PIO4=y +CONFIG_DEBUG_UART=y +CONFIG_DEBUG_UART_ATMEL=y +CONFIG_DEBUG_UART_BASE=0xf8020000 +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/sama5d2_xplained.h b/include/configs/sama5d2_xplained.h index cada04f..51fabbe 100644 --- a/include/configs/sama5d2_xplained.h +++ b/include/configs/sama5d2_xplained.h @@ -15,6 +15,8 @@
#include "at91-sama5_common.h"
+#define CONFIG_BOARD_EARLY_INIT_F + #define CONFIG_MISC_INIT_R
/* SDRAM */

On 30 August 2016 at 03:18, Wenyou Yang wenyou.yang@atmel.com wrote:
Enable an 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/sama5d2_xplained/sama5d2_xplained.c | 14 ++++++++++++++ configs/sama5d2_xplained_mmc_defconfig | 6 ++++++ configs/sama5d2_xplained_spiflash_defconfig | 6 ++++++ include/configs/sama5d2_xplained.h | 2 ++ 4 files changed, 28 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
participants (2)
-
Simon Glass
-
Wenyou Yang