All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/3] board: at91sam9n12ek: Convert to support DM and DT
@ 2017-04-12  9:08 Wenyou Yang
  2017-04-12  9:08 ` [U-Boot] [PATCH v2 1/3] configs: at91sam9n12ek: Update for DT and DM support Wenyou Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Wenyou Yang @ 2017-04-12  9:08 UTC (permalink / raw)
  To: u-boot

The purpose of the patch set is to convert the board to support
the driver model and the device tree.

It is based on the patch set:
	[PATCH v8 0/2] pinctrl: at91: Add pinctrl driver
	https://lists.denx.de/pipermail/u-boot/2017-March/284577.html

Changes in v2:
 - Remain the SPI speed macros.
 - Disable the SPL option for the nand config.
 - Add support of Atmel uart be used in the board_init_f stage.
 - Improve the commit log.
 - Use CONFIG_DEBUG_UART_CLOCK as the input clock for the early
   debug UART.
 - Move out [PATCH 1/4] ARM: dts: at91: add dts files for at91sam9n12ek.

Wenyou Yang (3):
  configs: at91sam9n12ek: Update for DT and DM support
  board: at91sam9n12ek: Clean up code
  board: at91sam9n12ek: Enable early debug UART

 board/atmel/at91sam9n12ek/at91sam9n12ek.c | 64 +++++++------------------------
 configs/at91sam9n12ek_mmc_defconfig       | 25 +++++++++++-
 configs/at91sam9n12ek_nandflash_defconfig | 31 +++++++++++----
 configs/at91sam9n12ek_spiflash_defconfig  | 32 ++++++++++++----
 include/configs/at91sam9n12ek.h           | 19 +--------
 5 files changed, 86 insertions(+), 85 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2 1/3] configs: at91sam9n12ek: Update for DT and DM support
  2017-04-12  9:08 [U-Boot] [PATCH v2 0/3] board: at91sam9n12ek: Convert to support DM and DT Wenyou Yang
@ 2017-04-12  9:08 ` Wenyou Yang
  2017-04-16 19:31   ` Simon Glass
  2017-04-12  9:08 ` [U-Boot] [PATCH v2 2/3] board: at91sam9n12ek: Clean up code Wenyou Yang
  2017-04-12  9:08 ` [U-Boot] [PATCH v2 3/3] board: at91sam9n12ek: Enable early debug UART Wenyou Yang
  2 siblings, 1 reply; 7+ messages in thread
From: Wenyou Yang @ 2017-04-12  9:08 UTC (permalink / raw)
  To: u-boot

Update the configuration files to support the device tree and driver
model. The device clock and pins configuration are handled by the
clock and the pinctrl drivers respectively.

Because the limitation of internal SRAM size, the SPL with driver
model can't be supported, disable the SPL option.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---

Changes in v2:
 - Remain the SPI speed macros.
 - Disable the SPL option for the nand config.
 - Add support of Atmel uart be used in the board_init_f stage.
 - Improve the commit log.

 board/atmel/at91sam9n12ek/at91sam9n12ek.c |  2 ++
 configs/at91sam9n12ek_mmc_defconfig       | 19 ++++++++++++++++++-
 configs/at91sam9n12ek_nandflash_defconfig | 25 ++++++++++++++++++-------
 configs/at91sam9n12ek_spiflash_defconfig  | 26 ++++++++++++++++++--------
 include/configs/at91sam9n12ek.h           | 19 +------------------
 5 files changed, 57 insertions(+), 34 deletions(-)

diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
index 58da2d27f8..e3f9cbbe50 100644
--- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c
+++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
@@ -133,6 +133,7 @@ void lcd_show_board_info(void)
 #endif /* CONFIG_LCD */
 
 /* SPI chip select control */
+#ifndef CONFIG_DM_SPI
 #ifdef CONFIG_ATMEL_SPI
 #include <spi.h>
 int spi_cs_is_valid(unsigned int bus, unsigned int cs)
@@ -164,6 +165,7 @@ void spi_cs_deactivate(struct spi_slave *slave)
 	}
 }
 #endif /* CONFIG_ATMEL_SPI */
+#endif
 
 #ifdef CONFIG_GENERIC_ATMEL_MCI
 int board_mmc_init(bd_t *bd)
diff --git a/configs/at91sam9n12ek_mmc_defconfig b/configs/at91sam9n12ek_mmc_defconfig
index ef9250bce9..abb07260be 100644
--- a/configs/at91sam9n12ek_mmc_defconfig
+++ b/configs/at91sam9n12ek_mmc_defconfig
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9N12EK=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9n12ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9N12,SYS_USE_MMC"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -19,9 +21,24 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=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_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
diff --git a/configs/at91sam9n12ek_nandflash_defconfig b/configs/at91sam9n12ek_nandflash_defconfig
index db88973d09..1b420e62b8 100644
--- a/configs/at91sam9n12ek_nandflash_defconfig
+++ b/configs/at91sam9n12ek_nandflash_defconfig
@@ -1,17 +1,13 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9N12EK=y
-CONFIG_SPL_GPIO_SUPPORT=y
-CONFIG_SPL_LIBCOMMON_SUPPORT=y
-CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SPL_SERIAL_SUPPORT=y
-CONFIG_SPL_NAND_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9n12ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9N12,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_CMD_BOOTZ=y
@@ -25,9 +21,24 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=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_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
diff --git a/configs/at91sam9n12ek_spiflash_defconfig b/configs/at91sam9n12ek_spiflash_defconfig
index 4e5d10226e..9048b14de4 100644
--- a/configs/at91sam9n12ek_spiflash_defconfig
+++ b/configs/at91sam9n12ek_spiflash_defconfig
@@ -1,18 +1,13 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9N12EK=y
-CONFIG_SPL_GPIO_SUPPORT=y
-CONFIG_SPL_LIBCOMMON_SUPPORT=y
-CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SPL_SERIAL_SUPPORT=y
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9n12ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9N12,SYS_USE_SPIFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_CMD_BOOTZ=y
@@ -26,9 +21,24 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=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_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
diff --git a/include/configs/at91sam9n12ek.h b/include/configs/at91sam9n12ek.h
index 872d471d05..398c3fdce6 100644
--- a/include/configs/at91sam9n12ek.h
+++ b/include/configs/at91sam9n12ek.h
@@ -28,14 +28,6 @@
 #define CONFIG_INITRD_TAG
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
-/* general purpose I/O */
-#define CONFIG_AT91_GPIO
-
-/* serial console */
-#define CONFIG_ATMEL_USART
-#define CONFIG_USART_BASE		ATMEL_BASE_DBGU
-#define CONFIG_USART_ID			ATMEL_ID_SYS
-
 /* LCD */
 #define LCD_BPP				LCD_COLOR16
 #define LCD_OUTPUT_BPP			24
@@ -46,7 +38,6 @@
 #define CONFIG_ATMEL_HLCD
 #define CONFIG_ATMEL_LCD_RGB565
 
-
 /*
  * BOOTP options
  */
@@ -70,14 +61,11 @@
  * that address while providing maximum stack area below.
  */
 # define CONFIG_SYS_INIT_SP_ADDR \
-	(ATMEL_BASE_SRAM + 0x1000 - GENERATED_GBL_DATA_SIZE)
+	(ATMEL_BASE_SRAM + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
 
 /* DataFlash */
 #ifdef CONFIG_CMD_SF
-#define CONFIG_ATMEL_SPI
 #define CONFIG_SF_DEFAULT_SPEED		30000000
-#define CONFIG_ENV_SPI_MODE		SPI_MODE_3
-#define CONFIG_SF_DEFAULT_MODE		SPI_MODE_3
 #endif
 
 /* NAND flash */
@@ -116,11 +104,6 @@
 	"bootargs_nand=rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs rw\0"\
 	"bootargs_mmc=root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait\0"
 
-/* MMC */
-#ifdef CONFIG_CMD_MMC
-#define CONFIG_GENERIC_ATMEL_MCI
-#endif
-
 /* Ethernet */
 #define CONFIG_KS8851_MLL
 #define CONFIG_KS8851_MLL_BASEADDR	0x30000000 /* use NCS2 */
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2 2/3] board: at91sam9n12ek: Clean up code
  2017-04-12  9:08 [U-Boot] [PATCH v2 0/3] board: at91sam9n12ek: Convert to support DM and DT Wenyou Yang
  2017-04-12  9:08 ` [U-Boot] [PATCH v2 1/3] configs: at91sam9n12ek: Update for DT and DM support Wenyou Yang
@ 2017-04-12  9:08 ` Wenyou Yang
  2017-04-16 19:31   ` Simon Glass
  2017-04-12  9:08 ` [U-Boot] [PATCH v2 3/3] board: at91sam9n12ek: Enable early debug UART Wenyou Yang
  2 siblings, 1 reply; 7+ messages in thread
From: Wenyou Yang @ 2017-04-12  9:08 UTC (permalink / raw)
  To: u-boot

Since the introduction of the pinctrl and clk driver and the device
tree files, remove unneeded related code from the board file.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---

Changes in v2: None

 board/atmel/at91sam9n12ek/at91sam9n12ek.c | 53 -------------------------------
 1 file changed, 53 deletions(-)

diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
index e3f9cbbe50..02b7790627 100644
--- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c
+++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
@@ -15,7 +15,6 @@
 #include <asm/arch/clk.h>
 #include <lcd.h>
 #include <atmel_hlcdc.h>
-#include <atmel_mci.h>
 #include <netdev.h>
 
 #ifdef CONFIG_LCD_INFO
@@ -132,50 +131,6 @@ void lcd_show_board_info(void)
 #endif /* CONFIG_LCD_INFO */
 #endif /* CONFIG_LCD */
 
-/* SPI chip select control */
-#ifndef CONFIG_DM_SPI
-#ifdef CONFIG_ATMEL_SPI
-#include <spi.h>
-int spi_cs_is_valid(unsigned int bus, unsigned int cs)
-{
-	return bus == 0 && cs < 2;
-}
-
-void spi_cs_activate(struct spi_slave *slave)
-{
-	switch (slave->cs) {
-	case 0:
-		at91_set_pio_output(AT91_PIO_PORTA, 14, 0);
-		break;
-	case 1:
-		at91_set_pio_output(AT91_PIO_PORTA, 7, 0);
-		break;
-	}
-}
-
-void spi_cs_deactivate(struct spi_slave *slave)
-{
-	switch (slave->cs) {
-	case 0:
-		at91_set_pio_output(AT91_PIO_PORTA, 14, 1);
-		break;
-	case 1:
-		at91_set_pio_output(AT91_PIO_PORTA, 7, 1);
-		break;
-	}
-}
-#endif /* CONFIG_ATMEL_SPI */
-#endif
-
-#ifdef CONFIG_GENERIC_ATMEL_MCI
-int board_mmc_init(bd_t *bd)
-{
-	at91_mci_hw_init();
-
-	return atmel_mci_init((void *)ATMEL_BASE_HSMCI0);
-}
-#endif
-
 #ifdef CONFIG_KS8851_MLL
 void at91sam9n12ek_ks8851_hw_init(void)
 {
@@ -209,10 +164,6 @@ void at91sam9n12ek_usb_hw_init(void)
 
 int board_early_init_f(void)
 {
-	at91_periph_clk_enable(ATMEL_ID_PIOAB);
-	at91_periph_clk_enable(ATMEL_ID_PIOCD);
-
-	at91_seriald_hw_init();
 	return 0;
 }
 
@@ -225,10 +176,6 @@ int board_init(void)
 	at91sam9n12ek_nand_hw_init();
 #endif
 
-#ifdef CONFIG_ATMEL_SPI
-	at91_spi0_hw_init(1 << 0);
-#endif
-
 #ifdef CONFIG_LCD
 	at91_lcd_hw_init();
 #endif
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2 3/3] board: at91sam9n12ek: Enable early debug UART
  2017-04-12  9:08 [U-Boot] [PATCH v2 0/3] board: at91sam9n12ek: Convert to support DM and DT Wenyou Yang
  2017-04-12  9:08 ` [U-Boot] [PATCH v2 1/3] configs: at91sam9n12ek: Update for DT and DM support Wenyou Yang
  2017-04-12  9:08 ` [U-Boot] [PATCH v2 2/3] board: at91sam9n12ek: Clean up code Wenyou Yang
@ 2017-04-12  9:08 ` Wenyou Yang
  2017-04-16 19:31   ` Simon Glass
  2 siblings, 1 reply; 7+ messages in thread
From: Wenyou Yang @ 2017-04-12  9:08 UTC (permalink / raw)
  To: u-boot

Enable the 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>
---

Changes in v2:
 - Use CONFIG_DEBUG_UART_CLOCK as the input clock for the early
   debug UART.
 - Move out [PATCH 1/4] ARM: dts: at91: add dts files for at91sam9n12ek.

 board/atmel/at91sam9n12ek/at91sam9n12ek.c | 13 +++++++++++++
 configs/at91sam9n12ek_mmc_defconfig       |  6 ++++++
 configs/at91sam9n12ek_nandflash_defconfig |  6 ++++++
 configs/at91sam9n12ek_spiflash_defconfig  |  6 ++++++
 4 files changed, 31 insertions(+)

diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
index 02b7790627..1105428986 100644
--- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c
+++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
@@ -13,6 +13,7 @@
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/at91_pio.h>
 #include <asm/arch/clk.h>
+#include <debug_uart.h>
 #include <lcd.h>
 #include <atmel_hlcdc.h>
 #include <netdev.h>
@@ -162,10 +163,22 @@ void at91sam9n12ek_usb_hw_init(void)
 }
 #endif
 
+#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();
+#endif
 	return 0;
 }
+#endif
 
 int board_init(void)
 {
diff --git a/configs/at91sam9n12ek_mmc_defconfig b/configs/at91sam9n12ek_mmc_defconfig
index abb07260be..e7e8a014c6 100644
--- a/configs/at91sam9n12ek_mmc_defconfig
+++ b/configs/at91sam9n12ek_mmc_defconfig
@@ -35,6 +35,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=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+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/at91sam9n12ek_nandflash_defconfig b/configs/at91sam9n12ek_nandflash_defconfig
index 1b420e62b8..e626805591 100644
--- a/configs/at91sam9n12ek_nandflash_defconfig
+++ b/configs/at91sam9n12ek_nandflash_defconfig
@@ -35,6 +35,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=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+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/at91sam9n12ek_spiflash_defconfig b/configs/at91sam9n12ek_spiflash_defconfig
index 9048b14de4..a5abcd1f3b 100644
--- a/configs/at91sam9n12ek_spiflash_defconfig
+++ b/configs/at91sam9n12ek_spiflash_defconfig
@@ -35,6 +35,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=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=132000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2 1/3] configs: at91sam9n12ek: Update for DT and DM support
  2017-04-12  9:08 ` [U-Boot] [PATCH v2 1/3] configs: at91sam9n12ek: Update for DT and DM support Wenyou Yang
@ 2017-04-16 19:31   ` Simon Glass
  0 siblings, 0 replies; 7+ messages in thread
From: Simon Glass @ 2017-04-16 19:31 UTC (permalink / raw)
  To: u-boot

On 12 April 2017 at 03:08, Wenyou Yang <wenyou.yang@atmel.com> wrote:
> Update the configuration files to support the device tree and driver
> model. The device clock and pins configuration are handled by the
> clock and the pinctrl drivers respectively.
>
> Because the limitation of internal SRAM size, the SPL with driver
> model can't be supported, disable the SPL option.
>
> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> ---
>
> Changes in v2:
>  - Remain the SPI speed macros.
>  - Disable the SPL option for the nand config.
>  - Add support of Atmel uart be used in the board_init_f stage.
>  - Improve the commit log.
>
>  board/atmel/at91sam9n12ek/at91sam9n12ek.c |  2 ++
>  configs/at91sam9n12ek_mmc_defconfig       | 19 ++++++++++++++++++-
>  configs/at91sam9n12ek_nandflash_defconfig | 25 ++++++++++++++++++-------
>  configs/at91sam9n12ek_spiflash_defconfig  | 26 ++++++++++++++++++--------
>  include/configs/at91sam9n12ek.h           | 19 +------------------
>  5 files changed, 57 insertions(+), 34 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2 2/3] board: at91sam9n12ek: Clean up code
  2017-04-12  9:08 ` [U-Boot] [PATCH v2 2/3] board: at91sam9n12ek: Clean up code Wenyou Yang
@ 2017-04-16 19:31   ` Simon Glass
  0 siblings, 0 replies; 7+ messages in thread
From: Simon Glass @ 2017-04-16 19:31 UTC (permalink / raw)
  To: u-boot

On 12 April 2017 at 03:08, Wenyou Yang <wenyou.yang@atmel.com> wrote:
> Since the introduction of the pinctrl and clk driver and the device
> tree files, remove unneeded related code from the board file.
>
> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> ---
>
> Changes in v2: None
>
>  board/atmel/at91sam9n12ek/at91sam9n12ek.c | 53 -------------------------------
>  1 file changed, 53 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2 3/3] board: at91sam9n12ek: Enable early debug UART
  2017-04-12  9:08 ` [U-Boot] [PATCH v2 3/3] board: at91sam9n12ek: Enable early debug UART Wenyou Yang
@ 2017-04-16 19:31   ` Simon Glass
  0 siblings, 0 replies; 7+ messages in thread
From: Simon Glass @ 2017-04-16 19:31 UTC (permalink / raw)
  To: u-boot

On 12 April 2017 at 03:08, Wenyou Yang <wenyou.yang@atmel.com> wrote:
> Enable the 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>
> ---
>
> Changes in v2:
>  - Use CONFIG_DEBUG_UART_CLOCK as the input clock for the early
>    debug UART.
>  - Move out [PATCH 1/4] ARM: dts: at91: add dts files for at91sam9n12ek.
>
>  board/atmel/at91sam9n12ek/at91sam9n12ek.c | 13 +++++++++++++
>  configs/at91sam9n12ek_mmc_defconfig       |  6 ++++++
>  configs/at91sam9n12ek_nandflash_defconfig |  6 ++++++
>  configs/at91sam9n12ek_spiflash_defconfig  |  6 ++++++
>  4 files changed, 31 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

Suggestion below.

> diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
> index 02b7790627..1105428986 100644
> --- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c
> +++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
> @@ -13,6 +13,7 @@
>  #include <asm/arch/at91_rstc.h>
>  #include <asm/arch/at91_pio.h>
>  #include <asm/arch/clk.h>
> +#include <debug_uart.h>
>  #include <lcd.h>
>  #include <atmel_hlcdc.h>
>  #include <netdev.h>
> @@ -162,10 +163,22 @@ void at91sam9n12ek_usb_hw_init(void)
>  }
>  #endif
>
> +#ifdef CONFIG_DEBUG_UART_BOARD_INIT
> +void board_debug_uart_init(void)

Perhaps this could become a common function across AT91?

> +{
> +       at91_seriald_hw_init();
> +}
> +#endif
> +

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-04-16 19:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-12  9:08 [U-Boot] [PATCH v2 0/3] board: at91sam9n12ek: Convert to support DM and DT Wenyou Yang
2017-04-12  9:08 ` [U-Boot] [PATCH v2 1/3] configs: at91sam9n12ek: Update for DT and DM support Wenyou Yang
2017-04-16 19:31   ` Simon Glass
2017-04-12  9:08 ` [U-Boot] [PATCH v2 2/3] board: at91sam9n12ek: Clean up code Wenyou Yang
2017-04-16 19:31   ` Simon Glass
2017-04-12  9:08 ` [U-Boot] [PATCH v2 3/3] board: at91sam9n12ek: Enable early debug UART Wenyou Yang
2017-04-16 19:31   ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.