Re: [U-Boot] [PATCH v6 1/2] gpio: at91_gpio: Remove CPU_HAS_PIO3 macro

2017-02-13 Thread Andreas Bießmann
Dear Wenyou,

On 13.02.17 03:07, Wenyou Yang wrote:
> The intention of this patch is the preparation to introduce
> the pinctrl driver for AT91 PIO.
> 
> Use "union" to make the PIO3 and PIO2's registers be together
> and make their offset aligned.

unfortunately there is another breakage in this patch I was not able to
discover yesterday. The at91_emac driver for at91rm9200 devices uses the
pio struct internally and therefore this patch also breaks the build for
at91rm9200.

Could you please also fix this?

Andreas

> 
> Signed-off-by: Wenyou Yang 
> ---
> 
> Changes in v6:
>  - Move PIO_SCDR_DIV define from mach/ to mach/at91_pio.h
>to fix the build error.
> 
> Changes in v5: None
> Changes in v4:
>  - Fix the incomplete conversion of the peripheral configurations on
>the sama5d3, sam9x5, and sam9n12.
> 
> Changes in v3: None
> Changes in v2: None
> 
>  arch/arm/mach-at91/arm926ejs/at91sam9n12_devices.c | 106 ++--
>  arch/arm/mach-at91/arm926ejs/at91sam9x5_devices.c  | 112 ++---
>  arch/arm/mach-at91/armv7/sama5d3_devices.c | 140 
>  arch/arm/mach-at91/include/mach/at91_pio.h |  63 
>  arch/arm/mach-at91/include/mach/at91sam9x5.h   |   2 -
>  arch/arm/mach-at91/include/mach/sama5d3.h  |   2 -
>  arch/arm/mach-at91/include/mach/sama5d4.h  |   2 -
>  board/atmel/at91sam9n12ek/at91sam9n12ek.c  |  10 +-
>  board/atmel/at91sam9x5ek/at91sam9x5ek.c|  90 +--
>  board/atmel/sama5d3xek/sama5d3xek.c|  64 
>  board/atmel/sama5d4_xplained/sama5d4_xplained.c| 148 -
>  board/atmel/sama5d4ek/sama5d4ek.c  | 136 
>  board/denx/ma5d4evk/ma5d4evk.c | 178 
> ++---
>  board/l+g/vinco/vinco.c|  70 
>  drivers/gpio/at91_gpio.c   | 142 ++--
>  15 files changed, 658 insertions(+), 607 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/arm926ejs/at91sam9n12_devices.c 
> b/arch/arm/mach-at91/arm926ejs/at91sam9n12_devices.c
> index a03abfc310..28c8cf260a 100644
> --- a/arch/arm/mach-at91/arm926ejs/at91sam9n12_devices.c
> +++ b/arch/arm/mach-at91/arm926ejs/at91sam9n12_devices.c
> @@ -18,45 +18,45 @@ unsigned int has_lcdc()
>  
>  void at91_serial0_hw_init(void)
>  {
> - at91_set_a_periph(AT91_PIO_PORTA, 0, 1);/* TXD0 */
> - at91_set_a_periph(AT91_PIO_PORTA, 1, 0);/* RXD0 */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 0, 1);   /* TXD0 */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 1, 0);   /* RXD0 */
>   at91_periph_clk_enable(ATMEL_ID_USART0);
>  }
>  
>  void at91_serial1_hw_init(void)
>  {
> - at91_set_a_periph(AT91_PIO_PORTA, 5, 1);/* TXD1 */
> - at91_set_a_periph(AT91_PIO_PORTA, 6, 0);/* RXD1 */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 5, 1);   /* TXD1 */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 6, 0);   /* RXD1 */
>   at91_periph_clk_enable(ATMEL_ID_USART1);
>  }
>  
>  void at91_serial2_hw_init(void)
>  {
> - at91_set_a_periph(AT91_PIO_PORTA, 7, 1);/* TXD2 */
> - at91_set_a_periph(AT91_PIO_PORTA, 8, 0);/* RXD2 */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 7, 1);   /* TXD2 */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 8, 0);   /* RXD2 */
>   at91_periph_clk_enable(ATMEL_ID_USART2);
>  }
>  
>  void at91_serial3_hw_init(void)
>  {
> - at91_set_b_periph(AT91_PIO_PORTC, 22, 1);   /* TXD3 */
> - at91_set_b_periph(AT91_PIO_PORTC, 23, 0);   /* RXD3 */
> + at91_pio3_set_b_periph(AT91_PIO_PORTC, 22, 1);  /* TXD3 */
> + at91_pio3_set_b_periph(AT91_PIO_PORTC, 23, 0);  /* RXD3 */
>   at91_periph_clk_enable(ATMEL_ID_USART3);
>  }
>  
>  void at91_seriald_hw_init(void)
>  {
> - at91_set_a_periph(AT91_PIO_PORTA, 10, 1);   /* DTXD */
> - at91_set_a_periph(AT91_PIO_PORTA, 9, 0);/* DRXD */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 10, 1);  /* DTXD */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 9, 0);   /* DRXD */
>   at91_periph_clk_enable(ATMEL_ID_SYS);
>  }
>  
>  #ifdef CONFIG_ATMEL_SPI
>  void at91_spi0_hw_init(unsigned long cs_mask)
>  {
> - at91_set_a_periph(AT91_PIO_PORTA, 11, 0);   /* SPI0_MISO */
> - at91_set_a_periph(AT91_PIO_PORTA, 12, 0);   /* SPI0_MOSI */
> - at91_set_a_periph(AT91_PIO_PORTA, 13, 0);   /* SPI0_SPCK */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 11, 0);  /* SPI0_MISO */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 12, 0);  /* SPI0_MOSI */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 13, 0);  /* SPI0_SPCK */
>  
>   at91_periph_clk_enable(ATMEL_ID_SPI0);
>  
> @@ -72,9 +72,9 @@ void at91_spi0_hw_init(unsigned long cs_mask)
>  
>  void 

Re: [U-Boot] [U-Boot, v5, 1/2] gpio: at91_gpio: Remove CPU_HAS_PIO3 macro

2017-02-12 Thread Andreas Bießmann
On Tue, Feb 07, 2017 at 02:07:18PM +0800, Wenyou Yang wrote:
> The intention of this patch is the preparation to introduce
> the pinctrl driver for AT91 PIO.
> 
> Use "union" to make the PIO3 and PIO2's registers be together
> and make their offset aligned.
> 

This patch breaks on at91 devices without PIO3 due to missing PIO_SCDR_DIV
define, please fix this. First one failing for me using buildman is pm9g45.

Andreas

> Signed-off-by: Wenyou Yang 
> ---
> 
> Changes in v5: None
> Changes in v4:
>  - Fix the incomplete conversion of the peripheral configurations on
>the sama5d3, sam9x5, and sam9n12.
> 
> Changes in v3: None
> Changes in v2: None
> 
>  arch/arm/mach-at91/arm926ejs/at91sam9n12_devices.c | 106 ++--
>  arch/arm/mach-at91/arm926ejs/at91sam9x5_devices.c  | 112 ++---
>  arch/arm/mach-at91/armv7/sama5d3_devices.c | 140 
>  arch/arm/mach-at91/include/mach/at91_pio.h |  61 +++
>  arch/arm/mach-at91/include/mach/at91sam9x5.h   |   1 -
>  arch/arm/mach-at91/include/mach/sama5d3.h  |   1 -
>  arch/arm/mach-at91/include/mach/sama5d4.h  |   1 -
>  board/atmel/at91sam9n12ek/at91sam9n12ek.c  |  10 +-
>  board/atmel/at91sam9x5ek/at91sam9x5ek.c|  90 +--
>  board/atmel/sama5d3xek/sama5d3xek.c|  64 
>  board/atmel/sama5d4_xplained/sama5d4_xplained.c| 148 -
>  board/atmel/sama5d4ek/sama5d4ek.c  | 136 
>  board/denx/ma5d4evk/ma5d4evk.c | 178 
> ++---
>  board/l+g/vinco/vinco.c|  70 
>  drivers/gpio/at91_gpio.c   | 142 ++--
>  15 files changed, 656 insertions(+), 604 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/arm926ejs/at91sam9n12_devices.c 
> b/arch/arm/mach-at91/arm926ejs/at91sam9n12_devices.c
> index a03abfc310..28c8cf260a 100644
> --- a/arch/arm/mach-at91/arm926ejs/at91sam9n12_devices.c
> +++ b/arch/arm/mach-at91/arm926ejs/at91sam9n12_devices.c
> @@ -18,45 +18,45 @@ unsigned int has_lcdc()
>  
>  void at91_serial0_hw_init(void)
>  {
> - at91_set_a_periph(AT91_PIO_PORTA, 0, 1);/* TXD0 */
> - at91_set_a_periph(AT91_PIO_PORTA, 1, 0);/* RXD0 */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 0, 1);   /* TXD0 */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 1, 0);   /* RXD0 */
>   at91_periph_clk_enable(ATMEL_ID_USART0);
>  }
>  
>  void at91_serial1_hw_init(void)
>  {
> - at91_set_a_periph(AT91_PIO_PORTA, 5, 1);/* TXD1 */
> - at91_set_a_periph(AT91_PIO_PORTA, 6, 0);/* RXD1 */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 5, 1);   /* TXD1 */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 6, 0);   /* RXD1 */
>   at91_periph_clk_enable(ATMEL_ID_USART1);
>  }
>  
>  void at91_serial2_hw_init(void)
>  {
> - at91_set_a_periph(AT91_PIO_PORTA, 7, 1);/* TXD2 */
> - at91_set_a_periph(AT91_PIO_PORTA, 8, 0);/* RXD2 */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 7, 1);   /* TXD2 */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 8, 0);   /* RXD2 */
>   at91_periph_clk_enable(ATMEL_ID_USART2);
>  }
>  
>  void at91_serial3_hw_init(void)
>  {
> - at91_set_b_periph(AT91_PIO_PORTC, 22, 1);   /* TXD3 */
> - at91_set_b_periph(AT91_PIO_PORTC, 23, 0);   /* RXD3 */
> + at91_pio3_set_b_periph(AT91_PIO_PORTC, 22, 1);  /* TXD3 */
> + at91_pio3_set_b_periph(AT91_PIO_PORTC, 23, 0);  /* RXD3 */
>   at91_periph_clk_enable(ATMEL_ID_USART3);
>  }
>  
>  void at91_seriald_hw_init(void)
>  {
> - at91_set_a_periph(AT91_PIO_PORTA, 10, 1);   /* DTXD */
> - at91_set_a_periph(AT91_PIO_PORTA, 9, 0);/* DRXD */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 10, 1);  /* DTXD */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 9, 0);   /* DRXD */
>   at91_periph_clk_enable(ATMEL_ID_SYS);
>  }
>  
>  #ifdef CONFIG_ATMEL_SPI
>  void at91_spi0_hw_init(unsigned long cs_mask)
>  {
> - at91_set_a_periph(AT91_PIO_PORTA, 11, 0);   /* SPI0_MISO */
> - at91_set_a_periph(AT91_PIO_PORTA, 12, 0);   /* SPI0_MOSI */
> - at91_set_a_periph(AT91_PIO_PORTA, 13, 0);   /* SPI0_SPCK */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 11, 0);  /* SPI0_MISO */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 12, 0);  /* SPI0_MOSI */
> + at91_pio3_set_a_periph(AT91_PIO_PORTA, 13, 0);  /* SPI0_SPCK */
>  
>   at91_periph_clk_enable(ATMEL_ID_SPI0);
>  
> @@ -72,9 +72,9 @@ void at91_spi0_hw_init(unsigned long cs_mask)
>  
>  void at91_spi1_hw_init(unsigned long cs_mask)
>  {
> - at91_set_b_periph(AT91_PIO_PORTA, 21, 0);   /* SPI1_MISO */
> - at91_set_b_periph(AT91_PIO_PORTA, 22, 0);   /* SPI1_MOSI */
> - 

Re: [U-Boot] [U-Boot, v2, 4/4] configs: at91sam9x5ek: move SYS_NO_FLASH to defconfig

2017-02-12 Thread Andreas Bießmann
On Tue, Feb 07, 2017 at 05:11:35PM +0800, Wenyou Yang wrote:
> Move CONFIG_SYS_NO_FLASH to the configs/sama5d4*_defconfig file.
>

this one conflicts with e856bdcfb49291d30b19603fc101bea096c48196, just drop it
from the series.

Andreas 

> Signed-off-by: Wenyou Yang 
> Reviewed-by: Simon Glass 
> ---
> 
> Changes in v2:
>  - rebase on the patch set:
> [RESEND PATCH v2] ARM: at91: add default config file for sama5d36ek 
> CMP board
> http://lists.denx.de/pipermail/u-boot/2017-February/280525.html
> 
>  configs/at91sam9x5ek_dataflash_defconfig | 1 +
>  configs/at91sam9x5ek_mmc_defconfig   | 1 +
>  configs/at91sam9x5ek_nandflash_defconfig | 1 +
>  configs/at91sam9x5ek_spiflash_defconfig  | 1 +
>  include/configs/at91sam9x5ek.h   | 3 ---
>  5 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/configs/at91sam9x5ek_dataflash_defconfig 
> b/configs/at91sam9x5ek_dataflash_defconfig
> index d7408e8b29..8351281a79 100644
> --- a/configs/at91sam9x5ek_dataflash_defconfig
> +++ b/configs/at91sam9x5ek_dataflash_defconfig
> @@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9X5,SYS_USE_DATAFLASH"
>  CONFIG_BOOTDELAY=3
>  # CONFIG_CONSOLE_MUX is not set
>  CONFIG_SYS_CONSOLE_IS_IN_ENV=y
> +CONFIG_SYS_NO_FLASH=y
>  # CONFIG_DISPLAY_BOARDINFO is not set
>  CONFIG_HUSH_PARSER=y
>  CONFIG_SYS_PROMPT="U-Boot> "
> diff --git a/configs/at91sam9x5ek_mmc_defconfig 
> b/configs/at91sam9x5ek_mmc_defconfig
> index 07f62fc38b..6d212d40e8 100644
> --- a/configs/at91sam9x5ek_mmc_defconfig
> +++ b/configs/at91sam9x5ek_mmc_defconfig
> @@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9X5,SYS_USE_MMC"
>  CONFIG_BOOTDELAY=3
>  # CONFIG_CONSOLE_MUX is not set
>  CONFIG_SYS_CONSOLE_IS_IN_ENV=y
> +CONFIG_SYS_NO_FLASH=y
>  # CONFIG_DISPLAY_BOARDINFO is not set
>  CONFIG_HUSH_PARSER=y
>  CONFIG_SYS_PROMPT="U-Boot> "
> diff --git a/configs/at91sam9x5ek_nandflash_defconfig 
> b/configs/at91sam9x5ek_nandflash_defconfig
> index 15ac465abd..d90481ec1c 100644
> --- a/configs/at91sam9x5ek_nandflash_defconfig
> +++ b/configs/at91sam9x5ek_nandflash_defconfig
> @@ -11,6 +11,7 @@ CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9X5,SYS_USE_NANDFLASH"
>  CONFIG_BOOTDELAY=3
>  # CONFIG_CONSOLE_MUX is not set
>  CONFIG_SYS_CONSOLE_IS_IN_ENV=y
> +CONFIG_SYS_NO_FLASH=y
>  # CONFIG_DISPLAY_BOARDINFO is not set
>  CONFIG_SPL=y
>  CONFIG_HUSH_PARSER=y
> diff --git a/configs/at91sam9x5ek_spiflash_defconfig 
> b/configs/at91sam9x5ek_spiflash_defconfig
> index d44d851848..b9fbf39d08 100644
> --- a/configs/at91sam9x5ek_spiflash_defconfig
> +++ b/configs/at91sam9x5ek_spiflash_defconfig
> @@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9X5,SYS_USE_SPIFLASH"
>  CONFIG_BOOTDELAY=3
>  # CONFIG_CONSOLE_MUX is not set
>  CONFIG_SYS_CONSOLE_IS_IN_ENV=y
> +CONFIG_SYS_NO_FLASH=y
>  # CONFIG_DISPLAY_BOARDINFO is not set
>  CONFIG_HUSH_PARSER=y
>  CONFIG_SYS_PROMPT="U-Boot> "
> diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h
> index a11d5748da..c133eb85ab 100644
> --- a/include/configs/at91sam9x5ek.h
> +++ b/include/configs/at91sam9x5ek.h
> @@ -50,9 +50,6 @@
>  #define CONFIG_BOOTP_GATEWAY
>  #define CONFIG_BOOTP_HOSTNAME
>  
> -/* no NOR flash */
> -#define CONFIG_SYS_NO_FLASH
> -
>  /*
>   * Command line configuration.
>   */
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 7/7] configs: sama5d3_xplained: move CONFIG_SYS_NO_FLASH to defconfig

2017-02-12 Thread Andreas Bießmann
On Tue, Feb 07, 2017 at 04:40:04PM +0800, Wenyou Yang wrote:
> Move CONFIG_SYS_NO_FLASH to the configs/sama5d3x_xplained_*_defconfig
> files.

this one conflicts with e856bdcfb49291d30b19603fc101bea096c48196, just drop it
from the series.

Andreas
> 
> Signed-off-by: Wenyou Yang 
> ---
> 
> 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(-)
> 
> diff --git a/configs/sama5d3_xplained_mmc_defconfig 
> b/configs/sama5d3_xplained_mmc_defconfig
> index a9890cc3d3..49089664de 100644
> --- a/configs/sama5d3_xplained_mmc_defconfig
> +++ b/configs/sama5d3_xplained_mmc_defconfig
> @@ -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
> diff --git a/configs/sama5d3_xplained_nandflash_defconfig 
> b/configs/sama5d3_xplained_nandflash_defconfig
> index 05798d666c..5f427c4bbd 100644
> --- a/configs/sama5d3_xplained_nandflash_defconfig
> +++ b/configs/sama5d3_xplained_nandflash_defconfig
> @@ -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
> diff --git a/include/configs/sama5d3_xplained.h 
> b/include/configs/sama5d3_xplained.h
> index 85997a6281..f98643a963 100644
> --- a/include/configs/sama5d3_xplained.h
> +++ b/include/configs/sama5d3_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"
>  
>  /*
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 8/8] configs: sama5d4: move CONFIG_SYS_NO_FLASH to *defconfig

2017-02-12 Thread Andreas Bießmann
On Tue, Feb 07, 2017 at 04:01:29PM +0800, Wenyou Yang wrote:
> Move CONFIG_SYS_NO_FLASH to the configs/sama5d4*_defconfig file.
> 
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
> Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

this one will conflict with e856bdcfb49291d30b19603fc101bea096c48196, just
drop it.

Andreas

> ---
> 
> Changes in v3:
>  - add the Reviewed-by tags.
>  - rebase on the patch:
> [PATCH v2] ARM: dts: at91: add device tree files for at91sam9x5ek
> http://lists.denx.de/pipermail/u-boot/2017-February/280504.html
> 
> Changes in v2: None
> 
>  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 e7518e819b..dfd607070d 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 790d7d13d1..3ac745c01e 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 af6263fcaa..bd3353b5a0 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 76b785569e..799fbbc689 100644
> --- a/configs/sama5d4ek_mmc_defconfig
> +++ b/configs/sama5d4ek_mmc_defconfig
> @@ -14,6 +14,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
>  CONFIG_BOOTDELAY=3
>  # CONFIG_CONSOLE_MUX is not set
>  CONFIG_SYS_CONSOLE_IS_IN_ENV=y
> +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 1bef32227a..cf2d71483f 100644
> --- a/configs/sama5d4ek_nandflash_defconfig
> +++ b/configs/sama5d4ek_nandflash_defconfig
> @@ -12,6 +12,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
>  CONFIG_BOOTDELAY=3
>  # CONFIG_CONSOLE_MUX is not set
>  CONFIG_SYS_CONSOLE_IS_IN_ENV=y
> +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 bd7325efaf..67e2fab3d8 100644
> --- a/configs/sama5d4ek_spiflash_defconfig
> +++ b/configs/sama5d4ek_spiflash_defconfig
> @@ -13,6 +13,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
>  CONFIG_BOOTDELAY=3
>  # CONFIG_CONSOLE_MUX is not set
>  CONFIG_SYS_CONSOLE_IS_IN_ENV=y
> +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 e3abedb9a6..3fe67b3c86 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"
>  
>  /* SDRAM */
> diff --

Re: [U-Boot] [PATCH v2 8/8] configs: sama5d4: move CONFIG_SYS_NO_FLASH to *defconfig

2017-02-06 Thread Andreas Bießmann

On 2016-10-28 09:16, Wenyou Yang wrote:

Move CONFIG_SYS_NO_FLASH to the configs/sama5d4*_defconfig file.

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


Reviewed-by: Andreas Bießmann <andr...@biessmann.org>


---

Changes in v2: None

 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 76b7855..799fbbc 100644
--- a/configs/sama5d4ek_mmc_defconfig
+++ b/configs/sama5d4ek_mmc_defconfig
@@ -14,6 +14,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
+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 1bef322..cf2d714 100644
--- a/configs/sama5d4ek_nandflash_defconfig
+++ b/configs/sama5d4ek_nandflash_defconfig
@@ -12,6 +12,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
+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 bd7325e..67e2fab 100644
--- a/configs/sama5d4ek_spiflash_defconfig
+++ b/configs/sama5d4ek_spiflash_defconfig
@@ -13,6 +13,7 @@ 
CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"

 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
+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 8032164..68d7bcf 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 964cb6b..fd60540 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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 7/8] board: sama5d4ek: enable early debug UART

2017-02-06 Thread Andreas Bießmann

On 2016-10-28 09:16, Wenyou Yang wrote:

Enable early debug UART to debug problems when an ICE or other
debug mechanism is not available.

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


Reviewed-by: Andreas Bießmann <andr...@biessmann.org>


---

Changes in v2: None

 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 c5479e7..2c2036c 100644
--- a/board/atmel/sama5d4ek/sama5d4ek.c
+++ b/board/atmel/sama5d4ek/sama5d4ek.c
@@ -17,6 +17,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -192,12 +193,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 fd49b58..76b7855 100644
--- a/configs/sama5d4ek_mmc_defconfig
+++ b/configs/sama5d4ek_mmc_defconfig
@@ -48,6 +48,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 34f5234..1bef322 100644
--- a/configs/sama5d4ek_nandflash_defconfig
+++ b/configs/sama5d4ek_nandflash_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_spiflash_defconfig
b/configs/sama5d4ek_spiflash_defconfig
index c7f4655..bd7325e 100644
--- a/configs/sama5d4ek_spiflash_defconfig
+++ b/configs/sama5d4ek_spiflash_defconfig
@@ -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=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 b5b8e4c..964cb6b 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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2017-02-06 Thread Andreas Bießmann
Hi Wenyou,

On 28.10.16 09:16, Wenyou Yang wrote:
> 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
> 

could you please send this series rebased on current ToT?

Andreas

> Changes in v2:
>  - Restore the wrong removal #define CONFIG_USB_ETHER.
>  - Update the commit log.
>  - Restore the wrong removal of USB related code.
>  - Update the commit log.
>  - Restore wrong removal of #define CONFIG_USB_ETHER.
>  - Update the commit log.
>  - Restore the wrong removal USB related code.
>  - Update the commit log.
> 
> 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 | 100 ---
>  board/atmel/sama5d4ek/sama5d4ek.c   | 101 
> 
>  configs/sama5d4_xplained_mmc_defconfig  |  31 +++-
>  configs/sama5d4_xplained_nandflash_defconfig|  33 +++-
>  configs/sama5d4_xplained_spiflash_defconfig |  31 +++-
>  configs/sama5d4ek_mmc_defconfig |  30 +++
>  configs/sama5d4ek_nandflash_defconfig   |  30 +++
>  configs/sama5d4ek_spiflash_defconfig|  30 +++
>  include/configs/at91-sama5_common.h |   2 +
>  include/configs/sama5d4_xplained.h  |  28 +--
>  include/configs/sama5d4ek.h |  29 +--
>  11 files changed, 216 insertions(+), 229 deletions(-)
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 6/8] board: sama5d4ek: clean up code

2017-02-06 Thread Andreas Bießmann

On 2016-10-28 09:16, Wenyou Yang wrote:

Since the introduction of the pinctrl and clk driver and
the dts file, remove unneeded hard coded related code from
the board file.

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


Reviewed-by: Andreas Bießmann <andr...@biessmann.org>


---

Changes in v2:
 - Restore the wrong removal USB related code.
 - Update the commit log.

 board/atmel/sama5d4ek/sama5d4ek.c | 88 
+--

 1 file changed, 1 insertion(+), 87 deletions(-)

diff --git a/board/atmel/sama5d4ek/sama5d4ek.c
b/board/atmel/sama5d4ek/sama5d4ek.c
index a0e4bb7..c5479e7 100644
--- a/board/atmel/sama5d4ek/sama5d4ek.c
+++ b/board/atmel/sama5d4ek/sama5d4ek.c
@@ -16,48 +16,14 @@
 #include 
 #include 
 #include 
-#include 
 #include 
-#include 
 #include 
 #include 
 #include 
-#include 
 #include 

 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)
 {
@@ -198,42 +164,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 +194,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,15 +204,9 @@ 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
@@ -334,12 +252,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
 }

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 5/8] board: sama5d4ek: move config options to defconfig

2017-02-04 Thread Andreas Bießmann
On Fri, Oct 28, 2016 at 03:16:46PM +0800, Wenyou Yang wrote:
> Enable CONFIG_CLK and CONFIG_PINCTRL to support at91 clock
> driver and at91 pinctrl driver.
> 
> Move some config options to configs/sama5d4ek_*_defconfig.
> 
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
> Changes in v2:
>  - Restore wrong removal of #define CONFIG_USB_ETHER.
>  - Update the commit log.
> 
>  board/atmel/sama5d4ek/sama5d4ek.c |  2 ++
>  configs/sama5d4ek_mmc_defconfig   | 23 +++
>  configs/sama5d4ek_nandflash_defconfig | 23 +++
>  configs/sama5d4ek_spiflash_defconfig  | 23 +++
>  include/configs/sama5d4ek.h   | 26 --
>  5 files changed, 71 insertions(+), 26 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 4899970..fd49b58 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
> @@ -28,9 +29,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
> diff --git a/configs/sama5d4ek_nandflash_defconfig 
> b/configs/sama5d4ek_nandflash_defconfig
> index 9ebe295..34f5234 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
> @@ -26,9 +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
> diff --git a/configs/sama5d4ek_spiflash_defconfig 
> b/configs/sama5d4ek_spiflash_defconfig
> index dff8995..c7f4655 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
> @@ -27,9 +28,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
> +CO

Re: [U-Boot] [U-Boot, v2, 4/8] board: sama5d4_xplained: enable early debug UART

2017-02-04 Thread Andreas Bießmann
On Fri, Oct 28, 2016 at 03:16:45PM +0800, Wenyou Yang wrote:
> Enable early debug UART to debug problems when an ICE or other
> debug mechanism is not available.
> 
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
> Changes in v2: None
> 
>  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 2b51e4c..c46a7a4 100644
> --- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c
> +++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c
> @@ -16,6 +16,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -197,12 +198,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 1173583..8032164 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
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 3/8] board: sama5d4_xplained: clean up code

2017-02-04 Thread Andreas Bießmann
On Fri, Oct 28, 2016 at 03:16:44PM +0800, Wenyou Yang wrote:
> Since the introduction of the pinctrl and clk driver and
> the dts file, remove unneeded hard coded related code from
> the board file.
> 
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
> Changes in v2:
>  - Restore the wrong removal of USB related code.
>  - Update the commit log.
> 
>  board/atmel/sama5d4_xplained/sama5d4_xplained.c | 87 
> +
>  1 file changed, 1 insertion(+), 86 deletions(-)
> 
> diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c 
> b/board/atmel/sama5d4_xplained/sama5d4_xplained.c
> index 6684276..2b51e4c 100644
> --- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c
> +++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c
> @@ -16,48 +16,14 @@
>  #include 
>  #include 
>  #include 
> -#include 
>  #include 
> -#include 
>  #include 
>  #include 
>  #include 
> -#include 
>  #include 
>  
>  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)
>  {
> @@ -202,41 +168,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 +199,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,15 +209,9 @@ 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
> @@ -338,12 +257,8 @@ int board_eth_init(bd_t 

Re: [U-Boot] [U-Boot, v2, 2/8] board: sama5d4_xplained: move config options to defconfig

2017-02-04 Thread Andreas Bießmann
On Fri, Oct 28, 2016 at 03:16:43PM +0800, Wenyou Yang wrote:
> Enable CONFIG_CLK and CONFIG_PINCTRL to support at91 clock
> driver and at91 pinctrl driver.
> 
> Move some config options to configs/sama5d4_xplained_*_defconfig
> files.
> 
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
> Changes in v2:
>  - Restore the wrong removal #define CONFIG_USB_ETHER.
>  - Update the commit log.
> 
>  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  | 25 
>  5 files changed, 73 insertions(+), 28 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
&g

Re: [U-Boot] [U-Boot, v2, 2/8] board: sama5d4_xplained: move config options to defconfig

2017-02-04 Thread Andreas Bießmann
On Fri, Oct 28, 2016 at 03:16:43PM +0800, Wenyou Yang wrote:
> Enable CONFIG_CLK and CONFIG_PINCTRL to support at91 clock
> driver and at91 pinctrl driver.
> 
> Move some config options to configs/sama5d4_xplained_*_defconfig
> files.
> 
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
> Changes in v2:
>  - Restore the wrong removal #define CONFIG_USB_ETHER.
>  - Update the commit log.
> 
>  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  | 25 
>  5 files changed, 73 insertions(+), 28 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
&g

Re: [U-Boot] [U-Boot, v2, 2/8] board: sama5d4_xplained: move config options to defconfig

2017-02-04 Thread Andreas Bießmann
On Fri, Oct 28, 2016 at 03:16:43PM +0800, Wenyou Yang wrote:
> Enable CONFIG_CLK and CONFIG_PINCTRL to support at91 clock
> driver and at91 pinctrl driver.
> 
> Move some config options to configs/sama5d4_xplained_*_defconfig
> files.
> 
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
> Changes in v2:
>  - Restore the wrong removal #define CONFIG_USB_ETHER.
>  - Update the commit log.
> 
>  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  | 25 
>  5 files changed, 73 insertions(+), 28 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
&g

Re: [U-Boot] [U-Boot, v2, 1/8] configs: at91-sama5_common: fix for CONFIG_AT91_GPIO

2017-02-04 Thread Andreas Bießmann
On Fri, Oct 28, 2016 at 03:16:42PM +0800, Wenyou Yang wrote:
> If enabled Driver Model for GPIO, CONFIG_AT91_GPIO should be defined
> by configs/*_defconfig file.
> 
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
> Changes in v2: None
> 
>  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
>  
>  
>  /*
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 3/3] gpio: at91_gpio: Add the clock support

2017-02-04 Thread Andreas Bießmann
On Fri, Oct 28, 2016 at 02:16:29PM +0800, Wenyou Yang wrote:
> Add the clock support.
> 
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
> Reviewed-by: Simon Glass <s...@chromium.org>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
> Changes in v2:
>  - Add Reviewed-by tag.
> 
>  drivers/gpio/at91_gpio.c | 13 +
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c
> index 23b2dc3..bd5c8c4 100644
> --- a/drivers/gpio/at91_gpio.c
> +++ b/drivers/gpio/at91_gpio.c
> @@ -10,6 +10,7 @@
>  
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -517,6 +518,18 @@ static int at91_gpio_probe(struct udevice *dev)
>   struct at91_port_priv *port = dev_get_priv(dev);
>   struct at91_port_platdata *plat = dev_get_platdata(dev);
>   struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
> + struct clk clk;
> + int ret;
> +
> + ret = clk_get_by_index(dev, 0, );
> + if (ret)
> + return ret;
> +
> + ret = clk_enable();
> + if (ret)
> + return ret;
> +
> + clk_free();
>  
>   uc_priv->bank_name = plat->bank_name;
>   uc_priv->gpio_count = GPIO_PER_BANK;
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 1/3] gpio: Kconfig: Add CONFIG_AT91_GPIO option

2017-02-04 Thread Andreas Bießmann
On Fri, Oct 28, 2016 at 02:16:27PM +0800, Wenyou Yang wrote:
> The CONFIG_AT91_GPIO option is used to select AT91 PIO GPIO driver.
> 
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
> Reviewed-by: Simon Glass <s...@chromium.org>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
> Changes in v2: None
> 
>  drivers/gpio/Kconfig | 13 +
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index 8d9ab52..c065342 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -28,6 +28,19 @@ config DWAPB_GPIO
>   help
> Support for the Designware APB GPIO driver.
>  
> +config AT91_GPIO
> + bool "AT91 PIO GPIO driver"
> + depends on DM_GPIO
> + default n
> + help
> +   Say yes here to select AT91 PIO GPIO driver. AT91 PIO
> +   controller manages up to 32 fully programmable input/output
> +   lines. Each I/O line may be dedicated as a general-purpose
> +   I/O or be assigned to a function of an embedded peripheral.
> +   The assignment to a function of an embedded peripheral is
> +   the responsibility of AT91 Pinctrl driver. This driver is
> +   responsible for the general-purpose I/O.
> +
>  config ATMEL_PIO4
>   bool "ATMEL PIO4 driver"
>   depends on DM_GPIO
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,v1] clk: at91: pmc: add more compatibles

2017-02-04 Thread Andreas Bießmann
On Wed, Oct 26, 2016 at 03:21:32PM +0800, Wenyou Yang wrote:
> To keep the compatibles aligned with kernel, add more compatibles.
> 
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
>  drivers/clk/at91/pmc.c | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c
> index 76ba91a..f866959 100644
> --- a/drivers/clk/at91/pmc.c
> +++ b/drivers/clk/at91/pmc.c
> @@ -15,7 +15,13 @@
>  DECLARE_GLOBAL_DATA_PTR;
>  
>  static const struct udevice_id at91_pmc_match[] = {
> + { .compatible = "atmel,at91rm9200-pmc" },
> + { .compatible = "atmel,at91sam9260-pmc" },
> + { .compatible = "atmel,at91sam9g45-pmc" },
> + { .compatible = "atmel,at91sam9n12-pmc" },
> + { .compatible = "atmel,at91sam9x5-pmc" },
>   { .compatible = "atmel,sama5d2-pmc" },
> + { .compatible = "atmel,sama5d3-pmc" },
>   {}
>  };
>  
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 2/3] gpio: at91_gpio: Add the device tree support

2017-02-04 Thread Andreas Bießmann
On Fri, Oct 28, 2016 at 02:16:28PM +0800, Wenyou Yang wrote:
> Add the device tree support.
> 
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
> Reviewed-by: Simon Glass <s...@chromium.org>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
> Changes in v2: None
> 
>  drivers/gpio/at91_gpio.c | 15 +++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c
> index 8e52e3d..23b2dc3 100644
> --- a/drivers/gpio/at91_gpio.c
> +++ b/drivers/gpio/at91_gpio.c
> @@ -520,14 +520,29 @@ static int at91_gpio_probe(struct udevice *dev)
>  
>   uc_priv->bank_name = plat->bank_name;
>   uc_priv->gpio_count = GPIO_PER_BANK;
> +
> +#if CONFIG_IS_ENABLED(OF_CONTROL)
> + plat->base_addr = (uint32_t)dev_get_addr_ptr(dev);
> +#endif
>   port->regs = (struct at91_port *)plat->base_addr;
>  
>   return 0;
>  }
>  
> +#if CONFIG_IS_ENABLED(OF_CONTROL)
> +static const struct udevice_id at91_gpio_ids[] = {
> + { .compatible = "atmel,at91rm9200-gpio" },
> + { }
> +};
> +#endif
> +
>  U_BOOT_DRIVER(gpio_at91) = {
>   .name   = "gpio_at91",
>   .id = UCLASS_GPIO,
> +#if CONFIG_IS_ENABLED(OF_CONTROL)
> + .of_match = at91_gpio_ids,
> + .platdata_auto_alloc_size = sizeof(struct at91_port_platdata),
> +#endif
>   .ops= _at91_ops,
>   .probe  = at91_gpio_probe,
>   .priv_auto_alloc_size = sizeof(struct at91_port_priv),
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v11] dm: at91: Add driver model support for the spi driver

2016-10-28 Thread Andreas Bießmann
Hi Jagan,

On 28.10.16 20:07, Jagan Teki wrote:
> On Fri, Oct 28, 2016 at 10:19 PM, Andreas Bießmann
> <andr...@biessmann.org> wrote:
>> Dear Wenyou Yang,
>>
>> Wenyou Yang <wenyou.y...@atmel.com> writes:
>>> Add driver model support while retaining the existing legacy code.
>>> This allows the driver to support boards that have converted to
>>> driver model as well as those that have not.
>>>
>>> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>>> Reviewed-by: Simon Glass <s...@chromium.org>
>>> Acked-by: Stephen Warren <swar...@nvidia.com>
>>> ---
>>>
>>> Changes in v11:
>>> - Set cs_gpio direction to output and active.
>>> - Use wait_for_bit() to replace do {} while ().
>>> - Add more description for help of ATMEL_SPI.
>>>
>>> Changes in v10:
>>> - Add Acked-by tag.
>>>
>>> Changes in v9:
>>> - Due to the peripheral clock driver improvement, remove the
>>>   unneccessary clock calling.
>>>
>>> Changes in v8:
>>> - Fix compile error for AVR32.
>>>
>>> Changes in v7:
>>> - Move gpio_request_list_by_name() to _probe(), remove
>>>   *_ofdata_to_platdata().
>>>
>>> Changes in v6:
>>> - Remove the two flash related options.
>>>
>>> Changes in v5:
>>> - Change clk_client.h -> clk.h to adapt to clk API conversion.
>>>
>>> Changes in v4:
>>> - Collect Reviewed-by tag.
>>> - Update the clk API based on [PATCH] clk: convert API to match
>>>   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
>>> - Remove check on dev_get_parent() return.
>>> - Fixed the return value, -ENODEV->-EINVAL.
>>> - Retain #include  line.
>>>
>>> Changes in v3:
>>> - Remove redundant log print.
>>>
>>> Changes in v2:
>>> - Add clock support.
>>>
>>> drivers/spi/Kconfig |   8 ++
>>> drivers/spi/atmel_spi.c | 288 
>>> 
>>> 2 files changed, 296 insertions(+)
>>
>> applied to u-boot-atmel/master, thanks!
> 
> Sorry, don't know how come this is applied w/o any Ack/Review tag from
> the maintainer?
> 

This patch is now in v11 and posted first in April this year, it was
most times delegated to me [1]. Sorry, when adding it today I did not
think of asking for your reviewed/acked-by. I try to respect this in future.

With your comment here I started a retrospective on this patch and
figured out it was once delegated to you (v7) and got a reviewed-by from
you which did not make it into the patch.
Do you have any objections? Should I remove this patch from the pull
request?

Andreas

[1]
http://patchwork.ozlabs.org/project/uboot/list/?submitter==*=dm%3A+at91%3A+Add+driver+model+support+for+the+spi+driver==
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PULL] u-boot-atmel/master -> u-boot/master

2016-10-28 Thread Andreas Bießmann
Hi Tom,

please pull the following changes into u-boot/master for 2016.11.

One of the patches introduce a build warning (-Wunused-function) which is
removed with the following patch. This is due to introducing the new feature,
then switch to the feature and remove the old code in a two step procedure.
Therefore I think this is Ok.

Andreas

The following changes since commit 5ac5861c4ba851b473e6a24940b412b397627d8d:

  travis-ci: Add test.py for various qemu platforms (2016-10-24 08:06:29 -0400)

are available in the git repository at:

  git://git.denx.de/u-boot-atmel.git master

for you to fetch changes up to 0eafd4b77615efdd948e698d83be746dcf026a53:

  dm: at91: Add driver model support for the spi driver (2016-10-28 18:37:15 
+0200)


Heiko Schocher (3):
  arm: at91: mpddrc: add missing MPDDRC_MD defines
  ARM: at91: clock: correct PRES offset for at91sam9x5
  arm, at91: add icache support

Robert P. J. Day (1):
  AT91: Correct misspelling of "redundent" in partition names

Wenyou Yang (16):
  clk: at91: Fix at91-pmc and at91-sckc's class ID
  ARM: at91/dt: sama5d2: Fix the warning from dtc
  clk: clk-uclass: Assign clk->dev before call .of_xlate
  clk: at91: Improve the clock implementation
  gpio: atmel_pio4: Remove unnecessary clock calling
  i2c: at91_i2c: Remove unnecessary clock calling
  i2c: at91_i2c: Change error return -ENODEV to -EINVAL
  usb: ehci-atmel: Remove unnecessary clock calling
  mmc: atmel_sdhci: Remove unnecessary clock calling
  serial: Kconfig: Add ATMEL_USART option
  serial: atmel_usart: Support enable an early debug UART
  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
  dm: at91: Add driver model support for the spi driver

 arch/arm/dts/sama5d2.dtsi   | 140 ++--
 arch/arm/mach-at91/arm926ejs/Makefile   |   1 +
 arch/arm/mach-at91/arm926ejs/cache.c|  29 +++
 arch/arm/mach-at91/arm926ejs/clock.c|   6 +
 arch/arm/mach-at91/include/mach/atmel_mpddrc.h  |   3 +
 board/atmel/sama5d2_xplained/sama5d2_xplained.c | 167 ++
 board/bluewater/gurnard/gurnard.c   |   6 -
 configs/sama5d2_xplained_mmc_defconfig  |  37 ++-
 configs/sama5d2_xplained_spiflash_defconfig |  37 ++-
 drivers/clk/at91/Kconfig|   1 +
 drivers/clk/at91/clk-generated.c|  87 ---
 drivers/clk/at91/clk-peripheral.c   |  72 --
 drivers/clk/at91/clk-system.c   |  57 +++--
 drivers/clk/at91/pmc.c  |  72 --
 drivers/clk/at91/pmc.h  |   5 +-
 drivers/clk/at91/sckc.c |  17 +-
 drivers/clk/clk-uclass.c|   3 +
 drivers/gpio/atmel_pio4.c   |  12 -
 drivers/i2c/at91_i2c.c  |  18 +-
 drivers/mmc/atmel_sdhci.c   |  27 +--
 drivers/serial/Kconfig  |  14 ++
 drivers/serial/atmel_usart.c|  22 ++
 drivers/spi/Kconfig |   8 +
 drivers/spi/atmel_spi.c | 288 
 drivers/usb/host/ehci-atmel.c   |  15 --
 include/configs/at91-sama5_common.h |   2 +-
 include/configs/at91sam9rlek.h  |   2 +-
 include/configs/sama5d2_xplained.h  |  31 +--
 28 files changed, 795 insertions(+), 384 deletions(-)
 create mode 100644 arch/arm/mach-at91/arm926ejs/cache.c
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 3/4] board: sama5d2_xplained: Set 'ethaddr' got from AT24MAC

2016-10-28 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>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.y...@atmel.com>
>Signed-off-by: Songjun Wu <songjun...@microchip.com>
>Reviewed-by: Andreas Bießmann <biessm...@corscience.de>
>---
>
>Changes in v3:
> - Collect Reviewed-by tag.
> - Rename CONFIG_AT24MAC_ADDR and CONFIG_AT24MAC_REG to AT24MAC_ADDR
>   and AT24MAC_REG,  removing the prefix CONFIG_, to avoid compile
>   warning.
>
>Changes in v2: None
>
> board/atmel/sama5d2_xplained/sama5d2_xplained.c | 51 +
> include/configs/sama5d2_xplained.h  |  6 +++
> 2 files changed, 57 insertions(+)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 4/4] board: sama5d2_xplained: Enable an early debug UART

2016-10-28 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>Enable an early debug UART to debug problems when an ICE or other
>debug mechanism is not available.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Reviewed-by: Simon Glass <s...@chromium.org>
>Reviewed-by: Andreas Bießmann <andreas.de...@googlemail.com>
>---
>
>Changes in v3:
> - Collect Reviewed-by tag.
>
>Changes in v2:
> - Collect Reviewed-by tags.
>
> 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(+)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 2/4] board: sama5d2_xplained: Clean up code

2016-10-28 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>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.y...@atmel.com>
>Reviewed-by: Simon Glass <s...@chromium.org>
>Reviewed-by: Andreas Bießmann <andreas.de...@googlemail.com>
>---
>
>Changes in v3:
> - Collect Reviewed-by tag.
>
>Changes in v2: None
>
> board/atmel/sama5d2_xplained/sama5d2_xplained.c | 104 
> 1 file changed, 104 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2016-10-28 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>Move the config options from the include/configs/sama5d2_xplained.h
>to configs/sama5d2_xplained_*_defconfig.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Reviewed-by: Andreas Bießmann <andreas.de...@googlemail.com>
>---
>
>Changes in v3:
> - Collect Reviewed-by tag.
>
>Changes in v2: None
>
> board/atmel/sama5d2_xplained/sama5d2_xplained.c |  2 ++
> configs/sama5d2_xplained_mmc_defconfig  | 31 -
> configs/sama5d2_xplained_spiflash_defconfig | 31 -
> include/configs/sama5d2_xplained.h  | 25 
> 4 files changed, 62 insertions(+), 27 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 7/7] mmc: atmel_sdhci: Remove unnecessary clock calling

2016-10-28 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>Due to the peripheral and generated clock driver improvement,
>remove the unnecessary clock calling.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Reviewed-by: Jaehoon Chung <jh80.ch...@samsung.com>
>---
>
>Changes in v3:
> - Fix typo, unneccessary -> unnecessary.
> - Add Reviewed-by tag.
>
>Changes in v2: None
>
> drivers/mmc/atmel_sdhci.c | 27 ++-
> 1 file changed, 2 insertions(+), 25 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 2/2] serial: atmel_usart: Support enable an early debug UART

2016-10-28 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>Add support to enable an early debug UART for debugging.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Reviewed-by: Simon Glass <s...@chromium.org>
>Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
>---
>
>Changes in v3:
> - Collect Reviewed-by tag.
>
>Changes in v2:
> - Collect Reviewed-by tag.
>
> drivers/serial/Kconfig   |  7 +++
> drivers/serial/atmel_usart.c | 22 ++
> 2 files changed, 29 insertions(+)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 1/2] serial: Kconfig: Add ATMEL_USART option

2016-10-28 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>Add ATMEL_USART option to support to enable the Atmel usart driver
>from Kconfig.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
>---
>
>Changes in v3:
> - Collect Reviewed-by tag.
>
>Changes in v2: None
>
> drivers/serial/Kconfig | 7 +++
> 1 file changed, 7 insertions(+)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v11] dm: at91: Add driver model support for the spi driver

2016-10-28 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>Add driver model support while retaining the existing legacy code.
>This allows the driver to support boards that have converted to
>driver model as well as those that have not.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Reviewed-by: Simon Glass <s...@chromium.org>
>Acked-by: Stephen Warren <swar...@nvidia.com>
>---
>
>Changes in v11:
> - Set cs_gpio direction to output and active.
> - Use wait_for_bit() to replace do {} while ().
> - Add more description for help of ATMEL_SPI.
>
>Changes in v10:
> - Add Acked-by tag.
>
>Changes in v9:
> - Due to the peripheral clock driver improvement, remove the
>   unneccessary clock calling.
>
>Changes in v8:
> - Fix compile error for AVR32.
>
>Changes in v7:
> - Move gpio_request_list_by_name() to _probe(), remove
>   *_ofdata_to_platdata().
>
>Changes in v6:
> - Remove the two flash related options.
>
>Changes in v5:
> - Change clk_client.h -> clk.h to adapt to clk API conversion.
>
>Changes in v4:
> - Collect Reviewed-by tag.
> - Update the clk API based on [PATCH] clk: convert API to match
>   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
> - Remove check on dev_get_parent() return.
> - Fixed the return value, -ENODEV->-EINVAL.
> - Retain #include  line.
>
>Changes in v3:
> - Remove redundant log print.
>
>Changes in v2:
> - Add clock support.
>
> drivers/spi/Kconfig |   8 ++
> drivers/spi/atmel_spi.c | 288 
> 2 files changed, 296 insertions(+)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 3/7] gpio: atmel_pio4: Remove unnecessary clock calling

2016-10-28 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>Due to the peripheral clock driver improvement, remove the
>unnecessary clock calling.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Acked-by: Stephen Warren <swar...@nvidia.com>
>---
>
>Changes in v3: None
>Changes in v2:
> - Add Acked-by tag for gpio/atmel_pio4.
>
> drivers/gpio/atmel_pio4.c | 12 
> 1 file changed, 12 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 6/7] usb: ehci-atmel: Remove unnecessary clock calling

2016-10-28 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>Due to the peripheral clock driver improvement, remove the
>unnecessary clock calling.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
>---
>
>Changes in v3: None
>Changes in v2: None
>
> drivers/usb/host/ehci-atmel.c | 15 ---
> 1 file changed, 15 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 1/7] clk: clk-uclass: Assign clk->dev before call .of_xlate

2016-10-28 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>In order to make clk->dev available in ops->of_xlate() to get the
>clock ID from the 'reg' property of the clock node, assign the
>clk->dev before calling ops->of_xlate().
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Acked-by: Stephen Warren <swar...@nvidia.com>
>Acked-by: Simon Glass <s...@chromium.org>
>---
>
>Changes in v3: None
>Changes in v2:
> - Add Acked-by tag.
>
> drivers/clk/clk-uclass.c | 3 +++
> 1 file changed, 3 insertions(+)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v1] ARM: at91/dt: sama5d2: Fix the warning from dtc

2016-10-28 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>Fix the warning from dtc like,
>---8<
>Warning (unit_address_vs_reg): Node 
>/ahb/apb/pmc@f0014000/periph64ck/sdmmc0_hclk has a reg or ranges property, but 
>no unit name
>--->8
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Acked-by: Stephen Warren <swar...@nvidia.com>
>---
>
> arch/arm/dts/sama5d2.dtsi | 140 +++---
> 1 file changed, 70 insertions(+), 70 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 4/7] i2c: at91_i2c: Remove unnecessary clock calling

2016-10-28 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>Due to the peripheral clock driver improvement, remove the
>unnecessary clock calling.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Reviewed-by: Heiko Schocher <h...@denx.de>
>---
>
>Changes in v3: None
>Changes in v2: None
>
> drivers/i2c/at91_i2c.c | 16 
> 1 file changed, 16 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 5/7] i2c: at91_i2c: Change error return -ENODEV to -EINVAL

2016-10-28 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>Change the error return value -ENODEV from to -EINVAL for more
>reasonable.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Reviewed-by: Heiko Schocher <h...@denx.de>
>---
>
>Changes in v3: None
>Changes in v2: None
>
> drivers/i2c/at91_i2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 2/7] clk: at91: Improve the clock implementation

2016-10-28 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>For the peripheral clock, provide the clock ops for the clock
>provider, such as spi0_clk. The .of_xlate is to get the clk->id,
>the .enable is to enable the spi0 peripheral clock, the .get_rate
>is to get the clock frequency.
>
>The driver for periph32ck node is responsible for recursively
>binding its children as clk devices, not provide the clock ops.
>
>So do the generated clock and system clock.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Acked-by: Stephen Warren <swar...@nvidia.com>
>---
>
>Changes in v3:
> - Remove the unneeded wrapper functions.
> - Fix typo, Invaild -> Invalid.
> - Add Acked-by tag.
>
>Changes in v2:
> - For the periph32ck, periph64ck, gck, systemck nodes, they aren't
>   the clock providers, are to house various actual clock providers,
>   use UCLASS_MISC, instead of UCLASS_CLK.
> - For *_of_xlate(), add argument check.
> - Fix the implementation of the *_get_rate().
> - Use documentation-wise variables for *_clk_probe().
> - Remove the duplicated code, use the common functions.
>
> drivers/clk/at91/Kconfig  |  1 +
> drivers/clk/at91/clk-generated.c  | 87 +++
> drivers/clk/at91/clk-peripheral.c | 72 ++--
> drivers/clk/at91/clk-system.c | 57 ++---
> drivers/clk/at91/pmc.c| 62 
> drivers/clk/at91/pmc.h    |  5 ++-
> 6 files changed, 195 insertions(+), 89 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,3/6] arm, at91: add icache support

2016-10-28 Thread Andreas Bießmann
Dear Heiko Schocher,

Heiko Schocher <h...@denx.de> writes:
>add at least icache support for at91 based boards.
>This speeds up NOR flash access on an at91sam9g15
>based board from 15.2 seconds reading 8 MiB from
>a SPI NOR flash to 5.7 seconds.
>
>Signed-off-by: Heiko Schocher <h...@denx.de>
>Reviewed-by: Simon Glass <s...@chromium.org>
>Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
>---
>removed the dcache enable in the gurnard board. Comment
>says that enabling dcache breaks Ethernet MAC ... why
>is it then enabled?
>
>@Simon: If you need dache enabled for the gurnard board,
>arch/arm/mach-at91/arm926ejs/cache.c is the correct place
>for doing this, I think. Please add there the common functions
>needed for dcache support on at91 plattforms and undef in
>the gurnard board configuration CONFIG_SYS_DCACHE_OFF.
>
> arch/arm/mach-at91/arm926ejs/Makefile |  1 +
> arch/arm/mach-at91/arm926ejs/cache.c  | 29 +
> board/bluewater/gurnard/gurnard.c |  6 --
> 3 files changed, 30 insertions(+), 6 deletions(-)
> create mode 100644 arch/arm/mach-at91/arm926ejs/cache.c

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] AT91: Correct misspelling of "redundent" in partition names

2016-10-28 Thread Andreas Bießmann
Dear "Robert P. J. Day",

Robert P. J. Day <rpj...@crashcourse.ca> writes:
>Signed-off-by: Robert P. J. Day <rpj...@crashcourse.ca>
>Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
>---
>
>  given that this misspelling is being used for partition names, i
>won't treat it as a normal typo, so sending a separate patch just for
>this.

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 2/6] ARM: at91: clock: correct PRES offset for at91sam9x5

2016-10-28 Thread Andreas Bießmann
Dear Heiko Schocher,

Heiko Schocher <h...@denx.de> writes:
>on at91sam9x5 PRES offset is 4 in the PMC master
>clock register.
>
>Signed-off-by: Heiko Schocher <h...@denx.de>
>Acked-by: Wenyou Yang <wenyou.y...@atmel.com>
>Acked-by: Andreas Bießmann <andr...@biessmann.org>
>---
>
> arch/arm/mach-at91/arm926ejs/clock.c | 6 ++
> 1 file changed, 6 insertions(+)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2] clk: at91: Fix at91-pmc and at91-sckc's class ID

2016-10-28 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>The at91-pmc and at91-sckc aren't the clock providers, change their
>class ID from UCLASS_CLK to UCLASS_SIMPLE_BUS, they also don't
>need to bind the child nodes explicitly, the .post_bind callback
>of simple_bus uclass will do it for them.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Acked-by: Stephen Warren <swar...@nvidia.com>
>Reviewed-by: Simon Glass <s...@chromium.org>
>---
>
>Changes in v2:
> - Collect the tags.
>
> drivers/clk/at91/pmc.c  | 10 ++
> drivers/clk/at91/sckc.c | 17 +
> 2 files changed, 7 insertions(+), 20 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 1/6] arm: at91: mpddrc: add missing MPDDRC_MD defines

2016-10-28 Thread Andreas Bießmann
Dear Heiko Schocher,

Heiko Schocher <h...@denx.de> writes:
>add missing MPDDRC_MD defines
>
>Signed-off-by: Heiko Schocher <h...@denx.de>
>Acked-by: Wenyou Yang <wenyou.y...@atmel.com>
>Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
>---
>
> arch/arm/mach-at91/include/mach/atmel_mpddrc.h | 3 +++
> 1 file changed, 3 insertions(+)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 6/7] usb: ehci-atmel: Remove unnecessary clock calling

2016-10-28 Thread Andreas Bießmann
On Tue, Sep 27, 2016 at 11:00:33AM +0800, Wenyou Yang wrote:
> Due to the peripheral clock driver improvement, remove the
> unnecessary clock calling.
> 
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  drivers/usb/host/ehci-atmel.c | 15 ---
>  1 file changed, 15 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
> index 2b138c5..a5c6d34 100644
> --- a/drivers/usb/host/ehci-atmel.c
> +++ b/drivers/usb/host/ehci-atmel.c
> @@ -56,9 +56,7 @@ struct ehci_atmel_priv {
>  
>  static int ehci_atmel_enable_clk(struct udevice *dev)
>  {
> - struct udevice *dev_clk;
>   struct clk clk;
> - int periph;
>   int ret;
>  
>   ret = clk_get_by_index(dev, 0, );
> @@ -73,19 +71,6 @@ static int ehci_atmel_enable_clk(struct udevice *dev)
>   if (ret)
>   return -EINVAL;
>  
> - periph = fdtdec_get_uint(gd->fdt_blob, clk.dev->of_offset, "reg", -1);
> - if (periph < 0)
> - return -EINVAL;
> -
> - dev_clk = dev_get_parent(clk.dev);
> - if (!dev_clk)
> - return -ENODEV;
> -
> - ret = clk_request(dev_clk, );
> - if (ret)
> - return ret;
> -
> - clk.id = periph;
>   ret = clk_enable();
>   if (ret)
>   return ret;
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, 2/6] ARM: at91: clock: correct PRES offset for at91sam9x5

2016-10-28 Thread Andreas Bießmann
On Wed, Aug 17, 2016 at 09:13:24AM +0200, Heiko Schocher wrote:
> on at91sam9x5 PRES offset is 4 in the PMC master
> clock register.
> 
> Signed-off-by: Heiko Schocher <h...@denx.de>
> Acked-by: Wenyou Yang <wenyou.y...@atmel.com>

Acked-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
>  arch/arm/mach-at91/arm926ejs/clock.c | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm/mach-at91/arm926ejs/clock.c 
> b/arch/arm/mach-at91/arm926ejs/clock.c
> index c8d24ae..e3181fa 100644
> --- a/arch/arm/mach-at91/arm926ejs/clock.c
> +++ b/arch/arm/mach-at91/arm926ejs/clock.c
> @@ -162,7 +162,13 @@ int at91_clock_init(unsigned long main_clock)
>   gd->arch.mck_rate_hz = at91_css_to_rate(mckr & AT91_PMC_MCKR_CSS_MASK);
>   freq = gd->arch.mck_rate_hz;
>  
> +#if defined(CONFIG_AT91SAM9X5)
> + /* different in prescale on at91sam9x5 */
> + freq /= (1 << ((mckr & AT91_PMC_MCKR_PRES_MASK) >> 4));
> +#else
>   freq /= (1 << ((mckr & AT91_PMC_MCKR_PRES_MASK) >> 2)); /* prescale */
> +#endif
> +
>  #if defined(CONFIG_AT91SAM9G20)
>   /* mdiv ; (x >> 7) = ((x >> 8) * 2) */
>   gd->arch.mck_rate_hz = (mckr & AT91_PMC_MCKR_MDIV_MASK) ?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 3/4] board: sama5d2_xplained: Set 'ethaddr' got from AT24MAC

2016-10-16 Thread Andreas Bießmann
Hi Wenyou,

On Tue, Sep 13, 2016 at 10:49:04AM +0800, Wenyou Yang wrote:
> 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.y...@atmel.com>
> Signed-off-by: Songjun Wu <songjun...@microchip.com>
> Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
> ---
> 
> Changes in v2: None
> 
>  board/atmel/sama5d2_xplained/sama5d2_xplained.c | 51 
> +
>  include/configs/sama5d2_xplained.h  |  6 +++
>  2 files changed, 57 insertions(+)
> 



> 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

these two configs produce compile warnings due to the lately introduced check
for new config options outside Kconfig.

Please resend with these two options moved to Kconfig of sama5d2_xplained
board.

Andreas

> +
>  /* Ethernet Hardware */
>  #define CONFIG_MACB
>  #define CONFIG_RMII
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] AT91: Correct misspelling of "redundent" in partition names

2016-10-16 Thread Andreas Bießmann
On Thu, Sep 01, 2016 at 09:49:14AM -0400, Robert P. J. Day wrote:
> Signed-off-by: Robert P. J. Day <rpj...@crashcourse.ca>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
>   given that this misspelling is being used for partition names, i
> won't treat it as a normal typo, so sending a separate patch just for
> this.
> 
> diff --git a/include/configs/at91-sama5_common.h 
> b/include/configs/at91-sama5_common.h
> index 051186d..3e55d13 100644
> --- a/include/configs/at91-sama5_common.h
> +++ b/include/configs/at91-sama5_common.h
> @@ -75,7 +75,7 @@
>  #define CONFIG_BOOTARGS  
> \
>   "console=ttyS0,115200 earlyprintk " \
>   "mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,"  \
> - "256K(env),256k(env_redundent),256k(spare),"\
> + "256K(env),256k(env_redundant),256k(spare),"\
>   "512k(dtb),6M(kernel)ro,-(rootfs) " \
>   "rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs"
> 
> diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
> index a383de6..0d24814 100644
> --- a/include/configs/at91sam9rlek.h
> +++ b/include/configs/at91sam9rlek.h
> @@ -152,7 +152,7 @@
>  #define CONFIG_BOOTARGS  \
>   "console=ttyS0,115200 earlyprintk " 
> \
>   
> "mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,"  \
> - "256K(env),256k(env_redundent),256k(spare),"
> \
> + "256K(env),256k(env_redundant),256k(spare),"
> \
>   "512k(dtb),6M(kernel)ro,-(rootfs) " 
> \
>   "rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs"
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,v1] i2c: at91_i2c: Fix the wrong include file

2016-10-16 Thread Andreas Bießmann
On Tue, Aug 30, 2016 at 04:03:47PM +0800, Wenyou Yang wrote:
> Since the 'clk_client.h' doesn't exist, it should be 'clk.h'.
> 
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
> Reviewed-by: Simon Glass <s...@chromium.org>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
>  drivers/i2c/at91_i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/at91_i2c.c b/drivers/i2c/at91_i2c.c
> index 8e9c3ad..d71f75c 100644
> --- a/drivers/i2c/at91_i2c.c
> +++ b/drivers/i2c/at91_i2c.c
> @@ -8,7 +8,7 @@
>  
>  #include 
>  #include 
> -#include 
> +#include 
>  #include 
>  #include 
>  #include 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 4/4] board: sama5d2_xplained: Enable an early debug UART

2016-10-16 Thread Andreas Bießmann
On Tue, Sep 13, 2016 at 10:49:05AM +0800, Wenyou Yang 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.y...@atmel.com>
> Reviewed-by: Simon Glass <s...@chromium.org>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
> Changes in v2:
>  - Collect Reviewed-by tags.
> 
>  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 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -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=0xf802
> +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=0xf802
> +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 */
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 3/4] board: sama5d2_xplained: Set 'ethaddr' got from AT24MAC

2016-10-16 Thread Andreas Bießmann
On Tue, Sep 13, 2016 at 10:49:04AM +0800, Wenyou Yang wrote:
> 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.y...@atmel.com>
> Signed-off-by: Songjun Wu <songjun...@microchip.com>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
> Changes in v2: None
> 
>  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 
>  #include 
> +#include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -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, )) {
> + printf("Cannot find I2C bus 1\n");
> + return -1;
> + }
> +
> + if (dm_i2c_probe(bus, CONFIG_AT24MAC_ADDR, 0, )) {
> + 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
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 2/4] board: sama5d2_xplained: Clean up code

2016-10-16 Thread Andreas Bießmann
On Tue, Sep 13, 2016 at 10:49:03AM +0800, Wenyou Yang 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.y...@atmel.com>
> Reviewed-by: Simon Glass <s...@chromium.org>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
> Changes in v2: None
> 
>  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 boo

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

2016-10-16 Thread Andreas Bießmann
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.y...@atmel.com>

Reviewed-by: Andreas Bießmann <andr...@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
> 

Re: [U-Boot] [U-Boot, v2, 2/2] serial: atmel_usart: Support enable an early debug UART

2016-10-16 Thread Andreas Bießmann
On Tue, Sep 13, 2016 at 10:37:33AM +0800, Wenyou Yang wrote:
> Add support to enable an early debug UART for debugging.
> 
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
> Reviewed-by: Simon Glass <s...@chromium.org>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
> Changes in v2:
>  - Collect the Reviewed-by tag.
> 
>  drivers/serial/Kconfig   |  7 +++
>  drivers/serial/atmel_usart.c | 22 ++
>  2 files changed, 29 insertions(+)
> 
> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
> index a6035dc..b8ecd80 100644
> --- a/drivers/serial/Kconfig
> +++ b/drivers/serial/Kconfig
> @@ -98,6 +98,13 @@ config DEBUG_UART_AR933X
> driver will be available until the real driver model serial is
> running.
>  
> +config DEBUG_UART_ATMEL
> + bool "Atmel USART"
> + help
> +   Select this to enable a debug UART using the atmel usart driver. You
> +   will need to provide parameters to make this work. The driver will
> +   be available until the real driver-model serial is running.
> +
>  config DEBUG_UART_NS16550
>   bool "ns16550"
>   help
> diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
> index e450135..7674f97 100644
> --- a/drivers/serial/atmel_usart.c
> +++ b/drivers/serial/atmel_usart.c
> @@ -11,6 +11,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  
>  #include 
> @@ -226,3 +227,24 @@ U_BOOT_DRIVER(serial_atmel) = {
>   .priv_auto_alloc_size   = sizeof(struct atmel_serial_priv),
>  };
>  #endif
> +
> +#ifdef CONFIG_DEBUG_UART_ATMEL
> +static inline void _debug_uart_init(void)
> +{
> + atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_DEBUG_UART_BASE;
> +
> + atmel_serial_setbrg_internal(usart, 0, CONFIG_BAUDRATE);
> +}
> +
> +static inline void _debug_uart_putc(int ch)
> +{
> + atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_DEBUG_UART_BASE;
> +
> + while (!(readl(>csr) & USART3_BIT(TXRDY)))
> + ;
> +
> + writel(ch, >thr);
> +}
> +
> +DEBUG_UART_FUNCS
> +#endif
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 1/2] serial: Kconfig: Add ATMEL_USART option

2016-10-16 Thread Andreas Bießmann
On Tue, Sep 13, 2016 at 10:37:32AM +0800, Wenyou Yang wrote:
> Add ATMEL_USART option to support to enable the Atmel usart driver
> from Kconfig.
> 
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
> Reviewed-by: Simon Glass <s...@chromium.org>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
> Changes in v2: None
> 
>  drivers/serial/Kconfig | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
> index ab5df70..a6035dc 100644
> --- a/drivers/serial/Kconfig
> +++ b/drivers/serial/Kconfig
> @@ -289,6 +289,13 @@ config AR933X_UART
> tree binding to operate, please refer to the document at
> doc/device-tree-bindings/serial/qca,ar9330-uart.txt.
>  
> +config ATMEL_USART
> + bool "Atmel USART support"
> + help
> +   Select this to enable USART support for Atmel SoCs. It can be
> +   configured in the device tree, and input clock frequency can
> +   be got from the clk node.
> +
>  config FSL_LPUART
>   bool "Freescale LPUART support"
>   help
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/6] [RFC] at91: SPL clock fix for AT91SAM9G15 based boards.

2016-10-06 Thread Andreas Bießmann
Hi Heiko,

On 17.08.16 09:13, Heiko Schocher wrote:
> on a at91sam9g15 basd board I need another MOR register
> init as common for at91 based boards. Changes:
> 
> - set AT91_PMC_MOR_KEY to 0x37, without this writting has
>   no effect to tthis register.
> - AT91_PMC_MOR_OSCOUNT to 0
> - set AT91_PMC_MOR_MOSCEN and AT91_PMC_MOR_MOSCSEL
> 
> Signed-off-by: Heiko Schocher 
> 
> ---
> I post this as a RFC patch, because this settings may
> break other boards ... so if this is not a valid common
> setting, I propose to make this setting board configurable
> through a weak function ...
> 
>  arch/arm/mach-at91/spl_at91.c | 13 ++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c
> index cc3341a..4d8ed26 100644
> --- a/arch/arm/mach-at91/spl_at91.c
> +++ b/arch/arm/mach-at91/spl_at91.c
> @@ -31,13 +31,20 @@ static void enable_ext_reset(void)
>  void lowlevel_clock_init(void)
>  {
>   struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
> + u32 tmp;
>  
>   if (!(readl(>sr) & AT91_PMC_MOSCS)) {
> - /* Enable Main Oscillator */
> - writel(AT91_PMC_MOSCS | (0x40 << 8), >mor);
> + tmp = readl(>mor);
> + tmp &= ~AT91_PMC_MOR_OSCOUNT(0xff);
> + tmp &= ~AT91_PMC_MOR_KEY(0xff);
> + tmp |= AT91_PMC_MOR_MOSCEN;
> + tmp |= AT91_PMC_MOR_MOSCSEL;
> + tmp |= AT91_PMC_MOR_OSCOUNT(0);

this is weird configuration to me. Why do you set the counter to 0? Is
the Oscillator really immediately stable? Or is it an external
Oscillator which should be bypassed?

Nevertheless, you should do a two step procedure here according to PMC
Programming Sequence. First switching the Oscillator on and second
activate the master clock from it. Each of the steps may poll the status
register for appropriate flags (or use interrupts).

Any chance to merge this lowlevel clock init with spl_atmel? At least
this part for enabling main oscillator.

Andreas

> + tmp |= AT91_PMC_MOR_KEY(0x37);
> + writel(tmp, >mor);
>  
>   /* Wait until Main Oscillator is stable */
> - while (!(readl(>sr) & AT91_PMC_MOSCS))
> + while (!(readl(>sr) & AT91_PMC_IXR_MOSCS))
>   ;
>   }
>  
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 5/6] at91: add function to set IO drive

2016-10-06 Thread Andreas Bießmann
On 17.08.16 09:13, Heiko Schocher wrote:
> add new function to set I/O drive.
> 
> Signed-off-by: Heiko Schocher 
> ---
> 
>  arch/arm/mach-at91/include/mach/at91_pio.h |  5 +
>  arch/arm/mach-at91/include/mach/gpio.h |  2 ++
>  drivers/gpio/at91_gpio.c   | 29 +
>  3 files changed, 36 insertions(+)
> 
> diff --git a/arch/arm/mach-at91/include/mach/at91_pio.h 
> b/arch/arm/mach-at91/include/mach/at91_pio.h
> index 8e054e1..535208a 100644
> --- a/arch/arm/mach-at91/include/mach/at91_pio.h
> +++ b/arch/arm/mach-at91/include/mach/at91_pio.h
> @@ -134,6 +134,7 @@ int at91_set_pio_debounce(unsigned port, unsigned pin, 
> int is_on, int div);
>  int at91_set_pio_pulldown(unsigned port, unsigned pin, int is_on);
>  int at91_set_pio_disable_schmitt_trig(unsigned port, unsigned pin);
>  #endif
> +int at91_set_pio_io_drive(unsigned port, unsigned pin, int value);
>  int at91_set_pio_input(unsigned port, unsigned pin, int use_pullup);
>  int at91_set_pio_multi_drive(unsigned port, unsigned pin, int is_on);
>  int at91_set_pio_output(unsigned port, unsigned pin, int value);
> @@ -151,4 +152,8 @@ int at91_get_pio_value(unsigned port, unsigned pin);
>  #define  AT91_PIO_PORTD  0x3
>  #define  AT91_PIO_PORTE  0x4
>  
> +/* allowed I/O driver values */
> +#define AT91_PIO_HI_DRIVE0

sama5 has 0 + 1 low drive, 2 medium and 3 hi :(

> +#define AT91_PIO_MEDIUM_DRIVE1
> +#define AT91_PIO_LOW_DRIVE   2
>  #endif
> diff --git a/arch/arm/mach-at91/include/mach/gpio.h 
> b/arch/arm/mach-at91/include/mach/gpio.h
> index 6d2a7b7..2b89309 100644
> --- a/arch/arm/mach-at91/include/mach/gpio.h
> +++ b/arch/arm/mach-at91/include/mach/gpio.h
> @@ -227,6 +227,8 @@ static inline unsigned pin_to_mask(unsigned pin)
>   at91_set_pio_value((x - PIN_BASE) / 32,(x % 32), y)
>  #define at91_get_gpio_value(x) \
>   at91_get_pio_value((x - PIN_BASE) / 32,(x % 32))
> +#define at91_set_gpio_io_drive(x, v) \
> + at91_set_pio_io_drive((x - PIN_BASE) / 32,(x % 32), v)
>  #else
>  #define at91_set_gpio_value(x, y)at91_set_pio_value(x, y)
>  #define at91_get_gpio_value(x)   at91_get_pio_value(x)
> diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c
> index 8e52e3d..1f624f8 100644
> --- a/drivers/gpio/at91_gpio.c
> +++ b/drivers/gpio/at91_gpio.c
> @@ -358,6 +358,35 @@ int at91_set_pio_multi_drive(unsigned port, unsigned 
> pin, int is_on)
>   return 0;
>  }
>  
> +#if defined(CPU_HAS_PIO3)
> +/*
> + * set I/O driver value
> + */
> +int at91_set_pio_io_drive(unsigned port, unsigned pin, int value)
> +{
> + struct at91_port *at91_port = at91_pio_get_port(port);
> + u32 *reg;
> + u32 mask;
> +
> + if (pin > 15) {
> + reg = _port->io_driver2;
> + pin -= 16;
> + } else {
> + reg = _port->io_driver1;
> + }
> +
> + mask = 0x3 << (pin * 2);
> + clrsetbits_le32(reg, mask, value << (pin * 2));
> + return 0;
> +}
> +#else
> +int at91_set_pio_io_drive(unsigned port, unsigned pin, int value)
> +{
> + return -ENOENT;
> +}
> +#endif
> +
> +
>  static void at91_set_port_value(struct at91_port *at91_port, int offset,
>   int value)
>  {
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/6] arm, at91: add some missing fields in PIO struct

2016-10-06 Thread Andreas Bießmann
On 17.08.16 09:13, Heiko Schocher wrote:
> add missing
> 
> u32 io_delay;   /* 0x110 I/O delay register */
> u32 io_driver1; /* 0x114 I/O driver register 1 */
> u32 io_driver2; /* 0x118 I/O driver register 2 */

This is also a mess ... it is true for sam9x5, but sama5d4 has 0x110
reserved, 0x114 reserved and 0x118 I/O driver register 1, same for
sama5d3 and persumably others ...

Why is is needed here? Couldn't we switch to device tree on the long run?

Andreas

> 
> fields in struct at91_port.
> 
> Signed-off-by: Heiko Schocher 
> ---
> 
>  arch/arm/mach-at91/include/mach/at91_pio.h | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-at91/include/mach/at91_pio.h 
> b/arch/arm/mach-at91/include/mach/at91_pio.h
> index 3012278..8e054e1 100644
> --- a/arch/arm/mach-at91/include/mach/at91_pio.h
> +++ b/arch/arm/mach-at91/include/mach/at91_pio.h
> @@ -103,7 +103,11 @@ typedef struct at91_port {
>   u32 wpsr;   /* 0xE8 Write Protect Status Register */
>   u32 reserved11[5];  /* */
>   u32 schmitt;/* 0x100 Schmitt Trigger Register */
> - u32 reserved12[63];
> + u32 reserved12[3];
> + u32 io_delay;   /* 0x110 I/O delay register */
> + u32 io_driver1; /* 0x114 I/O driver register 1 */
> + u32 io_driver2; /* 0x118 I/O driver register 2 */
> + u32 reserved13[57];
>  #else
>   u32 reserved6[85];
>  #endif
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/6] arm, at91: add icache support

2016-10-06 Thread Andreas Bießmann
On 17.08.16 09:13, Heiko Schocher wrote:
> add at least icache support for at91 based boards.
> This speeds up NOR flash access on an at91sam9g15
> based board from 15.2 seconds reading 8 MiB from
> a SPI NOR flash to 5.7 seconds.
> 
> Signed-off-by: Heiko Schocher <h...@denx.de>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/6] ARM: at91: clock: correct PRES offset for at91sam9x5

2016-10-06 Thread Andreas Bießmann
On 17.08.16 09:13, Heiko Schocher wrote:
> on at91sam9x5 PRES offset is 4 in the PMC master
> clock register.
> 
> Signed-off-by: Heiko Schocher 
> ---
> 
>  arch/arm/mach-at91/arm926ejs/clock.c | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm/mach-at91/arm926ejs/clock.c 
> b/arch/arm/mach-at91/arm926ejs/clock.c
> index c8d24ae..e3181fa 100644
> --- a/arch/arm/mach-at91/arm926ejs/clock.c
> +++ b/arch/arm/mach-at91/arm926ejs/clock.c
> @@ -162,7 +162,13 @@ int at91_clock_init(unsigned long main_clock)
>   gd->arch.mck_rate_hz = at91_css_to_rate(mckr & AT91_PMC_MCKR_CSS_MASK);
>   freq = gd->arch.mck_rate_hz;
>  
> +#if defined(CONFIG_AT91SAM9X5)
> + /* different in prescale on at91sam9x5 */
> + freq /= (1 << ((mckr & AT91_PMC_MCKR_PRES_MASK) >> 4));

This one is really ugly ... I can live with the ifdef here but have you
realized the 0x7 for PRES?

Andreas

> +#else
>   freq /= (1 << ((mckr & AT91_PMC_MCKR_PRES_MASK) >> 2)); /* prescale */
> +#endif
> +
>  #if defined(CONFIG_AT91SAM9G20)
>   /* mdiv ; (x >> 7) = ((x >> 8) * 2) */
>   gd->arch.mck_rate_hz = (mckr & AT91_PMC_MCKR_MDIV_MASK) ?
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/6] arm: at91: mpddrc: add missing MPDDRC_MD defines

2016-10-06 Thread Andreas Bießmann
On 17.08.16 09:13, Heiko Schocher wrote:
> add missing MPDDRC_MD defines
> 
> Signed-off-by: Heiko Schocher <h...@denx.de>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
>  arch/arm/mach-at91/include/mach/atmel_mpddrc.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/mach-at91/include/mach/atmel_mpddrc.h 
> b/arch/arm/mach-at91/include/mach/atmel_mpddrc.h
> index d37d908..f6bcecd 100644
> --- a/arch/arm/mach-at91/include/mach/atmel_mpddrc.h
> +++ b/arch/arm/mach-at91/include/mach/atmel_mpddrc.h
> @@ -147,6 +147,9 @@ int ddr3_init(const unsigned int base,
>  #define ATMEL_MPDDRC_TPR2_TFAW_MASK  0xf
>  
>  /* Bit field in Memory Device Register */
> +#define ATMEL_MPDDRC_MD_SDR_SDRAM0x0
> +#define ATMEL_MPDDRC_MD_LP_SDR_SDRAM 0x1
> +#define ATMEL_MPDDRC_MD_DDR_SDRAM0x2
>  #define ATMEL_MPDDRC_MD_LPDDR_SDRAM  0x3
>  #define ATMEL_MPDDRC_MD_DDR3_SDRAM   0x4
>  #define ATMEL_MPDDRC_MD_LPDDR3_SDRAM 0x5
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 13/16] atmel: Drop README.at91-soc

2016-10-06 Thread Andreas Bießmann
On 03.10.16 02:01, Simon Glass wrote:
> This issue covered by this doc appears to be fixed, so let's remove the
> README.
> 
> Signed-off-by: Simon Glass <s...@chromium.org>

Acked-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
>  doc/README.at91-soc | 48 
>  1 file changed, 48 deletions(-)
>  delete mode 100644 doc/README.at91-soc
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [ANN] U-Boot v2016.09-rc2 released

2016-08-26 Thread Andreas Bießmann

Hi Tom,

On 2016-08-23 02:38, Tom Rini wrote:

If you notice any problems with the release, please speak out and 
thanks

all!


could you please have a look for 
http://patchwork.ozlabs.org/patch/659055/


Andreas
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7] dm: at91: Add driver model support for the spi driver

2016-08-19 Thread Andreas Bießmann

On 2016-08-19 14:48, Jagan Teki wrote:
On 19 August 2016 at 18:16, Andreas Bießmann <andr...@biessmann.org> 
wrote:




non-dm code has to live for some time since this is a shared driver 
for
avr32 and arm architecture of atmel SoC. Unfortunately avr32 still 
lacks

dm
support in u-boot. I have some prepared patches but AFAIR there was 
a
problem with early malloc ... after that I had no time to get it 
done.


Beside that I also insist on converting the remaining at91 boards to 
dm.
Since there are some boards I would suggest a time frame until end 
of

this
year.



OK, look like avr32 should be a blocker here since at91 boards can do
at-least. What is the plan on avr32, shall I look in to it?



I hope I can look for it in next couple of month. So v2016.11 should 
be

doable, maybe v2017.01. Do you have some avr32 hardware to verify it?


Don't have.


It would be hard to verify it, if you would have taken that task ... So 
I'll do it, with a lower priority sometime next months.


Andreas



thanks!

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7] dm: at91: Add driver model support for the spi driver

2016-08-19 Thread Andreas Bießmann

Hi Jagan,

On 2016-08-19 14:10, Jagan Teki wrote:

Hi Andreas,

On 19 August 2016 at 17:20, Andreas Bießmann <andr...@biessmann.de> 
wrote:

Hi Jagan,

On 2016-08-19 13:35, Jagan Teki wrote:


On 8 August 2016 at 06:14,  <wenyou.y...@microchip.com> wrote:


Hi Jagan,


-Original Message-
From: Jagan Teki [mailto:jagannadh.t...@gmail.com]
Sent: 2016年8月6日 21:00
To: Wenyou Yang <wenyou.y...@atmel.com>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [U-Boot] [PATCH v7] dm: at91: Add driver model support 
for

the spi
driver

On 31 July 2016 at 17:05, Jagan Teki <jagannadh.t...@gmail.com> 
wrote:

> On 29 July 2016 at 06:08, Wenyou Yang <wenyou.y...@atmel.com> wrote:
>> Add driver model support while retaining the existing legacy code.
>> This allows the driver to support boards that have converted to
>> driver model as well as those that have not.

Need some info - how many boards still pending to use this driver 
to use

it in dm?



For now, only sama5d2_xplained has used this drive in dm, other 
boards

with AT91 SoC has not used dm driver,
such as at91sam9g20ek, at91sam9x5ek, at91sam9m10g45ek, sama5d3xek.
sama5d4ek, 



Please convert these boards to dm as well, because driver still have
non-dm code never know when it gets removed.



non-dm code has to live for some time since this is a shared driver 
for
avr32 and arm architecture of atmel SoC. Unfortunately avr32 still 
lacks dm

support in u-boot. I have some prepared patches but AFAIR there was a
problem with early malloc ... after that I had no time to get it done.

Beside that I also insist on converting the remaining at91 boards to 
dm.
Since there are some boards I would suggest a time frame until end of 
this

year.


OK, look like avr32 should be a blocker here since at91 boards can do
at-least. What is the plan on avr32, shall I look in to it?


I hope I can look for it in next couple of month. So v2016.11 should be 
doable, maybe v2017.01. Do you have some avr32 hardware to verify it?


Andreas



thanks!

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7] dm: at91: Add driver model support for the spi driver

2016-08-18 Thread Andreas Bießmann

Hi Wenyou,

On 2016-08-18 03:16, wenyou.y...@microchip.com wrote:

Hi Andreas,


-Original Message-
From: Andreas Bießmann [mailto:andr...@biessmann.org]
Sent: 2016年8月16日 5:15
To: Wenyou Yang <wenyou.y...@atmel.com>; U-Boot Mailing List 
Cc: Simon Glass <s...@chromium.org>; Jagan Teki <jt...@openedev.com>
Subject: Re: [PATCH v7] dm: at91: Add driver model support for the spi 
driver


Hi Wenyou,

On 29.07.16 02:38, Wenyou Yang wrote:
> Add driver model support while retaining the existing legacy code.
> This allows the driver to support boards that have converted to driver
> model as well as those that have not.
>
> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
> Reviewed-by: Simon Glass <s...@chromium.org>

This one breaks avr32 boards:

---8<---
02: dm: at91: Add driver model support for the spi driver
 avr32:  +   atngw100 atngw100mkii
+../drivers/spi/atmel_spi.c:17:31: error: asm/arch/at91_spi.h: No such
file or directory
+../drivers/spi/atmel_spi.c:18:22: error: asm/gpio.h: No such file or
directory
+make[2]: *** [drivers/spi/atmel_spi.o] Error 1
+make[1]: *** [drivers/spi] Error 2
+make: *** [sub-make] Error 2
--->8---


It seems this error is not introduced by this patch.


Well, I think it is introduced by this patch. This patch chenges the 
atmel_cpi driver in such a way that it breaks for avr32 architecture 
which has a slight different structure in files.



Can we apply this patch first?


No, not if it breaks AVR32.

Andreas





please fix this

Andreas

> ---
>
> Changes in v7:
>  - Move gpio_request_list_by_name() to _probe(), remove
>*_ofdata_to_platdata().
>
> Changes in v6:
>  - Remove the two flash related options.
>
> Changes in v5:
>  - Change clk_client.h -> clk.h to adapt to clk API conversion.
>
> Changes in v4:
>  - Collect Reviewed-by tag.
>  - Update the clk API based on [PATCH] clk: convert API to match
>reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
>  - Remove check on dev_get_parent() return.
>  - Fixed the return value, -ENODEV->-EINVAL.
>  - Retain #include  line.
>
> Changes in v3:
>  - Remove redundant log print.
>
> Changes in v2:
>  - Add clock support.
>
>  drivers/spi/Kconfig |   7 ++
>  drivers/spi/atmel_spi.c | 295
> 
>  2 files changed, 302 insertions(+)
>
> diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index
> aca385d..16ed231 100644
> --- a/drivers/spi/Kconfig
> +++ b/drivers/spi/Kconfig
> @@ -32,6 +32,13 @@ config ATH79_SPI
>  uses driver model and requires a device tree binding to operate.
>  please refer to doc/device-tree-bindings/spi/spi-ath79.txt.
>
> +config ATMEL_SPI
> +  bool "Atmel SPI driver"
> +  depends on ARCH_AT91
> +  help
> +Enable the Atmel SPI driver. This driver can be used to access
> +the SPI Flash, such as AT25DF321.
> +
>  config CADENCE_QSPI
>bool "Cadence QSPI driver"
>help
> diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index
> ed6278b..db40631 100644
> --- a/drivers/spi/atmel_spi.c
> +++ b/drivers/spi/atmel_spi.c
> @@ -4,6 +4,9 @@
>   * SPDX-License-Identifier:   GPL-2.0+
>   */
>  #include 
> +#include 
> +#include 
> +#include 
>  #include 
>  #include 
>
> @@ -11,9 +14,15 @@
>
>  #include 
>  #include 
> +#include 
> +#include 
>
>  #include "atmel_spi.h"
>
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +#ifndef CONFIG_DM_SPI
> +
>  static int spi_has_wdrbt(struct atmel_spi_slave *slave)  {
>unsigned int ver;
> @@ -209,3 +218,289 @@ out:
>
>return 0;
>  }
> +
> +#else
> +
> +#define MAX_CS_COUNT  4
> +
> +struct atmel_spi_platdata {
> +  struct at91_spi *regs;
> +};
> +
> +struct atmel_spi_priv {
> +  unsigned int freq;  /* Default frequency */
> +  unsigned int mode;
> +  ulong bus_clk_rate;
> +  struct gpio_desc cs_gpios[MAX_CS_COUNT]; };
> +
> +static int atmel_spi_claim_bus(struct udevice *dev) {
> +  struct udevice *bus = dev_get_parent(dev);
> +  struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus);
> +  struct atmel_spi_priv *priv = dev_get_priv(bus);
> +  struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
> +  struct at91_spi *reg_base = bus_plat->regs;
> +  u32 cs = slave_plat->cs;
> +  u32 freq = priv->freq;
> +  u32 scbr, csrx, mode;
> +
> +  scbr = (priv->bus_clk_rate + freq - 1) / freq;
> +  if (scbr > ATMEL_SPI_CSRx_SCBR_MAX)
> +  return -EINVAL;
> +
> +  if (scbr < 1)
> +  scbr = 1;
> +
> +  csrx = ATMEL_SPI_CSRx_SCBR(scbr);
> +  csrx |= ATMEL_SPI_CSRx_BITS(ATM

Re: [U-Boot] Boot failure with a AT91RM9200 based custom board

2016-08-17 Thread Andreas Bießmann

Hi Peter,

On 2016-08-17 11:31, Peter Kardos wrote:

On Mon, Aug 15, 2016 at 10:43 PM, Andreas Bießmann
<andr...@biessmann.org> wrote:


Dear Peter,

On 12.08.16 02:24, Peter Kardos wrote:





RAM Configuration:
Bank #0: 2000 64 MiB

DRAM:  64 MiB
initcall: 1000b424
New Stack Pointer is: 23f23ed0
initcall: 1000b6ac
initcall: 1000b640
Relocation Offset is: 13f84000
Relocating to 23f84000, new gd at 23f23ef0, sp at 23f23ed0


Could you please check, if the RAM initialisation is working
properly?
AFAIR there was some problem with the u-boot RAM initialisation
for this
board but never fixed (shame on me). Some set of known data and
read
back before relocation should do the check.


Yeah, this is my guess as well, as things seem to work up to this
point (continue exec from RAM).

Thanks for the pointer, i'll have a look at the init magic and compare
it with the old from v1.1.4.


Would be great if you come with a solution, so I could fix the 
at91rm9200ek board too.



I guess the easiest way would be to mod the relocation routine and
read back what was written...


sounds good as a quick test

Andreas
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7] dm: at91: Add driver model support for the spi driver

2016-08-15 Thread Andreas Bießmann
Hi Wenyou,

On 29.07.16 02:38, Wenyou Yang wrote:
> Add driver model support while retaining the existing legacy code.
> This allows the driver to support boards that have converted to
> driver model as well as those that have not.
> 
> Signed-off-by: Wenyou Yang 
> Reviewed-by: Simon Glass 

This one breaks avr32 boards:

---8<---
02: dm: at91: Add driver model support for the spi driver
 avr32:  +   atngw100 atngw100mkii
+../drivers/spi/atmel_spi.c:17:31: error: asm/arch/at91_spi.h: No such
file or directory
+../drivers/spi/atmel_spi.c:18:22: error: asm/gpio.h: No such file or
directory
+make[2]: *** [drivers/spi/atmel_spi.o] Error 1
+make[1]: *** [drivers/spi] Error 2
+make: *** [sub-make] Error 2
--->8---

please fix this

Andreas

> ---
> 
> Changes in v7:
>  - Move gpio_request_list_by_name() to _probe(), remove
>*_ofdata_to_platdata().
> 
> Changes in v6:
>  - Remove the two flash related options.
> 
> Changes in v5:
>  - Change clk_client.h -> clk.h to adapt to clk API conversion.
> 
> Changes in v4:
>  - Collect Reviewed-by tag.
>  - Update the clk API based on [PATCH] clk: convert API to match
>reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
>  - Remove check on dev_get_parent() return.
>  - Fixed the return value, -ENODEV->-EINVAL.
>  - Retain #include  line.
> 
> Changes in v3:
>  - Remove redundant log print.
> 
> Changes in v2:
>  - Add clock support.
> 
>  drivers/spi/Kconfig |   7 ++
>  drivers/spi/atmel_spi.c | 295 
> 
>  2 files changed, 302 insertions(+)
> 
> diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
> index aca385d..16ed231 100644
> --- a/drivers/spi/Kconfig
> +++ b/drivers/spi/Kconfig
> @@ -32,6 +32,13 @@ config ATH79_SPI
> uses driver model and requires a device tree binding to operate.
> please refer to doc/device-tree-bindings/spi/spi-ath79.txt.
>  
> +config ATMEL_SPI
> + bool "Atmel SPI driver"
> + depends on ARCH_AT91
> + help
> +   Enable the Atmel SPI driver. This driver can be used to access
> +   the SPI Flash, such as AT25DF321.
> +
>  config CADENCE_QSPI
>   bool "Cadence QSPI driver"
>   help
> diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
> index ed6278b..db40631 100644
> --- a/drivers/spi/atmel_spi.c
> +++ b/drivers/spi/atmel_spi.c
> @@ -4,6 +4,9 @@
>   * SPDX-License-Identifier:  GPL-2.0+
>   */
>  #include 
> +#include 
> +#include 
> +#include 
>  #include 
>  #include 
>  
> @@ -11,9 +14,15 @@
>  
>  #include 
>  #include 
> +#include 
> +#include 
>  
>  #include "atmel_spi.h"
>  
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +#ifndef CONFIG_DM_SPI
> +
>  static int spi_has_wdrbt(struct atmel_spi_slave *slave)
>  {
>   unsigned int ver;
> @@ -209,3 +218,289 @@ out:
>  
>   return 0;
>  }
> +
> +#else
> +
> +#define MAX_CS_COUNT 4
> +
> +struct atmel_spi_platdata {
> + struct at91_spi *regs;
> +};
> +
> +struct atmel_spi_priv {
> + unsigned int freq;  /* Default frequency */
> + unsigned int mode;
> + ulong bus_clk_rate;
> + struct gpio_desc cs_gpios[MAX_CS_COUNT];
> +};
> +
> +static int atmel_spi_claim_bus(struct udevice *dev)
> +{
> + struct udevice *bus = dev_get_parent(dev);
> + struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus);
> + struct atmel_spi_priv *priv = dev_get_priv(bus);
> + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
> + struct at91_spi *reg_base = bus_plat->regs;
> + u32 cs = slave_plat->cs;
> + u32 freq = priv->freq;
> + u32 scbr, csrx, mode;
> +
> + scbr = (priv->bus_clk_rate + freq - 1) / freq;
> + if (scbr > ATMEL_SPI_CSRx_SCBR_MAX)
> + return -EINVAL;
> +
> + if (scbr < 1)
> + scbr = 1;
> +
> + csrx = ATMEL_SPI_CSRx_SCBR(scbr);
> + csrx |= ATMEL_SPI_CSRx_BITS(ATMEL_SPI_BITS_8);
> +
> + if (!(priv->mode & SPI_CPHA))
> + csrx |= ATMEL_SPI_CSRx_NCPHA;
> + if (priv->mode & SPI_CPOL)
> + csrx |= ATMEL_SPI_CSRx_CPOL;
> +
> + writel(csrx, _base->csr[cs]);
> +
> + mode = ATMEL_SPI_MR_MSTR |
> +ATMEL_SPI_MR_MODFDIS |
> +ATMEL_SPI_MR_WDRBT |
> +ATMEL_SPI_MR_PCS(~(1 << cs));
> +
> + writel(mode, _base->mr);
> +
> + writel(ATMEL_SPI_CR_SPIEN, _base->cr);
> +
> + return 0;
> +}
> +
> +static int atmel_spi_release_bus(struct udevice *dev)
> +{
> + struct udevice *bus = dev_get_parent(dev);
> + struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus);
> +
> + writel(ATMEL_SPI_CR_SPIDIS, _plat->regs->cr);
> +
> + return 0;
> +}
> +
> +static void atmel_spi_cs_activate(struct udevice *dev)
> +{
> + struct udevice *bus = dev_get_parent(dev);
> + struct atmel_spi_priv *priv = dev_get_priv(bus);
> + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
> + u32 cs = slave_plat->cs;
> +
> +   

[U-Boot] [PULL] u-boot-atmel/master -> u-boot/master

2016-08-15 Thread Andreas Bießmann
Hi Tom,

please pull the following changes into u-boot/master for v2016.09.

Andreas

The following changes since commit f4b0df1823921ad3bc39820466e9c5201cef6210:

  Merge git://git.denx.de/u-boot-dm (2016-08-12 16:00:50 -0400)

are available in the git repository at:

  git://git.denx.de/u-boot-atmel.git master

for you to fetch changes up to a0d0d86f5cfeefda87986f3825ed1a85efa24448:

  mmc: atmel_sdhci: Convert to the driver model support (2016-08-15 22:58:05 
+0200)


Andreas Bießmann (1):
  clk.h: inline clk_get_by_name()

Songjun Wu (2):
  i2c: atmel: add i2c driver
  i2c: atmel: DT binding for i2c driver

Wenyou Yang (8):
  clk: at91: Add clock driver
  gpio: atmel_pio4: Move PIO4 definitions to head file
  gpio: atmel_pio4: Rework to support DM & DT
  pinctrl: at91-pio4: Add pinctrl driver
  atmel: Bring in at91 pio4 device tree file and bindings
  ARM: at91/dt: Add device tree for SAMA5D2 Xplained
  dm: atmel: Add driver model support for the ehci driver
  mmc: atmel_sdhci: Convert to the driver model support

mario@gdsys.cc (1):
  tpm: atmel_twi: Make compatible with DM I2C busses

 arch/arm/dts/Makefile  |   3 +
 arch/arm/dts/at91-sama5d2_xplained.dts | 200 +
 arch/arm/dts/sama5d2-pinfunc.h | 880 +
 arch/arm/dts/sama5d2.dtsi  | 671 
 arch/arm/mach-at91/include/mach/at91_pmc.h |  11 +-
 arch/arm/mach-at91/include/mach/atmel_pio4.h   |  35 +
 doc/device-tree-bindings/i2c/i2c-at91.txt  |  26 +
 .../pinctrl/atmel,at91-pio4-pinctrl.txt|  66 ++
 drivers/clk/Kconfig|   1 +
 drivers/clk/Makefile   |   1 +
 drivers/clk/at91/Kconfig   |  43 +
 drivers/clk/at91/Makefile  |  11 +
 drivers/clk/at91/clk-generated.c   | 162 
 drivers/clk/at91/clk-h32mx.c   |  56 ++
 drivers/clk/at91/clk-main.c|  55 ++
 drivers/clk/at91/clk-master.c  |  33 +
 drivers/clk/at91/clk-peripheral.c  |  60 ++
 drivers/clk/at91/clk-plla.c|  55 ++
 drivers/clk/at91/clk-slow.c|  37 +
 drivers/clk/at91/clk-system.c  |  76 ++
 drivers/clk/at91/clk-utmi.c|  67 ++
 drivers/clk/at91/pmc.c |  71 ++
 drivers/clk/at91/pmc.h |  18 +
 drivers/clk/at91/sckc.c|  30 +
 drivers/gpio/Kconfig   |   2 +-
 drivers/gpio/atmel_pio4.c  | 201 +++--
 drivers/i2c/Kconfig|  10 +
 drivers/i2c/Makefile   |   1 +
 drivers/i2c/at91_i2c.c | 338 
 drivers/i2c/at91_i2c.h |  77 ++
 drivers/mmc/Kconfig|  10 +
 drivers/mmc/atmel_sdhci.c  | 123 +++
 drivers/pinctrl/Kconfig|   7 +
 drivers/pinctrl/Makefile   |   1 +
 drivers/pinctrl/pinctrl-at91-pio4.c| 182 +
 drivers/tpm/Kconfig|   2 +-
 drivers/tpm/tpm_atmel_twi.c|  15 +-
 drivers/usb/host/Kconfig   |   7 +
 drivers/usb/host/ehci-atmel.c  | 116 +++
 include/clk.h  |   2 +-
 include/sdhci.h|   2 +
 41 files changed, 3686 insertions(+), 78 deletions(-)
 create mode 100644 arch/arm/dts/at91-sama5d2_xplained.dts
 create mode 100644 arch/arm/dts/sama5d2-pinfunc.h
 create mode 100644 arch/arm/dts/sama5d2.dtsi
 create mode 100644 doc/device-tree-bindings/i2c/i2c-at91.txt
 create mode 100644 doc/device-tree-bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
 create mode 100644 drivers/clk/at91/Kconfig
 create mode 100644 drivers/clk/at91/Makefile
 create mode 100644 drivers/clk/at91/clk-generated.c
 create mode 100644 drivers/clk/at91/clk-h32mx.c
 create mode 100644 drivers/clk/at91/clk-main.c
 create mode 100644 drivers/clk/at91/clk-master.c
 create mode 100644 drivers/clk/at91/clk-peripheral.c
 create mode 100644 drivers/clk/at91/clk-plla.c
 create mode 100644 drivers/clk/at91/clk-slow.c
 create mode 100644 drivers/clk/at91/clk-system.c
 create mode 100644 drivers/clk/at91/clk-utmi.c
 create mode 100644 drivers/clk/at91/pmc.c
 create mode 100644 drivers/clk/at91/pmc.h
 create mode 100644 drivers/clk/at91/sckc.c
 create mode 100644 drivers/i2c/at91_i2c.c
 create mode 100644 drivers/i2c/at91_i2c.h
 create mode 100644 drivers/pinctrl/pinctrl-at91-pio4.c
___
U-Boot mailing list
U-

Re: [U-Boot] clk.h: inline clk_get_by_name()

2016-08-15 Thread Andreas Bießmann
Dear =?utf-8?q?Andreas_Bie=C3=9Fmann?=,

<andr...@biessmann.org> writes:
>Fix compile warning for non OF_CONTROL builds:
>
>---8<---
>In file included from /Volumes/devel/u-boot/drivers/gpio/atmel_pio4.c:10:0:
>/Volumes/devel/u-boot/include/clk.h:107:12: warning: 'clk_get_by_name' defined 
>but not used [-Wunused-function]
>--->8---
>
>Signed-off-by: Andreas Bießmann <andr...@biessmann.org>
>Acked-by: Stephen Warren <swar...@nvidia.com>
>---
>
> include/clk.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, RESEND, v3] dm: atmel: Add driver model support for the ehci driver

2016-08-15 Thread Andreas Bießmann
Hi Marek,

On 15.08.16 22:25, Marek Vasut wrote:
> On 08/15/2016 10:16 PM, Andreas Bießmann wrote:
>> Dear Wenyou Yang,
>>
>> Wenyou Yang <wenyou.y...@atmel.com> writes:
>>> Add driver model support while retaining the existing legacy code.
>>> This allows the driver to support boards that have converted to
>>> driver model as well as those that have not.
>>>
>>> Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>>> Acked-by: Simon Glass <s...@chromium.org>
>>> ---
>>>
>>> Changes in v3:
>>> - Change clk_client.h -> clk.h to adapt to clk API conversion.
>>>
>>> Changes in v2:
>>> - Collect Acked-by tag.
>>> - Update the clk API based on [PATCH] clk: convert API to match
>>>   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
>>>
>>> drivers/usb/host/Kconfig  |   7 +++
>>> drivers/usb/host/ehci-atmel.c | 116 
>>> ++
>>> 2 files changed, 123 insertions(+)
>>
>> applied to u-boot-atmel/master, thanks!
>>
>> Best regards,
>> Andreas Bießmann
>>
> Wasn't this droppped because of some build issues ? See the USB PR mail.
> 

Sorry, haven't seen that PR.
This patch depends on 'clk: at91: Add clock driver' (9e5935c in
u-boot-atmel/master).
No build error for arm nor avr32 here (also depends on
http://patchwork.ozlabs.org/patch/659378/; currently not on
u-boot-atmel/master).

Andreas
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PULL] u-boot-atmel/master -> u-boot/master

2016-08-15 Thread Andreas Bießmann
Hi Tom,

On 15.08.16 22:33, Tom Rini wrote:
> On Mon, Aug 15, 2016 at 10:23:29PM +0200, Andreas Bießmann wrote:
> 
>> Hi Tom,
>>
>> please pull the following changes into u-boot/master for v2016.09. It 
>> contains
>> one patch also available in the pull request for u-boot-mmc/master from
>> Jaehoon Chung.
>>
>> Andreas
>>
>> The following changes since commit f4b0df1823921ad3bc39820466e9c5201cef6210:
>>
>>   Merge git://git.denx.de/u-boot-dm (2016-08-12 16:00:50 -0400)
>>
>> are available in the git repository at:
>>
>>   git://git.denx.de/u-boot-atmel.git master
>>
>> for you to fetch changes up to 2fdbd8559a0a72930922435ecaa2eefb378b1f54:
>>
>>   mmc: atmel_sdhci: Convert to the driver model support (2016-08-15 22:12:00 
>> +0200)
>>
> 
> NAK:
> +   sama5d2_ptc_spiflash  
> +(sama5d2_ptc_spiflash)  static int clk_get_by_name(struct udevice *dev, 
> const char *name,
> +(sama5d2_ptc_spiflash) ^
> w+(sama5d2_ptc_spiflash) In file included from drivers/gpio/atmel_pio4.c:10:0:
> w+(sama5d2_ptc_spiflash) include/clk.h:107:12: warning: 'clk_get_by_name' 
> defined but not used [-Wunused-function]
> w+(sama5d2_ptc_spiflash) In file included from 
> drivers/usb/host/ehci-atmel.c:10:0:
> 

Please see http://patchwork.ozlabs.org/patch/659378/
Sorry, should have mentioned this in the mail.

Andreas
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Boot failure with a AT91RM9200 based custom board

2016-08-15 Thread Andreas Bießmann
Dear Peter,

On 12.08.16 02:24, Peter Kardos wrote:
> Greetings,
> 
> I'm looking for a AT91RM9200 specialist as I've got stuck porting board
> support from a old u-boot (v1.1.4) to the latest stable (v2016.07)...
> 
> I'm using the at91r9200ek board as a template to get things running...

I haven't booted that board for a while ...

> With the patches i can get to the state below and here the board hangs.
> When patch 0004 is omitted, it seems the board doesn't boot at all (I'm
> basing this assumption on the current consumption of the system).

AFAIR the address 0x0 is mapped to the boot source until REMAP (also
depending on the BMS setting). It may be flash for your setup ...
writing the flash with a copy instruction should fail so this could be
the cause why it is not working.

> The console shows the following...
> initcall: 1001cce0
> 
> 
> U-Boot 2016.07-g95a02a7 (Aug 12 2016 - 01:43:34 +0200)
> 
> initcall: 1000b5bc
> U-Boot code: 1000 -> 10030338  BSS: -> 1006B424
> initcall: 1000b3b4
> initcall: 1000bae8
> initcall: 1000b5e8
> DRAM:  initcall: 100010b8
> initcall: 1000b808
> Monitor len: 0006B424
> Ram size: 0400
> Ram top: 2400
> initcall: 1000b3dc
> initcall: 1000b564
> TLB table from 23ff to 23ff4000
> initcall: 1000b3f4
> initcall: 1000b518
> Reserving 429k for U-Boot at: 23f84000
> initcall: 1000b4ec
> Reserving 384k for malloc() at: 23f24000
> initcall: 1000b6e8
> Reserving 80 Bytes for Board Info at: 23f23fb0
> initcall: 1000b3fc
> initcall: 1000b4b8
> Reserving 192 Bytes for Global Data at: 23f23ef0
> initcall: 1000b440
> initcall: 1000b414
> initcall: 1000b884
> initcall: 1000b7e0
> initcall: 1000b738
> 
> RAM Configuration:
> Bank #0: 2000 64 MiB
> 
> DRAM:  64 MiB
> initcall: 1000b424
> New Stack Pointer is: 23f23ed0
> initcall: 1000b6ac
> initcall: 1000b640
> Relocation Offset is: 13f84000
> Relocating to 23f84000, new gd at 23f23ef0, sp at 23f23ed0

Could you please check, if the RAM initialisation is working properly?
AFAIR there was some problem with the u-boot RAM initialisation for this
board but never fixed (shame on me). Some set of known data and read
back before relocation should do the check.

Andreas

> Some detail about the board:
> AT91RM9200; external boot from /CS0
> 64Mbyte SDRAM (32bit)
> 32Mbyte NOR (16bit)
> Micrel KSZ8721
> 
> Any ideas, pointers, even flame is appreciated. If more info is needed
> I'm happy to deliver
> Thanx in advance.
> Cheers, Peter
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PULL] u-boot-atmel/master -> u-boot/master

2016-08-15 Thread Andreas Bießmann
Hi Tom,

please pull the following changes into u-boot/master for v2016.09. It contains
one patch also available in the pull request for u-boot-mmc/master from
Jaehoon Chung.

Andreas

The following changes since commit f4b0df1823921ad3bc39820466e9c5201cef6210:

  Merge git://git.denx.de/u-boot-dm (2016-08-12 16:00:50 -0400)

are available in the git repository at:

  git://git.denx.de/u-boot-atmel.git master

for you to fetch changes up to 2fdbd8559a0a72930922435ecaa2eefb378b1f54:

  mmc: atmel_sdhci: Convert to the driver model support (2016-08-15 22:12:00 
+0200)


Songjun Wu (2):
  i2c: atmel: add i2c driver
  i2c: atmel: DT binding for i2c driver

Wenyou Yang (8):
  clk: at91: Add clock driver
  gpio: atmel_pio4: Move PIO4 definitions to head file
  gpio: atmel_pio4: Rework to support DM & DT
  pinctrl: at91-pio4: Add pinctrl driver
  atmel: Bring in at91 pio4 device tree file and bindings
  ARM: at91/dt: Add device tree for SAMA5D2 Xplained
  dm: atmel: Add driver model support for the ehci driver
  mmc: atmel_sdhci: Convert to the driver model support

mario@gdsys.cc (1):
  tpm: atmel_twi: Make compatible with DM I2C busses

 arch/arm/dts/Makefile  |   3 +
 arch/arm/dts/at91-sama5d2_xplained.dts | 200 +
 arch/arm/dts/sama5d2-pinfunc.h | 880 +
 arch/arm/dts/sama5d2.dtsi  | 671 
 arch/arm/mach-at91/include/mach/at91_pmc.h |  11 +-
 arch/arm/mach-at91/include/mach/atmel_pio4.h   |  35 +
 doc/device-tree-bindings/i2c/i2c-at91.txt  |  26 +
 .../pinctrl/atmel,at91-pio4-pinctrl.txt|  66 ++
 drivers/clk/Kconfig|   1 +
 drivers/clk/Makefile   |   1 +
 drivers/clk/at91/Kconfig   |  43 +
 drivers/clk/at91/Makefile  |  11 +
 drivers/clk/at91/clk-generated.c   | 162 
 drivers/clk/at91/clk-h32mx.c   |  56 ++
 drivers/clk/at91/clk-main.c|  55 ++
 drivers/clk/at91/clk-master.c  |  33 +
 drivers/clk/at91/clk-peripheral.c  |  60 ++
 drivers/clk/at91/clk-plla.c|  55 ++
 drivers/clk/at91/clk-slow.c|  37 +
 drivers/clk/at91/clk-system.c  |  76 ++
 drivers/clk/at91/clk-utmi.c|  67 ++
 drivers/clk/at91/pmc.c |  71 ++
 drivers/clk/at91/pmc.h |  18 +
 drivers/clk/at91/sckc.c|  30 +
 drivers/gpio/Kconfig   |   2 +-
 drivers/gpio/atmel_pio4.c  | 201 +++--
 drivers/i2c/Kconfig|  10 +
 drivers/i2c/Makefile   |   1 +
 drivers/i2c/at91_i2c.c | 338 
 drivers/i2c/at91_i2c.h |  77 ++
 drivers/mmc/Kconfig|  10 +
 drivers/mmc/atmel_sdhci.c  | 123 +++
 drivers/pinctrl/Kconfig|   7 +
 drivers/pinctrl/Makefile   |   1 +
 drivers/pinctrl/pinctrl-at91-pio4.c| 182 +
 drivers/tpm/Kconfig|   2 +-
 drivers/tpm/tpm_atmel_twi.c|  15 +-
 drivers/usb/host/Kconfig   |   7 +
 drivers/usb/host/ehci-atmel.c  | 116 +++
 include/sdhci.h|   2 +
 40 files changed, 3685 insertions(+), 77 deletions(-)
 create mode 100644 arch/arm/dts/at91-sama5d2_xplained.dts
 create mode 100644 arch/arm/dts/sama5d2-pinfunc.h
 create mode 100644 arch/arm/dts/sama5d2.dtsi
 create mode 100644 doc/device-tree-bindings/i2c/i2c-at91.txt
 create mode 100644 doc/device-tree-bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
 create mode 100644 drivers/clk/at91/Kconfig
 create mode 100644 drivers/clk/at91/Makefile
 create mode 100644 drivers/clk/at91/clk-generated.c
 create mode 100644 drivers/clk/at91/clk-h32mx.c
 create mode 100644 drivers/clk/at91/clk-main.c
 create mode 100644 drivers/clk/at91/clk-master.c
 create mode 100644 drivers/clk/at91/clk-peripheral.c
 create mode 100644 drivers/clk/at91/clk-plla.c
 create mode 100644 drivers/clk/at91/clk-slow.c
 create mode 100644 drivers/clk/at91/clk-system.c
 create mode 100644 drivers/clk/at91/clk-utmi.c
 create mode 100644 drivers/clk/at91/pmc.c
 create mode 100644 drivers/clk/at91/pmc.h
 create mode 100644 drivers/clk/at91/sckc.c
 create mode 100644 drivers/i2c/at91_i2c.c
 create mode 100644 drivers/i2c/at91_i2c.h
 create mode 100644 drivers/pinctrl/pinctrl-at91-pio4.c
___
U-Boot mailing list
U-Boot@lists.denx.de

Re: [U-Boot] [U-Boot, v7, 2/4] gpio: atmel_pio4: Rework to support DM & DT

2016-08-15 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>Rework the driver to support driver model and device tree, and
>support to regard the pio4 pinctrl device as a child of
>atmel_pio4 device.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Reviewed-by: Simon Glass <s...@chromium.org>
>---
>
>Changes in v7:
> - Change clk_client.h -> clk.h to adapt to clk API conversion.
>
>Changes in v6:
> - Add Reviewed-by tag.
> - Fixed the return value, -EINVAL -> ret.
>
>Changes in v5:
> - Update the clk API based on [PATCH] clk: convert API to match
>   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
> - Use clrbits_le32() to replace readl()/writel().
> - Fixed the return value, -ENODEV->-EINVAL.
> - Remove check on dev_get_parent() return.
>
>Changes in v4:
> - Remove the redundant log print.
>
>Changes in v3:
> - Add bind callback to support the pinctl device regarding as
>   a child of atmel_pio4 device.
> - Add clock support.
>
>Changes in v2: None
>
> drivers/gpio/Kconfig  |   2 +-
> drivers/gpio/atmel_pio4.c | 138 ++++++----
> 2 files changed, 117 insertions(+), 23 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v11] mmc: atmel_sdhci: Convert to the driver model support

2016-08-15 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>Convert the driver to the driver model while retaining the existing
>legacy code. This allows the driver to support boards that have
>converted to driver model as well as those that have not.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Reviewed-by: Simon Glass <s...@chromium.org>
>Reviewed-by: Jaehoon Chung <jh80.ch...@samsung.com>
>Reviewed-by: Heiko Schocher <h...@denx.de>
>---
>
>Changes in v11:
> - Due the removal of unnecessary arguments for sdhci_setup_cfg(),
>   change accordingly.
>
>Changes in v10:
> - Add Reviewed-by tag.
>
>Changes in v9:
> - Add Reviewed-by tag.
>
>Changes in v8:
> - Make atmel_sdhci_get_clk() to get clock device.
> - Use ulong type for gck_rate.
> - Remove meaningless type casting before dev->name.
>
>Changes in v7:
> - Add support for using driver model for block devices and MMC operations.
> - Change clk_client.h -> clk.h to adapt to clk API conversion.
>
>Changes in v6:
> - Remove unnecessary white space.
> - Use sdhci_read(), instead of readl().
> - Remove the local variables min_clk.
>
>Changes in v5:
> - Add Reviewed-by tag.
>
>Changes in v4:
> - Update the clk API based on [PATCH] clk: convert API to match
>   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
> - Remove check on dev_get_parent() return.
> - Fixed the return value, such as -ENODEV->-EINVAL.
>
>Changes in v3:
> - Remove the redundant log print.
>
>Changes in v2:
> - Add clock support, include enabling peripheral clock
>   and generated clock.
> - Retain the existing legacy code to support boards which have not
>   converted to driver model.
>
> drivers/mmc/Kconfig   |  10 
> drivers/mmc/atmel_sdhci.c | 123 ++
> include/sdhci.h   |   2 +
> 3 files changed, 135 insertions(+)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] ARM: at91/dt: Add device tree for SAMA5D2 Xplained

2016-08-15 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>Add device tree for SAMA5D2 Xplained board.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>---
>
> arch/arm/dts/Makefile  |   3 +
> arch/arm/dts/at91-sama5d2_xplained.dts | 200 ++
> arch/arm/dts/sama5d2.dtsi  | 671 +
> 3 files changed, 874 insertions(+)
> create mode 100644 arch/arm/dts/at91-sama5d2_xplained.dts
> create mode 100644 arch/arm/dts/sama5d2.dtsi

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,v3,1/2] i2c: atmel: add i2c driver

2016-08-15 Thread Andreas Bießmann
Dear Songjun Wu,

Songjun Wu <songjun...@atmel.com> writes:
>Add i2c driver.
>
>Signed-off-by: Songjun Wu <songjun...@atmel.com>
>Reviewed-by: Heiko Schocher <h...@denx.de>
>Acked-by: Heiko Schocher <h...@denx.de>
>---
>
>Changes in v3:
>- Update the clk API.
>
>Changes in v2:
>- Add code to get and enable clock.
>
> drivers/i2c/Kconfig|  10 ++
> drivers/i2c/Makefile   |   1 +
> drivers/i2c/at91_i2c.c | 338 +
> drivers/i2c/at91_i2c.h |  77 +++
> 4 files changed, 426 insertions(+)
> create mode 100644 drivers/i2c/at91_i2c.c
> create mode 100644 drivers/i2c/at91_i2c.h

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, RESEND, v3] dm: atmel: Add driver model support for the ehci driver

2016-08-15 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>Add driver model support while retaining the existing legacy code.
>This allows the driver to support boards that have converted to
>driver model as well as those that have not.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Acked-by: Simon Glass <s...@chromium.org>
>---
>
>Changes in v3:
> - Change clk_client.h -> clk.h to adapt to clk API conversion.
>
>Changes in v2:
> - Collect Acked-by tag.
> - Update the clk API based on [PATCH] clk: convert API to match
>   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
>
> drivers/usb/host/Kconfig  |   7 +++
> drivers/usb/host/ehci-atmel.c | 116 ++
> 2 files changed, 123 insertions(+)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,v3,2/2] i2c: atmel: DT binding for i2c driver

2016-08-15 Thread Andreas Bießmann
Dear Songjun Wu,

Songjun Wu <songjun...@atmel.com> writes:
>DT binding documentation for atmel i2c driver.
>
>Signed-off-by: Songjun Wu <songjun...@atmel.com>
>Reviewed-by: Heiko Schocher <h...@denx.de>
>Acked-by: Heiko Schocher <h...@denx.de>
>---
>
>Changes in v3: None
>Changes in v2:
>- Add phandles to input clocks
>
> doc/device-tree-bindings/i2c/i2c-at91.txt | 26 ++
> 1 file changed, 26 insertions(+)
> create mode 100644 doc/device-tree-bindings/i2c/i2c-at91.txt

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v7, 4/4] atmel: Bring in at91 pio4 device tree file and bindings

2016-08-15 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>Bring in required device tree file and bindings from Linux.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
>Reviewed-by: Simon Glass <s...@chromium.org>
>---
>
>Changes in v7:
> - Drop [PATCH]: configs: sama5d2_xplained: Add #ifndef before
>   CONFIG_ATMEL_PIO4.
>
>Changes in v6: None
>Changes in v5: None
>Changes in v4: None
>Changes in v3: None
>Changes in v2:
> - add detailed example to show how to configure pinctrl for device.
> - remove interrupt and gpio property description.
> - add reviewed-by tag.
>
> arch/arm/dts/sama5d2-pinfunc.h | 880 +
> .../pinctrl/atmel,at91-pio4-pinctrl.txt|  66 ++
> 2 files changed, 946 insertions(+)
> create mode 100644 arch/arm/dts/sama5d2-pinfunc.h
> create mode 100644 
> doc/device-tree-bindings/pinctrl/atmel,at91-pio4-pinctrl.txt

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v7, 3/4] pinctrl: at91-pio4: Add pinctrl driver

2016-08-15 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>AT91 PIO4 controller is a combined gpio-controller, pin-mux and
>pin-config module. The peripheral's pins are assigned through
>per-pin based muxing logic.
>
>The pin configuration is performed on specific registers which
>are shared along with the gpio controller. So regard the pinctrl
>device as a child of atmel_pio4 device.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Reviewed-by: Simon Glass <s...@chromium.org>
>Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
>---
>
>Changes in v7: None
>Changes in v6: None
>Changes in v5:
> - Fixed the return value, -ENODEV->-EINVAL.
> - Remove check on dev_get_parent() return.
>
>Changes in v4: None
>Changes in v3:
> - Rework due to the pinctrl device is regarded as atmel_pio4
>   device's child.
>
>Changes in v2:
> - remove meaningless comment.
> - add else path for argument of pinconf.
> - add inline attribute for atmel_pio4_bank_base().
> - add handle if the pinmux entries is greater maximum value.
>
> drivers/pinctrl/Kconfig |   7 ++
> drivers/pinctrl/Makefile|   1 +
> drivers/pinctrl/pinctrl-at91-pio4.c | 182 
> 3 files changed, 190 insertions(+)
> create mode 100644 drivers/pinctrl/pinctrl-at91-pio4.c

applied to u-boot-atmel/master, thanks!

I had to rebase this patch before applying.

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,v5] clk: at91: Add clock driver

2016-08-15 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>The patch is referred to at91 clock driver of Linux, to make
>the clock node descriptions in DT aligned with the Linux's.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Reviewed-by: Simon Glass <s...@chromium.org>
>---
>
>Changes in v5:
> - Change clk_client.h -> clk.h to adapt to clk API conversion.
> - Fix missing semicolon and clk->dev in clk-generated.c.
> - Make clock options selectable via menuconfig.
>
>Changes in v4:
> - Add Reviewed-by tag.
> - Add more information in Kconfig help.
> - Use u32 for num_parents variable, not u8.
> - Change the check return from clk_get_rate().
> - Remove return -ENODEV line, use return ret.
> - Improve the comments in at91_system_clk_enable().
>
>Changes in v3:
> - Update based on [PATCH] clk: convert API to match reset/mailbox
>   style (http://patchwork.ozlabs.org/patch/625342/).
> - Remove [PATCH] clk: clk-uclass: Add post binding for CLK uclass,
>   add bind() method to bind the clk node without compatible.
> - Add help for Kconfig HAVE_AT91_XX option.
> - Add ofdata_to_platdata() method for generated clock driver
>   to handle the device tree.
> - Use setbits_le32() to replace readl()/writel().
> - Fixed the return value, -ENODEV->-EINVAL.
> - Use dev_get_addr_ptr() to replace dev_get_addr().
> - Remove check on dev_get_parent() return.
>
>Changes in v2:
> - Remove the redundant log print.
>
> arch/arm/mach-at91/include/mach/at91_pmc.h |  11 +-
> drivers/clk/Kconfig|   1 +
> drivers/clk/Makefile   |   1 +
> drivers/clk/at91/Kconfig   |  43 
> drivers/clk/at91/Makefile  |  11 ++
> drivers/clk/at91/clk-generated.c   | 162 +
> drivers/clk/at91/clk-h32mx.c   |  56 ++
> drivers/clk/at91/clk-main.c|  55 ++
> drivers/clk/at91/clk-master.c  |  33 ++
> drivers/clk/at91/clk-peripheral.c  |  60 +++
> drivers/clk/at91/clk-plla.c|  55 ++
> drivers/clk/at91/clk-slow.c|  37 +++
> drivers/clk/at91/clk-system.c  |  76 ++
> drivers/clk/at91/clk-utmi.c|  67 
> drivers/clk/at91/pmc.c |  71 +
> drivers/clk/at91/pmc.h |  18 
> drivers/clk/at91/sckc.c|  30 ++
> 17 files changed, 784 insertions(+), 3 deletions(-)
> create mode 100644 drivers/clk/at91/Kconfig
> create mode 100644 drivers/clk/at91/Makefile
> create mode 100644 drivers/clk/at91/clk-generated.c
> create mode 100644 drivers/clk/at91/clk-h32mx.c
> create mode 100644 drivers/clk/at91/clk-main.c
> create mode 100644 drivers/clk/at91/clk-master.c
> create mode 100644 drivers/clk/at91/clk-peripheral.c
> create mode 100644 drivers/clk/at91/clk-plla.c
> create mode 100644 drivers/clk/at91/clk-slow.c
> create mode 100644 drivers/clk/at91/clk-system.c
> create mode 100644 drivers/clk/at91/clk-utmi.c
> create mode 100644 drivers/clk/at91/pmc.c
> create mode 100644 drivers/clk/at91/pmc.h
> create mode 100644 drivers/clk/at91/sckc.c

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] tpm: atmel_twi: Make compatible with DM I2C busses

2016-08-15 Thread Andreas Bießmann
Dear ,

Mario Six <mario@gdsys.cc> writes:
>Commit 302c5db ("dm: tpm: Add Driver Model support for tpm_atmel_twi
>driver") converted the Atmel TWI TPM driver itself to driver model, but
>kept the legacy-style i2c_write/i2c_read calls.
>
>Commit 3e7d940 ("dm: tpm: Every TPM drivers should depends on DM_TPM")
>then made DM_I2C a dependency of the driver, effectively forcing users
>to turn on CONFIG_DM_I2C_COMPAT to get it to work.
>
>This patch adds the necessary dm_i2c_write/dm_i2c_read calls to make the
>driver compatible with DM, but also keeps the legacy calls in ifdefs, so
>that the driver is now compatible with both DM and non-DM setups.
>
>Signed-off-by: Mario Six <mario@gdsys.cc>
>Reviewed-by: Simon Glass <s...@chromium.org>
>Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
>---
> drivers/tpm/Kconfig |  2 +-
> drivers/tpm/tpm_atmel_twi.c | 15 ++-
> 2 files changed, 15 insertions(+), 2 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v7, 1/4] gpio: atmel_pio4: Move PIO4 definitions to head file

2016-08-15 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang <wenyou.y...@atmel.com> writes:
>In order to make these PIO4 definitions shared with AT91 PIO4
>pinctrl driver, move them from the existing gpio driver to the
>head file, and rephrase them.
>
>Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com>
>Reviewed-by: Simon Glass <s...@chromium.org>
>---
>
>Changes in v7: None
>Changes in v6: None
>Changes in v5: None
>Changes in v4: None
>Changes in v3: None
>Changes in v2: None
>
> arch/arm/mach-at91/include/mach/atmel_pio4.h | 35 ++
> drivers/gpio/atmel_pio4.c| 71 +++-
> 2 files changed, 53 insertions(+), 53 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] clk.h: inline clk_get_by_name()

2016-08-15 Thread Andreas Bießmann
Fix compile warning for non OF_CONTROL builds:

---8<---
In file included from /Volumes/devel/u-boot/drivers/gpio/atmel_pio4.c:10:0:
/Volumes/devel/u-boot/include/clk.h:107:12: warning: 'clk_get_by_name' defined 
but not used [-Wunused-function]
--->8---

Signed-off-by: Andreas Bießmann <andr...@biessmann.org>
---

 include/clk.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/clk.h b/include/clk.h
index 161bc28..dc18b03 100644
--- a/include/clk.h
+++ b/include/clk.h
@@ -104,7 +104,7 @@ static inline int clk_get_by_index(struct udevice *dev, int 
index,
return -ENOSYS;
 }
 
-static int clk_get_by_name(struct udevice *dev, const char *name,
+static inline int clk_get_by_name(struct udevice *dev, const char *name,
   struct clk *clk)
 {
return -ENOSYS;
-- 
2.7.4 (Apple Git-66)

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] image-fit: fix fit_image_load() OS check

2016-08-15 Thread Andreas Bießmann

Hi Michal,

On 2016-08-15 08:41, Michal Simek wrote:

On 14.8.2016 20:31, Andreas Bießmann wrote:
Commit 62afc601883e788f3f22291202d5b2a23c1a8b06 introduced fpga image 
load via

bootm but broke the OS check in fit_image_load().

This commit removes following compiler warning:

---8<---
In file included from tools/common/image-fit.c:1:
/Volumes/devel/u-boot/tools/../common/image-fit.c:1715:39: warning: 
use of logical '||' with constant operand [-Wconstant-logical-operand]

os_ok = image_type == IH_TYPE_FLATDT || IH_TYPE_FPGA ||
 ^  
/Volumes/devel/u-boot/tools/../common/image-fit.c:1715:39: note: use 
'|' for a bitwise operation

os_ok = image_type == IH_TYPE_FLATDT || IH_TYPE_FPGA ||
 ^~
 |
1 warning generated.
--->8---

Signed-off-by: Andreas Bießmann <andr...@biessmann.org>
Cc: Michal Simek <michal.si...@xilinx.com>
---
 common/image-fit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/image-fit.c b/common/image-fit.c
index d8d4e95..f833fe3 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -1712,7 +1712,8 @@ int fit_image_load(bootm_headers_t *images, 
ulong addr,

  (image_type == IH_TYPE_KERNEL &&
   fit_image_check_type(fit, noffset, IH_TYPE_KERNEL_NOLOAD));

-   os_ok = image_type == IH_TYPE_FLATDT || IH_TYPE_FPGA ||
+   os_ok = image_type == IH_TYPE_FLATDT ||
+   image_type == IH_TYPE_FPGA ||
fit_image_check_os(fit, noffset, IH_OS_LINUX) ||
fit_image_check_os(fit, noffset, IH_OS_U_BOOT) ||
fit_image_check_os(fit, noffset, IH_OS_OPENRTOS);




hm. Interesting. I didn't see that compilation warning.


It is an llvm 3.6 or so compiler (latest OS X)

Andreas
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] tpm: atmel_twi: Make compatible with DM I2C busses

2016-08-14 Thread Andreas Bießmann
On 18.07.16 13:47, Mario Six wrote:
> Commit 302c5db ("dm: tpm: Add Driver Model support for tpm_atmel_twi
> driver") converted the Atmel TWI TPM driver itself to driver model, but
> kept the legacy-style i2c_write/i2c_read calls.
> 
> Commit 3e7d940 ("dm: tpm: Every TPM drivers should depends on DM_TPM")
> then made DM_I2C a dependency of the driver, effectively forcing users
> to turn on CONFIG_DM_I2C_COMPAT to get it to work.
> 
> This patch adds the necessary dm_i2c_write/dm_i2c_read calls to make the
> driver compatible with DM, but also keeps the legacy calls in ifdefs, so
> that the driver is now compatible with both DM and non-DM setups.
> 
> Signed-off-by: Mario Six <mario@gdsys.cc>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] image-fit: fix fit_image_load() OS check

2016-08-14 Thread Andreas Bießmann
Commit 62afc601883e788f3f22291202d5b2a23c1a8b06 introduced fpga image load via
bootm but broke the OS check in fit_image_load().

This commit removes following compiler warning:

---8<---
In file included from tools/common/image-fit.c:1:
/Volumes/devel/u-boot/tools/../common/image-fit.c:1715:39: warning: use of 
logical '||' with constant operand [-Wconstant-logical-operand]
os_ok = image_type == IH_TYPE_FLATDT || IH_TYPE_FPGA ||
 ^  
/Volumes/devel/u-boot/tools/../common/image-fit.c:1715:39: note: use '|' for a 
bitwise operation
os_ok = image_type == IH_TYPE_FLATDT || IH_TYPE_FPGA ||
 ^~
 |
1 warning generated.
--->8---

Signed-off-by: Andreas Bießmann <andr...@biessmann.org>
Cc: Michal Simek <michal.si...@xilinx.com>
---
 common/image-fit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/image-fit.c b/common/image-fit.c
index d8d4e95..f833fe3 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -1712,7 +1712,8 @@ int fit_image_load(bootm_headers_t *images, ulong addr,
  (image_type == IH_TYPE_KERNEL &&
   fit_image_check_type(fit, noffset, IH_TYPE_KERNEL_NOLOAD));
 
-   os_ok = image_type == IH_TYPE_FLATDT || IH_TYPE_FPGA ||
+   os_ok = image_type == IH_TYPE_FLATDT ||
+   image_type == IH_TYPE_FPGA ||
fit_image_check_os(fit, noffset, IH_OS_LINUX) ||
fit_image_check_os(fit, noffset, IH_OS_U_BOOT) ||
fit_image_check_os(fit, noffset, IH_OS_OPENRTOS);
-- 
2.7.4 (Apple Git-66)

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mmc: sdhci: Add the programmable clock mode support

2016-08-14 Thread Andreas Bießmann
Dear Pantelis,

On 20.06.16 03:58, Wenyou Yang wrote:
> Add the programmable clock mode for the clock generator.
> 

this one is delegated to me, but I think it is out of my scope. Could
you please have a look?

Andreas

> Signed-off-by: Wenyou Yang 
> ---
> 
>  drivers/mmc/sdhci.c | 49 +++--
>  include/sdhci.h | 15 +++
>  2 files changed, 54 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
> index 5c71ab8..ee6d4a1 100644
> --- a/drivers/mmc/sdhci.c
> +++ b/drivers/mmc/sdhci.c
> @@ -286,7 +286,7 @@ static int sdhci_send_command(struct mmc *mmc, struct 
> mmc_cmd *cmd,
>  static int sdhci_set_clock(struct mmc *mmc, unsigned int clock)
>  {
>   struct sdhci_host *host = mmc->priv;
> - unsigned int div, clk, timeout, reg;
> + unsigned int div, clk = 0, timeout, reg;
>  
>   /* Wait max 20 ms */
>   timeout = 200;
> @@ -310,14 +310,35 @@ static int sdhci_set_clock(struct mmc *mmc, unsigned 
> int clock)
>   return 0;
>  
>   if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
> - /* Version 3.00 divisors must be a multiple of 2. */
> - if (mmc->cfg->f_max <= clock)
> - div = 1;
> - else {
> - for (div = 2; div < SDHCI_MAX_DIV_SPEC_300; div += 2) {
> - if ((mmc->cfg->f_max / div) <= clock)
> + /*
> +  * Check if the Host Controller supports Programmable Clock
> +  * Mode.
> +  */
> + if (host->clk_mul) {
> + for (div = 1; div <= 1024; div++) {
> + if ((mmc->cfg->f_max * host->clk_mul / div)
> + <= clock)
>   break;
>   }
> +
> + /*
> +  * Set Programmable Clock Mode in the Clock
> +  * Control register.
> +  */
> + clk = SDHCI_PROG_CLOCK_MODE;
> + div--;
> + } else {
> + /* Version 3.00 divisors must be a multiple of 2. */
> + if (mmc->cfg->f_max <= clock) {
> + div = 1;
> + } else {
> + for (div = 2;
> +  div < SDHCI_MAX_DIV_SPEC_300; div += 2) {
> + if ((mmc->cfg->f_max / div) <= clock)
> + break;
> + }
> + }
> + div >>= 1;
>   }
>   } else {
>   /* Version 2.00 divisors must be a power of 2. */
> @@ -325,13 +346,13 @@ static int sdhci_set_clock(struct mmc *mmc, unsigned 
> int clock)
>   if ((mmc->cfg->f_max / div) <= clock)
>   break;
>   }
> + div >>= 1;
>   }
> - div >>= 1;
>  
>   if (host->set_clock)
>   host->set_clock(host->index, div);
>  
> - clk = (div & SDHCI_DIV_MASK) << SDHCI_DIVIDER_SHIFT;
> + clk |= (div & SDHCI_DIV_MASK) << SDHCI_DIVIDER_SHIFT;
>   clk |= ((div & SDHCI_DIV_HI_MASK) >> SDHCI_DIV_MASK_LEN)
>   << SDHCI_DIVIDER_HI_SHIFT;
>   clk |= SDHCI_CLOCK_INT_EN;
> @@ -480,7 +501,7 @@ static const struct mmc_ops sdhci_ops = {
>  
>  int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk)
>  {
> - unsigned int caps;
> + unsigned int caps, caps_1;
>  
>   host->cfg.name = host->name;
>   host->cfg.ops = _ops;
> @@ -546,6 +567,14 @@ int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 
> min_clk)
>  
>   host->cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
>  
> + /*
> +  * In case of Host Controller v3.00, find out whether clock
> +  * multiplier is supported.
> +  */
> + caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
> + host->clk_mul = (caps_1 & SDHCI_CLOCK_MUL_MASK) >>
> + SDHCI_CLOCK_MUL_SHIFT;
> +
>   sdhci_reset(host, SDHCI_RESET_ALL);
>  
>   host->mmc = mmc_create(>cfg, host);
> diff --git a/include/sdhci.h b/include/sdhci.h
> index e0f6667..5abe0a2 100644
> --- a/include/sdhci.h
> +++ b/include/sdhci.h
> @@ -97,6 +97,7 @@
>  #define  SDHCI_DIV_MASK  0xFF
>  #define  SDHCI_DIV_MASK_LEN  8
>  #define  SDHCI_DIV_HI_MASK   0x300
> +#define  SDHCI_PROG_CLOCK_MODE  0x0020
>  #define  SDHCI_CLOCK_CARD_EN 0x0004
>  #define  SDHCI_CLOCK_INT_STABLE  0x0002
>  #define  SDHCI_CLOCK_INT_EN  0x0001
> @@ -166,6 +167,19 @@
>  #define  SDHCI_CAN_64BIT 0x1000
>  
>  #define SDHCI_CAPABILITIES_1 0x44
> +#define  SDHCI_SUPPORT_SDR50 0x0001
> +#define  SDHCI_SUPPORT_SDR1040x0002
> +#define  SDHCI_SUPPORT_DDR50 0x0004
> +#define  SDHCI_DRIVER_TYPE_A 0x0010
> 

Re: [U-Boot] [PATCH] Please pull u-boot-mmc

2016-08-12 Thread Andreas Bießmann

On 2016-08-12 14:48, Tom Rini wrote:

On Fri, Aug 12, 2016 at 02:40:12PM +0200, andr...@biessmann.de wrote:

On 2016-08-12 14:04, Tom Rini wrote:
>On Fri, Aug 12, 2016 at 04:34:01PM +0900, Jaehoon Chung wrote:
>
>>Dear Tom,
>>
>>Here is the mmc updates.
>>- Supports the Driver model for atmel_sdhci.
>>- Fixed the build error for omap_hsmmc.
>>
>>Could you pull these patch to u-boot/master?
>>
>>Best Regards,
>>Jaehoon Chung
>>
>>The following changes since commit
>>28cd88baa3f11cdb52be3b6d0610dcf32c60871a:
>>
>>  Merge branch 'master' of git://git.denx.de/u-boot-uniphier
>>(2016-08-11 10:45:53 -0400)
>>
>>are available in the git repository at:
>>
>>
>>  http://git.denx.de/u-boot-mmc.git master
>>
>>for you to fetch changes up to
>>761326b33f1a14b19c0a4f7e8c336f8ed153d00c:
>>
>>  defconfig: k2g_evm_defconfig: Enable mmc driver model
>>(2016-08-12 16:23:07 +0900)
>>
>>
>>Sekhar Nori (4):
>>  drivers: mmc: omap_hsmmc: fix build breakage
>>  ARM: dts: K2G: Add support for MMC controller
>>  ARM: dts: k2g-evm: enable mmc/sd suppport
>>  defconfig: k2g_evm_defconfig: Enable mmc driver model
>>
>>Wenyou Yang (1):
>>  mmc: atmel_sdhci: Convert to the driver model support
>
>NAK.  This atmel change, like the all of the others in their
>series need
>to come in via Andreas' tree as it's introducing a warning due to some
>other patch being required:
>+   sama5d2_xplained_spiflash
>+(sama5d2_xplained_spiflash)  static int clk_get_by_name(struct
>udevice *dev, const char *name,
>+(sama5d2_xplained_spiflash) ^
>w+(sama5d2_xplained_spiflash) In file included from
>drivers/mmc/atmel_sdhci.c:9:0:
>w+(sama5d2_xplained_spiflash) include/clk.h:107:12: warning:
>'clk_get_by_name' defined but not used [-Wunused-function]

Sorry, I had no time to prepare a pull request early enough for rc1.
I'll have a look for outstanding patches next few days and could
also grab this one.


Thanks!  Note that Wenyou has a number of patches along these lines and
they're delegated to various people in patchwork, but please just grab
them all (unless someone nak'd them of course) once you've also found
the one that makes us also not have that warning :)


I think I know the right one (clk framework rework, ack'ed by at least 
simon). I will have prepared it by end of this weekend.


Andreas
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PULL] u-boot-atmel/master -> u-boot/master

2016-06-26 Thread Andreas Bießmann
Hi Tom,

please pull the following into u-boot/master for 2016.07.

It contains the spl_boot_mode() change from Marek which was delegated partly
to you and partly to me on patchwork.
The rest is DT support for some Siemens boards which where sent before MW
close but missed in my last pull request. I hope you'll take it since it
touches only the three boards.

Compile tests are clean, except for them already broken in
4141e85bcd79c0b9b16def710e527f165107b7af:

01: kbuild: avoid race between dtbs and dt/dt.dtb targets
   arm:  +   omap3_overo igep0030_nand mx31pdk igep0020_nand socfpga_is1
   omap4_sdp4430 omap4_panda

(some section overflows with my toolchain and socfpga_is1 is broken for
CONFIG_BOOTDELAY change)

Andreas

The following changes since commit 4141e85bcd79c0b9b16def710e527f165107b7af:

  kbuild: avoid race between dtbs and dt/dt.dtb targets (2016-06-24 17:24:41 
-0400)

are available in the git repository at:

  git://git.denx.de/u-boot-atmel.git master

for you to fetch changes up to 8e6e8221c78ed283a45f8598c65ffe4d287dcf42:

  arm: at91: taurus/axm: add DM and DTS support (2016-06-26 20:17:22 +0200)


Heiko Schocher (5):
  arm: at91: add CONFIG_AT91SAM9M10G45
  corvus DTS / DM support
  arm: at91: dts: Bring in dts files for AT91SAM9G20 and SAM9260
  arm: at91: smartweb: add DM and DTS support
  arm: at91: taurus/axm: add DM and DTS support

Marek Vasut (2):
  common: Pass the boot device into spl_boot_mode()
  ARM: at91: Don't invoke spl_boot_device() twice

 arch/arm/cpu/arm1136/mx35/generic.c   |2 +-
 arch/arm/cpu/armv7/ls102xa/spl.c  |2 +-
 arch/arm/cpu/armv7/omap-common/boot-common.c  |2 +-
 arch/arm/cpu/armv8/fsl-layerscape/spl.c   |2 +-
 arch/arm/cpu/armv8/zynqmp/spl.c   |2 +-
 arch/arm/dts/Makefile |6 +-
 arch/arm/dts/at91sam9260-smartweb.dts |  110 +++
 arch/arm/dts/at91sam9260.dtsi | 1034 +
 arch/arm/dts/at91sam9261.dtsi |  876 +
 arch/arm/dts/at91sam9263.dtsi | 1034 +
 arch/arm/dts/at91sam9g20-taurus.dts   |  119 +++
 arch/arm/dts/at91sam9g20.dtsi |   68 ++
 arch/arm/dts/at91sam9g45-corvus.dts   |  108 +++
 arch/arm/imx-common/spl.c |2 +-
 arch/arm/mach-at91/Kconfig|   12 +
 arch/arm/mach-at91/include/mach/at91_matrix.h |   26 +-
 arch/arm/mach-at91/spl.c  |4 +-
 arch/arm/mach-davinci/spl.c   |2 +-
 arch/arm/mach-mvebu/spl.c |2 +-
 arch/arm/mach-rockchip/rk3288-board-spl.c |2 +-
 arch/arm/mach-socfpga/spl.c   |2 +-
 arch/arm/mach-sunxi/board.c   |2 +-
 arch/arm/mach-uniphier/boot-mode/boot-mode.c  |2 +-
 arch/arm/mach-zynq/spl.c  |2 +-
 board/siemens/corvus/board.c  |   41 +-
 board/siemens/smartweb/smartweb.c |   32 +-
 board/siemens/taurus/taurus.c |   25 +
 common/spl/spl_mmc.c  |2 +-
 configs/axm_defconfig |5 +-
 configs/corvus_defconfig  |8 +
 configs/smartweb_defconfig|7 +-
 configs/taurus_defconfig  |5 +-
 include/configs/corvus.h  |2 +-
 include/configs/smartweb.h|6 +-
 include/configs/taurus.h  |2 +-
 include/spl.h |2 +-
 36 files changed, 3511 insertions(+), 49 deletions(-)
 create mode 100644 arch/arm/dts/at91sam9260-smartweb.dts
 create mode 100644 arch/arm/dts/at91sam9260.dtsi
 create mode 100644 arch/arm/dts/at91sam9261.dtsi
 create mode 100644 arch/arm/dts/at91sam9263.dtsi
 create mode 100644 arch/arm/dts/at91sam9g20-taurus.dts
 create mode 100644 arch/arm/dts/at91sam9g20.dtsi
 create mode 100644 arch/arm/dts/at91sam9g45-corvus.dts
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] ARM: at91: Don't invoke spl_boot_device() twice

2016-06-26 Thread Andreas Bießmann
Dear Marek Vasut,

Marek Vasut <ma...@denx.de> writes:
>Since the spl_boot_mode() is now passed the boot device to boot from,
>make use of it instead of inquiring for the boot device again. This
>allows board_boot_order() to function correctly.
>
>Signed-off-by: Marek Vasut <ma...@denx.de>
>Cc: Andreas Bießmann <andreas.de...@googlemail.com>
>Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
>---
> arch/arm/mach-at91/spl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,v1,1/5] arm: at91: add CONFIG_AT91SAM9M10G45

2016-06-26 Thread Andreas Bießmann
Dear Heiko Schocher,

Heiko Schocher <h...@denx.de> writes:
>add support for CONFIG_AT91SAM9M10G45.
>
>Signed-off-by: Heiko Schocher <h...@denx.de>
>Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
>---
>
> arch/arm/mach-at91/include/mach/at91_matrix.h | 26 ++
> 1 file changed, 14 insertions(+), 12 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v1, 3/5] arm: at91: dts: Bring in dts files for AT91SAM9G20 and SAM9260

2016-06-26 Thread Andreas Bießmann
Dear Heiko Schocher,

Heiko Schocher <h...@denx.de> writes:
>Add this files from Linux v4.6-rc5
>
>66b8a424d: [workqueue: fix ghost PENDING flag while doing MQ IO]
>
>Signed-off-by: Heiko Schocher <h...@denx.de>
>Acked-by: Andreas Bießmann <andr...@biessmann.org>
>---
>
> arch/arm/dts/at91sam9260.dtsi | 1034 +
> arch/arm/dts/at91sam9261.dtsi |  876 ++
> arch/arm/dts/at91sam9263.dtsi | 1034 +
> arch/arm/dts/at91sam9g20.dtsi |   68 +++
> 4 files changed, 3012 insertions(+)
> create mode 100644 arch/arm/dts/at91sam9260.dtsi
> create mode 100644 arch/arm/dts/at91sam9261.dtsi
> create mode 100644 arch/arm/dts/at91sam9263.dtsi
> create mode 100644 arch/arm/dts/at91sam9g20.dtsi

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v1, 4/5] arm: at91: smartweb: add DM and DTS support

2016-06-26 Thread Andreas Bießmann
Dear Heiko Schocher,

Heiko Schocher <h...@denx.de> writes:
>Signed-off-by: Heiko Schocher <h...@denx.de>
>Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
>[rebased on current ToT]
>Signed-off-by: Andreas Bießmann <andr...@biessmann.org>
>---
> arch/arm/dts/Makefile |   1 +
> arch/arm/dts/at91sam9260-smartweb.dts | 110 ++
> arch/arm/mach-at91/Kconfig|   4 ++
> board/siemens/smartweb/smartweb.c |  32 --
> configs/smartweb_defconfig|   7 ++-
> include/configs/smartweb.h|   6 +-
> 6 files changed, 148 insertions(+), 12 deletions(-)
> create mode 100644 arch/arm/dts/at91sam9260-smartweb.dts

applied to u-boot-atmel/master, thanks!

I had to rebase on current ToT while applying.

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v1, 5/5] arm: at91: taurus/axm: add DM and DTS support

2016-06-26 Thread Andreas Bießmann
Dear Heiko Schocher,

Heiko Schocher <h...@denx.de> writes:
>add DM and DTS support for the at91 based siemens
>boards.
>
>Signed-off-by: Heiko Schocher <h...@denx.de>
>Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
>[rebased on current ToT]
>Signed-off-by: Andreas Bießmann <andr...@biessmann.org>
>---
> arch/arm/dts/Makefile   |   1 +
> arch/arm/dts/at91sam9g20-taurus.dts | 119 
> arch/arm/mach-at91/Kconfig  |   4 ++
> board/siemens/taurus/taurus.c   |  25 
> configs/axm_defconfig   |   5 +-
> configs/taurus_defconfig|   5 +-
> include/configs/taurus.h|   2 +-
> 7 files changed, 158 insertions(+), 3 deletions(-)
> create mode 100644 arch/arm/dts/at91sam9g20-taurus.dts

applied to u-boot-atmel/master, thanks!

I had to rebase on current ToT whily applying.

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,v1,2/5] corvus DTS / DM support

2016-06-26 Thread Andreas Bießmann
Dear Heiko Schocher,

Heiko Schocher <h...@denx.de> writes:
>Signed-off-by: Heiko Schocher <h...@denx.de>
>Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
>[rebase on current ToT, don't delete gurnard DTB creation]
>Signed-off-by: Andreas Bießmann <andr...@biessmann.org>
>---
> arch/arm/dts/Makefile   |   4 +-
> arch/arm/dts/at91sam9g45-corvus.dts | 108 
> arch/arm/mach-at91/Kconfig  |   4 ++
> board/siemens/corvus/board.c|  41 +-
> configs/corvus_defconfig|   8 +++
> include/configs/corvus.h|   2 +-
> 6 files changed, 162 insertions(+), 5 deletions(-)
> create mode 100644 arch/arm/dts/at91sam9g45-corvus.dts

applied to u-boot-atmel/master, thanks!

I had to rebase on current ToT, escpecially the
 deletion of gurnard DTB had to be reverted.

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] common: Pass the boot device into spl_boot_mode()

2016-06-26 Thread Andreas Bießmann
Dear Marek Vasut,

Marek Vasut <ma...@denx.de> writes:
>The SPL code already knows which boot device it calls the spl_boot_mode()
>on, so pass that information into the function. This allows the code of
>spl_boot_mode() avoid invoking spl_boot_device() again, but it also lets
>board_boot_order() correctly alter the behavior of the boot process.
>
>The later one is important, since in certain cases, it is desired that
>spl_boot_device() return value be overriden using board_boot_order().
>
>Signed-off-by: Marek Vasut <ma...@denx.de>
>Cc: Andreas Bießmann <andreas.de...@googlemail.com>
>Cc: Albert Aribaud <albert.u.b...@aribaud.net>
>Cc: Tom Rini <tr...@konsulko.com>
>Reviewed-by: Andreas Bießmann <andr...@biessmann.org>
>[add newly introduced zynq variant]
>Signed-aff-by: Andreas Bießmann <andr...@biessmann.org>
>---
> arch/arm/cpu/arm1136/mx35/generic.c  | 2 +-
> arch/arm/cpu/armv7/ls102xa/spl.c | 2 +-
> arch/arm/cpu/armv7/omap-common/boot-common.c | 2 +-
> arch/arm/cpu/armv8/fsl-layerscape/spl.c  | 2 +-
> arch/arm/imx-common/spl.c| 2 +-
> arch/arm/mach-at91/spl.c | 2 +-
> arch/arm/mach-davinci/spl.c  | 2 +-
> arch/arm/mach-mvebu/spl.c| 2 +-
> arch/arm/mach-rockchip/rk3288-board-spl.c| 2 +-
> arch/arm/mach-socfpga/spl.c  | 2 +-
> arch/arm/mach-sunxi/board.c  | 2 +-
> arch/arm/mach-uniphier/boot-mode/boot-mode.c | 2 +-
> arch/arm/mach-zynq/spl.c | 2 +-
> common/spl/spl_mmc.c | 2 +-
> include/spl.h| 2 +-
> 15 files changed, 15 insertions(+), 15 deletions(-)

applied to u-boot-atmel/master, thanks!

Also adopted newly introduced zynq variant of
 spl_boot_mode().

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v1 5/5] arm: at91: taurus/axm: add DM and DTS support

2016-06-25 Thread Andreas Bießmann
On 25.05.16 07:23, Heiko Schocher wrote:
> add DM and DTS support for the at91 based siemens
> boards.
> 
> Signed-off-by: Heiko Schocher <h...@denx.de>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
>  arch/arm/dts/Makefile   |   1 +
>  arch/arm/dts/at91sam9g20-taurus.dts | 119 
> 
>  arch/arm/mach-at91/Kconfig  |   4 ++
>  board/siemens/taurus/taurus.c   |  25 
>  configs/axm_defconfig   |   5 +-
>  configs/taurus_defconfig|   5 +-
>  include/configs/taurus.h|   2 +-
>  7 files changed, 158 insertions(+), 3 deletions(-)
>  create mode 100644 arch/arm/dts/at91sam9g20-taurus.dts
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v1 4/5] arm: at91: smartweb: add DM and DTS support

2016-06-25 Thread Andreas Bießmann
On 25.05.16 07:23, Heiko Schocher wrote:
> Signed-off-by: Heiko Schocher <h...@denx.de>

Reviewed-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
>  arch/arm/dts/Makefile |   3 +-
>  arch/arm/dts/at91sam9260-smartweb.dts | 110 
> ++
>  arch/arm/mach-at91/Kconfig|   4 ++
>  board/siemens/smartweb/smartweb.c |  32 --
>  configs/smartweb_defconfig|   7 ++-
>  include/configs/smartweb.h|   6 +-
>  6 files changed, 149 insertions(+), 13 deletions(-)
>  create mode 100644 arch/arm/dts/at91sam9260-smartweb.dts
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v1 3/5] arm: at91: dts: Bring in dts files for AT91SAM9G20 and SAM9260

2016-06-25 Thread Andreas Bießmann
On 25.05.16 07:23, Heiko Schocher wrote:
> Add this files from Linux v4.6-rc5
> 
> 66b8a424d: [workqueue: fix ghost PENDING flag while doing MQ IO]
> 
> Signed-off-by: Heiko Schocher <h...@denx.de>

Acked-by: Andreas Bießmann <andr...@biessmann.org>

> ---
> 
>  arch/arm/dts/at91sam9260.dtsi | 1034 
> +
>  arch/arm/dts/at91sam9261.dtsi |  876 ++
>  arch/arm/dts/at91sam9263.dtsi | 1034 
> +
>  arch/arm/dts/at91sam9g20.dtsi |   68 +++
>  4 files changed, 3012 insertions(+)
>  create mode 100644 arch/arm/dts/at91sam9260.dtsi
>  create mode 100644 arch/arm/dts/at91sam9261.dtsi
>  create mode 100644 arch/arm/dts/at91sam9263.dtsi
>  create mode 100644 arch/arm/dts/at91sam9g20.dtsi
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


  1   2   3   4   5   6   7   8   9   10   >