Re: [U-Boot] [PATCH 07/13] x86: dm: video: Add a framebuffer driver that utilizes VBT

2017-08-25 Thread Simon Glass
On 15 August 2017 at 23:41, Bin Meng  wrote:
> When a VBT is given to an FSP that supports graphics initialization,
> the FSP will produce a graphics info HOB that contains all necessary
> information for the linear frame buffer of the integrated graphics
> device. This adds a DM video driver for it.
>
> Signed-off-by: Bin Meng 
> ---
>
>  arch/x86/Kconfig|   8 +++
>  arch/x86/lib/fsp/Makefile   |   1 +
>  arch/x86/lib/fsp/fsp_graphics.c | 124 
> 
>  3 files changed, 133 insertions(+)
>  create mode 100644 arch/x86/lib/fsp/fsp_graphics.c

Reviewed-by: Simon Glass 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 0/8] sf: improve support of (Q)SPI flash memories

2017-08-25 Thread Bin Meng
On Sat, Aug 26, 2017 at 12:45 AM, Marek Vasut  wrote:
> On 08/25/2017 06:28 PM, Jagan Teki wrote:
>> On Fri, Aug 25, 2017 at 9:43 PM, Marek Vasut  wrote:
>>> On 08/25/2017 06:07 PM, Jagan Teki wrote:
 On Fri, Aug 25, 2017 at 6:47 AM, Yang, Wenyou  
 wrote:
> Hi,
>
> This patch set has been here for a long time, could you have a look and 
> take
> it?

 Yeah, I'm holding this because of my current spi-nor work. But anyway
 I will try to merge on coming MW If all OK.
>>>
>>> Is your work posted somewhere or available in some git repository ?
>
> You did not answer this question.
>
>>> I don't see any reason why you should not perform your maintainer duties
>>> by reviewing/replying to an incoming patch, no matter what work you do
>>> to the subsystem though ...
>>
>> I didn't write "this series holding spi-nor work" since it has some
>> new features I'm taking time to review.
>
> I never implied this. Rather the opposite, you claim you do some work on
> the SPI NOR core, yet you let this patchset rot in the list for over a
> month now and gave the author zero feedback.
>
> Notifying the author about the core changes early could've prevented a
> lot of wasted effort on his side. Reviewing early could've prevented a
> lot of frustration from patches being ignored.
>
>> There is nothing wrong with
>> maintainer duties here, you must need to understand.
>
> I disagree.
>

I agree with Marek here. I found it's really hard to get feedback for
SF patches in time and what I have to do is to ping again and again.

Regards,
Bin
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] Please pull u-boot-sh/master branch

2017-08-25 Thread Nobuhiro Iwamatsu
Hi, Tom.

The following changes since commit 90ae53ce1ae665a1b43ecf5ccafc339839392427:

  fastboot: Ensure we treat CONFIG_FASTBOOT_BUF_ADDR as long
(2017-08-22 08:20:02 -0400)

are available in the git repository at:

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

for you to fetch changes up to f40ad66fa066c7eacbcbb11c2e2f251bb82426e0:

  arch/sh: don't bring common/env_embedded.o into the link (2017-08-26
07:40:36 +0900)


Thomas Petazzoni (2):
  arch/sh: allow building in big-endian mode
  arch/sh: don't bring common/env_embedded.o into the link

 arch/sh/cpu/u-boot.lds | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)


-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] README: Fix typo in description of CONFIG_OF_EMBED

2017-08-25 Thread Nobuhiro Iwamatsu
The correct name is 'gd->fdt_blob', not 'gd->blob'.

Signed-off-by: Nobuhiro Iwamatsu 
CC: Simon Glass 
---
 README | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README b/README
index 1edf3dbbd8..6adbe6b435 100644
--- a/README
+++ b/README
@@ -892,7 +892,7 @@ The following options need to be configured:
binary in its image. This device tree file should be in the
board directory and called -.dts. The binary file
is then picked up in board_init_f() and made available through
-   the global data structure as gd->blob.
+   the global data structure as gd->fdt_blob.
 
CONFIG_OF_SEPARATE
If this variable is defined, U-Boot will build a device tree
-- 
2.13.2

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


[U-Boot] Please pull u-boot-sh/rmobile branch

2017-08-25 Thread Nobuhiro Iwamatsu
Hi Tom,

The following changes since commit 90ae53ce1ae665a1b43ecf5ccafc339839392427:

  fastboot: Ensure we treat CONFIG_FASTBOOT_BUF_ADDR as long
(2017-08-22 08:20:02 -0400)

are available in the git repository at:

  git://git.denx.de/u-boot-sh.git rmobile

for you to fetch changes up to f7f79b4493b8beeb1de099d1d1c86049b018ef5c:

  ARM: rmobile: Enable MMC and USB DM on ULCB (2017-08-26 07:04:49 +0900)


Marek Vasut (12):
  clk: rmobile: Split R8A7795 and R8A7796 core clock tables
  ARM: rmobile: Add u-boot, dm-pre-reloc to clock nodes on Gen3
  ARM: rmobile: Enable KSZ90X1 PHY on Salvator-X
  ARM: rmobile: Enable HUSH parser
  ARM: rmobile: Remove RAVB probing from Salvator-X board
  ARM: rmobile: Remove RAVB probing from ULCB board
  ARM: rmobile: Remove Serial SH probing from Salvator-X board
  ARM: rmobile: Remove Serial SH probing from ULCB board
  ARM: rmobile: Remove SH SDHI probing from Salvator-X board
  ARM: rmobile: Remove SH SDHI probing from ULCB board
  ARM: rmobile: Enable MMC and USB DM on Salvator-X
  ARM: rmobile: Enable MMC and USB DM on ULCB

 arch/arm/dts/r8a7795.dtsi |   4 ++
 arch/arm/dts/r8a7796.dtsi |   4 ++
 board/renesas/salvator-x/salvator-x.c |  39 +-
 board/renesas/ulcb/ulcb.c |  35 +
 configs/r8a7795_salvator-x_defconfig  |   4 ++
 configs/r8a7795_ulcb_defconfig|   3 +
 configs/r8a7796_salvator-x_defconfig  |   4 ++
 configs/r8a7796_ulcb_defconfig|   3 +
 drivers/clk/renesas/clk-rcar-gen3.c   | 129 +-
 9 files changed, 120 insertions(+), 105 deletions(-)

-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 04/12] ARM: rmobile: Enable HUSH parser

2017-08-25 Thread Nobuhiro Iwamatsu
Hi,

2017-08-21 0:13 GMT+09:00 Marek Vasut :
> The HUSH parser was disabled somewhere along the way, reenable it.
>
> Signed-off-by: Marek Vasut 
> Cc: Alexandru Gagniuc 
> Cc: Joe Hershberger 
> ---
>  configs/r8a7795_salvator-x_defconfig | 1 +
>  configs/r8a7795_ulcb_defconfig   | 1 +
>  configs/r8a7796_salvator-x_defconfig | 1 +
>  configs/r8a7796_ulcb_defconfig   | 1 +
>  4 files changed, 4 insertions(+)

Applied, thanks.

Best regards,
  Nobuhiro

>
> diff --git a/configs/r8a7795_salvator-x_defconfig 
> b/configs/r8a7795_salvator-x_defconfig
> index 3d36698127..d83eaf2b67 100644
> --- a/configs/r8a7795_salvator-x_defconfig
> +++ b/configs/r8a7795_salvator-x_defconfig
> @@ -10,6 +10,7 @@ CONFIG_USE_BOOTARGS=y
>  CONFIG_BOOTARGS="console=ttySC0,115200 rw root=/dev/nfs 
> nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"
>  CONFIG_DEFAULT_FDT_FILE="r8a7795-salvator-x.dtb"
>  CONFIG_VERSION_VARIABLE=y
> +CONFIG_HUSH_PARSER=y
>  CONFIG_CMD_BOOTZ=y
>  # CONFIG_CMD_IMLS is not set
>  CONFIG_CMD_MMC=y
> diff --git a/configs/r8a7795_ulcb_defconfig b/configs/r8a7795_ulcb_defconfig
> index 8b6b03ba32..82e5942091 100644
> --- a/configs/r8a7795_ulcb_defconfig
> +++ b/configs/r8a7795_ulcb_defconfig
> @@ -9,6 +9,7 @@ CONFIG_USE_BOOTARGS=y
>  CONFIG_BOOTARGS="console=ttySC0,115200 rw root=/dev/nfs 
> nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"
>  CONFIG_DEFAULT_FDT_FILE="r8a7795-h3ulcb.dtb"
>  CONFIG_VERSION_VARIABLE=y
> +CONFIG_HUSH_PARSER=y
>  CONFIG_CMD_BOOTZ=y
>  # CONFIG_CMD_IMLS is not set
>  CONFIG_CMD_MMC=y
> diff --git a/configs/r8a7796_salvator-x_defconfig 
> b/configs/r8a7796_salvator-x_defconfig
> index 10aa0bed44..141316127a 100644
> --- a/configs/r8a7796_salvator-x_defconfig
> +++ b/configs/r8a7796_salvator-x_defconfig
> @@ -11,6 +11,7 @@ CONFIG_USE_BOOTARGS=y
>  CONFIG_BOOTARGS="console=ttySC0,115200 rw root=/dev/nfs 
> nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"
>  CONFIG_DEFAULT_FDT_FILE="r8a7796-salvator-x.dtb"
>  CONFIG_VERSION_VARIABLE=y
> +CONFIG_HUSH_PARSER=y
>  CONFIG_CMD_BOOTZ=y
>  # CONFIG_CMD_IMLS is not set
>  CONFIG_CMD_MMC=y
> diff --git a/configs/r8a7796_ulcb_defconfig b/configs/r8a7796_ulcb_defconfig
> index bc995deea0..160bde2ef3 100644
> --- a/configs/r8a7796_ulcb_defconfig
> +++ b/configs/r8a7796_ulcb_defconfig
> @@ -10,6 +10,7 @@ CONFIG_USE_BOOTARGS=y
>  CONFIG_BOOTARGS="console=ttySC0,115200 rw root=/dev/nfs 
> nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20"
>  CONFIG_DEFAULT_FDT_FILE="r8a7796-m3ulcb.dtb"
>  CONFIG_VERSION_VARIABLE=y
> +CONFIG_HUSH_PARSER=y
>  CONFIG_CMD_BOOTZ=y
>  # CONFIG_CMD_IMLS is not set
>  CONFIG_CMD_MMC=y
> --
> 2.11.0
>
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 03/12] ARM: rmobile: Enable KSZ90X1 PHY on Salvator-X

2017-08-25 Thread Nobuhiro Iwamatsu
Hi,

2017-08-21 0:13 GMT+09:00 Marek Vasut :
> Commit da3b9e7fd6a1 (Move PHY_MICREL and PHY_MICREL_KSZ90X1 to Kconfig)
> broke ethernet support on R8A779x Salvator-X boards by disabling the
> KSZ90x1 PHY in Kconfig. Reenable it.
>
> Signed-off-by: Marek Vasut 
> Cc: Alexandru Gagniuc 
> Cc: Joe Hershberger 
> ---
>  configs/r8a7795_salvator-x_defconfig | 1 +
>  configs/r8a7796_salvator-x_defconfig | 1 +
>  2 files changed, 2 insertions(+)

Applied, thanks.

Best regards,
  Nobuhiro
>
> diff --git a/configs/r8a7795_salvator-x_defconfig 
> b/configs/r8a7795_salvator-x_defconfig
> index f517e0e7ab..3d36698127 100644
> --- a/configs/r8a7795_salvator-x_defconfig
> +++ b/configs/r8a7795_salvator-x_defconfig
> @@ -24,6 +24,7 @@ CONFIG_CLK=y
>  CONFIG_CLK_RENESAS=y
>  CONFIG_SH_SDHI=y
>  CONFIG_PHY_MICREL=y
> +CONFIG_PHY_MICREL_KSZ90X1=y
>  CONFIG_DM_ETH=y
>  CONFIG_RENESAS_RAVB=y
>  CONFIG_SCIF_CONSOLE=y
> diff --git a/configs/r8a7796_salvator-x_defconfig 
> b/configs/r8a7796_salvator-x_defconfig
> index 247f8785e3..10aa0bed44 100644
> --- a/configs/r8a7796_salvator-x_defconfig
> +++ b/configs/r8a7796_salvator-x_defconfig
> @@ -25,6 +25,7 @@ CONFIG_CLK=y
>  CONFIG_CLK_RENESAS=y
>  CONFIG_SH_SDHI=y
>  CONFIG_PHY_MICREL=y
> +CONFIG_PHY_MICREL_KSZ90X1=y
>  CONFIG_DM_ETH=y
>  CONFIG_RENESAS_RAVB=y
>  CONFIG_SCIF_CONSOLE=y
> --
> 2.11.0
>
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 11/12] ARM: rmobile: Enable MMC and USB DM on Salvator-X

2017-08-25 Thread Nobuhiro Iwamatsu
Hi,

2017-08-21 0:13 GMT+09:00 Marek Vasut :
> Enable the MMC and USB DM on the board since it's the modern method
> and now supported by the drivers.
>
> Signed-off-by: Marek Vasut 
> Cc: Nobuhiro Iwamatsu 
> ---
>  configs/r8a7795_salvator-x_defconfig | 2 ++
>  configs/r8a7796_salvator-x_defconfig | 2 ++
>  2 files changed, 4 insertions(+)

Applied, thanks.

Best regards,
  Nobuhiro

>
> diff --git a/configs/r8a7795_salvator-x_defconfig 
> b/configs/r8a7795_salvator-x_defconfig
> index d83eaf2b67..d53504a5bb 100644
> --- a/configs/r8a7795_salvator-x_defconfig
> +++ b/configs/r8a7795_salvator-x_defconfig
> @@ -23,6 +23,7 @@ CONFIG_CMD_FAT=y
>  CONFIG_OF_CONTROL=y
>  CONFIG_CLK=y
>  CONFIG_CLK_RENESAS=y
> +CONFIG_DM_MMC=y
>  CONFIG_SH_SDHI=y
>  CONFIG_PHY_MICREL=y
>  CONFIG_PHY_MICREL_KSZ90X1=y
> @@ -30,6 +31,7 @@ CONFIG_DM_ETH=y
>  CONFIG_RENESAS_RAVB=y
>  CONFIG_SCIF_CONSOLE=y
>  CONFIG_USB=y
> +CONFIG_DM_USB=y
>  CONFIG_USB_EHCI_HCD=y
>  CONFIG_USB_STORAGE=y
>  CONFIG_SMBIOS_MANUFACTURER=""
> diff --git a/configs/r8a7796_salvator-x_defconfig 
> b/configs/r8a7796_salvator-x_defconfig
> index 141316127a..d18bf2e965 100644
> --- a/configs/r8a7796_salvator-x_defconfig
> +++ b/configs/r8a7796_salvator-x_defconfig
> @@ -24,6 +24,7 @@ CONFIG_CMD_FAT=y
>  CONFIG_OF_CONTROL=y
>  CONFIG_CLK=y
>  CONFIG_CLK_RENESAS=y
> +CONFIG_DM_MMC=y
>  CONFIG_SH_SDHI=y
>  CONFIG_PHY_MICREL=y
>  CONFIG_PHY_MICREL_KSZ90X1=y
> @@ -31,6 +32,7 @@ CONFIG_DM_ETH=y
>  CONFIG_RENESAS_RAVB=y
>  CONFIG_SCIF_CONSOLE=y
>  CONFIG_USB=y
> +CONFIG_DM_USB=y
>  CONFIG_USB_EHCI_HCD=y
>  CONFIG_USB_STORAGE=y
>  CONFIG_SMBIOS_MANUFACTURER=""
> --
> 2.11.0
>



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 12/12] ARM: rmobile: Enable MMC and USB DM on ULCB

2017-08-25 Thread Nobuhiro Iwamatsu
Hi,

2017-08-21 0:13 GMT+09:00 Marek Vasut :
> Enable the MMC and USB DM on the board since it's the modern method
> and now supported by the drivers.
>
> Signed-off-by: Marek Vasut 
> Cc: Nobuhiro Iwamatsu 
> ---
>  configs/r8a7795_ulcb_defconfig | 2 ++
>  configs/r8a7796_ulcb_defconfig | 2 ++
>  2 files changed, 4 insertions(+)

Applied, thanks.

Best regards,
  Nobuhiro

>
> diff --git a/configs/r8a7795_ulcb_defconfig b/configs/r8a7795_ulcb_defconfig
> index 82e5942091..42913dffaf 100644
> --- a/configs/r8a7795_ulcb_defconfig
> +++ b/configs/r8a7795_ulcb_defconfig
> @@ -21,11 +21,13 @@ CONFIG_OF_CONTROL=y
>  CONFIG_ENV_IS_IN_MMC=y
>  CONFIG_CLK=y
>  CONFIG_CLK_RENESAS=y
> +CONFIG_DM_MMC=y
>  CONFIG_SH_SDHI=y
>  CONFIG_DM_ETH=y
>  CONFIG_RENESAS_RAVB=y
>  CONFIG_SCIF_CONSOLE=y
>  CONFIG_USB=y
> +CONFIG_DM_USB=y
>  CONFIG_USB_EHCI_HCD=y
>  CONFIG_USB_STORAGE=y
>  CONFIG_SMBIOS_MANUFACTURER=""
> diff --git a/configs/r8a7796_ulcb_defconfig b/configs/r8a7796_ulcb_defconfig
> index 160bde2ef3..e5f560612b 100644
> --- a/configs/r8a7796_ulcb_defconfig
> +++ b/configs/r8a7796_ulcb_defconfig
> @@ -22,11 +22,13 @@ CONFIG_OF_CONTROL=y
>  CONFIG_ENV_IS_IN_MMC=y
>  CONFIG_CLK=y
>  CONFIG_CLK_RENESAS=y
> +CONFIG_DM_MMC=y
>  CONFIG_SH_SDHI=y
>  CONFIG_DM_ETH=y
>  CONFIG_RENESAS_RAVB=y
>  CONFIG_SCIF_CONSOLE=y
>  CONFIG_USB=y
> +CONFIG_DM_USB=y
>  CONFIG_USB_EHCI_HCD=y
>  CONFIG_USB_STORAGE=y
>  CONFIG_SMBIOS_MANUFACTURER=""
> --
> 2.11.0
>



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 09/12] ARM: rmobile: Remove SH SDHI probing from Salvator-X board

2017-08-25 Thread Nobuhiro Iwamatsu
Hi,

2017-08-21 0:13 GMT+09:00 Marek Vasut :
> Drop the SH SDHI bit from the board since SD now probes from DT instead.
>
> Signed-off-by: Marek Vasut 
> Cc: Nobuhiro Iwamatsu 
> ---
>  board/renesas/salvator-x/salvator-x.c | 16 +---
>  1 file changed, 1 insertion(+), 15 deletions(-)

Applied, thanks.

Best regards,
  Nobuhiro

>
> diff --git a/board/renesas/salvator-x/salvator-x.c 
> b/board/renesas/salvator-x/salvator-x.c
> index 4ed80f5493..a09cd56d66 100644
> --- a/board/renesas/salvator-x/salvator-x.c
> +++ b/board/renesas/salvator-x/salvator-x.c
> @@ -164,8 +164,6 @@ int board_init(void)
>  #ifdef CONFIG_SH_SDHI
>  int board_mmc_init(bd_t *bis)
>  {
> -   int ret = -ENODEV;
> -
> /* SDHI0 */
> gpio_request(GPIO_GFN_SD0_DAT0, NULL);
> gpio_request(GPIO_GFN_SD0_DAT1, NULL);
> @@ -181,11 +179,6 @@ int board_mmc_init(bd_t *bis)
> gpio_direction_output(GPIO_GP_5_2, 1);  /* power on */
> gpio_direction_output(GPIO_GP_5_1, 1);  /* 1: 3.3V, 0: 1.8V */
>
> -   ret = sh_sdhi_init(CONFIG_SYS_SH_SDHI0_BASE, 0,
> -  SH_SDHI_QUIRK_64BIT_BUF);
> -   if (ret)
> -   return ret;
> -
> /* SDHI1/SDHI2 eMMC */
> gpio_request(GPIO_GFN_SD1_DAT0, NULL);
> gpio_request(GPIO_GFN_SD1_DAT1, NULL);
> @@ -208,11 +201,6 @@ int board_mmc_init(bd_t *bis)
> gpio_direction_output(GPIO_GP_5_3, 0);  /* 1: 3.3V, 0: 1.8V */
> gpio_direction_output(GPIO_GP_5_9, 0);  /* 1: 3.3V, 0: 1.8V */
>
> -   ret = sh_sdhi_init(CONFIG_SYS_SH_SDHI2_BASE, 1,
> -  SH_SDHI_QUIRK_64BIT_BUF);
> -   if (ret)
> -   return ret;
> -
>  #if defined(CONFIG_R8A7795)
> /* SDHI3 */
> gpio_request(GPIO_GFN_SD3_DAT0, NULL);  /* GP_4_9 */
> @@ -240,9 +228,7 @@ int board_mmc_init(bd_t *bis)
> gpio_direction_output(GPIO_GP_3_15, 1); /* power on */
> gpio_direction_output(GPIO_GP_3_14, 1); /* 1: 3.3V, 0: 1.8V */
>
> -   ret = sh_sdhi_init(CONFIG_SYS_SH_SDHI3_BASE, 2,
> -  SH_SDHI_QUIRK_64BIT_BUF);
> -   return ret;
> +   return 0;
>  }
>  #endif
>
> --
> 2.11.0
>



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 07/12] ARM: rmobile: Remove Serial SH probing from Salvator-X board

2017-08-25 Thread Nobuhiro Iwamatsu
Hi,

2017-08-21 0:13 GMT+09:00 Marek Vasut :
> Drop the Serial SH bit from the board since UART now probes from DT instead.
>
> Signed-off-by: Marek Vasut 
> Cc: Nobuhiro Iwamatsu 
> ---
>  board/renesas/salvator-x/salvator-x.c | 12 
>  1 file changed, 12 deletions(-)

Applied, thanks.

Best regards,
  Nobuhiro
>
> diff --git a/board/renesas/salvator-x/salvator-x.c 
> b/board/renesas/salvator-x/salvator-x.c
> index ce3892da90..4ed80f5493 100644
> --- a/board/renesas/salvator-x/salvator-x.c
> +++ b/board/renesas/salvator-x/salvator-x.c
> @@ -300,15 +300,3 @@ void reset_cpu(ulong addr)
> writel(RST_CODE, RST_CA57RESCNT);
>  #endif
>  }
> -
> -static const struct sh_serial_platdata serial_platdata = {
> -   .base = SCIF2_BASE,
> -   .type = PORT_SCIF,
> -   .clk = CONFIG_SH_SCIF_CLK_FREQ,
> -   .clk_mode = INT_CLK,
> -};
> -
> -U_BOOT_DEVICE(salvator_x_scif2) = {
> -   .name = "serial_sh",
> -   .platdata = _platdata,
> -};
> --
> 2.11.0
>



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 10/12] ARM: rmobile: Remove SH SDHI probing from ULCB board

2017-08-25 Thread Nobuhiro Iwamatsu
Hi,

2017-08-21 0:13 GMT+09:00 Marek Vasut :
> Drop the SH SDHI bit from the board since SD now probes from DT instead.
>
> Signed-off-by: Marek Vasut 
> Cc: Nobuhiro Iwamatsu 
> ---
>  board/renesas/ulcb/ulcb.c | 12 +---
>  1 file changed, 1 insertion(+), 11 deletions(-)

Applied, thanks.

Best regards,
  Nobuhiro
>
> diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c
> index 6b080311d0..068cbdea03 100644
> --- a/board/renesas/ulcb/ulcb.c
> +++ b/board/renesas/ulcb/ulcb.c
> @@ -143,8 +143,6 @@ int board_init(void)
>  #ifdef CONFIG_SH_SDHI
>  int board_mmc_init(bd_t *bis)
>  {
> -   int ret = -ENODEV;
> -
> /* SDHI0 */
> gpio_request(GPIO_GFN_SD0_DAT0, NULL);
> gpio_request(GPIO_GFN_SD0_DAT1, NULL);
> @@ -160,11 +158,6 @@ int board_mmc_init(bd_t *bis)
> gpio_direction_output(GPIO_GP_5_2, 1);  /* power on */
> gpio_direction_output(GPIO_GP_5_1, 1);  /* 1: 3.3V, 0: 1.8V */
>
> -   ret = sh_sdhi_init(CONFIG_SYS_SH_SDHI0_BASE, 0,
> -  SH_SDHI_QUIRK_64BIT_BUF);
> -   if (ret)
> -   return ret;
> -
> /* SDHI1/SDHI2 eMMC */
> gpio_request(GPIO_GFN_SD1_DAT0, NULL);
> gpio_request(GPIO_GFN_SD1_DAT1, NULL);
> @@ -187,10 +180,7 @@ int board_mmc_init(bd_t *bis)
> gpio_direction_output(GPIO_GP_5_3, 0);  /* 1: 3.3V, 0: 1.8V */
> gpio_direction_output(GPIO_GP_5_9, 0);  /* 1: 3.3V, 0: 1.8V */
>
> -   ret = sh_sdhi_init(CONFIG_SYS_SH_SDHI2_BASE, 1,
> -  SH_SDHI_QUIRK_64BIT_BUF);
> -
> -   return ret;
> +   return 0;
>  }
>  #endif
>
> --
> 2.11.0
>



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 08/12] ARM: rmobile: Remove Serial SH probing from ULCB board

2017-08-25 Thread Nobuhiro Iwamatsu
Hi,

2017-08-21 0:13 GMT+09:00 Marek Vasut :
> Drop the Serial SH bit from the board since UART now probes from DT instead.
>
> Signed-off-by: Marek Vasut 
> Cc: Nobuhiro Iwamatsu 
> ---
>  board/renesas/ulcb/ulcb.c | 12 
>  1 file changed, 12 deletions(-)

Applied, thanks.

Best regards,
  Nobuhiro
>
> diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c
> index e249bd27d4..6b080311d0 100644
> --- a/board/renesas/ulcb/ulcb.c
> +++ b/board/renesas/ulcb/ulcb.c
> @@ -232,15 +232,3 @@ int dram_init_banksize(void)
>  const struct rmobile_sysinfo sysinfo = {
> CONFIG_RCAR_BOARD_STRING
>  };
> -
> -static const struct sh_serial_platdata serial_platdata = {
> -   .base = SCIF2_BASE,
> -   .type = PORT_SCIF,
> -   .clk = CONFIG_SH_SCIF_CLK_FREQ,
> -   .clk_mode = INT_CLK,
> -};
> -
> -U_BOOT_DEVICE(salvator_x_scif2) = {
> -   .name = "serial_sh",
> -   .platdata = _platdata,
> -};
> --
> 2.11.0
>



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 06/12] ARM: rmobile: Remove RAVB probing from ULCB board

2017-08-25 Thread Nobuhiro Iwamatsu
Hi,

2017-08-21 0:13 GMT+09:00 Marek Vasut :
> Drop the RAVB bit from the board since RAVB now probes from DT instead.
>
> Signed-off-by: Marek Vasut 
> Cc: Nobuhiro Iwamatsu 
> ---
>  board/renesas/ulcb/ulcb.c | 11 ---
>  1 file changed, 11 deletions(-)

Applied, thanks.

Best regards,
  Nobuhiro
>
> diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c
> index 4005ec8ad5..e249bd27d4 100644
> --- a/board/renesas/ulcb/ulcb.c
> +++ b/board/renesas/ulcb/ulcb.c
> @@ -140,17 +140,6 @@ int board_init(void)
> return 0;
>  }
>
> -static struct eth_pdata salvator_x_ravb_platdata = {
> -   .iobase = 0xE680,
> -   .phy_interface  = 0,
> -   .max_speed  = 1000,
> -};
> -
> -U_BOOT_DEVICE(salvator_x_ravb) = {
> -   .name   = "ravb",
> -   .platdata   = _x_ravb_platdata,
> -};
> -
>  #ifdef CONFIG_SH_SDHI
>  int board_mmc_init(bd_t *bis)
>  {
> --
> 2.11.0
>



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 05/12] ARM: rmobile: Remove RAVB probing from Salvator-X board

2017-08-25 Thread Nobuhiro Iwamatsu
Hi,

2017-08-21 0:13 GMT+09:00 Marek Vasut :
> Drop the RAVB bit from the board since RAVB now probes from DT instead.
>
> Signed-off-by: Marek Vasut 
> Cc: Nobuhiro Iwamatsu 
> ---
>  board/renesas/salvator-x/salvator-x.c | 11 ---
>  1 file changed, 11 deletions(-)

Applied, thanks.

Best regards,
  Nobuhiro

>
> diff --git a/board/renesas/salvator-x/salvator-x.c 
> b/board/renesas/salvator-x/salvator-x.c
> index 6270de4e40..ce3892da90 100644
> --- a/board/renesas/salvator-x/salvator-x.c
> +++ b/board/renesas/salvator-x/salvator-x.c
> @@ -161,17 +161,6 @@ int board_init(void)
> return 0;
>  }
>
> -static struct eth_pdata salvator_x_ravb_platdata = {
> -   .iobase = 0xE680,
> -   .phy_interface  = 0,
> -   .max_speed  = 1000,
> -};
> -
> -U_BOOT_DEVICE(salvator_x_ravb) = {
> -   .name   = "ravb",
> -   .platdata   = _x_ravb_platdata,
> -};
> -
>  #ifdef CONFIG_SH_SDHI
>  int board_mmc_init(bd_t *bis)
>  {
> --
> 2.11.0
>



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 02/12] ARM: rmobile: Add u-boot, dm-pre-reloc to clock nodes on Gen3

2017-08-25 Thread Nobuhiro Iwamatsu
Hi,

2017-08-21 0:13 GMT+09:00 Marek Vasut :
> We need the clock available very early, add the u-boot,dm-pre-reloc
> DT property on those nodes, so they come up very in the process.
>
> Signed-off-by: Marek Vasut 
> Cc: Nobuhiro Iwamatsu 
> ---
>  arch/arm/dts/r8a7795.dtsi | 4 
>  arch/arm/dts/r8a7796.dtsi | 4 
>  2 files changed, 8 insertions(+)

Applied, thanks.

Best regards,
  Nobuhiro

>
> diff --git a/arch/arm/dts/r8a7795.dtsi b/arch/arm/dts/r8a7795.dtsi
> index e99d6443b3..110d0681c8 100644
> --- a/arch/arm/dts/r8a7795.dtsi
> +++ b/arch/arm/dts/r8a7795.dtsi
> @@ -129,6 +129,7 @@
> #clock-cells = <0>;
> /* This value must be overridden by the board */
> clock-frequency = <0>;
> +   u-boot,dm-pre-reloc;
> };
>
> extalr_clk: extalr {
> @@ -136,6 +137,7 @@
> #clock-cells = <0>;
> /* This value must be overridden by the board */
> clock-frequency = <0>;
> +   u-boot,dm-pre-reloc;
> };
>
> /*
> @@ -189,6 +191,7 @@
> #address-cells = <2>;
> #size-cells = <2>;
> ranges;
> +   u-boot,dm-pre-reloc;
>
> gic: interrupt-controller@f101 {
> compatible = "arm,gic-400";
> @@ -380,6 +383,7 @@
> #clock-cells = <2>;
> #power-domain-cells = <0>;
> #reset-cells = <1>;
> +   u-boot,dm-pre-reloc;
> };
>
> rst: reset-controller@e616 {
> diff --git a/arch/arm/dts/r8a7796.dtsi b/arch/arm/dts/r8a7796.dtsi
> index 2ec1ed5f49..298df5db9f 100644
> --- a/arch/arm/dts/r8a7796.dtsi
> +++ b/arch/arm/dts/r8a7796.dtsi
> @@ -111,6 +111,7 @@
> #clock-cells = <0>;
> /* This value must be overridden by the board */
> clock-frequency = <0>;
> +   u-boot,dm-pre-reloc;
> };
>
> extalr_clk: extalr {
> @@ -118,6 +119,7 @@
> #clock-cells = <0>;
> /* This value must be overridden by the board */
> clock-frequency = <0>;
> +   u-boot,dm-pre-reloc;
> };
>
> /* External CAN clock - to be overridden by boards that provide it */
> @@ -140,6 +142,7 @@
> #address-cells = <2>;
> #size-cells = <2>;
> ranges;
> +   u-boot,dm-pre-reloc;
>
> gic: interrupt-controller@f101 {
> compatible = "arm,gic-400";
> @@ -333,6 +336,7 @@
> #clock-cells = <2>;
> #power-domain-cells = <0>;
> #reset-cells = <1>;
> +   u-boot,dm-pre-reloc;
> };
>
> rst: reset-controller@e616 {
> --
> 2.11.0
>



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 01/12] clk: rmobile: Split R8A7795 and R8A7796 core clock tables

2017-08-25 Thread Nobuhiro Iwamatsu
Hi,

2017-08-21 0:13 GMT+09:00 Marek Vasut :
> The R8A7795 and R8A7796 tables use different constants to identify
> clock in DT, so split the tables and use the correct constants on
> R8A7795. This fixes UART clock misconfiguration on R8A7795.
>
> Signed-off-by: Marek Vasut 
> Cc: Nobuhiro Iwamatsu 
> ---
>  drivers/clk/renesas/clk-rcar-gen3.c | 129 
> +++-
>  1 file changed, 96 insertions(+), 33 deletions(-)

Applied, thanks.

Best regards,
  Nobuhiro

>
> diff --git a/drivers/clk/renesas/clk-rcar-gen3.c 
> b/drivers/clk/renesas/clk-rcar-gen3.c
> index 5ea7d9a1f5..4e74856940 100644
> --- a/drivers/clk/renesas/clk-rcar-gen3.c
> +++ b/drivers/clk/renesas/clk-rcar-gen3.c
> @@ -73,6 +73,8 @@ struct gen3_clk_priv {
> struct clk  clk_extal;
> struct clk  clk_extalr;
> const struct rcar_gen3_cpg_pll_config *cpg_pll_config;
> +   const struct cpg_core_clk *core_clk;
> +   u32 core_clk_size;
> const struct mssr_mod_clk *mod_clk;
> u32 mod_clk_size;
>  };
> @@ -181,7 +183,7 @@ enum clk_ids {
> MOD_CLK_BASE
>  };
>
> -static const struct cpg_core_clk gen3_core_clks[] = {
> +static const struct cpg_core_clk r8a7795_core_clks[] = {
> /* External Clock Inputs */
> DEF_INPUT("extal",  CLK_EXTAL),
> DEF_INPUT("extalr", CLK_EXTALR),
> @@ -203,38 +205,38 @@ static const struct cpg_core_clk gen3_core_clks[] = {
> DEF_FIXED(".sdsrc", CLK_SDSRC, CLK_PLL1_DIV2,  2, 1),
>
> /* Core Clock Outputs */
> -   DEF_FIXED("ztr",R8A7796_CLK_ZTR,   CLK_PLL1_DIV2,  6, 1),
> -   DEF_FIXED("ztrd2",  R8A7796_CLK_ZTRD2, CLK_PLL1_DIV2, 12, 1),
> -   DEF_FIXED("zt", R8A7796_CLK_ZT,CLK_PLL1_DIV2,  4, 1),
> -   DEF_FIXED("zx", R8A7796_CLK_ZX,CLK_PLL1_DIV2,  2, 1),
> -   DEF_FIXED("s0d1",   R8A7796_CLK_S0D1,  CLK_S0, 1, 1),
> -   DEF_FIXED("s0d2",   R8A7796_CLK_S0D2,  CLK_S0, 2, 1),
> -   DEF_FIXED("s0d3",   R8A7796_CLK_S0D3,  CLK_S0, 3, 1),
> -   DEF_FIXED("s0d4",   R8A7796_CLK_S0D4,  CLK_S0, 4, 1),
> -   DEF_FIXED("s0d6",   R8A7796_CLK_S0D6,  CLK_S0, 6, 1),
> -   DEF_FIXED("s0d8",   R8A7796_CLK_S0D8,  CLK_S0, 8, 1),
> -   DEF_FIXED("s0d12",  R8A7796_CLK_S0D12, CLK_S0,12, 1),
> -   DEF_FIXED("s1d1",   R8A7796_CLK_S1D1,  CLK_S1, 1, 1),
> -   DEF_FIXED("s1d2",   R8A7796_CLK_S1D2,  CLK_S1, 2, 1),
> -   DEF_FIXED("s1d4",   R8A7796_CLK_S1D4,  CLK_S1, 4, 1),
> -   DEF_FIXED("s2d1",   R8A7796_CLK_S2D1,  CLK_S2, 1, 1),
> -   DEF_FIXED("s2d2",   R8A7796_CLK_S2D2,  CLK_S2, 2, 1),
> -   DEF_FIXED("s2d4",   R8A7796_CLK_S2D4,  CLK_S2, 4, 1),
> -   DEF_FIXED("s3d1",   R8A7796_CLK_S3D1,  CLK_S3, 1, 1),
> -   DEF_FIXED("s3d2",   R8A7796_CLK_S3D2,  CLK_S3, 2, 1),
> -   DEF_FIXED("s3d4",   R8A7796_CLK_S3D4,  CLK_S3, 4, 1),
> -
> -   DEF_GEN3_SD("sd0",  R8A7796_CLK_SD0,   CLK_SDSRC, 0x074),
> -   DEF_GEN3_SD("sd1",  R8A7796_CLK_SD1,   CLK_SDSRC, 0x078),
> -   DEF_GEN3_SD("sd2",  R8A7796_CLK_SD2,   CLK_SDSRC, 0x268),
> -   DEF_GEN3_SD("sd3",  R8A7796_CLK_SD3,   CLK_SDSRC, 0x26c),
> -
> -   DEF_FIXED("cl", R8A7796_CLK_CL,CLK_PLL1_DIV2, 48, 1),
> -   DEF_FIXED("cp", R8A7796_CLK_CP,CLK_EXTAL,  2, 1),
> +   DEF_FIXED("ztr",R8A7795_CLK_ZTR,   CLK_PLL1_DIV2,  6, 1),
> +   DEF_FIXED("ztrd2",  R8A7795_CLK_ZTRD2, CLK_PLL1_DIV2, 12, 1),
> +   DEF_FIXED("zt", R8A7795_CLK_ZT,CLK_PLL1_DIV2,  4, 1),
> +   DEF_FIXED("zx", R8A7795_CLK_ZX,CLK_PLL1_DIV2,  2, 1),
> +   DEF_FIXED("s0d1",   R8A7795_CLK_S0D1,  CLK_S0, 1, 1),
> +   DEF_FIXED("s0d2",   R8A7795_CLK_S0D2,  CLK_S0, 2, 1),
> +   DEF_FIXED("s0d3",   R8A7795_CLK_S0D3,  CLK_S0, 3, 1),
> +   DEF_FIXED("s0d4",   R8A7795_CLK_S0D4,  CLK_S0, 4, 1),
> +   DEF_FIXED("s0d6",   R8A7795_CLK_S0D6,  CLK_S0, 6, 1),
> +   DEF_FIXED("s0d8",   R8A7795_CLK_S0D8,  CLK_S0, 8, 1),
> +   DEF_FIXED("s0d12",  R8A7795_CLK_S0D12, CLK_S0,12, 1),
> +   DEF_FIXED("s1d1",   R8A7795_CLK_S1D1,  CLK_S1, 1, 1),
> +   DEF_FIXED("s1d2",   R8A7795_CLK_S1D2,  CLK_S1, 2, 1),
> +   DEF_FIXED("s1d4",   R8A7795_CLK_S1D4,  CLK_S1, 4, 1),
> +   DEF_FIXED("s2d1",   R8A7795_CLK_S2D1,  CLK_S2, 1, 1),
> +   DEF_FIXED("s2d2",   R8A7795_CLK_S2D2,  CLK_S2, 2, 1),
> +   DEF_FIXED("s2d4",   R8A7795_CLK_S2D4,  CLK_S2, 4, 1),
> +   DEF_FIXED("s3d1",   R8A7795_CLK_S3D1,  CLK_S3,   

[U-Boot] [PATCH 1/2] configs: Migrate all of the existing USB symbols, except fastboot

2017-08-25 Thread Tom Rini
This syncs all of the currently Kconfig'd symbols out of the headers and
into the defconfig files.  This has two exceptions, first am335x_evm
needs to be converted to DM in SPL and then it can stop undef'ing
CONFIG_DM_USB.  Leaving this as-is results in a build failure, and
without work, run time failure.  The other case is am43xx_evm.h and in
turn am43xx_evm_usbhost_boot.  The problem here is that we need DWC3 USB
host mode in SPL, but still desire to have gadget mode in U-Boot proper.

Signed-off-by: Tom Rini 
---
 configs/A10-OLinuXino-Lime_defconfig| 1 +
 configs/A10s-OLinuXino-M_defconfig  | 1 +
 configs/A13-OLinuXinoM_defconfig| 1 +
 configs/A13-OLinuXino_defconfig | 1 +
 configs/A20-OLinuXino-Lime2-eMMC_defconfig  | 1 +
 configs/A20-OLinuXino-Lime2_defconfig   | 1 +
 configs/A20-OLinuXino-Lime_defconfig| 1 +
 configs/A20-OLinuXino_MICRO_defconfig   | 1 +
 configs/A20-Olimex-SOM-EVB_defconfig| 1 +
 configs/A33-OLinuXino_defconfig | 1 +
 configs/Ainol_AW1_defconfig | 1 +
 configs/Ampe_A76_defconfig  | 1 +
 configs/Auxtek-T003_defconfig   | 1 +
 configs/Auxtek-T004_defconfig   | 1 +
 configs/Bananapi_M2_Ultra_defconfig | 1 +
 configs/Bananapi_defconfig  | 1 +
 configs/Bananapro_defconfig | 1 +
 configs/CHIP_defconfig  | 1 +
 configs/CHIP_pro_defconfig  | 1 +
 configs/CSQ_CS908_defconfig | 1 +
 configs/Chuwi_V7_CW0825_defconfig   | 1 +
 configs/Colombus_defconfig  | 1 +
 configs/Cubieboard2_defconfig   | 1 +
 configs/Cubieboard4_defconfig   | 1 +
 configs/Cubieboard_defconfig| 1 +
 configs/Cubietruck_defconfig| 1 +
 configs/Cubietruck_plus_defconfig   | 1 +
 configs/Cyrus_P5020_defconfig   | 1 +
 configs/Cyrus_P5040_defconfig   | 1 +
 configs/Empire_electronix_d709_defconfig| 1 +
 configs/Empire_electronix_m712_defconfig| 1 +
 configs/Hummingbird_A31_defconfig   | 1 +
 configs/Hyundai_A7HD_defconfig  | 1 +
 configs/Itead_Ibox_A20_defconfig| 1 +
 configs/Lamobo_R1_defconfig | 1 +
 configs/LicheePi_Zero_defconfig | 1 +
 configs/Linksprite_pcDuino3_Nano_defconfig  | 1 +
 configs/Linksprite_pcDuino3_defconfig   | 1 +
 configs/Linksprite_pcDuino_defconfig| 1 +
 configs/MK808C_defconfig| 1 +
 configs/MPC8610HPCD_defconfig   | 1 +
 configs/MPC8641HPCN_36BIT_defconfig | 1 +
 configs/MPC8641HPCN_defconfig   | 1 +
 configs/MSI_Primo73_defconfig   | 1 +
 configs/MSI_Primo81_defconfig   | 1 +
 configs/Marsboard_A10_defconfig | 1 +
 configs/Mele_A1000G_quad_defconfig  | 1 +
 configs/Mele_A1000_defconfig| 1 +
 configs/Mele_I7_defconfig   | 1 +
 configs/Mele_M3_defconfig   | 1 +
 configs/Mele_M5_defconfig   | 1 +
 configs/Mele_M9_defconfig   | 1 +
 configs/Merrii_A80_Optimus_defconfig| 1 +
 configs/Mini-X_defconfig| 1 +
 configs/Nintendo_NES_Classic_Edition_defconfig  | 1 +
 configs/Orangepi_defconfig  | 1 +
 configs/Orangepi_mini_defconfig | 1 +
 configs/Sinlinx_SinA31s_defconfig   | 1 +
 configs/Sinlinx_SinA33_defconfig| 1 +
 configs/Sinovoip_BPI_M2_Plus_defconfig  | 1 +
 configs/Sinovoip_BPI_M2_defconfig   | 1 +
 configs/Sinovoip_BPI_M3_defconfig   | 1 +
 configs/Sunchip_CX-A99_defconfig| 1 +
 configs/UTOO_P66_defconfig  | 1 +
 configs/Wexler_TAB7200_defconfig| 1 +
 configs/Wits_Pro_A20_DKT_defconfig  | 1 +
 configs/Wobo_i5_defconfig   | 1 +
 configs/Yones_Toptech_BD1078_defconfig  | 1 +
 configs/Yones_Toptech_BS1078_V2_defconfig   | 1 +
 configs/a64-olinuxino_defconfig | 1 +
 configs/apalis_imx6_defconfig   | 3 +++
 configs/apalis_imx6_nospl_com_defconfig | 3 +++
 configs/apalis_imx6_nospl_it_defconfig  | 3 +++
 configs/ba10_tv_box_defconfig   | 1 +
 configs/bananapi_m64_defconfig  | 1 +
 configs/cgtqmx6eval_defconfig   | 1 +
 configs/chromebit_mickey_defconfig  | 7 +++
 configs/chromebook_jerry_defconfig  | 7 +++
 configs/chromebook_minnie_defconfig | 7 +++
 configs/colibri_imx6_defconfig  | 3 +++
 

[U-Boot] [PATCH 2/2] Kconfig: Migrate all of cmd/fastboot/Kconfig to defconfigs

2017-08-25 Thread Tom Rini
- Move ANDROID_IMAGE_SUPPORT to top level Kconfig under images as it's
  not strictly part of fastboot.
- Add some defaults for the fastboot buffer location and size
- Migrate all options listed in cmd/fastboot/Kconfig
- Cleanup the README

Signed-off-by: Tom Rini 
---
 Kconfig  |  7 
 README   | 44 
 arch/arm/Kconfig |  6 
 cmd/fastboot/Kconfig | 23 +
 configs/A13-OLinuXino_defconfig  |  2 ++
 configs/A20-OLinuXino-Lime2-eMMC_defconfig   |  2 ++
 configs/A20-OLinuXino-Lime2_defconfig|  2 ++
 configs/CHIP_defconfig   |  1 +
 configs/CHIP_pro_defconfig   |  1 +
 configs/Cubietruck_defconfig |  2 ++
 configs/Nintendo_NES_Classic_Edition_defconfig   |  1 +
 configs/Sinlinx_SinA33_defconfig |  2 ++
 configs/am335x_boneblack_defconfig   |  2 --
 configs/am335x_boneblack_vboot_defconfig |  2 --
 configs/am335x_evm_defconfig |  2 --
 configs/am335x_evm_nor_defconfig |  2 --
 configs/am335x_evm_norboot_defconfig |  2 --
 configs/am335x_evm_spiboot_defconfig |  2 --
 configs/am335x_evm_usbspl_defconfig  |  3 +-
 configs/am335x_hs_evm_defconfig  |  1 +
 configs/am57xx_evm_defconfig |  3 +-
 configs/am57xx_evm_nodt_defconfig|  3 +-
 configs/am57xx_hs_evm_defconfig  |  3 +-
 configs/bcm23550_w1d_defconfig   |  3 +-
 configs/bcm28155_ap_defconfig|  3 +-
 configs/birdland_bav335a_defconfig   |  4 +++
 configs/birdland_bav335b_defconfig   |  4 +++
 configs/cgtqmx6eval_defconfig|  4 +++
 configs/chromebit_mickey_defconfig   |  3 ++
 configs/chromebook_jerry_defconfig   |  3 ++
 configs/chromebook_minnie_defconfig  |  3 ++
 configs/dra7xx_evm_defconfig |  3 +-
 configs/dra7xx_hs_evm_defconfig  |  3 +-
 configs/evb-rk3036_defconfig |  3 ++
 configs/evb-rk3229_defconfig |  3 +-
 configs/evb-rk3288_defconfig |  3 ++
 configs/evb-rk3328_defconfig |  7 ++--
 configs/fennec-rk3288_defconfig  |  3 ++
 configs/firefly-rk3288_defconfig |  3 ++
 configs/kc1_defconfig|  7 
 configs/kylin-rk3036_defconfig   |  3 ++
 configs/miqi-rk3288_defconfig|  3 ++
 configs/mx6qsabrelite_defconfig  |  4 +++
 configs/nitrogen6dl2g_defconfig  |  4 +++
 configs/nitrogen6dl_defconfig|  4 +++
 configs/nitrogen6q2g_defconfig   |  4 +++
 configs/nitrogen6q_defconfig |  4 +++
 configs/nitrogen6s1g_defconfig   |  4 +++
 configs/nitrogen6s_defconfig |  4 +++
 configs/omap3_beagle_defconfig   |  4 +++
 configs/omap3_logic_defconfig|  3 ++
 configs/parrot_r16_defconfig |  2 ++
 configs/phycore-rk3288_defconfig |  3 ++
 configs/popmetal-rk3288_defconfig|  3 ++
 configs/rock2_defconfig  |  3 ++
 configs/sandbox_defconfig|  1 +
 configs/sandbox_flattree_defconfig   |  1 +
 configs/sandbox_noblk_defconfig  |  1 +
 configs/sandbox_spl_defconfig|  1 +
 configs/sniper_defconfig |  7 
 configs/tinker-rk3288_defconfig  |  3 ++
 configs/xilinx_zynqmp_ep_defconfig   |  5 +++
 configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig |  5 +++
 configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig |  4 +++
 configs/xilinx_zynqmp_zcu102_revA_defconfig  |  5 +++
 configs/xilinx_zynqmp_zcu102_revB_defconfig  |  5 +++
 include/configs/am335x_evm.h |  7 
 include/configs/am335x_shc.h |  4 ---
 include/configs/am335x_sl50.h|  4 ---
 include/configs/bav335x.h| 11 --
 include/configs/cgtqmx6eval.h|  6 
 include/configs/dra7xx_evm.h |  9 -
 include/configs/evb_rk3229.h |  1 -
 include/configs/kc1.h| 16 -
 include/configs/mx6sabre_common.h|  6 
 include/configs/nitrogen6x.h |  6 
 include/configs/omap3_beagle.h   |  5 ---
 include/configs/omap3_logic.h|  5 ---
 include/configs/rk3036_common.h  |  8 -
 include/configs/rk322x_common.h

[U-Boot] [PATCH] davinci: da850-evm: switch to using TI_COMMON_CMD_OPTIONS

2017-08-25 Thread Adam Ford
Like the OMAP-L138 LCDK before it, let's move the da850-evm and
the variations to TI_COMMON_CMD_OPTIONS to cut back one some of the
defconfig entries.

Signed-off-by: Adam Ford 
---
 board/davinci/da8xxevm/Kconfig|  4 ++--
 configs/da850_am18xxevm_defconfig | 22 --
 configs/da850evm_defconfig| 22 +++---
 configs/da850evm_direct_nor_defconfig | 21 +++--
 4 files changed, 40 insertions(+), 29 deletions(-)

diff --git a/board/davinci/da8xxevm/Kconfig b/board/davinci/da8xxevm/Kconfig
index 0935abf..d49d244 100644
--- a/board/davinci/da8xxevm/Kconfig
+++ b/board/davinci/da8xxevm/Kconfig
@@ -22,6 +22,6 @@ config SYS_VENDOR
 config SYS_CONFIG_NAME
default "omapl138_lcdk"
 
-source "board/ti/common/Kconfig"
-
 endif
+
+source "board/ti/common/Kconfig"
diff --git a/configs/da850_am18xxevm_defconfig 
b/configs/da850_am18xxevm_defconfig
index 7e056e8..f187882 100644
--- a/configs/da850_am18xxevm_defconfig
+++ b/configs/da850_am18xxevm_defconfig
@@ -1,13 +1,13 @@
 CONFIG_ARM=y
 CONFIG_ARCH_DAVINCI=y
 CONFIG_TARGET_DA850EVM=y
+CONFIG_TI_COMMON_CMD_OPTIONS=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
 
CONFIG_SYS_EXTRA_OPTIONS="DA850_AM18X_EVM,MAC_ADDR_IN_EEPROM,SYS_I2C_EEPROM_ADDR_LEN=2,SYS_I2C_EEPROM_ADDR=0x50"
-CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="mem=32M console=ttyS2,115200n8 root=/dev/mtdblock2 rw 
noinitrd ip=dhcp"
@@ -18,22 +18,24 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL=y
 CONFIG_SPL_BOARD_INIT=y
 CONFIG_HUSH_PARSER=y
+# CONFIG_CMD_BOOTZ is not set
 # CONFIG_CMD_IMLS is not set
-CONFIG_CMD_ASKENV=y
 CONFIG_CRC32_VERIFY=y
+# CONFIG_CMD_EEPROM is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_CMD_MMC=y
-CONFIG_CMD_SF=y
-CONFIG_CMD_SPI=y
+# CONFIG_CMD_GPIO is not set
+# CONFIG_CMD_GPT is not set
+# CONFIG_CMD_I2C is not set
+# CONFIG_CMD_PART is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_FAT=y
+# CONFIG_CMD_TIME is not set
+# CONFIG_CMD_EXT4 is not set
+# CONFIG_CMD_FS_GENERIC is not set
 CONFIG_CMD_DIAG=y
+CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+# CONFIG_FAT_WRITE is not set
 CONFIG_OF_LIBFDT=y
diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
index 0135e7d..b923ec3 100644
--- a/configs/da850evm_defconfig
+++ b/configs/da850evm_defconfig
@@ -1,13 +1,13 @@
 CONFIG_ARM=y
 CONFIG_ARCH_DAVINCI=y
 CONFIG_TARGET_DA850EVM=y
+CONFIG_TI_COMMON_CMD_OPTIONS=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_SYS_EXTRA_OPTIONS="MAC_ADDR_IN_SPIFLASH"
-CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="mem=32M console=ttyS2,115200n8 root=/dev/mtdblock2 rw 
noinitrd ip=dhcp"
@@ -19,23 +19,23 @@ CONFIG_SPL=y
 CONFIG_SPL_BOARD_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot > "
-CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
-CONFIG_CMD_ASKENV=y
 CONFIG_CRC32_VERIFY=y
+# CONFIG_CMD_EEPROM is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_CMD_MMC=y
-CONFIG_CMD_SF=y
-CONFIG_CMD_SPI=y
+# CONFIG_CMD_GPIO is not set
+# CONFIG_CMD_GPT is not set
+# CONFIG_CMD_I2C is not set
+# CONFIG_CMD_PART is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_FAT=y
+# CONFIG_CMD_TIME is not set
+# CONFIG_CMD_EXT4 is not set
+# CONFIG_CMD_FS_GENERIC is not set
 CONFIG_CMD_DIAG=y
+CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+# CONFIG_FAT_WRITE is not set
 CONFIG_OF_LIBFDT=y
diff --git a/configs/da850evm_direct_nor_defconfig 
b/configs/da850evm_direct_nor_defconfig
index 5c6ae25..fc62c84 100644
--- a/configs/da850evm_direct_nor_defconfig
+++ b/configs/da850evm_direct_nor_defconfig
@@ -1,8 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_DAVINCI=y
 CONFIG_TARGET_DA850EVM=y
+CONFIG_TI_COMMON_CMD_OPTIONS=y
 CONFIG_SYS_EXTRA_OPTIONS="MAC_ADDR_IN_SPIFLASH,USE_NOR,DIRECT_NOR_BOOT"
-CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="mem=32M console=ttyS2,115200n8 root=/dev/mtdblock2 rw 
noinitrd ip=dhcp"
@@ -12,14 +12,23 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot > "
-CONFIG_CMD_ASKENV=y
+# CONFIG_CMD_BOOTZ is not set
 CONFIG_CRC32_VERIFY=y
-CONFIG_CMD_SF=y
+# CONFIG_CMD_EEPROM is not set
+# CONFIG_CMD_GPIO is not set
+# CONFIG_CMD_GPT is not set
+# CONFIG_CMD_I2C is not set
+# CONFIG_CMD_MMC is not set
+# CONFIG_CMD_PART is not set
+# CONFIG_CMD_SPI is not set
 # CONFIG_CMD_SETEXPR is not set

[U-Boot] [PATCH 1/1] efi_loader: call __efi_exit_check in efi_exit

2017-08-25 Thread Heinrich Schuchardt
The calls to __efi_entry_check and __efi_exit_check have to match.
If DEBUG is defined, panic() will be called otherwise.

If debugging is activated some Travis CI builds fail due to an
assertion in EFI_CALL without the patch.

Signed-off-by: Heinrich Schuchardt 
---
 lib/efi_loader/efi_boottime.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 5444b32530..ef3ae05126 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -828,6 +828,8 @@ static efi_status_t EFIAPI efi_exit(efi_handle_t 
image_handle,
EFI_ENTRY("%p, %ld, %ld, %p", image_handle, exit_status,
  exit_data_size, exit_data);
 
+   __efi_exit_check();
+
loaded_image_info->exit_status = exit_status;
longjmp(_image_info->exit_jmp, 1);
 
-- 
2.14.1

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


Re: [U-Boot] [PATCH 1/1] mtd/spi: Support of non-jedec MRAM devices

2017-08-25 Thread Jagan Teki
On Mon, Jul 10, 2017 at 10:01 PM, Matt Weber
 wrote:
> This patch adds support of non-jedec MRAM devices mr25hx from Everspin.
> This flash devices do not have jedec device ID and hence support for
> name matching is also added as part of this series.
>
> This patch streamlined the update of SPI flash probing function API
> changes and included the following updates:
>
> 1) Updated "spi_flash_probe" (old method) and
> "spi_flash_probe_bus_cs" (new method) APIs
> 2) Added ifdefs for CONFIG_ENV_SPI_NAME and CONFIG_SF_DEFAULT_NAME so
> that addition of flash name in case of non-jedec device becomes
> streamlined.
> 3) Used CONFIG_ENV_SPI_NAME and CONFIG_SF_DEFAULT_NAME at all possible
> places except board/ files which has custom or hard coded arguments in
> "spi_flash_probe" functions. In such cases, passed NULL as flash name.
>
> Signed-off-by: Ronak Desai 
> Signed-off-by: Matthew Weber 
> ---
>  board/Arcturus/ucp1020/cmd_arc.c |  4 ++--
>  board/Synology/ds414/cmd_syno.c  |  2 +-
>  board/aries/ma5d4evk/ma5d4evk.c  |  3 ++-
>  board/buffalo/lsxl/lsxl.c|  2 +-
>  board/congatec/cgtqmx6eval/cgtqmx6eval.c |  5 +++--
>  board/davinci/da8xxevm/da850evm.c|  2 +-
>  board/renesas/sh7752evb/sh7752evb.c  |  4 ++--
>  board/renesas/sh7753evb/sh7753evb.c  |  4 ++--
>  board/renesas/sh7757lcr/sh7757lcr.c  |  6 +++---
>  board/siemens/taurus/taurus.c|  3 ++-
>  cmd/mvebu/bubt.c |  3 ++-
>  cmd/sf.c | 12 
>  common/env_sf.c  | 10 ++
>  common/spl/spl_spi.c |  3 ++-
>  common/splash_source.c   |  3 ++-
>  drivers/dfu/dfu_sf.c |  3 ++-
>  drivers/mtd/spi/Kconfig  |  5 +
>  drivers/mtd/spi/fsl_espi_spl.c   |  4 ++--
>  drivers/mtd/spi/sf-uclass.c  |  9 +
>  drivers/mtd/spi/sf_internal.h|  4 +++-
>  drivers/mtd/spi/sf_probe.c   | 18 +-
>  drivers/mtd/spi/spi_flash.c  | 27 ---
>  drivers/mtd/spi/spi_flash_ids.c  | 11 +++
>  drivers/net/fm/fm.c  |  4 ++--
>  drivers/spi/spi-uclass.c | 15 +--
>  include/spi.h|  6 +-
>  include/spi_flash.h  | 11 +++
>  27 files changed, 123 insertions(+), 60 deletions(-)

Please split this into multiple patches where inital non-jedec on
flash has one patch and adding boards will be an individual patches.

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 0/8] sf: improve support of (Q)SPI flash memories

2017-08-25 Thread Marek Vasut
On 08/25/2017 06:28 PM, Jagan Teki wrote:
> On Fri, Aug 25, 2017 at 9:43 PM, Marek Vasut  wrote:
>> On 08/25/2017 06:07 PM, Jagan Teki wrote:
>>> On Fri, Aug 25, 2017 at 6:47 AM, Yang, Wenyou  
>>> wrote:
 Hi,

 This patch set has been here for a long time, could you have a look and 
 take
 it?
>>>
>>> Yeah, I'm holding this because of my current spi-nor work. But anyway
>>> I will try to merge on coming MW If all OK.
>>
>> Is your work posted somewhere or available in some git repository ?

You did not answer this question.

>> I don't see any reason why you should not perform your maintainer duties
>> by reviewing/replying to an incoming patch, no matter what work you do
>> to the subsystem though ...
> 
> I didn't write "this series holding spi-nor work" since it has some
> new features I'm taking time to review.

I never implied this. Rather the opposite, you claim you do some work on
the SPI NOR core, yet you let this patchset rot in the list for over a
month now and gave the author zero feedback.

Notifying the author about the core changes early could've prevented a
lot of wasted effort on his side. Reviewing early could've prevented a
lot of frustration from patches being ignored.

> There is nothing wrong with
> maintainer duties here, you must need to understand.

I disagree.

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 0/6] sunxi: update sun8i-emac driver and A64 DTs

2017-08-25 Thread Jagan Teki
On Mon, Jul 24, 2017 at 4:26 AM, Andre Przywara  wrote:
> This patch set updates the latest device trees for Allwinner A64 based
> boards from Linux. In contrast to v1 I now took the actual 4.13-rc1 DTs
> from Linux, which restructures the patch set a bit.
>
> The big advantage of having the very same DTs in U-Boot
> is that we can use UEFI boot much more easily, because U-Boot can just
> pass on its own DT, without having to find and load some external version.
> This makes UEFI based installers boot out of the box, which is a big relief.
> Linux 4.13-rc1 saw the addition of the sun8i-emac Ethernet driver, for
> which U-Boot has a driver for quite a while, but with a slightly different
> binding, so this series makes it compatible.
> Patch 1/6 adds some missing compatible strings, it was on the list before,
> but I add it to this series because it is a prerequisite for the following
> patches. Patches 2 till 4 add some code to be able to parse the new pinctrl
> bindings that newer Allwinner DTs use.
> Patch 5 extends U-Boot sun8i-emac driver to be able to properly parse the
> DT binding used by the new Linux driver as well.
> Patch 6 then actually replaces the DTs for A64 boards with the exact version
> as of the Linux tree (v4.13-rc1).
> This allows us to *almost* get rid of out *-u-boot.dtsi kludge, but we
> still need the alias, which the Linux version doesn't have, so this file
> still contains this one line, effectively.
>
> I am still not convinced that having a full featured pinctrl driver in
> U-Boot is the right thing, so I cheekily ignore this part of the comments.
> If people consider this a requirement, we can have a look at this, but
> I don't see any reply since the first patch was posted some months ago,
> so I guess this takes much more time.
>
> Also my apologies for not having looked at the syscon driver change Simon
> asked. It looks like a reasonable change, but I am about to leave for
> holidays and didn't want to postpone an updated version any longer.
>
> Cheers,
> Andre.
>
> Andre Przywara (6):
>   sunxi: gpio: add missing compatible strings
>   libfdt: add fdtdec_lookup_phandle_index()
>   sunxi: GPIO: introduce sunxi_gpio_setup_dt_pins()
>   net: sun8i-emac: use new, generic GPIO setup routine
>   net: sun8i-emac: add support for new DT binding
>   sunxi: A64: update Linux DTs

This series look OK, to me. Will test emac and update. Meanwhile any
comments please let me know.

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] dma: import linux/dma-direction.h to consolidate enum dma_data_direction

2017-08-25 Thread Andy Shevchenko
On Sat, 2017-08-26 at 00:50 +0900, Masahiro Yamada wrote:
> Import include/linux/dma-direction.h from Linux 4.13-rc7 and delete
> duplicated definitions of enum dma_data_direction.
> 

Makes sense.

Reviewed-by: Andy Shevchenko 

> Signed-off-by: Masahiro Yamada 
> ---
> 
>  arch/arm/include/asm/dma-mapping.h   |  8 ++--
>  arch/nds32/include/asm/dma-mapping.h |  6 +-
>  arch/x86/include/asm/dma-mapping.h   |  8 ++--
>  drivers/ata/sata_dwc.c   |  1 +
>  drivers/ata/sata_dwc.h   |  7 ---
>  drivers/mmc/uniphier-sd.c|  2 +-
>  include/linux/dma-direction.h| 13 +
>  7 files changed, 20 insertions(+), 25 deletions(-)
>  create mode 100644 include/linux/dma-direction.h
> 
> diff --git a/arch/arm/include/asm/dma-mapping.h
> b/arch/arm/include/asm/dma-mapping.h
> index a5821f54e567..287466800e4b 100644
> --- a/arch/arm/include/asm/dma-mapping.h
> +++ b/arch/arm/include/asm/dma-mapping.h
> @@ -8,13 +8,9 @@
>  #ifndef __ASM_ARM_DMA_MAPPING_H
>  #define __ASM_ARM_DMA_MAPPING_H
>  
> -#define  dma_mapping_error(x, y) 0
> +#include 
>  
> -enum dma_data_direction {
> - DMA_BIDIRECTIONAL   = 0,
> - DMA_TO_DEVICE   = 1,
> - DMA_FROM_DEVICE = 2,
> -};
> +#define  dma_mapping_error(x, y) 0
>  
>  static inline void *dma_alloc_coherent(size_t len, unsigned long
> *handle)
>  {
> diff --git a/arch/nds32/include/asm/dma-mapping.h
> b/arch/nds32/include/asm/dma-mapping.h
> index 25e5a1b6ec8a..a627306ed852 100644
> --- a/arch/nds32/include/asm/dma-mapping.h
> +++ b/arch/nds32/include/asm/dma-mapping.h
> @@ -7,11 +7,7 @@
>  #ifndef __ASM_NDS_DMA_MAPPING_H
>  #define __ASM_NDS_DMA_MAPPING_H
>  
> -enum dma_data_direction {
> - DMA_BIDIRECTIONAL   = 0,
> - DMA_TO_DEVICE   = 1,
> - DMA_FROM_DEVICE = 2,
> -};
> +#include 
>  
>  static void *dma_alloc_coherent(size_t len, unsigned long *handle)
>  {
> diff --git a/arch/x86/include/asm/dma-mapping.h
> b/arch/x86/include/asm/dma-mapping.h
> index 7de4c08e36ea..43073ad2524f 100644
> --- a/arch/x86/include/asm/dma-mapping.h
> +++ b/arch/x86/include/asm/dma-mapping.h
> @@ -8,13 +8,9 @@
>  #ifndef __ASM_X86_DMA_MAPPING_H
>  #define __ASM_X86_DMA_MAPPING_H
>  
> -#define  dma_mapping_error(x, y) 0
> +#include 
>  
> -enum dma_data_direction {
> - DMA_BIDIRECTIONAL   = 0,
> - DMA_TO_DEVICE   = 1,
> - DMA_FROM_DEVICE = 2,
> -};
> +#define  dma_mapping_error(x, y) 0
>  
>  static inline void *dma_alloc_coherent(size_t len, unsigned long
> *handle)
>  {
> diff --git a/drivers/ata/sata_dwc.c b/drivers/ata/sata_dwc.c
> index a226ca2decb5..2f3b2ddb411f 100644
> --- a/drivers/ata/sata_dwc.c
> +++ b/drivers/ata/sata_dwc.c
> @@ -26,6 +26,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> diff --git a/drivers/ata/sata_dwc.h b/drivers/ata/sata_dwc.h
> index e2d9e0c1fce8..17fb20cf437b 100644
> --- a/drivers/ata/sata_dwc.h
> +++ b/drivers/ata/sata_dwc.h
> @@ -401,13 +401,6 @@ struct ata_device {
>  #endif
>  };
>  
> -enum dma_data_direction {
> - DMA_BIDIRECTIONAL = 0,
> - DMA_TO_DEVICE = 1,
> - DMA_FROM_DEVICE = 2,
> - DMA_NONE = 3,
> -};
> -
>  struct ata_link {
>   struct ata_port *ap;
>   int pmp;
> diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c
> index e272b1415324..721b75fddace 100644
> --- a/drivers/mmc/uniphier-sd.c
> +++ b/drivers/mmc/uniphier-sd.c
> @@ -11,10 +11,10 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> -#include 
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> diff --git a/include/linux/dma-direction.h b/include/linux/dma-
> direction.h
> new file mode 100644
> index ..95b6a82f5951
> --- /dev/null
> +++ b/include/linux/dma-direction.h
> @@ -0,0 +1,13 @@
> +#ifndef _LINUX_DMA_DIRECTION_H
> +#define _LINUX_DMA_DIRECTION_H
> +/*
> + * These definitions mirror those in pci.h, so they can be used
> + * interchangeably with their PCI_ counterparts.
> + */
> +enum dma_data_direction {
> + DMA_BIDIRECTIONAL = 0,
> + DMA_TO_DEVICE = 1,
> + DMA_FROM_DEVICE = 2,
> + DMA_NONE = 3,
> +};
> +#endif

-- 
Andy Shevchenko 
Intel Finland Oy
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 2/4] arm: sunxi: compile spl_boot_device even for U-Boot

2017-08-25 Thread Jagan Teki
Hi Maxime,

On Fri, Aug 25, 2017 at 1:32 AM, Maxime Ripard
 wrote:
> Hi Jagan,
>
> On Thu, Aug 24, 2017 at 12:25:24PM +0530, Jagan Teki wrote:
>> On Wed, Aug 23, 2017 at 5:11 PM, Maxime Ripard
>>  wrote:
>> > U-Boot itself might need to identify the boot device, for example to be
>> > able to tell where to load the kernel from when several options are
>> > possible.
>> >
>> > Remove the guard preventing it from being compiled.
>> >
>> > Signed-off-by: Maxime Ripard 
>> > ---
>> >  arch/arm/mach-sunxi/board.c | 4 +---
>> >  1 file changed, 1 insertion(+), 3 deletions(-)
>> >
>> > diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
>> > index 65b1ebd83787..f5e977b4183d 100644
>> > --- a/arch/arm/mach-sunxi/board.c
>> > +++ b/arch/arm/mach-sunxi/board.c
>> > @@ -14,9 +14,7 @@
>> >  #include 
>> >  #include 
>> >  #include 
>> > -#ifdef CONFIG_SPL_BUILD
>> >  #include 
>> > -#endif
>> >  #include 
>> >  #include 
>> >  #include 
>> > @@ -210,7 +208,6 @@ void s_init(void)
>> > eth_init_board();
>> >  }
>> >
>> > -#ifdef CONFIG_SPL_BUILD
>> >  DECLARE_GLOBAL_DATA_PTR;
>> >
>> >  /* The sunxi internal brom will try to loader external bootloader
>> > @@ -261,6 +258,7 @@ u32 spl_boot_mode(const u32 boot_device)
>> > return MMCSD_MODE_RAW;
>> >  }
>> >
>> > +#ifdef CONFIG_SPL_BUILD
>>
>> Based on this, 3/4 is reusing for finding boot device, reusing spl
>> core functions in u-boot proper is not good approach. Better to have
>> some separate function that determine boot source and reuse the same
>> in spl and U-Boot proper.
>
> I'm not sure what you mean here, do you want something like
>
> int sunxi_boot_device()
> {
> 
> }
>
> #ifdef CONFIG_SPL_BUILD
> int spl_boot_device()
> {
> return sunxi_boot_device();
> }
> #endif
>
> I mean, I could do that, but I don't see the difference. Can you
> elaborate?

spl_boot_device is SPL core function so it's better not to call for
U-Boot proper instead I recommended to use stub function, anyway that
stub look sunxi function so we can use it in both the stages - IMHO.

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 0/8] sf: improve support of (Q)SPI flash memories

2017-08-25 Thread Jagan Teki
On Fri, Aug 25, 2017 at 9:43 PM, Marek Vasut  wrote:
> On 08/25/2017 06:07 PM, Jagan Teki wrote:
>> On Fri, Aug 25, 2017 at 6:47 AM, Yang, Wenyou  
>> wrote:
>>> Hi,
>>>
>>> This patch set has been here for a long time, could you have a look and take
>>> it?
>>
>> Yeah, I'm holding this because of my current spi-nor work. But anyway
>> I will try to merge on coming MW If all OK.
>
> Is your work posted somewhere or available in some git repository ?
>
> I don't see any reason why you should not perform your maintainer duties
> by reviewing/replying to an incoming patch, no matter what work you do
> to the subsystem though ...

I didn't write "this series holding spi-nor work" since it has some
new features I'm taking time to review. There is nothing wrong with
maintainer duties here, you must need to understand.

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 0/8] sf: improve support of (Q)SPI flash memories

2017-08-25 Thread Marek Vasut
On 08/25/2017 06:07 PM, Jagan Teki wrote:
> On Fri, Aug 25, 2017 at 6:47 AM, Yang, Wenyou  
> wrote:
>> Hi,
>>
>> This patch set has been here for a long time, could you have a look and take
>> it?
> 
> Yeah, I'm holding this because of my current spi-nor work. But anyway
> I will try to merge on coming MW If all OK.

Is your work posted somewhere or available in some git repository ?

I don't see any reason why you should not perform your maintainer duties
by reviewing/replying to an incoming patch, no matter what work you do
to the subsystem though ...

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 0/2] Add denali DT driver

2017-08-25 Thread Masahiro Yamada
1/2 is required for 2/2.
Denali NAND controller has two reg regions named "nand_data" and "denali_reg"
as described by Documentation/devicetree/bindings/mtd/denali-nand.txt



Masahiro Yamada (2):
  ofnode: add {ofnode,dev}_read_resource_byname()
  mtd: nand: denali_dt: add a DT driver

 drivers/core/ofnode.c| 12 
 drivers/core/read.c  |  6 
 drivers/mtd/nand/Kconfig |  7 +
 drivers/mtd/nand/Makefile|  1 +
 drivers/mtd/nand/denali.c|  4 ++-
 drivers/mtd/nand/denali.h|  2 ++
 drivers/mtd/nand/denali_dt.c | 67 
 include/dm/ofnode.h  |  2 ++
 include/dm/read.h| 20 -
 9 files changed, 119 insertions(+), 2 deletions(-)
 create mode 100644 drivers/mtd/nand/denali_dt.c

-- 
2.7.4

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


[U-Boot] [PATCH 2/2] mtd: nand: denali_dt: add a DT driver

2017-08-25 Thread Masahiro Yamada
A patch for NAND uclass support was proposed about half a year:
https://patchwork.ozlabs.org/patch/722282/

It was not merged and I do not see on-going work for this.

Without DM-based probing, we need to set up pinctrl etc. in an ad-hoc
way and give lots of crappy CONFIG options for base addresses and
properties, which are supposed to be specified by DT.  This is painful.

This commit just provides a probe hook to retrieve "reg" from DT and
allocate private data in a DM manner.  This DT driver is not essentially
a NAND driver, in fact it is (ab)using UCLASS_MISC.  Once UCLASS_NAND is
supported, it would be possible to migrate to it.

Signed-off-by: Masahiro Yamada 
---

 drivers/mtd/nand/Kconfig |  7 +
 drivers/mtd/nand/Makefile|  1 +
 drivers/mtd/nand/denali.c|  4 ++-
 drivers/mtd/nand/denali.h|  2 ++
 drivers/mtd/nand/denali_dt.c | 67 
 5 files changed, 80 insertions(+), 1 deletion(-)
 create mode 100644 drivers/mtd/nand/denali_dt.c

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 71d678fc66b5..85b26d608851 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -16,6 +16,13 @@ config NAND_DENALI
help
  Enable support for the Denali NAND controller.
 
+config NAND_DENALI_DT
+   bool "Support Denali NAND controller as a DT device"
+   depends on NAND_DENALI && OF_CONTROL && DM
+   help
+ Enable the driver for NAND flash on platforms using a Denali NAND
+ controller as a DT device.
+
 config SYS_NAND_DENALI_64BIT
bool "Use 64-bit variant of Denali NAND controller"
depends on NAND_DENALI
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index c3d4a996f37f..9f7d9d6ff7ae 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -44,6 +44,7 @@ obj-$(CONFIG_NAND_ATMEL) += atmel_nand.o
 obj-$(CONFIG_NAND_ARASAN) += arasan_nfc.o
 obj-$(CONFIG_NAND_DAVINCI) += davinci_nand.o
 obj-$(CONFIG_NAND_DENALI) += denali.o
+obj-$(CONFIG_NAND_DENALI_DT) += denali_dt.o
 obj-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o
 obj-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_nand.o
 obj-$(CONFIG_NAND_FSL_UPM) += fsl_upm.o
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index 18280b0b2fe8..47cf37d1d9b7 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -1175,7 +1175,7 @@ static void denali_hw_init(struct denali_nand_info 
*denali)
 
 static struct nand_ecclayout nand_oob;
 
-static int denali_init(struct denali_nand_info *denali)
+int denali_init(struct denali_nand_info *denali)
 {
struct mtd_info *mtd = nand_to_mtd(>nand);
int ret;
@@ -1273,6 +1273,7 @@ fail:
return ret;
 }
 
+#ifndef CONFIG_NAND_DENALI_DT
 static int __board_nand_init(void)
 {
struct denali_nand_info *denali;
@@ -1296,3 +1297,4 @@ void board_nand_init(void)
if (__board_nand_init() < 0)
pr_warn("Failed to initialize Denali NAND controller.\n");
 }
+#endif
diff --git a/drivers/mtd/nand/denali.h b/drivers/mtd/nand/denali.h
index 0e098bddf11d..694bce53a955 100644
--- a/drivers/mtd/nand/denali.h
+++ b/drivers/mtd/nand/denali.h
@@ -464,4 +464,6 @@ struct denali_nand_info {
uint32_t max_banks;
 };
 
+int denali_init(struct denali_nand_info *denali);
+
 #endif /* __DENALI_H__ */
diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c
new file mode 100644
index ..6a987c5b7880
--- /dev/null
+++ b/drivers/mtd/nand/denali_dt.c
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2017 Socionext Inc.
+ *   Author: Masahiro Yamada 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include "denali.h"
+
+static const struct udevice_id denali_nand_dt_ids[] = {
+   {
+   .compatible = "altr,socfpga-denali-nand",
+   },
+   {
+   .compatible = "socionext,uniphier-denali-nand-v5a",
+   },
+   {
+   .compatible = "socionext,uniphier-denali-nand-v5b",
+   },
+   { /* sentinel */ }
+};
+
+static int denali_dt_probe(struct udevice *dev)
+{
+   struct denali_nand_info *denali = dev_get_priv(dev);
+   struct resource res;
+   int ret;
+
+   ret = dev_read_resource_byname(dev, "denali_reg", );
+   if (ret)
+   return ret;
+
+   denali->flash_reg = devm_ioremap(dev, res.start, resource_size());
+
+   ret = dev_read_resource_byname(dev, "nand_data", );
+   if (ret)
+   return ret;
+
+   denali->flash_mem = devm_ioremap(dev, res.start, resource_size());
+
+   return denali_init(denali);
+}
+
+U_BOOT_DRIVER(denali_nand_dt) = {
+   .name = "denali-nand-dt",
+   .id = UCLASS_MISC,
+   .of_match = denali_nand_dt_ids,
+   .probe = denali_dt_probe,
+   .priv_auto_alloc_size = sizeof(struct denali_nand_info),
+};
+
+void board_nand_init(void)
+{
+  

[U-Boot] [PATCH 1/2] ofnode: add {ofnode, dev}_read_resource_byname()

2017-08-25 Thread Masahiro Yamada
Linux supports platform_get_resource_byname() to look up a resource
by name.

We want a similar helper.  It is useful when a device node has two
or more named register regions.

Signed-off-by: Masahiro Yamada 
---

 drivers/core/ofnode.c | 12 
 drivers/core/read.c   |  6 ++
 include/dm/ofnode.h   |  2 ++
 include/dm/read.h | 20 +++-
 4 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index c1a2e9f0daef..0685b689d846 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -627,3 +627,15 @@ int ofnode_read_resource(ofnode node, uint index, struct 
resource *res)
return 0;
}
 }
+
+int ofnode_read_resource_byname(ofnode node, const char *name,
+   struct resource *res)
+{
+   int index;
+
+   index = ofnode_stringlist_search(node, "reg-names", name);
+   if (index < 0)
+   return index;
+
+   return ofnode_read_resource(node, index, res);
+}
diff --git a/drivers/core/read.c b/drivers/core/read.c
index fe40bed64de3..6acb33388f56 100644
--- a/drivers/core/read.c
+++ b/drivers/core/read.c
@@ -164,3 +164,9 @@ int dev_read_resource(struct udevice *dev, uint index, 
struct resource *res)
 {
return ofnode_read_resource(dev_ofnode(dev), index, res);
 }
+
+int dev_read_resource_byname(struct udevice *dev, const char *name,
+struct resource *res)
+{
+   return ofnode_read_resource_byname(dev_ofnode(dev), name, res);
+}
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index 210ddb2e5d74..de2769ed5376 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -625,5 +625,7 @@ int ofnode_read_simple_size_cells(ofnode node);
 bool ofnode_pre_reloc(ofnode node);
 
 int ofnode_read_resource(ofnode node, uint index, struct resource *res);
+int ofnode_read_resource_byname(ofnode node, const char *name,
+   struct resource *res);
 
 #endif
diff --git a/include/dm/read.h b/include/dm/read.h
index c3a4a5611a70..49d69c990f6e 100644
--- a/include/dm/read.h
+++ b/include/dm/read.h
@@ -359,13 +359,24 @@ int dev_read_enabled(struct udevice *dev);
 /**
  * dev_read_resource() - obtain an indexed resource from a device.
  *
- * @dev: devuce to examine
+ * @dev: device to examine
  * @index index of the resource to retrieve (0 = first)
  * @res returns the resource
  * @return 0 if ok, negative on error
  */
 int dev_read_resource(struct udevice *dev, uint index, struct resource *res);
 
+/**
+ * dev_read_resource_byname() - obtain a named resource from a device.
+ *
+ * @dev: device to examine
+ * @name: name of the resource to retrieve
+ * @res: returns the resource
+ * @return 0 if ok, negative on error
+ */
+int dev_read_resource_byname(struct udevice *dev, const char *name,
+struct resource *res);
+
 #else /* CONFIG_DM_DEV_READ_INLINE is enabled */
 
 static inline int dev_read_u32_default(struct udevice *dev,
@@ -513,6 +524,13 @@ static inline int dev_read_resource(struct udevice *dev, 
uint index,
return ofnode_read_resource(dev_ofnode(dev), index, res);
 }
 
+static inline int dev_read_resource_byname(struct udevice *dev,
+  const char *name,
+  struct resource *res)
+{
+   return ofnode_read_resource_byname(dev_ofnode(dev), name, res);
+}
+
 #endif /* CONFIG_DM_DEV_READ_INLINE */
 
 /**
-- 
2.7.4

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


Re: [U-Boot] [PATCH v3 0/8] sf: improve support of (Q)SPI flash memories

2017-08-25 Thread Jagan Teki
On Fri, Aug 25, 2017 at 6:47 AM, Yang, Wenyou  wrote:
> Hi,
>
> This patch set has been here for a long time, could you have a look and take
> it?

Yeah, I'm holding this because of my current spi-nor work. But anyway
I will try to merge on coming MW If all OK.

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] linux/io.h: import generic ioread* / iowrite* accessors from Linux

2017-08-25 Thread Masahiro Yamada
Some drivers in Linux (ex. drivers/mtd/nand/denali.c) use
ioread*/iowrite* accessors.  Import them to make drivers more
synced.  I copied code from include/asm-generic/io.h of Linux.

Signed-off-by: Masahiro Yamada 
---

 include/linux/io.h | 44 
 1 file changed, 44 insertions(+)

diff --git a/include/linux/io.h b/include/linux/io.h
index a104b7e69f7c..bf1ddbbaa671 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -9,6 +9,50 @@
 #include 
 #include 
 
+static inline u8 ioread8(const volatile void __iomem *addr)
+{
+   return readb(addr);
+}
+
+static inline u16 ioread16(const volatile void __iomem *addr)
+{
+   return readw(addr);
+}
+
+static inline u32 ioread32(const volatile void __iomem *addr)
+{
+   return readl(addr);
+}
+
+#ifdef CONFIG_64BIT
+static inline u64 ioread64(const volatile void __iomem *addr)
+{
+   return readq(addr);
+}
+#endif /* CONFIG_64BIT */
+
+static inline void iowrite8(u8 value, volatile void __iomem *addr)
+{
+   writeb(value, addr);
+}
+
+static inline void iowrite16(u16 value, volatile void __iomem *addr)
+{
+   writew(value, addr);
+}
+
+static inline void iowrite32(u32 value, volatile void __iomem *addr)
+{
+   writel(value, addr);
+}
+
+#ifdef CONFIG_64BIT
+static inline void iowrite64(u64 value, volatile void __iomem *addr)
+{
+   writeq(value, addr);
+}
+#endif /* CONFIG_64BIT */
+
 #ifndef CONFIG_HAVE_ARCH_IOREMAP
 static inline void __iomem *ioremap(resource_size_t offset,
resource_size_t size)
-- 
2.7.4

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


Re: [U-Boot] U-boot 2017.07 not working on Raspberry Pi

2017-08-25 Thread Stephen Warren

On 08/25/2017 03:46 AM, Paul Barker wrote:

On Fri, Aug 25, 2017 at 2:46 AM, Simon Glass  wrote:

Hi,

On 20 August 2017 at 20:59, Simon Glass  wrote:

Hi Paul,

On 3 August 2017 at 11:42, Tom Rini  wrote:

On Thu, Aug 03, 2017 at 09:42:13AM -0600, Stephen Warren wrote:

On 08/03/2017 07:45 AM, Simon Glass wrote:
...

I'm not sure if we have a Raspberry Pi in a test farm anywhere. I
should be able to look next week if no one can figure these out
beforehand.


I thought that Tom had some Pis in his test farm?


I have an RPi 3, but we don't have Linux boot tests atm.  I'm talking
with Kevin Hilman about how I might setup kernelci to test a few things
in my lab, which might catch this kind of problem sooner rather than
later.


Just a note that I can repeat the CONFIG_OF_EMBED problem. I am not
sure what is going on or why this would prevent the kernel booting.
But I believe rpi has a device tree pass-through from the pre-U-Boot
boot loader, and I am booting with that, so perhaps it relies on
CONFIG_OF_EMBED in some way?


I can see some code in board_fdt_blob_setup() but it does not seem to
be enabled. For me I am able to boot Linux without CONFIG_OF_EMBED.



I can also repeat the USB keyboard problem. It doesn't detect the
keyboard at all. For me this can be fixed by enabling
CONFIG_DM_KEYBOARD, so we should probably do that for all rpi boards.


I have sent a patch for this.


This patch looks good. I've now got working keyboard and network in
u-boot along with a successful boot of Linux for the 2 devices I've
tested (Original rpi and rpi3 32-bit) from the following:

* U-boot 2017.07 release
* Revert "dm: arm: rpi: Drop CONFIG_OF_EMBED" (25877d4e)
* Apply backported version of your patch

The rpi firmware does provide a device tree blob at boot and my only
guess is that this is currently being overwritten or ignored. That's
masked when CONFIG_OF_EMBED is enabled as we use an embedded device
tree instead of the one provided by the rpi firmware.


As background information, note that there are two ways U-Boot can work:

1) Load a DTB from "disk", and pass that to the kernel. This is 
typically used for upstream kernels, since at least historically the 
DTBs supplied by the RPi Foundation and loaded/modified by the VideoCore 
firmware use a non-upstream schema, so need to be replaced with an 
upstream-compatible DTB by U-Boot.


2) Pass through the DTB from the VideoCore firmware to the kernel. This 
is almost certainly required when booting a downstream RPi Foundation 
kernel.


Historically, U-Boot has only implemented option 1. I think recent 
versions of U-Boot support option 2, although you'd have to make some 
configuration(environment) changes to use that method. That's because 
historically, U-Boot has been targeted at booting upstream kernels.


I haven't investigated whether any of this is related to the problem 
you're seeing.

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


Re: [U-Boot] [PATCH] icorem6: Fix to find MMC devices

2017-08-25 Thread Jagan Teki
On Fri, Aug 25, 2017 at 9:03 PM, Stefano Babic  wrote:
> Hi Jagan,
>
> On 25/08/2017 16:50, Jagan Teki wrote:
>> From: Jagan Teki 
>>
>> U-Boot proper is using DM_MMC so, enable CONFIG_BLK otherwise
>> find_mmc_device failed to detect MMC device.
>>
>> Signed-off-by: Jagan Teki 
>> ---
>>  configs/imx6qdl_icore_mmc_defconfig | 1 -
>>  configs/imx6qdl_icore_rqs_defconfig | 1 -
>>  2 files changed, 2 deletions(-)
>>
>> diff --git a/configs/imx6qdl_icore_mmc_defconfig 
>> b/configs/imx6qdl_icore_mmc_defconfig
>> index ec39d09..9d61c48 100644
>> --- a/configs/imx6qdl_icore_mmc_defconfig
>> +++ b/configs/imx6qdl_icore_mmc_defconfig
>> @@ -36,7 +36,6 @@ CONFIG_CMD_EXT4_WRITE=y
>>  CONFIG_CMD_FAT=y
>>  CONFIG_CMD_FS_GENERIC=y
>>  CONFIG_OF_LIST="imx6q-icore imx6dl-icore"
>> -# CONFIG_BLK is not set
>
> OT: it is quite strange that removing a "commented" line we change the
> behaviour, but that is in this case !

Yeah, this is forcing to use mmc_legacy even with DM_MMC because of
SPL need. _BLK will enabled by default with DM_MMC so this make U-Boot
proper not to use mmc_legacy and go with BLK.

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] dma: import linux/dma-direction.h to consolidate enum dma_data_direction

2017-08-25 Thread Masahiro Yamada
Import include/linux/dma-direction.h from Linux 4.13-rc7 and delete
duplicated definitions of enum dma_data_direction.

Signed-off-by: Masahiro Yamada 
---

 arch/arm/include/asm/dma-mapping.h   |  8 ++--
 arch/nds32/include/asm/dma-mapping.h |  6 +-
 arch/x86/include/asm/dma-mapping.h   |  8 ++--
 drivers/ata/sata_dwc.c   |  1 +
 drivers/ata/sata_dwc.h   |  7 ---
 drivers/mmc/uniphier-sd.c|  2 +-
 include/linux/dma-direction.h| 13 +
 7 files changed, 20 insertions(+), 25 deletions(-)
 create mode 100644 include/linux/dma-direction.h

diff --git a/arch/arm/include/asm/dma-mapping.h 
b/arch/arm/include/asm/dma-mapping.h
index a5821f54e567..287466800e4b 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -8,13 +8,9 @@
 #ifndef __ASM_ARM_DMA_MAPPING_H
 #define __ASM_ARM_DMA_MAPPING_H
 
-#definedma_mapping_error(x, y) 0
+#include 
 
-enum dma_data_direction {
-   DMA_BIDIRECTIONAL   = 0,
-   DMA_TO_DEVICE   = 1,
-   DMA_FROM_DEVICE = 2,
-};
+#definedma_mapping_error(x, y) 0
 
 static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
 {
diff --git a/arch/nds32/include/asm/dma-mapping.h 
b/arch/nds32/include/asm/dma-mapping.h
index 25e5a1b6ec8a..a627306ed852 100644
--- a/arch/nds32/include/asm/dma-mapping.h
+++ b/arch/nds32/include/asm/dma-mapping.h
@@ -7,11 +7,7 @@
 #ifndef __ASM_NDS_DMA_MAPPING_H
 #define __ASM_NDS_DMA_MAPPING_H
 
-enum dma_data_direction {
-   DMA_BIDIRECTIONAL   = 0,
-   DMA_TO_DEVICE   = 1,
-   DMA_FROM_DEVICE = 2,
-};
+#include 
 
 static void *dma_alloc_coherent(size_t len, unsigned long *handle)
 {
diff --git a/arch/x86/include/asm/dma-mapping.h 
b/arch/x86/include/asm/dma-mapping.h
index 7de4c08e36ea..43073ad2524f 100644
--- a/arch/x86/include/asm/dma-mapping.h
+++ b/arch/x86/include/asm/dma-mapping.h
@@ -8,13 +8,9 @@
 #ifndef __ASM_X86_DMA_MAPPING_H
 #define __ASM_X86_DMA_MAPPING_H
 
-#definedma_mapping_error(x, y) 0
+#include 
 
-enum dma_data_direction {
-   DMA_BIDIRECTIONAL   = 0,
-   DMA_TO_DEVICE   = 1,
-   DMA_FROM_DEVICE = 2,
-};
+#definedma_mapping_error(x, y) 0
 
 static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
 {
diff --git a/drivers/ata/sata_dwc.c b/drivers/ata/sata_dwc.c
index a226ca2decb5..2f3b2ddb411f 100644
--- a/drivers/ata/sata_dwc.c
+++ b/drivers/ata/sata_dwc.c
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/drivers/ata/sata_dwc.h b/drivers/ata/sata_dwc.h
index e2d9e0c1fce8..17fb20cf437b 100644
--- a/drivers/ata/sata_dwc.h
+++ b/drivers/ata/sata_dwc.h
@@ -401,13 +401,6 @@ struct ata_device {
 #endif
 };
 
-enum dma_data_direction {
-   DMA_BIDIRECTIONAL = 0,
-   DMA_TO_DEVICE = 1,
-   DMA_FROM_DEVICE = 2,
-   DMA_NONE = 3,
-};
-
 struct ata_link {
struct ata_port *ap;
int pmp;
diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c
index e272b1415324..721b75fddace 100644
--- a/drivers/mmc/uniphier-sd.c
+++ b/drivers/mmc/uniphier-sd.c
@@ -11,10 +11,10 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
-#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/include/linux/dma-direction.h b/include/linux/dma-direction.h
new file mode 100644
index ..95b6a82f5951
--- /dev/null
+++ b/include/linux/dma-direction.h
@@ -0,0 +1,13 @@
+#ifndef _LINUX_DMA_DIRECTION_H
+#define _LINUX_DMA_DIRECTION_H
+/*
+ * These definitions mirror those in pci.h, so they can be used
+ * interchangeably with their PCI_ counterparts.
+ */
+enum dma_data_direction {
+   DMA_BIDIRECTIONAL = 0,
+   DMA_TO_DEVICE = 1,
+   DMA_FROM_DEVICE = 2,
+   DMA_NONE = 3,
+};
+#endif
-- 
2.7.4

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


Re: [U-Boot] [PATCH] icorem6: Fix to find MMC devices

2017-08-25 Thread Stefano Babic
Hi Jagan,

On 25/08/2017 16:50, Jagan Teki wrote:
> From: Jagan Teki 
> 
> U-Boot proper is using DM_MMC so, enable CONFIG_BLK otherwise
> find_mmc_device failed to detect MMC device.
> 
> Signed-off-by: Jagan Teki 
> ---
>  configs/imx6qdl_icore_mmc_defconfig | 1 -
>  configs/imx6qdl_icore_rqs_defconfig | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/configs/imx6qdl_icore_mmc_defconfig 
> b/configs/imx6qdl_icore_mmc_defconfig
> index ec39d09..9d61c48 100644
> --- a/configs/imx6qdl_icore_mmc_defconfig
> +++ b/configs/imx6qdl_icore_mmc_defconfig
> @@ -36,7 +36,6 @@ CONFIG_CMD_EXT4_WRITE=y
>  CONFIG_CMD_FAT=y
>  CONFIG_CMD_FS_GENERIC=y
>  CONFIG_OF_LIST="imx6q-icore imx6dl-icore"
> -# CONFIG_BLK is not set

OT: it is quite strange that removing a "commented" line we change the
behaviour, but that is in this case !

>  CONFIG_SYS_I2C_MXC=y
>  CONFIG_PHYLIB=y
>  CONFIG_PHY_SMSC=y
> diff --git a/configs/imx6qdl_icore_rqs_defconfig 
> b/configs/imx6qdl_icore_rqs_defconfig
> index ba3ac1b..319a88d 100644
> --- a/configs/imx6qdl_icore_rqs_defconfig
> +++ b/configs/imx6qdl_icore_rqs_defconfig
> @@ -34,7 +34,6 @@ CONFIG_CMD_EXT4_WRITE=y
>  CONFIG_CMD_FAT=y
>  CONFIG_CMD_FS_GENERIC=y
>  CONFIG_OF_LIST="imx6q-icore-rqs imx6dl-icore-rqs"
> -# CONFIG_BLK is not set
>  CONFIG_SYS_I2C_MXC=y
>  CONFIG_PHYLIB=y
>  CONFIG_PHY_MICREL=y
> 

Reviewed-by: Stefano Babic 

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] board/ls2080ardb: Update board env based on SoC

2017-08-25 Thread York Sun
On 08/24/2017 09:52 PM, Priyanka Jain wrote:
> 
> 
>> -Original Message-
>> From: York Sun
>> Sent: Thursday, August 24, 2017 8:26 PM
>> To: Priyanka Jain ; u-boot@lists.denx.de
>> Subject: Re: [PATCH] board/ls2080ardb: Update board env based on SoC
>>
>> On 08/24/2017 12:07 AM, Priyanka Jain wrote:
>>> As per current implemenetation, default value of board env is based on
>>> board filename i.e ls2080ardb.
>>>
>>> With distro support changes, this env is used to decide upon kernel
>>> dtb which is different for other SoCs (ls2088a, ls2081a) combination
>>> supported with this board.
>>>
>>> Add support to modify board env based on SoC type
>>
>> Please point me to where environmental variable "board" is used for distro 
>> boot.
>> I only see it for PXE.
> Please refer to file end part in "ENV_SETTINGS" section in file 
> "include/configs/ls2080ardb.h",
> Linux boot commands like "nor_bootcmd" uses command "bootm $loadr_addr#$board"
> Depending upon board value, kernel dtb is chosen.

I see. It is not a variable used by U-Boot itself. I wonder if you can 
use multiple configurations in FIT image to maximize the flexibility to 
load different device tree image.

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


[U-Boot] [PATCH] icorem6: Fix to find MMC devices

2017-08-25 Thread Jagan Teki
From: Jagan Teki 

U-Boot proper is using DM_MMC so, enable CONFIG_BLK otherwise
find_mmc_device failed to detect MMC device.

Signed-off-by: Jagan Teki 
---
 configs/imx6qdl_icore_mmc_defconfig | 1 -
 configs/imx6qdl_icore_rqs_defconfig | 1 -
 2 files changed, 2 deletions(-)

diff --git a/configs/imx6qdl_icore_mmc_defconfig 
b/configs/imx6qdl_icore_mmc_defconfig
index ec39d09..9d61c48 100644
--- a/configs/imx6qdl_icore_mmc_defconfig
+++ b/configs/imx6qdl_icore_mmc_defconfig
@@ -36,7 +36,6 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_LIST="imx6q-icore imx6dl-icore"
-# CONFIG_BLK is not set
 CONFIG_SYS_I2C_MXC=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_SMSC=y
diff --git a/configs/imx6qdl_icore_rqs_defconfig 
b/configs/imx6qdl_icore_rqs_defconfig
index ba3ac1b..319a88d 100644
--- a/configs/imx6qdl_icore_rqs_defconfig
+++ b/configs/imx6qdl_icore_rqs_defconfig
@@ -34,7 +34,6 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_LIST="imx6q-icore-rqs imx6dl-icore-rqs"
-# CONFIG_BLK is not set
 CONFIG_SYS_I2C_MXC=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
-- 
2.7.4

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


[U-Boot] [PATCH] ram: kconfig: s/SPL/TPL/ in TPL_RAM help text

2017-08-25 Thread Jagan Teki
From: Jagan Teki 

Signed-off-by: Jagan Teki 
---
 drivers/ram/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ram/Kconfig b/drivers/ram/Kconfig
index 836be25..47969f3 100644
--- a/drivers/ram/Kconfig
+++ b/drivers/ram/Kconfig
@@ -18,7 +18,7 @@ config SPL_RAM
  setting up RAM (e.g. SDRAM / DDR) within SPL.
 
 config TPL_RAM
-   bool "Enable RAM support in SPL"
+   bool "Enable RAM support in TPL"
depends on RAM && TPL_DM
help
  The RAM subsystem adds a small amount of overhead to the image.
-- 
2.7.4

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


[U-Boot] [PATCH] video: ipuv3_fb: skip IPU shutdown if IPU was not enabled before

2017-08-25 Thread Anatolij Gustschin
Boards can skip display interface init using board_video_skip().
If display interface was not initialized (e.g. no ipuv3 framebuffer
registered or IPU clock disabled), booting Linux stops due to the
crash in IPU shutdown function, when accessing IPU registers.
Check IPU clock and skip shutdown if clock is not enabled.

Signed-off-by: Anatolij Gustschin 
---
 drivers/video/mxc_ipuv3_fb.c | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c
index 0d0a0a9..8836229 100644
--- a/drivers/video/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc_ipuv3_fb.c
@@ -13,6 +13,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -568,8 +569,18 @@ err0:
 
 void ipuv3_fb_shutdown(void)
 {
-   int i;
+   struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
struct ipu_stat *stat = (struct ipu_stat *)IPU_STAT;
+   u32 reg;
+   int i;
+
+   /*
+* Check if IPU clock was enabled before. Won't access
+* IPU registers if clock is not enabled.
+*/
+   reg = readl(_ccm->CCGR3);
+   if ((reg & MXC_CCM_CCGR3_IPU1_IPU_MASK) == 0)
+   return;
 
for (i = 0; i < ARRAY_SIZE(mxcfb_info); i++) {
struct fb_info *fbi = mxcfb_info[i];
-- 
2.7.4

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


Re: [U-Boot] [PATCH] mtd: nand: zynq: Add a config option to use timing values set by FSBL

2017-08-25 Thread Michal Simek
On 25.8.2017 09:15, Wilson Lee wrote:
> From: Jeff Westfahl 
> 
> In legacy method, FSBL was used to configure the HW setting such as
> NAND timing. Hence, adding a config option in Zynq NAND driver for the
> compability of device that using FSBL instead of U-boot SPL.
> 
> This commit is to add config option CONFIG_NAND_ZYNQ_USE_FSBL_TIMINGS
> that allow NAND driver use timing values set by the FSBL, instead of
> the hard-coded values in the Zynq NAND driver.
> 
> Signed-off-by: Jeff Westfahl 
> Signed-off-by: Wilson Lee 
> Cc: Joe Hershberger 
> Cc: Keng Soon Cheah 
> Cc: Chen Yee Chew 
> Cc: Siva Durga Prasad Paladugu 
> Cc: Michal Simek 
> Cc: Scott Wood 
> ---
> 
>  drivers/mtd/nand/Kconfig | 6 ++
>  drivers/mtd/nand/zynq_nand.c | 5 +
>  2 files changed, 11 insertions(+)
> 
> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> index 71d678f..44d6aa0 100644
> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -121,6 +121,12 @@ config NAND_ZYNQ
> This enables Nand driver support for Nand flash controller
> found on Zynq SoC.
>  
> +config NAND_ZYNQ_USE_FSBL_TIMINGS

it is not only fsbl which can set it up. That's why please rename this
config option.

> + bool "Enable use of FSBL timing for NAND"
> + depends on NAND_ZYNQ
> + help
> +   This enabled the use of FSBL timing for NAND flash controller.
> +
>  comment "Generic NAND options"
>  
>  # Enhance depends when converting drivers to Kconfig which use this config
> diff --git a/drivers/mtd/nand/zynq_nand.c b/drivers/mtd/nand/zynq_nand.c
> index 484f1bb..f292531 100644
> --- a/drivers/mtd/nand/zynq_nand.c
> +++ b/drivers/mtd/nand/zynq_nand.c
> @@ -35,6 +35,8 @@
>   (0x1 << 4)   |  /* Clear interrupt */ \
>   (0x1 << 6)) /* Disable ECC interrupt */
>  
> +#ifndef CONFIG_NAND_ZYNQ_USE_FSBL_TIMINGS
> +
>  /* Assuming 50MHz clock (20ns cycle time) and 3V operation */
>  #define ZYNQ_NAND_SET_CYCLES ((0x2 << 20) |  /* t_rr from nand_cycles */ \
>   (0x2 << 17)  |  /* t_ar from nand_cycles */ \
> @@ -43,6 +45,7 @@
>   (0x2 << 8)   |  /* t_rea from nand_cycles */ \
>   (0x5 << 4)   |  /* t_wc from nand_cycles */ \
>   (0x5 << 0)) /* t_rc from nand_cycles */
> +#endif
>  
>  
>  #define ZYNQ_NAND_DIRECT_CMD ((0x4 << 23) |  /* Chip 0 from interface 1 */ \
> @@ -257,8 +260,10 @@ static int zynq_nand_init_nand_flash(int option)
>  
>   /* disable interrupts */
>   writel(ZYNQ_NAND_CLR_CONFIG, _nand_smc_base->cfr);
> +#ifndef CONFIG_NAND_ZYNQ_USE_FSBL_TIMINGS
>   /* Initialize the NAND interface by setting cycles and operation mode */
>   writel(ZYNQ_NAND_SET_CYCLES, _nand_smc_base->scr);
> +#endif
>   if (option & NAND_BUSWIDTH_16)
>   writel(ZYNQ_NAND_SET_OPMODE_16BIT, _nand_smc_base->sor);
>   else
> 

Siva: is this even needed to setup these cycles or simple we are taking
it from psu_init?

Thanks,
Michal

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


Re: [U-Boot] [PATCH v3] bootvx_fdt: fix missing 'fdt_fixup_ethernet(...)' on vxWorks boot

2017-08-25 Thread Bin Meng
On Fri, Aug 25, 2017 at 8:27 PM, Hannes Schmelzer  wrote:
> Before commit 26d6119 (fdt: Move fdt_fixup_ethernet to a common place)
> the fdt_fixup_ethernet(...) was called during do_bootvx_fdt(...).
>
> Afterwards the only (common) place for this fixup is during
> image_setup_libfdt(...) and this is only called, at least on ARM
> platform, from image_setup_linux(...).
>
> All this ends up in the fact, that the fdt_fixup_ethernet(...) is only
> called on booting a linux image and not on booting a vxWorks image.
>
> We fix this with adding the fdt_fixup_ethernet(...) call again to
> do_bootvx_fdt(...)
>
> Signed-off-by: Hannes Schmelzer 
>
> ---
>
> Changes in v3:
> - cosmetic changes (coding style)
>
> Changes in v2:
> - restore original behaviour from
>   b3b522f247d3f19c4f2309ab0e6a02b3dd82de45 with moving the
>   fdt_fixup_ethernet(...) call after boot_relocate_fdt(...)
>
>  common/bootm_os.c | 3 +++
>  1 file changed, 3 insertions(+)
>

Reviewed-by: Bin Meng 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3] bootvx_fdt: fix missing 'fdt_fixup_ethernet(...)' on vxWorks boot

2017-08-25 Thread Hannes Schmelzer
Before commit 26d6119 (fdt: Move fdt_fixup_ethernet to a common place)
the fdt_fixup_ethernet(...) was called during do_bootvx_fdt(...).

Afterwards the only (common) place for this fixup is during
image_setup_libfdt(...) and this is only called, at least on ARM
platform, from image_setup_linux(...).

All this ends up in the fact, that the fdt_fixup_ethernet(...) is only
called on booting a linux image and not on booting a vxWorks image.

We fix this with adding the fdt_fixup_ethernet(...) call again to
do_bootvx_fdt(...)

Signed-off-by: Hannes Schmelzer 

---

Changes in v3:
- cosmetic changes (coding style)

Changes in v2:
- restore original behaviour from
  b3b522f247d3f19c4f2309ab0e6a02b3dd82de45 with moving the
  fdt_fixup_ethernet(...) call after boot_relocate_fdt(...)

 common/bootm_os.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/bootm_os.c b/common/bootm_os.c
index 1feea8a..31b1878 100644
--- a/common/bootm_os.c
+++ b/common/bootm_os.c
@@ -276,6 +276,9 @@ void do_bootvx_fdt(bootm_headers_t *images)
if (ret)
return;
 
+   /* Update ethernet nodes */
+   fdt_fixup_ethernet(*of_flat_tree);
+
ret = fdt_add_subnode(*of_flat_tree, 0, "chosen");
if ((ret >= 0 || ret == -FDT_ERR_EXISTS)) {
bootline = env_get("bootargs");
-- 
2.7.4

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


Re: [U-Boot] U-boot 2017.07 not working on Raspberry Pi

2017-08-25 Thread Jonathan Gray
On Fri, Aug 25, 2017 at 10:46:55AM +0100, Paul Barker wrote:
> On Fri, Aug 25, 2017 at 2:46 AM, Simon Glass  wrote:
> > Hi,
> >
> > On 20 August 2017 at 20:59, Simon Glass  wrote:
> >> Hi Paul,
> >>
> >> On 3 August 2017 at 11:42, Tom Rini  wrote:
> >>> On Thu, Aug 03, 2017 at 09:42:13AM -0600, Stephen Warren wrote:
>  On 08/03/2017 07:45 AM, Simon Glass wrote:
>  ...
>  >I'm not sure if we have a Raspberry Pi in a test farm anywhere. I
>  >should be able to look next week if no one can figure these out
>  >beforehand.
> 
>  I thought that Tom had some Pis in his test farm?
> >>>
> >>> I have an RPi 3, but we don't have Linux boot tests atm.  I'm talking
> >>> with Kevin Hilman about how I might setup kernelci to test a few things
> >>> in my lab, which might catch this kind of problem sooner rather than
> >>> later.
> >>
> >> Just a note that I can repeat the CONFIG_OF_EMBED problem. I am not
> >> sure what is going on or why this would prevent the kernel booting.
> >> But I believe rpi has a device tree pass-through from the pre-U-Boot
> >> boot loader, and I am booting with that, so perhaps it relies on
> >> CONFIG_OF_EMBED in some way?
> >
> > I can see some code in board_fdt_blob_setup() but it does not seem to
> > be enabled. For me I am able to boot Linux without CONFIG_OF_EMBED.
> >
> >>
> >> I can also repeat the USB keyboard problem. It doesn't detect the
> >> keyboard at all. For me this can be fixed by enabling
> >> CONFIG_DM_KEYBOARD, so we should probably do that for all rpi boards.
> >
> > I have sent a patch for this.
> 
> This patch looks good. I've now got working keyboard and network in
> u-boot along with a successful boot of Linux for the 2 devices I've
> tested (Original rpi and rpi3 32-bit) from the following:
> 
> * U-boot 2017.07 release
> * Revert "dm: arm: rpi: Drop CONFIG_OF_EMBED" (25877d4e)
> * Apply backported version of your patch
> 
> The rpi firmware does provide a device tree blob at boot and my only
> guess is that this is currently being overwritten or ignored. That's
> masked when CONFIG_OF_EMBED is enabled as we use an embedded device
> tree instead of the one provided by the rpi firmware.
> 
> For u-boot v2017.09 release is it possible to re-enable
> CONFIG_OF_EMBED until we can find and fix the underlying issue? Or is
> there some reason to avoid CONFIG_OF_EMBED?

There is also CONFIG_OF_BOARD that is supposed to do something similiar
but adding that to rpi_3_defconfig resulted in nothing on serial and a
coloured splash screen from the gpu firmware on hdmi.

The only way to use the device trees that come with the firmware seems
to be adding CONFIG_OF_EMBED.  Without it the dtb header is missing from
where fdt_addr_r points to (0x100), libfdt rightfully complains and
anything expecting a device tree breaks.

U-Boot> boot
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found EFI removable media binary efi/boot/bootaa64.efi
reading efi/boot/bootaa64.efi
78271 bytes read in 27 ms (2.8 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
## Starting EFI application at 0100 ...
Scanning disk sd...@7e30.blk...
Scanning disk usb_mass_storage.lun0...
Found 2 disks
>> OpenBSD/arm64 BOOTAA64 0.8
boot> boot -a
cannot open sd0a:/etc/random.seed: No such file or directory
booting sd0a:/bsd: 3804004+574452+508392+674936 
[283297+96+448008+238164]=0x80df08
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2] bootvx_fdt: fix missing 'fdt_fixup_ethernet(...)' on vxWorks boot

2017-08-25 Thread Bin Meng
On Fri, Aug 25, 2017 at 5:32 PM, Hannes Schmelzer  wrote:
> Before commit 26d6119 (fdt: Move fdt_fixup_ethernet to a common place)
> the fdt_fixup_ethernet(...) was called during do_bootvx_fdt(...).
>
> Afterwards the only (common) place for this fixup is during
> image_setup_libfdt(...) and this is only called, at least on ARM
> platform, from image_setup_linux(...).
>
> All this ends up in the fact, that the fdt_fixup_ethernet(...) is only
> called on booting a linux image and not on booting a vxWorks image.
>
> We fix this with adding the fdt_fixup_ethernet(...) call again to
> do_bootvx_fdt(...)
>
> Signed-off-by: Hannes Schmelzer 
>
> ---
>
> Changes in v2:
> - restore original behaviour from
>   b3b522f247d3f19c4f2309ab0e6a02b3dd82de45 with moving the
>   fdt_fixup_ethernet(...) call after boot_relocate_fdt(...)
>
>  common/bootm_os.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/common/bootm_os.c b/common/bootm_os.c
> index 1feea8a..934019f 100644
> --- a/common/bootm_os.c
> +++ b/common/bootm_os.c
> @@ -275,6 +275,8 @@ void do_bootvx_fdt(bootm_headers_t *images)
> ret = boot_relocate_fdt(lmb, of_flat_tree, _size);
> if (ret)
> return;

nits: please add one blank line here.

> +   /* Update ethernet nodes */
> +   fdt_fixup_ethernet(*of_flat_tree);
>
> ret = fdt_add_subnode(*of_flat_tree, 0, "chosen");
> if ((ret >= 0 || ret == -FDT_ERR_EXISTS)) {
> --

Reviewed-by: Bin Meng 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] part: efi: Fix offset

2017-08-25 Thread Dr. Philipp Tomsich

> On 23 Aug 2017, at 16:01, Maxime Ripard  
> wrote:
> 
> Both the config option and the DT options specify the offset to set the GPT
> at in bytes, yet the code treats those values as block numbers.
> 
> Fix that.
> 
> Signed-off-by: Maxime Ripard 

Reviewed-by: Philipp Tomsich 

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


Re: [U-Boot] [PATCH v1 1/2] imx: fix USB boot mode detection for i.MX 6UL and 6ULL

2017-08-25 Thread Stefano Babic
On 16/08/2017 02:49, Stefan Agner wrote:
> From: Stefan Agner 
> 
> Add the reserved boot mode used in the bmode command for i.MX 6UL
> and 6ULL as introduced in commit 3fd9579085fa ("imx: mx6ull: fix USB
> bmode for i.MX 6UL and 6ULL").
> 
> Also replace BMODE_UART with BMODE_RESERVED, which is more appropriate.
> Commit 96aac843b68d ("imx: Use IMX6_BMODE_* macros instead of numericals")
> added macros for boot modes, in the process the reserved boot mode got
> named BMODE_UART. We use the reserved boot mode in the bmode command to
> let the boot ROM enter serial downloader recovery mode. But this is only
> a side effect, the actual boot mode is reserved...
> 
> Signed-off-by: Stefan Agner 
> ---
> Afaik there is no board yet using SPL on 6UL/ULL...

Not yet...

> 
>  arch/arm/include/asm/mach-imx/sys_proto.h | 7 ++-
>  arch/arm/mach-imx/spl.c   | 2 +-
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h 
> b/arch/arm/include/asm/mach-imx/sys_proto.h
> index 046df6291a..d94c095118 100644
> --- a/arch/arm/include/asm/mach-imx/sys_proto.h
> +++ b/arch/arm/include/asm/mach-imx/sys_proto.h
> @@ -69,8 +69,13 @@ enum imx6_bmode_emi {
>  
>  enum imx6_bmode {
>   IMX6_BMODE_EMI,
> - IMX6_BMODE_UART,
> +#if defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL)
> + IMX6_BMODE_QSPI,
> + IMX6_BMODE_RESERVED,
> +#else
> + IMX6_BMODE_RESERVED,
>   IMX6_BMODE_SATA,
> +#endif
>   IMX6_BMODE_SERIAL_ROM,
>   IMX6_BMODE_SD,
>   IMX6_BMODE_ESD,
> diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
> index 75698c48ea..836b334fa9 100644
> --- a/arch/arm/mach-imx/spl.c
> +++ b/arch/arm/mach-imx/spl.c
> @@ -42,7 +42,7 @@ u32 spl_boot_device(void)
>   break;
>   }
>   /* Reserved: Used to force Serial Downloader */
> - case IMX6_BMODE_UART:
> + case IMX6_BMODE_RESERVED:
>   return BOOT_DEVICE_UART;
>   /* SATA: See 8.5.4, Table 8-20 */
>   case IMX6_BMODE_SATA:
> 

Applied to u-boot-imx, -master, thanks !

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v1 2/2] imx: use BOOT_DEVICE_BOARD instead of UART

2017-08-25 Thread Stefano Babic
On 16/08/2017 02:49, Stefan Agner wrote:
> From: Stefan Agner 
> 
> i.MX 6 serial downloader is not necessarily booting via UART but can
> also boot from USB. In fact only some i.MX chips have serial
> downloader support via UART (e.g. 6UL/ULL and Vybrid) but all of
> them have serial downloader support via USB. Use the more appropriate
> BOOT_DEVICE_BOARD define which is used for ROM provided recovery
> mechanisms in general.
> 
> Signed-off-by: Stefan Agner 
> ---
> 
>  arch/arm/mach-imx/spl.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
> index 836b334fa9..bcd1033fdb 100644
> --- a/arch/arm/mach-imx/spl.c
> +++ b/arch/arm/mach-imx/spl.c
> @@ -27,7 +27,7 @@ u32 spl_boot_device(void)
>* BOOT_MODE - see IMX6DQRM Table 8-1
>*/
>   if (((bmode >> 24) & 0x03) == 0x01) /* Serial Downloader */
> - return BOOT_DEVICE_UART;
> + return BOOT_DEVICE_BOARD;
>  
>   /* BOOT_CFG1[7:4] - see IMX6DQRM Table 8-8 */
>   switch ((reg & IMX6_BMODE_MASK) >> IMX6_BMODE_SHIFT) {
> @@ -43,7 +43,7 @@ u32 spl_boot_device(void)
>   }
>   /* Reserved: Used to force Serial Downloader */
>   case IMX6_BMODE_RESERVED:
> - return BOOT_DEVICE_UART;
> + return BOOT_DEVICE_BOARD;
>   /* SATA: See 8.5.4, Table 8-20 */
>   case IMX6_BMODE_SATA:
>   return BOOT_DEVICE_SATA;
> 

Applied to u-boot-imx, -master, thanks !

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 0/8] Clean up CONFIG_SYS_{CBSIZE, PBSIZE, MAXARGS, BARGSIZE} definitions

2017-08-25 Thread Dr. Philipp Tomsich

> On 24 Aug 2017, at 21:13, Thomas Petazzoni 
>  wrote:
> 
> Hello,
> 
> On Thu, 24 Aug 2017 20:53:35 +0200, Wolfgang Denk wrote:
> 
>>> I believe this patch series is a step in that direction. With this
>>> patch series applied, we can now clearly identify which boards have
>>> custom values for CONFIG_SYS_{CBSIZE, PBSIZE, MAXARGS, BARGSIZE}, and
>>> therefore more easily move these from the .h files to defconfig files.  
>> 
>> So you think moving this to Kconfig would be a second step?  Ok,
>> fine with me.
> 
> Yes, this would be a second step. The current patch series eliminates
> the situations where the .h files use the default values, or values
> that are close enough to the default values for the default value to
> remain reasonable.

Moving these to Kconfig would achieve the same, as boards that do
not override the defaults (or override the defaults with the same value)
would not have an entry added to their defconfig.

Furthermore, if there’s an override for an entire architecture (as I has
seen with the SPL_LDSCRIPT conversion), once can always have a
default value added to that architecture’s Kconfig.

In other words: I don’t see any value in doing this as a two-step process
as this will just trigger two rounds of reviews and integration testing.

Regards,
Philipp.

> Of course, the patches should be reviewed, and the decision taken by
> them potentially discussed.
> 
>>> The choice for such values is totally independent from the HW, but
>>> rather tied to the specific use of a given board. For the same board,  
>> 
>> No, it is not. Buffer sizes eat on RAM, and there are environments
>> (like today in SPL) where this may be a precious resource.
> 
> Right, true.
> 
>>> most people will find the default value to be OK, some people will need
>>> a larger number of command arguments or a bigger Linux kernel command
>>> line.
>>> 
>>> Let me know what your preference is.  
>> 
>> I think it makes a lot of sense to keep such configuration parameters
>> changable, but we hould not stop half way but rather move this to
>> Kconfig so it's easy to use a default setting, and only boards with
>> special needs have to adjust this in their defconfig files.
> 
> OK. So let's review this first patch series. Once we agree on it and it
> gets merged, I can work on the second step of moving those
> configuration options to Kconfig.
> 
> Thanks for the very useful feedback!
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot

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


[U-Boot] [PATCH] rockchip: timer: fix U_BOOT_DRIVER name

2017-08-25 Thread Philipp Tomsich
When I originally added this driver, I did some careless (and in
retrospect: mindless) copy & paste for the U_BOOT_DRIVER structure
skeletion... unfortunately, the 'arc_timer' string was committed
and slipped through all reviews.

This fixes the U_BOOT_DRIVER name to read 'rockchip_rk3368_timer'
(as originally intended).

Signed-off-by: Philipp Tomsich 
Reported-by: Artturi Alm 
---

 drivers/timer/rockchip_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/timer/rockchip_timer.c b/drivers/timer/rockchip_timer.c
index 0848033..eb44965 100644
--- a/drivers/timer/rockchip_timer.c
+++ b/drivers/timer/rockchip_timer.c
@@ -92,7 +92,7 @@ static const struct udevice_id rockchip_timer_ids[] = {
{}
 };
 
-U_BOOT_DRIVER(arc_timer) = {
+U_BOOT_DRIVER(rockchip_rk3368_timer) = {
.name   = "rockchip_rk3368_timer",
.id = UCLASS_TIMER,
.of_match = rockchip_timer_ids,
-- 
2.1.4

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


Re: [U-Boot] rk3xxx.dtsi /usb_host missing specific compatible

2017-08-25 Thread Philipp Tomsich

+ Heiko

On Wed, 23 Aug 2017, Artturi Alm wrote:


Hi,


no idea if this is the right place to mail about this, but i got
suggested this node is out-of-norm, and the diff below fixes that
for me on rk3188.

-Artturi


When submitting changes, please send a patch w/ an appropriate commit 
message (e.g. using patman).  If you tag it as "rockchip:", it will 
eventually get assigned to my queue.




diff --git a/arch/arm/dts/rk3xxx.dtsi b/arch/arm/dts/rk3xxx.dtsi
index 6d9e36d235..21f2afc104 100644
--- a/arch/arm/dts/rk3xxx.dtsi
+++ b/arch/arm/dts/rk3xxx.dtsi
@@ -157,7 +157,7 @@
};

usb_host: usb@101c {
-   compatible = "snps,dwc2";
+   compatible = "rockchip,rk3066-usb", "snps,dwc2";


This is the same on the Linux upstream, which is the leading repository
for this DTS file.  Also, the "rockchip,rk3066-usb" is used by none of the 
drivers (whereas "snsp,dwc2" is matche by drivers/usb/host/dwc2.c.


From my point of view, there's no point in changing this (unless Heiko 
would like to see this changed both here and in Linux).



reg = <0x101c 0x4>;
interrupts = ;
clocks = < HCLK_OTG1>;


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


[U-Boot] Resync NAND framework with Linux?

2017-08-25 Thread Masahiro Yamada
Hi all.

It is more than one year since the last re-sync.
https://lists.denx.de/pipermail/u-boot/2016-May/256464.html


Any plan for re-sync?



My main motivation is to update denali.c

Recently, I reworked the denali driver in Linux
(thanks to Boris for the review!)

The U-Boot variant driver does not work
on some of my boards, so I need to fix it as well.

I would be nice to import my efforts from Linux,
but some hooks / helpers are missing in the framework.



Thanks!


-- 
Best Regards
Masahiro Yamada
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 4/4] rockchip: enable rockusb for all rockchip SoCs

2017-08-25 Thread Łukasz Majewski

Hi Philipp, Andy, Tom



On 25 Aug 2017, at 03:51, Andy Yan  wrote:

Hi Lukasz:

2017-08-22 18:05 GMT+08:00 Łukasz Majewski >:
Hi Kever,


Philipp,

I have no idea about the status of rockusb, it has been a long time
on the list.

Maybe Eddie or Lukasz have an answer?

I've asked Eddie to fix issues with breaking other boards when enabling USB 
gadget infrastructure on RK.

No reply since then.



Eddie has fix all the issues he can reproduced on local。 The only problem now 
is that  the rk3036 based boards(evb-rk3036/kylin-rk3036) show compile errors 
on CI[0],


The Travis log shows linker errors for some of the other boards (i.e. not 
evb-rk3036/kylin-rk3036), due to unresolved symbols.


Yes, Indeed.

I've build those boards locally with gcc 6.3 and it was successful.


Regarding travis CI:

With Eddie's patches it shows error:
https://travis-ci.org/lmajewski/u-boot-dfu/builds/268270904

However, without Eddie's patches travis-CI doesn't show any errors:
https://travis-ci.org/lmajewski/u-boot-dfu/builds/268303030


Let's ask Tom (who has far more experience with travis-CI), if he saw 
something like that before.





but when we do the same compile on our local computer, the all evb-rk3036 and 
kylin-rk3036 compiled successfully. And we didn't find anything in Eddie's 
patch that will trigger such errors. As you mentationed in the mail[1], you 
have also build rk3036 successfully on your local. So maybe there is something 
different between the CI and the local build. Could you please give as some 
directions on this?

[0] https://travis-ci.org/eddiecailinux/u-boot/jobs/23599#L759 
[1] 
http://patchwork.ozlabs.org/patch/766901/ 



I have to use those patches on my local branch, so that we don't have to
enter

bootrom mode for firmware update.

Thanks,
- Kever
On 08/22/2017 04:44 PM, Dr. Philipp Tomsich wrote:
Kever,

I was about to apply the rockusb changes onto next yesterday, when I
realised
that rockusb hadn’t been merged on the USB side…

Do you know the status on the rockusb patches?
I’d like to avoid merging this on our end, before the infrastructure
has been merged.

Regards,
Philipp.

On 22 Aug 2017, at 09:35, Kever Yang > wrote:

Rockusb will be used by all the rockchip SoCs, enable it by
default in Kconfig, and it can be work if USB gadget is available.

Signed-off-by: Kever Yang >
Acked-by: Philipp Tomsich >
---

Changes in v2: None

arch/arm/Kconfig | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index da9324b..f566d50 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1084,6 +1084,8 @@ config ARCH_ROCKCHIP
select DM_PWM
select DM_REGULATOR
imply FAT_WRITE
+imply USB_FUNCTION_ROCKUSB
+imply CMD_ROCKUSB

config TARGET_THUNDERX_88XX
bool "Support ThunderX 88xx"
--
1.9.1







--
Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10  Fax: (+49)-8142-66989-80 
 Email: w...@denx.de 

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





--
Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] pfla02: Fix RAM detection and support 1 bank SOM

2017-08-25 Thread Stefano Babic
In case of 2 banks, the address space of the first CS must be defined
and not let to the higher value.

Add support for SOM with a single bank of RAM. It was tested with i.MX6Q
modules in the following configurations:

- 2 Banks, 4 GB
- 2 Banks, 1 GB
- 1 Bank,  1 GB

Signed-off-by: Stefano Babic 
---
 board/phytec/pfla02/Kconfig  |  6 +++
 board/phytec/pfla02/pfla02.c | 87 +++-
 2 files changed, 60 insertions(+), 33 deletions(-)

diff --git a/board/phytec/pfla02/Kconfig b/board/phytec/pfla02/Kconfig
index 142a122..f4da68b 100644
--- a/board/phytec/pfla02/Kconfig
+++ b/board/phytec/pfla02/Kconfig
@@ -9,4 +9,10 @@ config SYS_VENDOR
 config SYS_CONFIG_NAME
default "pfla02"
 
+config SPL_DRAM_1_BANK
+   bool "DRAM on just one bank"
+   help
+ activate, if the module has just one bank
+ of RAM
+
 endif
diff --git a/board/phytec/pfla02/pfla02.c b/board/phytec/pfla02/pfla02.c
index 8d2ce63..10b63e9 100644
--- a/board/phytec/pfla02/pfla02.c
+++ b/board/phytec/pfla02/pfla02.c
@@ -485,9 +485,9 @@ static const struct mx6_mmdc_calibration mx6_mmcd_calib = {
 
 /* Index in RAM Chip array */
 enum {
-   RAM_1GB,
-   RAM_2GB,
-   RAM_4GB
+   RAM_MT64K,
+   RAM_MT128K,
+   RAM_MT256K
 };
 
 static struct mx6_ddr3_cfg mt41k_xx[] = {
@@ -561,31 +561,11 @@ static void gpr_init(void)
writel(0x007F007F, >gpr[7]);
 }
 
-static void spl_dram_init(struct mx6_ddr3_cfg *mem_ddr)
+static void spl_dram_init(struct mx6_ddr_sysinfo *sysinfo,
+   struct mx6_ddr3_cfg *mem_ddr)
 {
-   struct mx6_ddr_sysinfo sysinfo = {
-   /* width of data bus:0=16,1=32,2=64 */
-   .dsize = 2,
-   /* config for full 4GB range so that get_mem_size() works */
-   .cs_density = 32, /* 32Gb per CS */
-   /* single chip select */
-   .ncs = 2,
-   .cs1_mirror = 0,
-   .rtt_wr = 1 /*DDR3_RTT_60_OHM*/,/* RTT_Wr = RZQ/4 */
-   .rtt_nom = 1 /*DDR3_RTT_60_OHM*/,   /* RTT_Nom = RZQ/4 */
-   .walat = 1, /* Write additional latency */
-   .ralat = 5, /* Read additional latency */
-   .mif3_mode = 3, /* Command prediction working mode */
-   .bi_on = 1, /* Bank interleaving enabled */
-   .sde_to_rst = 0x10, /* 14 cycles, 200us (JEDEC default) */
-   .rst_to_cke = 0x23, /* 33 cycles, 500us (JEDEC default) */
-   .ddr_type = DDR_TYPE_DDR3,
-   .refsel = 1,/* Refresh cycles at 32KHz */
-   .refr = 7,  /* 8 refresh commands per refresh cycle */
-   };
-
mx6dq_dram_iocfg(64, _ddr_ioregs, _grp_ioregs);
-   mx6_dram_cfg(, _mmcd_calib, mem_ddr);
+   mx6_dram_cfg(sysinfo, _mmcd_calib, mem_ddr);
 }
 
 int board_mmc_init(bd_t *bis)
@@ -627,10 +607,12 @@ void board_boot_order(u32 *spl_boot_list)
  * Function checks for mirrors in the first CS
  */
 #define RAM_TEST_PATTERN   0xaaaa
-static unsigned int pfla02_detect_ramsize(void)
+#define MIN_BANK_SIZE  (512 * 1024 * 1024)
+
+static unsigned int pfla02_detect_chiptype(void)
 {
u32 *p, *p1;
-   unsigned int offset = 512 * 1024 * 1024;
+   unsigned int offset = MIN_BANK_SIZE;
int i;
 
for (i = 0; i < 2; i++) {
@@ -649,12 +631,38 @@ static unsigned int pfla02_detect_ramsize(void)
if (*p == *p1)
return i;
}
-   return RAM_4GB;
+   return RAM_MT256K;
 }
 
 void board_init_f(ulong dummy)
 {
unsigned int ramchip;
+
+   struct mx6_ddr_sysinfo sysinfo = {
+   /* width of data bus:0=16,1=32,2=64 */
+   .dsize = 2,
+   /* config for full 4GB range so that get_mem_size() works */
+   .cs_density = 32, /* 512 MB */
+   /* single chip select */
+#if IS_ENABLED(CONFIG_SPL_DRAM_1_BANK)
+   .ncs = 1,
+#else
+   .ncs = 2,
+#endif
+   .cs1_mirror = 1,
+   .rtt_wr = 1 /*DDR3_RTT_60_OHM*/,/* RTT_Wr = RZQ/4 */
+   .rtt_nom = 1 /*DDR3_RTT_60_OHM*/,   /* RTT_Nom = RZQ/4 */
+   .walat = 1, /* Write additional latency */
+   .ralat = 5, /* Read additional latency */
+   .mif3_mode = 3, /* Command prediction working mode */
+   .bi_on = 1, /* Bank interleaving enabled */
+   .sde_to_rst = 0x10, /* 14 cycles, 200us (JEDEC default) */
+   .rst_to_cke = 0x23, /* 33 cycles, 500us (JEDEC default) */
+   .ddr_type = DDR_TYPE_DDR3,
+   .refsel = 1,/* Refresh cycles at 32KHz */
+   .refr = 7,  /* 8 refresh commands per refresh cycle */
+   };
+
 #ifdef CONFIG_CMD_NAND
/* Enable NAND */
setup_gpmi_nand();
@@ -682,10 +690,23 @@ void 

[U-Boot] [PATCH] mtd: nand: zynq: Add a config option to use timing values set by FSBL

2017-08-25 Thread Wilson Lee
From: Jeff Westfahl 

In legacy method, FSBL was used to configure the HW setting such as
NAND timing. Hence, adding a config option in Zynq NAND driver for the
compability of device that using FSBL instead of U-boot SPL.

This commit is to add config option CONFIG_NAND_ZYNQ_USE_FSBL_TIMINGS
that allow NAND driver use timing values set by the FSBL, instead of
the hard-coded values in the Zynq NAND driver.

Signed-off-by: Jeff Westfahl 
Signed-off-by: Wilson Lee 
Cc: Joe Hershberger 
Cc: Keng Soon Cheah 
Cc: Chen Yee Chew 
Cc: Siva Durga Prasad Paladugu 
Cc: Michal Simek 
Cc: Scott Wood 
---

 drivers/mtd/nand/Kconfig | 6 ++
 drivers/mtd/nand/zynq_nand.c | 5 +
 2 files changed, 11 insertions(+)

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 71d678f..44d6aa0 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -121,6 +121,12 @@ config NAND_ZYNQ
  This enables Nand driver support for Nand flash controller
  found on Zynq SoC.
 
+config NAND_ZYNQ_USE_FSBL_TIMINGS
+   bool "Enable use of FSBL timing for NAND"
+   depends on NAND_ZYNQ
+   help
+ This enabled the use of FSBL timing for NAND flash controller.
+
 comment "Generic NAND options"
 
 # Enhance depends when converting drivers to Kconfig which use this config
diff --git a/drivers/mtd/nand/zynq_nand.c b/drivers/mtd/nand/zynq_nand.c
index 484f1bb..f292531 100644
--- a/drivers/mtd/nand/zynq_nand.c
+++ b/drivers/mtd/nand/zynq_nand.c
@@ -35,6 +35,8 @@
(0x1 << 4)   |  /* Clear interrupt */ \
(0x1 << 6)) /* Disable ECC interrupt */
 
+#ifndef CONFIG_NAND_ZYNQ_USE_FSBL_TIMINGS
+
 /* Assuming 50MHz clock (20ns cycle time) and 3V operation */
 #define ZYNQ_NAND_SET_CYCLES   ((0x2 << 20) |  /* t_rr from nand_cycles */ \
(0x2 << 17)  |  /* t_ar from nand_cycles */ \
@@ -43,6 +45,7 @@
(0x2 << 8)   |  /* t_rea from nand_cycles */ \
(0x5 << 4)   |  /* t_wc from nand_cycles */ \
(0x5 << 0)) /* t_rc from nand_cycles */
+#endif
 
 
 #define ZYNQ_NAND_DIRECT_CMD   ((0x4 << 23) |  /* Chip 0 from interface 1 */ \
@@ -257,8 +260,10 @@ static int zynq_nand_init_nand_flash(int option)
 
/* disable interrupts */
writel(ZYNQ_NAND_CLR_CONFIG, _nand_smc_base->cfr);
+#ifndef CONFIG_NAND_ZYNQ_USE_FSBL_TIMINGS
/* Initialize the NAND interface by setting cycles and operation mode */
writel(ZYNQ_NAND_SET_CYCLES, _nand_smc_base->scr);
+#endif
if (option & NAND_BUSWIDTH_16)
writel(ZYNQ_NAND_SET_OPMODE_16BIT, _nand_smc_base->sor);
else
-- 
2.7.4

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


[U-Boot] [PATCH] mtd: nand: zynq: Add support for the NAND lock/unlock operation

2017-08-25 Thread Wilson Lee
From: Joe Hershberger 

Zynq NAND driver is not support for NAND lock or unlock operation.
Hence, accidentally write into the critical NAND region might cause
data corruption to occur.

This commit is to add NAND lock/unlock command into NAND SMC register
set for NAND lock/unlock operaion.

Signed-off-by: Joe Hershberger 
Signed-off-by: Keng Soon Cheah 
Cc: Chen Yee Chew 
Cc: Siva Durga Prasad Paladugu 
Cc: Michal Simek 
Cc: Scott Wood 
Signed-off-by: Wilson Lee 
---

 drivers/mtd/nand/zynq_nand.c | 12 
 1 file changed, 12 insertions(+)

diff --git a/drivers/mtd/nand/zynq_nand.c b/drivers/mtd/nand/zynq_nand.c
index 948f059..484f1bb 100644
--- a/drivers/mtd/nand/zynq_nand.c
+++ b/drivers/mtd/nand/zynq_nand.c
@@ -81,6 +81,13 @@
 #define ZYNQ_NAND_ECC_BUSY (1 << 6)/* ECC block is busy */
 #define ZYNQ_NAND_ECC_MASK 0x00FF  /* ECC value mask */
 
+#ifndef NAND_CMD_LOCK_TIGHT
+#define NAND_CMD_LOCK_TIGHT 0x2c
+#endif
+
+#ifndef NAND_CMD_LOCK_STATUS
+#define NAND_CMD_LOCK_STATUS 0x7a
+#endif
 
 /* SMC register set */
 struct zynq_nand_smc_regs {
@@ -141,6 +148,11 @@ static const struct zynq_nand_command_format 
zynq_nand_commands[] = {
{NAND_CMD_PARAM, NAND_CMD_NONE, 1, 0},
{NAND_CMD_GET_FEATURES, NAND_CMD_NONE, 1, 0},
{NAND_CMD_SET_FEATURES, NAND_CMD_NONE, 1, 0},
+   {NAND_CMD_LOCK, NAND_CMD_NONE, 0, 0},
+   {NAND_CMD_LOCK_TIGHT, NAND_CMD_NONE, 0, 0},
+   {NAND_CMD_UNLOCK1, NAND_CMD_NONE, 3, 0},
+   {NAND_CMD_UNLOCK2, NAND_CMD_NONE, 3, 0},
+   {NAND_CMD_LOCK_STATUS, NAND_CMD_NONE, 3, 0},
{NAND_CMD_NONE, NAND_CMD_NONE, 0, 0},
/* Add all the flash commands supported by the flash device */
 };
-- 
2.7.4

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


[U-Boot] [PATCH] common: console: Fix duplicated CONFIG in silent env callback

2017-08-25 Thread Wilson Lee
The silent environment callback function does not update the silent
flag during silent env set or unset. That is because of duplicated
CONFIG keyword at preprocessor condition in silent environment
callback function and cause silent env callback unable to work.

This patch is to remove the duplicated CONFIG keywork in silent
environment callback function.

Signed-off-by: Wilson Lee 
Cc: Keng Soon Cheah 
Cc: Chen Yee Chew 
Cc: Joe Hershberger 
---

 common/console.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/console.c b/common/console.c
index 3167921..f83528c 100644
--- a/common/console.c
+++ b/common/console.c
@@ -68,11 +68,11 @@ U_BOOT_ENV_CALLBACK(console, on_console);
 static int on_silent(const char *name, const char *value, enum env_op op,
int flags)
 {
-#if !CONFIG_IS_ENABLED(CONFIG_SILENT_CONSOLE_UPDATE_ON_SET)
+#if !CONFIG_IS_ENABLED(SILENT_CONSOLE_UPDATE_ON_SET)
if (flags & H_INTERACTIVE)
return 0;
 #endif
-#if !CONFIG_IS_ENABLED(CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC)
+#if !CONFIG_IS_ENABLED(SILENT_CONSOLE_UPDATE_ON_RELOC)
if ((flags & H_INTERACTIVE) == 0)
return 0;
 #endif
-- 
2.7.4

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


[U-Boot] [PATCH v2] serial: nulldev: Add nulldev serial driver

2017-08-25 Thread Wilson Lee
From: Keng Soon Cheah 

Some device the serial console's initialization cannot run early during
the boot process. Hence, nulldev serial device is helpful on that
situation.

For example, if the serial module was implemented in FPGA. Serial
initialization is prohibited to run until the FPGA was programmed.

This commit is to adding nulldev serial driver. This will allows the
default console to be specified as a nulldev.

Signed-off-by: Joe Hershberger 
Signed-off-by: Keng Soon Cheah 
Cc: Chen Yee Chew 
---
 drivers/serial/Kconfig  |  7 ++
 drivers/serial/Makefile |  1 +
 drivers/serial/serial_nulldev.c | 48 +
 3 files changed, 56 insertions(+)
 create mode 100644 drivers/serial/serial_nulldev.c

diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index a8e9978..5064edf 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -409,6 +409,13 @@ config MXC_UART
  If you have a machine based on a Motorola IMX CPU you
  can enable its onboard serial port by enabling this option.
 
+config NULLDEV_SERIAL
+   bool "Null serial device"
+   help
+ Select this to enable null serial device support. A null serial
+ device merely acts as a placeholder for a serial device and does
+ nothing for all it's operation.
+
 config PIC32_SERIAL
bool "Support for Microchip PIC32 on-chip UART"
depends on DM_SERIAL && MACH_PIC32
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index 72a6996..7adcee3 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -49,6 +49,7 @@ obj-$(CONFIG_BCM283X_MU_SERIAL) += serial_bcm283x_mu.o
 obj-$(CONFIG_MSM_SERIAL) += serial_msm.o
 obj-$(CONFIG_MVEBU_A3700_UART) += serial_mvebu_a3700.o
 obj-$(CONFIG_MPC8XX_CONS) += serial_mpc8xx.o
+obj-$(CONFIG_NULLDEV_SERIAL) += serial_nulldev.o
 
 ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_USB_TTY) += usbtty.o
diff --git a/drivers/serial/serial_nulldev.c b/drivers/serial/serial_nulldev.c
new file mode 100644
index 000..0768308
--- /dev/null
+++ b/drivers/serial/serial_nulldev.c
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2015 National Instruments
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+
+static int nulldev_serial_setbrg(struct udevice *dev, int baudrate)
+{
+   return 0;
+}
+
+static int nulldev_serial_getc(struct udevice *dev)
+{
+   return -EAGAIN;
+}
+
+static int nulldev_serial_input(struct udevice *dev)
+{
+   return 0;
+}
+
+static int nulldev_serial_putc(struct udevice *dev, const char ch)
+{
+   return 0;
+}
+
+static const struct udevice_id nulldev_serial_ids[] = {
+   { .compatible = "nulldev-serial" },
+   { }
+};
+
+
+const struct dm_serial_ops nulldev_serial_ops = {
+   .putc = nulldev_serial_putc,
+   .getc = nulldev_serial_getc,
+   .setbrg = nulldev_serial_setbrg,
+};
+
+U_BOOT_DRIVER(serial_nulldev) = {
+   .name   = "serial_nulldev",
+   .id = UCLASS_SERIAL,
+   .of_match = nulldev_serial_ids,
+   .ops= _serial_ops,
+};
-- 
2.7.4

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


[U-Boot] [Patch v2] configs: SECURE_BOOT: Enable CONFIG_CMD_EXT4_WRITE

2017-08-25 Thread Sumit Garg
As part of chain of trust with confidentiality along with distro
boot, linux kernel image needs to be stored in encrypted form on
ext4 boot partition. So enable CONFIG_CMD_EXT4_WRITE in case of
Secure boot.

Signed-off-by: Sumit Garg 
---

Changes in v2:
Instead of adding CMD_EXT4_WRITE option in each defconfig, added this
option in Kconfig.

 board/freescale/common/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/board/freescale/common/Kconfig b/board/freescale/common/Kconfig
index 53b606e..3496eed 100644
--- a/board/freescale/common/Kconfig
+++ b/board/freescale/common/Kconfig
@@ -6,6 +6,8 @@ config CHAIN_OF_TRUST
select SPL_BOARD_INIT if (ARM && SPL)
select SHA_HW_ACCEL
select SHA_PROG_HW_ACCEL
+   select CMD_EXT4
+   select CMD_EXT4_WRITE
bool
default y
 
-- 
2.7.4

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


Re: [U-Boot] [PATCH] rpi: Enable USB keyboard support

2017-08-25 Thread Paul Barker
On Fri, Aug 25, 2017 at 6:34 AM, Bin Meng  wrote:
> Hi Simon,
>
> On Fri, Aug 25, 2017 at 9:45 AM, Simon Glass  wrote:
>> This is currently disabled, so USB keyboards are not detected in U_Boot.
>
> U-Boot
>
>> Enable this option to fix that.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>>  configs/rpi_2_defconfig | 1 +
>>  configs/rpi_3_32b_defconfig | 1 +
>>  configs/rpi_3_defconfig | 1 +
>>  configs/rpi_defconfig   | 1 +
>>  4 files changed, 4 insertions(+)
>>
>> diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
>> index 63d1e4042d..5150eed79c 100644
>> --- a/configs/rpi_2_defconfig
>> +++ b/configs/rpi_2_defconfig
>> @@ -15,6 +15,7 @@ CONFIG_SYS_PROMPT="U-Boot> "
>>  CONFIG_CMD_GPIO=y
>>  CONFIG_CMD_MMC=y
>>  CONFIG_CMD_USB=y
>> +CONFIG_DM_KEYBOARD=y
>>  CONFIG_DM_MMC=y
>>  CONFIG_MMC_SDHCI=y
>>  CONFIG_MMC_SDHCI_BCM2835=y
>> diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
>> index 343cb197a1..caceb85b07 100644
>> --- a/configs/rpi_3_32b_defconfig
>> +++ b/configs/rpi_3_32b_defconfig
>> @@ -16,6 +16,7 @@ CONFIG_SYS_PROMPT="U-Boot> "
>>  CONFIG_CMD_GPIO=y
>>  CONFIG_CMD_MMC=y
>>  CONFIG_CMD_USB=y
>> +CONFIG_DM_KEYBOARD=y
>>  CONFIG_DM_MMC=y
>>  CONFIG_MMC_SDHCI=y
>>  CONFIG_MMC_SDHCI_BCM2835=y
>> diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
>> index 6c9f2e32b5..e3dd1b9124 100644
>> --- a/configs/rpi_3_defconfig
>> +++ b/configs/rpi_3_defconfig
>> @@ -16,6 +16,7 @@ CONFIG_SYS_PROMPT="U-Boot> "
>>  CONFIG_CMD_GPIO=y
>>  CONFIG_CMD_MMC=y
>>  CONFIG_CMD_USB=y
>> +CONFIG_DM_KEYBOARD=y
>>  CONFIG_DM_MMC=y
>>  CONFIG_MMC_SDHCI=y
>>  CONFIG_MMC_SDHCI_BCM2835=y
>> diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
>> index 6b3cec5ce0..eaf9bb9189 100644
>> --- a/configs/rpi_defconfig
>> +++ b/configs/rpi_defconfig
>> @@ -15,6 +15,7 @@ CONFIG_SYS_PROMPT="U-Boot> "
>>  CONFIG_CMD_GPIO=y
>>  CONFIG_CMD_MMC=y
>>  CONFIG_CMD_USB=y
>> +CONFIG_DM_KEYBOARD=y
>>  CONFIG_DM_MMC=y
>>  CONFIG_MMC_SDHCI=y
>>  CONFIG_MMC_SDHCI_BCM2835=y
>> --
>
> Reviewed-by: Bin Meng 
>

Tested-by: Paul Barker 

I now have working keyboard & network in u-boot master on an rpi 3 32-bit.

It still hangs at "Starting kernel ..." when I try to boot Linux as
discussed elsewhere but the keyboard issue is now fixed.

-- 
Paul Barker
Togán Labs Ltd
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 4/4] rockchip: enable rockusb for all rockchip SoCs

2017-08-25 Thread Dr. Philipp Tomsich

> On 25 Aug 2017, at 03:51, Andy Yan  wrote:
> 
> Hi Lukasz:
> 
> 2017-08-22 18:05 GMT+08:00 Łukasz Majewski  >:
> Hi Kever,
> 
> 
> Philipp,
> 
> I have no idea about the status of rockusb, it has been a long time
> on the list.
> 
> Maybe Eddie or Lukasz have an answer?
> 
> I've asked Eddie to fix issues with breaking other boards when enabling USB 
> gadget infrastructure on RK.
> 
> No reply since then.
> 
> 
> 
> Eddie has fix all the issues he can reproduced on local。 The only problem now 
> is that  the rk3036 based boards(evb-rk3036/kylin-rk3036) show compile errors 
> on CI[0],

The Travis log shows linker errors for some of the other boards (i.e. not 
evb-rk3036/kylin-rk3036), due to unresolved symbols.

> but when we do the same compile on our local computer, the all evb-rk3036 and 
> kylin-rk3036 compiled successfully. And we didn't find anything in Eddie's 
> patch that will trigger such errors. As you mentationed in the mail[1], you 
> have also build rk3036 successfully on your local. So maybe there is 
> something different between the CI and the local build. Could you please give 
> as some directions on this?
> 
> [0] https://travis-ci.org/eddiecailinux/u-boot/jobs/23599#L759 
> [1] 
> http://patchwork.ozlabs.org/patch/766901/ 
> 
> 
> 
> 
> I have to use those patches on my local branch, so that we don't have to
> enter
> 
> bootrom mode for firmware update.
> 
> Thanks,
> - Kever
> On 08/22/2017 04:44 PM, Dr. Philipp Tomsich wrote:
> Kever,
> 
> I was about to apply the rockusb changes onto next yesterday, when I
> realised
> that rockusb hadn’t been merged on the USB side…
> 
> Do you know the status on the rockusb patches?
> I’d like to avoid merging this on our end, before the infrastructure
> has been merged.
> 
> Regards,
> Philipp.
> 
> On 22 Aug 2017, at 09:35, Kever Yang  > wrote:
> 
> Rockusb will be used by all the rockchip SoCs, enable it by
> default in Kconfig, and it can be work if USB gadget is available.
> 
> Signed-off-by: Kever Yang  >
> Acked-by: Philipp Tomsich  >
> ---
> 
> Changes in v2: None
> 
> arch/arm/Kconfig | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index da9324b..f566d50 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1084,6 +1084,8 @@ config ARCH_ROCKCHIP
> select DM_PWM
> select DM_REGULATOR
> imply FAT_WRITE
> +imply USB_FUNCTION_ROCKUSB
> +imply CMD_ROCKUSB
> 
> config TARGET_THUNDERX_88XX
> bool "Support ThunderX 88xx"
> --
> 1.9.1
> 
> 
> 
> 
> 
> 
> 
> -- 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10  Fax: 
> (+49)-8142-66989-80  Email: w...@denx.de 
> 
> 
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de 
> https://lists.denx.de/listinfo/u-boot 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] U-boot 2017.07 not working on Raspberry Pi

2017-08-25 Thread Paul Barker
On Fri, Aug 25, 2017 at 2:46 AM, Simon Glass  wrote:
> Hi,
>
> On 20 August 2017 at 20:59, Simon Glass  wrote:
>> Hi Paul,
>>
>> On 3 August 2017 at 11:42, Tom Rini  wrote:
>>> On Thu, Aug 03, 2017 at 09:42:13AM -0600, Stephen Warren wrote:
 On 08/03/2017 07:45 AM, Simon Glass wrote:
 ...
 >I'm not sure if we have a Raspberry Pi in a test farm anywhere. I
 >should be able to look next week if no one can figure these out
 >beforehand.

 I thought that Tom had some Pis in his test farm?
>>>
>>> I have an RPi 3, but we don't have Linux boot tests atm.  I'm talking
>>> with Kevin Hilman about how I might setup kernelci to test a few things
>>> in my lab, which might catch this kind of problem sooner rather than
>>> later.
>>
>> Just a note that I can repeat the CONFIG_OF_EMBED problem. I am not
>> sure what is going on or why this would prevent the kernel booting.
>> But I believe rpi has a device tree pass-through from the pre-U-Boot
>> boot loader, and I am booting with that, so perhaps it relies on
>> CONFIG_OF_EMBED in some way?
>
> I can see some code in board_fdt_blob_setup() but it does not seem to
> be enabled. For me I am able to boot Linux without CONFIG_OF_EMBED.
>
>>
>> I can also repeat the USB keyboard problem. It doesn't detect the
>> keyboard at all. For me this can be fixed by enabling
>> CONFIG_DM_KEYBOARD, so we should probably do that for all rpi boards.
>
> I have sent a patch for this.

This patch looks good. I've now got working keyboard and network in
u-boot along with a successful boot of Linux for the 2 devices I've
tested (Original rpi and rpi3 32-bit) from the following:

* U-boot 2017.07 release
* Revert "dm: arm: rpi: Drop CONFIG_OF_EMBED" (25877d4e)
* Apply backported version of your patch

The rpi firmware does provide a device tree blob at boot and my only
guess is that this is currently being overwritten or ignored. That's
masked when CONFIG_OF_EMBED is enabled as we use an embedded device
tree instead of the one provided by the rpi firmware.

For u-boot v2017.09 release is it possible to re-enable
CONFIG_OF_EMBED until we can find and fix the underlying issue? Or is
there some reason to avoid CONFIG_OF_EMBED?

>
>>
>> Re the Ethernet thing, what changes when you disable that?

CONFIG_DM_ETH was disabled purely as it depends on CONFIG_DM_USB on
the Raspberry Pi and I'd disabled that to work around the USB keyboard
issue. With CONFIG_DM_ETH, CONFIG_DM_USB and CONFIG_DM_KEYBOARD
enabled everything looks good.

Thanks,

-- 
Paul Barker
Togán Labs Ltd
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 2/2] LS1088A_QSPI: Add secure boot defconfigs for QSPI boot.

2017-08-25 Thread Udit Agarwal
Changes in V2:
Rebasing the image validation patch.
Dependent patch set:
https://patchwork.ozlabs.org/patch/801852/
https://patchwork.ozlabs.org/patch/803045/
https://patchwork.ozlabs.org/patch/803043/

> -Original Message-
> From: Udit Agarwal [mailto:udit.agar...@nxp.com]
> Sent: Friday, August 25, 2017 2:29 PM
> To: u-boot@lists.denx.de
> Cc: York Sun ; Ruchika Gupta ; Sumit
> Garg ; Prabhakar Kushwaha ;
> Ashish Kumar ; Udit Agarwal 
> Subject: [PATCH v2 2/2] LS1088A_QSPI: Add secure boot defconfigs for QSPI 
> boot.
> 
> Add the secure boot defconfigs for QSPI boot on LS1088ARDB and LS1088AQDS
> platforms.
> 
> Signed-off-by: Udit Agarwal 
> ---
>  configs/ls1088aqds_qspi_SECURE_BOOT_defconfig | 32
> +++  configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
> | 32 +++
>  2 files changed, 64 insertions(+)
>  create mode 100644 configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
>  create mode 100644 configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
> 
> diff --git a/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
> b/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
> new file mode 100644
> index 000..65653b8
> --- /dev/null
> +++ b/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
> @@ -0,0 +1,32 @@
> +CONFIG_ARM=y
> +CONFIG_TARGET_LS1088AQDS=y
> +# CONFIG_SYS_MALLOC_F is not set
> +CONFIG_DM_SPI=y
> +CONFIG_DM_SPI_FLASH=y
> +CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-qds"
> +CONFIG_FIT=y
> +CONFIG_FIT_VERBOSE=y
> +CONFIG_OF_BOARD_SETUP=y
> +CONFIG_OF_STDOUT_VIA_ALIAS=y
> +CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4, QSPI_BOOT"
> +CONFIG_HUSH_PARSER=y
> +CONFIG_CMD_MMC=y
> +CONFIG_CMD_SF=y
> +CONFIG_CMD_I2C=y
> +# CONFIG_CMD_SETEXPR is not set
> +CONFIG_CMD_DHCP=y
> +CONFIG_CMD_PING=y
> +CONFIG_OF_CONTROL=y
> +CONFIG_NET_RANDOM_ETHADDR=y
> +CONFIG_DM=y
> +CONFIG_SPI_FLASH=y
> +CONFIG_NETDEVICES=y
> +CONFIG_E1000=y
> +CONFIG_SYS_NS16550=y
> +CONFIG_FSL_DSPI=y
> +CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
> +# CONFIG_DISPLAY_BOARDINFO is not set
> +CONFIG_FSL_LS_PPA=y
> +CONFIG_SECURE_BOOT=y
> +CONFIG_RSA=y
> +CONFIG_RSA_SOFTWARE_EXP=y
> diff --git a/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
> b/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
> new file mode 100644
> index 000..5afd559
> --- /dev/null
> +++ b/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
> @@ -0,0 +1,32 @@
> +CONFIG_ARM=y
> +CONFIG_TARGET_LS1088ARDB=y
> +# CONFIG_SYS_MALLOC_F is not set
> +CONFIG_DM_SPI=y
> +CONFIG_DM_SPI_FLASH=y
> +CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-rdb"
> +CONFIG_FIT=y
> +CONFIG_FIT_VERBOSE=y
> +CONFIG_OF_BOARD_SETUP=y
> +CONFIG_OF_STDOUT_VIA_ALIAS=y
> +CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4, QSPI_BOOT"
> +CONFIG_HUSH_PARSER=y
> +CONFIG_CMD_MMC=y
> +CONFIG_CMD_SF=y
> +CONFIG_CMD_I2C=y
> +# CONFIG_CMD_SETEXPR is not set
> +CONFIG_CMD_DHCP=y
> +CONFIG_CMD_PING=y
> +CONFIG_OF_CONTROL=y
> +CONFIG_NET_RANDOM_ETHADDR=y
> +CONFIG_DM=y
> +CONFIG_SPI_FLASH=y
> +CONFIG_NETDEVICES=y
> +CONFIG_E1000=y
> +CONFIG_SYS_NS16550=y
> +CONFIG_FSL_DSPI=y
> +CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
> +# CONFIG_DISPLAY_BOARDINFO is not set
> +CONFIG_FSL_LS_PPA=y
> +CONFIG_SECURE_BOOT=y
> +CONFIG_RSA=y
> +CONFIG_RSA_SOFTWARE_EXP=y
> --
> 1.9.1

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


Re: [U-Boot] [PATCH v2 1/2] LS1088A_QSPI: SECURE_BOOT: Images validation

2017-08-25 Thread Udit Agarwal
Changes in V2:
Rebasing the image validation patch.
Dependent patch set:
https://patchwork.ozlabs.org/patch/801852/
https://patchwork.ozlabs.org/patch/803045/
https://patchwork.ozlabs.org/patch/803043/


> -Original Message-
> From: Udit Agarwal [mailto:udit.agar...@nxp.com]
> Sent: Friday, August 25, 2017 2:29 PM
> To: u-boot@lists.denx.de
> Cc: York Sun ; Ruchika Gupta ; Sumit
> Garg ; Prabhakar Kushwaha ;
> Ashish Kumar ; Udit Agarwal 
> Subject: [PATCH v2 1/2] LS1088A_QSPI: SECURE_BOOT: Images validation
> 
> Validates PPA, MC, DPC, Bootscript, DPL and Kernel images in ESBC phase using
> esbc_validate command. Add images validation in default environment under 
> mcinitcmd
> prior to MC in Changes in V2:
Rebasing the image validation patch.
Dependent patch set:
https://patchwork.ozlabs.org/patch/801852/
https://patchwork.ozlabs.org/patch/803045/
https://patchwork.ozlabs.org/patch/803043/itialization.
> 
> Add header address for PPA to be validated during ESBC phase for LS1088A 
> platform
> based on LAyerscape Chasis 3.
> 
> Moves sec_init prior to ppa_init as for validation of PPA sec must be 
> initialised before the
> PPA is initialised.
> 
> Signed-off-by: Udit Agarwal 
> ---
>  arch/arm/cpu/armv8/fsl-layerscape/Kconfig |  1 +
>  board/freescale/ls1088a/Kconfig   |  2 ++
>  board/freescale/ls1088a/ls1088a.c |  6 +++---
>  include/configs/ls1088a_common.h  |  6 +++---
>  include/configs/ls1088aqds.h  | 21 +
>  include/configs/ls1088ardb.h  | 22 +-
>  6 files changed, 51 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig 
> b/arch/arm/cpu/armv8/fsl-
> layerscape/Kconfig
> index ab69a32..d61f522 100644
> --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
> +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
> @@ -229,6 +229,7 @@ config SYS_LS_PPA_ESBC_ADDR
>   default 0x4068 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1012A
>   default 0x2068 if SYS_LS_PPA_FW_IN_XIP && QSPI_BOOT &&
> ARCH_LS2080A
>   default 0x58068 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS2080A
> + default 0x2068 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1088A
>   default 0x68 if SYS_LS_PPA_FW_IN_MMC
>   default 0x68 if SYS_LS_PPA_FW_IN_NAND
>   help
> diff --git a/board/freescale/ls1088a/Kconfig 
> b/board/freescale/ls1088a/Kconfig index
> 1ada661..4479dd0 100644
> --- a/board/freescale/ls1088a/Kconfig
> +++ b/board/freescale/ls1088a/Kconfig
> @@ -12,6 +12,7 @@ config SYS_SOC
>  config SYS_CONFIG_NAME
>   default "ls1088aqds"
> 
> +source "board/freescale/common/Kconfig"
>  endif
> 
>  if TARGET_LS1088ARDB
> @@ -28,4 +29,5 @@ config SYS_SOC
>  config SYS_CONFIG_NAME
>   default "ls1088ardb"
> 
> +source "board/freescale/common/Kconfig"
>  endif
> diff --git a/board/freescale/ls1088a/ls1088a.c 
> b/board/freescale/ls1088a/ls1088a.c
> index d1de4d1..b3a646d 100644
> --- a/board/freescale/ls1088a/ls1088a.c
> +++ b/board/freescale/ls1088a/ls1088a.c
> @@ -315,6 +315,9 @@ int board_init(void)
>   out_le32(irq_ccsr + IRQCR_OFFSET / 4, AQR105_IRQ_MASK);  #endif
> 
> +#ifdef CONFIG_FSL_CAAM
> + sec_init();
> +#endif
>  #ifdef CONFIG_FSL_LS_PPA
> ppa_init();
>  #endif
> @@ -337,9 +340,6 @@ void detail_board_ddr_info(void)  #if
> defined(CONFIG_ARCH_MISC_INIT)  int arch_misc_init(void)  { -#ifdef
> CONFIG_FSL_CAAM
> - sec_init();
> -#endif
>   return 0;
>  }
>  #endif
> diff --git a/include/configs/ls1088a_common.h 
> b/include/configs/ls1088a_common.h
> index d01095e..4943e19 100644
> --- a/include/configs/ls1088a_common.h
> +++ b/include/configs/ls1088a_common.h
> @@ -128,9 +128,9 @@ unsigned long long get_qixis_addr(void);  #if
> defined(CONFIG_FSL_MC_ENET)
>  #define CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE (512UL * 1024 *
> 1024)
>  #endif
> -
> -#define CONFIG_FSL_CAAM  /* Enable SEC/CAAM */
> -
> +#if !defined(CONFIG_FSL_CAAM)
> + #define CONFIG_FSL_CAAM /* Enable SEC/CAAM */
> +#endif
>  /* Command line configuration */
>  #define CONFIG_CMD_GREPENV
>  #define CONFIG_CMD_CACHE
> diff --git a/include/configs/ls1088aqds.h b/include/configs/ls1088aqds.h index
> 3547b0b..ff0cb7e 100644
> --- a/include/configs/ls1088aqds.h
> +++ b/include/configs/ls1088aqds.h
> @@ -329,6 +329,26 @@ unsigned long get_board_ddr_clk(void);
>   QIXIS_SDID_MASK) != QIXIS_ESDHC_NO_ADAPTER)
> 
>  /* Initial environment variables */
> +#ifdef CONFIG_SECURE_BOOT
> +#undef CONFIG_EXTRA_ENV_SETTINGS
> +#define CONFIG_EXTRA_ENV_SETTINGS\
> + "hwconfig=fsl_ddr:bank_intlv=auto\0"\
> + "loadaddr=0x9010\0" \
> + "kernel_addr=0x10\0"\
> + "ramdisk_addr=0x80\0"  

[U-Boot] [PATCH v2] bootvx_fdt: fix missing 'fdt_fixup_ethernet(...)' on vxWorks boot

2017-08-25 Thread Hannes Schmelzer
Before commit 26d6119 (fdt: Move fdt_fixup_ethernet to a common place)
the fdt_fixup_ethernet(...) was called during do_bootvx_fdt(...).

Afterwards the only (common) place for this fixup is during
image_setup_libfdt(...) and this is only called, at least on ARM
platform, from image_setup_linux(...).

All this ends up in the fact, that the fdt_fixup_ethernet(...) is only
called on booting a linux image and not on booting a vxWorks image.

We fix this with adding the fdt_fixup_ethernet(...) call again to
do_bootvx_fdt(...)

Signed-off-by: Hannes Schmelzer 

---

Changes in v2:
- restore original behaviour from
  b3b522f247d3f19c4f2309ab0e6a02b3dd82de45 with moving the
  fdt_fixup_ethernet(...) call after boot_relocate_fdt(...)

 common/bootm_os.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/bootm_os.c b/common/bootm_os.c
index 1feea8a..934019f 100644
--- a/common/bootm_os.c
+++ b/common/bootm_os.c
@@ -275,6 +275,8 @@ void do_bootvx_fdt(bootm_headers_t *images)
ret = boot_relocate_fdt(lmb, of_flat_tree, _size);
if (ret)
return;
+   /* Update ethernet nodes */
+   fdt_fixup_ethernet(*of_flat_tree);
 
ret = fdt_add_subnode(*of_flat_tree, 0, "chosen");
if ((ret >= 0 || ret == -FDT_ERR_EXISTS)) {
-- 
2.7.4

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


Re: [U-Boot] [PATCH] usb: dwc3: fix Kconfig dependency to accept host driver in drivers/usb/dwc3

2017-08-25 Thread Marek Vasut
On 08/25/2017 05:56 AM, Masahiro Yamada wrote:
> 2017-08-25 6:57 GMT+09:00 Marek Vasut :
>> On 08/24/2017 06:30 PM, Masahiro Yamada wrote:
>>> We see the choice of USB_DWC3_HOST / _GADGET in drivers/usb/dwc3/Kconfig,
>>> but we can not choose USB_DWC3_HOST unless USB_GADGET is defined.
>>> This is strange.
>>>
>>> Loosen the "depends on" and also move "select USB_GADGET_DUALSPEED" to
>>> the correct place.
>>>
>>> Signed-off-by: Masahiro Yamada 
>>
>> Applied, thanks
>>
>>> ---
>>>
>>>  drivers/usb/dwc3/Kconfig | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig
>>> index e93398fe7c1c..7f2f400c09ce 100644
>>> --- a/drivers/usb/dwc3/Kconfig
>>> +++ b/drivers/usb/dwc3/Kconfig
>>> @@ -1,7 +1,6 @@
>>>  config USB_DWC3
>>>   bool "DesignWare USB3 DRD Core Support"
>>> - depends on (USB && USB_GADGET)
>>> - select USB_GADGET_DUALSPEED
>>> + depends on (USB_HOST || USB_GADGET)
>>>   help
>>> Say Y here if your system has a Dual Role SuperSpeed
>>> USB controller based on the DesignWare USB3 IP Core.
>>> @@ -21,6 +20,7 @@ config USB_DWC3_HOST
>>>  config USB_DWC3_GADGET
>>>   bool "Gadget only mode"
>>>   depends on USB_GADGET
>>> + select USB_GADGET_DUALSPEED
>>>   help
>>> Select this when you want to use DWC3 in gadget mode only,
>>> thereby the host feature will be regressed.
>>>
>>
> 
> Marek,
> 
> I noticed redundant parentheses for depends on.
> Could you fix it up locally like follows?
> 
> 
> depends on (USB_HOST || USB_GADGET)
> 
> ->
> 
> depends on USB_HOST || USB_GADGET

Hrmm, fixed.

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] bootvx_fdt: fix missing 'fdt_fixup_ethernet(...)' on vxWorks boot

2017-08-25 Thread Hannes Schmelzer

On 08/25/2017 11:21 AM, Bin Meng wrote:

Hi Hannes,

On Fri, Aug 25, 2017 at 4:44 PM, Hannes Schmelzer  wrote:

Before commit 26d6119 (fdt: Move fdt_fixup_ethernet to a common place)
the fdt_fixup_ethernet(...) was called during do_bootvx_fdt(...).


Thanks for catching this!


Afterwards the only (common) place for this fixup is during
image_setup_libfdt(...) and this is only called, at least on ARM
platform, from image_setup_linux(...).

All this ends up in the fact, that the fdt_fixup_ethernet(...) is only
called on booting a linux image and not on booting a vxWorks image.

We fix this with adding the fdt_fixup_ethernet(...) call again to
do_bootvx_fdt(...)

Signed-off-by: Hannes Schmelzer 

---

  common/bootm_os.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/common/bootm_os.c b/common/bootm_os.c
index 1feea8a..56b1c3c 100644
--- a/common/bootm_os.c
+++ b/common/bootm_os.c
@@ -271,6 +271,8 @@ void do_bootvx_fdt(bootm_headers_t *images)

 if (*of_flat_tree) {
 boot_fdt_add_mem_rsv_regions(lmb, *of_flat_tree);
+   /* Update ethernet nodes */
+   fdt_fixup_ethernet(*of_flat_tree);


Can we insert this call after boot_relocate_fdt(), like the original
commit in b3b522f247d3f19c4f2309ab0e6a02b3dd82de45 did?

Yes, i will send v2.

 ret = boot_relocate_fdt(lmb, of_flat_tree, _size);
 if (ret)
--

Regards,
Bin

cheers,
Hannes
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] bootvx_fdt: fix missing 'fdt_fixup_ethernet(...)' on vxWorks boot

2017-08-25 Thread Bin Meng
Hi Hannes,

On Fri, Aug 25, 2017 at 4:44 PM, Hannes Schmelzer  wrote:
> Before commit 26d6119 (fdt: Move fdt_fixup_ethernet to a common place)
> the fdt_fixup_ethernet(...) was called during do_bootvx_fdt(...).
>

Thanks for catching this!

> Afterwards the only (common) place for this fixup is during
> image_setup_libfdt(...) and this is only called, at least on ARM
> platform, from image_setup_linux(...).
>
> All this ends up in the fact, that the fdt_fixup_ethernet(...) is only
> called on booting a linux image and not on booting a vxWorks image.
>
> We fix this with adding the fdt_fixup_ethernet(...) call again to
> do_bootvx_fdt(...)
>
> Signed-off-by: Hannes Schmelzer 
>
> ---
>
>  common/bootm_os.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/common/bootm_os.c b/common/bootm_os.c
> index 1feea8a..56b1c3c 100644
> --- a/common/bootm_os.c
> +++ b/common/bootm_os.c
> @@ -271,6 +271,8 @@ void do_bootvx_fdt(bootm_headers_t *images)
>
> if (*of_flat_tree) {
> boot_fdt_add_mem_rsv_regions(lmb, *of_flat_tree);
> +   /* Update ethernet nodes */
> +   fdt_fixup_ethernet(*of_flat_tree);
>

Can we insert this call after boot_relocate_fdt(), like the original
commit in b3b522f247d3f19c4f2309ab0e6a02b3dd82de45 did?

> ret = boot_relocate_fdt(lmb, of_flat_tree, _size);
> if (ret)
> --

Regards,
Bin
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2 2/2] LS1088A_QSPI: Add secure boot defconfigs for QSPI boot.

2017-08-25 Thread Udit Agarwal
Add the secure boot defconfigs for QSPI boot on LS1088ARDB
and LS1088AQDS platforms.

Signed-off-by: Udit Agarwal 
---
 configs/ls1088aqds_qspi_SECURE_BOOT_defconfig | 32 +++
 configs/ls1088ardb_qspi_SECURE_BOOT_defconfig | 32 +++
 2 files changed, 64 insertions(+)
 create mode 100644 configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
 create mode 100644 configs/ls1088ardb_qspi_SECURE_BOOT_defconfig

diff --git a/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig 
b/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
new file mode 100644
index 000..65653b8
--- /dev/null
+++ b/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
@@ -0,0 +1,32 @@
+CONFIG_ARM=y
+CONFIG_TARGET_LS1088AQDS=y
+# CONFIG_SYS_MALLOC_F is not set
+CONFIG_DM_SPI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-qds"
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_OF_BOARD_SETUP=y
+CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4, QSPI_BOOT"
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_I2C=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_PING=y
+CONFIG_OF_CONTROL=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_DM=y
+CONFIG_SPI_FLASH=y
+CONFIG_NETDEVICES=y
+CONFIG_E1000=y
+CONFIG_SYS_NS16550=y
+CONFIG_FSL_DSPI=y
+CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+# CONFIG_DISPLAY_BOARDINFO is not set
+CONFIG_FSL_LS_PPA=y
+CONFIG_SECURE_BOOT=y
+CONFIG_RSA=y
+CONFIG_RSA_SOFTWARE_EXP=y
diff --git a/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig 
b/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
new file mode 100644
index 000..5afd559
--- /dev/null
+++ b/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
@@ -0,0 +1,32 @@
+CONFIG_ARM=y
+CONFIG_TARGET_LS1088ARDB=y
+# CONFIG_SYS_MALLOC_F is not set
+CONFIG_DM_SPI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-rdb"
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_OF_BOARD_SETUP=y
+CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4, QSPI_BOOT"
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_I2C=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_PING=y
+CONFIG_OF_CONTROL=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_DM=y
+CONFIG_SPI_FLASH=y
+CONFIG_NETDEVICES=y
+CONFIG_E1000=y
+CONFIG_SYS_NS16550=y
+CONFIG_FSL_DSPI=y
+CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+# CONFIG_DISPLAY_BOARDINFO is not set
+CONFIG_FSL_LS_PPA=y
+CONFIG_SECURE_BOOT=y
+CONFIG_RSA=y
+CONFIG_RSA_SOFTWARE_EXP=y
-- 
1.9.1

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


[U-Boot] [PATCH v2 1/2] LS1088A_QSPI: SECURE_BOOT: Images validation

2017-08-25 Thread Udit Agarwal
Validates PPA, MC, DPC, Bootscript, DPL and Kernel images in ESBC phase
using esbc_validate command. Add images validation in default environment
under mcinitcmd prior to MC initialization.

Add header address for PPA to be validated during ESBC phase for LS1088A
platform based on LAyerscape Chasis 3.

Moves sec_init prior to ppa_init as for validation of PPA sec must
be initialised before the PPA is initialised.

Signed-off-by: Udit Agarwal 
---
 arch/arm/cpu/armv8/fsl-layerscape/Kconfig |  1 +
 board/freescale/ls1088a/Kconfig   |  2 ++
 board/freescale/ls1088a/ls1088a.c |  6 +++---
 include/configs/ls1088a_common.h  |  6 +++---
 include/configs/ls1088aqds.h  | 21 +
 include/configs/ls1088ardb.h  | 22 +-
 6 files changed, 51 insertions(+), 7 deletions(-)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig 
b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
index ab69a32..d61f522 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
@@ -229,6 +229,7 @@ config SYS_LS_PPA_ESBC_ADDR
default 0x4068 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1012A
default 0x2068 if SYS_LS_PPA_FW_IN_XIP && QSPI_BOOT && ARCH_LS2080A
default 0x58068 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS2080A
+   default 0x2068 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1088A
default 0x68 if SYS_LS_PPA_FW_IN_MMC
default 0x68 if SYS_LS_PPA_FW_IN_NAND
help
diff --git a/board/freescale/ls1088a/Kconfig b/board/freescale/ls1088a/Kconfig
index 1ada661..4479dd0 100644
--- a/board/freescale/ls1088a/Kconfig
+++ b/board/freescale/ls1088a/Kconfig
@@ -12,6 +12,7 @@ config SYS_SOC
 config SYS_CONFIG_NAME
default "ls1088aqds"
 
+source "board/freescale/common/Kconfig"
 endif
 
 if TARGET_LS1088ARDB
@@ -28,4 +29,5 @@ config SYS_SOC
 config SYS_CONFIG_NAME
default "ls1088ardb"
 
+source "board/freescale/common/Kconfig"
 endif
diff --git a/board/freescale/ls1088a/ls1088a.c 
b/board/freescale/ls1088a/ls1088a.c
index d1de4d1..b3a646d 100644
--- a/board/freescale/ls1088a/ls1088a.c
+++ b/board/freescale/ls1088a/ls1088a.c
@@ -315,6 +315,9 @@ int board_init(void)
out_le32(irq_ccsr + IRQCR_OFFSET / 4, AQR105_IRQ_MASK);
 #endif
 
+#ifdef CONFIG_FSL_CAAM
+   sec_init();
+#endif
 #ifdef CONFIG_FSL_LS_PPA
ppa_init();
 #endif
@@ -337,9 +340,6 @@ void detail_board_ddr_info(void)
 #if defined(CONFIG_ARCH_MISC_INIT)
 int arch_misc_init(void)
 {
-#ifdef CONFIG_FSL_CAAM
-   sec_init();
-#endif
return 0;
 }
 #endif
diff --git a/include/configs/ls1088a_common.h b/include/configs/ls1088a_common.h
index d01095e..4943e19 100644
--- a/include/configs/ls1088a_common.h
+++ b/include/configs/ls1088a_common.h
@@ -128,9 +128,9 @@ unsigned long long get_qixis_addr(void);
 #if defined(CONFIG_FSL_MC_ENET)
 #define CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE   (512UL * 1024 * 1024)
 #endif
-
-#define CONFIG_FSL_CAAM/* Enable SEC/CAAM */
-
+#if !defined(CONFIG_FSL_CAAM)
+   #define CONFIG_FSL_CAAM /* Enable SEC/CAAM */
+#endif
 /* Command line configuration */
 #define CONFIG_CMD_GREPENV
 #define CONFIG_CMD_CACHE
diff --git a/include/configs/ls1088aqds.h b/include/configs/ls1088aqds.h
index 3547b0b..ff0cb7e 100644
--- a/include/configs/ls1088aqds.h
+++ b/include/configs/ls1088aqds.h
@@ -329,6 +329,26 @@ unsigned long get_board_ddr_clk(void);
QIXIS_SDID_MASK) != QIXIS_ESDHC_NO_ADAPTER)
 
 /* Initial environment variables */
+#ifdef CONFIG_SECURE_BOOT
+#undef CONFIG_EXTRA_ENV_SETTINGS
+#define CONFIG_EXTRA_ENV_SETTINGS  \
+   "hwconfig=fsl_ddr:bank_intlv=auto\0"\
+   "loadaddr=0x9010\0" \
+   "kernel_addr=0x10\0"\
+   "ramdisk_addr=0x80\0"   \
+   "ramdisk_size=0x200\0"  \
+   "fdt_high=0xa000\0" \
+   "initrd_high=0x\0"  \
+   "kernel_start=0x100\0"  \
+   "kernel_load=0xa000\0"  \
+   "kernel_size=0x280\0"   \
+   "mcinitcmd=sf probe 0:0;sf read 0xa0a0 0xa0 0x10;"  \
+   "sf read 0xa070 0x70 0x4000; esbc_validate 0xa070;" \
+   "sf read 0xa0e0 0xe0 0x10;" \
+   "sf read 0xa074 0x74 0x4000;esbc_validate 0xa074;"  \
+   "fsl_mc start mc 0xa0a0 0xa0e0\0"   \
+   "mcmemsize=0x7000 \0"
+#else /* if !(CONFIG_SECURE_BOOT) */
 #if defined(CONFIG_QSPI_BOOT)
 #undef CONFIG_EXTRA_ENV_SETTINGS
 #define CONFIG_EXTRA_ENV_SETTINGS  \
@@ -362,6 +382,7 @@ unsigned long get_board_ddr_clk(void);
"mcinitcmd=fsl_mc start mc 0x580A0 0x580E0\0"   \
"mcmemsize=0x7000 \0"
 #endif
+#endif /* CONFIG_SECURE_BOOT */
 
 #ifdef CONFIG_FSL_MC_ENET
 #define 

[U-Boot] [PATCH] bootvx_fdt: fix missing 'fdt_fixup_ethernet(...)' on vxWorks boot

2017-08-25 Thread Hannes Schmelzer
Before commit 26d6119 (fdt: Move fdt_fixup_ethernet to a common place)
the fdt_fixup_ethernet(...) was called during do_bootvx_fdt(...).

Afterwards the only (common) place for this fixup is during
image_setup_libfdt(...) and this is only called, at least on ARM
platform, from image_setup_linux(...).

All this ends up in the fact, that the fdt_fixup_ethernet(...) is only
called on booting a linux image and not on booting a vxWorks image.

We fix this with adding the fdt_fixup_ethernet(...) call again to
do_bootvx_fdt(...)

Signed-off-by: Hannes Schmelzer 

---

 common/bootm_os.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/bootm_os.c b/common/bootm_os.c
index 1feea8a..56b1c3c 100644
--- a/common/bootm_os.c
+++ b/common/bootm_os.c
@@ -271,6 +271,8 @@ void do_bootvx_fdt(bootm_headers_t *images)
 
if (*of_flat_tree) {
boot_fdt_add_mem_rsv_regions(lmb, *of_flat_tree);
+   /* Update ethernet nodes */
+   fdt_fixup_ethernet(*of_flat_tree);
 
ret = boot_relocate_fdt(lmb, of_flat_tree, _size);
if (ret)
-- 
2.7.4

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


Re: [U-Boot] [PATCH 00/22] mmc: Add support for HS200 and UHS modes

2017-08-25 Thread Ziyuan

hi Jaehoon,

On 07/28/2017 09:05 PM, Jaehoon Chung wrote:

Hi Kever,

On 07/26/2017 08:33 PM, Kever Yang wrote:

Hi Jaehoon,


 What's the status of this patch set now?

 Can we land this patch set or the other patch set from Ziyuan Xu?

The performance for  mmc in U-Boot is really bad now, and this patch set has 
been

on list for more than two months now, I'm using the patch set from Ziyuan Xu 
locally,

but really hope the upstream can move forward.

Apologized for late. Will try to upstream this before releasing v2017.09.
Really sorry for late, again. Thanks for reminding this.


*ping*
Anything update?



Best Regards,
Jaehoon Chung



Thanks,
- Kever
On 06/29/2017 05:59 PM, Jaehoon Chung wrote:

On 06/16/2017 07:00 PM, Jean-Jacques Hiblot wrote:

Hi Jaehoon,


On 25/05/2017 09:41, Jaehoon Chung wrote:

Hi,

On 05/24/2017 12:24 AM, Jean-Jacques Hiblot wrote:

Hi,


On 18/05/2017 06:27, Jaehoon Chung wrote:

Hi,

On 05/13/2017 03:16 AM, Jean-Jacques Hiblot wrote:

This series brings support for HS200 and UHS modes to the mmc core.
It has been tested with the hsmmc driver on several platforms (DRA7,
AM57x, AM437x, beaglebone black). Some modifications are required in
the host driver to take advantage of this (voltage switching, tuning).
The changes to the host driver will be posted a another series as this
one is already long enough.

The series starts with a small refactoring of th sd/mmc startup. The first 4 
commits
are mostly moving code around with little or no functionnal change.

Then the notion of "mode" is introduced. Until now, this information wasn't
kept in struct mmc. Only the clock and a flag for ddr was kept. Later the mode
information will be used to select the clock frequency, the ddr flag and the
tuning procedure. It will be also be check against the host capabilities.

Then comes the big refactoring job in:
"mmc: refactor MMC startup to make it easier to support new modes" and
"mmc: refactor SD startup to make it easier to support new modes"
Since the number of modes is increasing, it makes sense to try them in a more
organized way. those commits use a list of supported modes and iterate through
them to find the best working one. It also allows to switch more easilly from
one mode to another (switching from HS200 to DDR52 to access boot partitions 
for example)

Then there are a couple of new callback added to:
- enable/disable Vdd
- check if the card is busy (used during UHS voltage switching)
- select the IO voltage

Then Power cycle is added. Without power cycle, if a UHS card fails to 
enumerate in
UHS mode, it can't fall back to high speed mode and card enumeration will fail.

And finally the last commits add the support for HS200 and UHS.
I haven't been able to test the UHS SDR104 mode by lack of compatible sdcard.

After testing my targets, some boards don't work fine..So i'm checking this 
problem..

Jaehoon,

what kind of issues are you running into and on what platforms ?
So far, besides the items brought-up by the reviews, there are 2 issues that 
are in the pipe for the next version:
* signal voltage selection is not done for the MMCs only for SDs.
* I noticed a timing constraint in voltage selection for SDs that can be a 
problem when trying a UHS mode with some SDs (seen only with Sandisk Ultra  
64Gb micro SD class I) :  the voltage must be switched quickly after the cmd 
SWITCH_UHS18V has been sent, making debug messages in that context a problem. 
With this SD I've been able to check that SDR104 is working.

How about making the "testing-hs200-uhs" branch for this? It needs to test 
more..
I guess my target doesn't do the voltage change..i'm doing for ufs driver on 
u-boot in my local..
So i didn't see fully..today i have a free time..So i'm doing full review other 
thing..and about pending patches.

Thanks for waiting me.. :)

I updated the branches for testing in my github repo 
(https://github.com/jjhiblot/u-boot.git )
branch testing-hs200-uhs_v2 touches only the MMC core
branch high_speed_hsmmc_v2 implements the required bit for th HSMMC found on TI 
boards

Sorry for late..I make the hs200-ufs-testing branch in u-boot-mmc repo.
I will rebase on latest u-boot. and start the testing.

Best Regards,
Jaehoon Chung


Most of the comments (if not all of them) have been taken in account and the 
branches have been rebased on top of u-boot master.

Will you be able to do some testing and let me know if there are other things 
to change ? Don't hesitate to let me know what boards it breaks (if any), I'll 
do my best to get my hands on one and help with the debugging.

Thanks,

JJ

Best Regards,
Jaehoon Chung


Jean-Jacques

With this in place and the required changes in the HSMMC (including DAM), we 
observe significant
improvements in the performances on a DRA7 evm:
eMMC HS200: 130 MB/s
eMMC DDR52: 80 MB/s
sd   SDR50: 80 MB/s

cheers,

Jean-Jacques


Jean-Jacques Hiblot (18):
  mmc: split mmc_startup()
  mmc: move the MMC startup for version 

[U-Boot] commit 26d6119 (fdt: Move fdt_fixup_ethernet to a common place) breaks vxWorks targets

2017-08-25 Thread Hannes Schmelzer

Hello,

Moving the "fdt_fixup_ethernet(...)" call breaks vxWorks targets.

The MAC-address isn't updated in the device-tree anymore since the 
function never gets called on booting a vxWork kernel.

I'll provide some patch to fix this.

cheers,
Hannes



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


Re: [U-Boot] SPDX License status

2017-08-25 Thread Wolfgang Denk
Dear Tom,

In message <20170825012557.GK2827@bill-the-cat> you wrote:
> 
> Actual code we have to take care with anyhow, but it's still up to the
> person that has to handle the syncing.

Really?  Should we not rather implement a common, consistent policy
for the whole project?

Our patch submission already include a rule for new code [1]:

If you add new files, please always make sure that these
contain your copyright note and a GPLv2+
SPDX-License-Identifier, for example like this:

(C) Copyright 2010  Joe Hacker 

SPDX-License-Identifier:GPL-2.0+

Should we not ask the same for code merged from other projects?

[1] Bullet #3 in 
http://www.denx.de/wiki/view/U-Boot/Patches#Attributing_Code_Copyrights_Sign

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
On mules we find two legs behind and two we find before.
We stand behind before we find what those behind be for.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] odroidc2 stuck after "Starting kernel"

2017-08-25 Thread daggs
Greetings,

> Sent: Monday, August 21, 2017 at 9:43 PM
> From: daggs 
> To: u-boot@lists.denx.de
> Subject: [U-Boot] odroidc2 stuck after "Starting kernel"
>
> Greetings,
> 
> I'm trying to get uboot 2017.7 working on my odroidc2 board.
> I have a image without uboot, I've compiled uboot with the correct defconfig.
> the image has two partitions, boot (fat32) and root (ext4), I've followed the 
> howto in the readme file, generated and burnt the needed files into the image.
> I'm using teh vendor's kenrel (based on 3.14.79), my boot.cmd looks like this:
> setenv m "1080p60hz" # Progressive 60Hz
> setenv m_bpp "32"
> setenv hpd "true"
> setenv monitor_onoff "false" # true or false
> setenv nographics "0"
> setenv mesontimer "1"
> setenv disableuhs "false"
> setenv mmc_removable "true"
> setenv usbmulticam "false"
> setenv condev "console=ttyS0,115200n8"   # on both
> setenv maxcpus "4"
> setenv max_freq "1536"  # 1.536GHz
> 
> 
> if test "${m}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; fi
> 
> setenv bootargs "root=/dev/mmcblk0p2 rootwait ro ${condev} no_console_suspend 
> hdmimode=${m} ${cmode} m_bpp=${m_bpp} vout=${vout} fsck.repair=yes 
> net.ifnames=0 elevator=noop disablehpd=${hpd} max_freq=${max_freq} 
> maxcpus=${maxcpus} monitor_onoff=${monitor_onoff} disableuhs=${disableuhs} 
> mmc_removable=${mmc_removable} usbmulticam=${usbmulticam}"
> 
> setenv loadaddr "0x2000"
> setenv dtb_loadaddr "0x0100"
> setenv initrd_high "0x"
> setenv fdt_high "0x"
> setenv kernel_filename Image
> setenv fdt_filename meson64_odroidc2.dtb
> 
> fatload mmc 0:1 ${loadaddr} ${kernel_filename}
> fatload mmc 0:1 ${dtb_loadaddr} ${fdt_filename}
> fdt addr ${dtb_loadaddr}
> 
> if test "${mesontimer}" = "0"; then fdt rm /meson_timer; fdt rm 
> /cpus/cpu@0/timer; fdt rm /cpus/cpu@1/timer; fdt rm /cpus/cpu@2/timer; fdt rm 
> /cpus/cpu@3/timer; fi
> if test "${mesontimer}" = "1"; then fdt rm /timer; fi
> 
> if test "${nographics}" = "1"; then fdt rm /reserved-memory; fdt rm /aocec; fi
> if test "${nographics}" = "1"; then fdt rm /meson-fb; fdt rm /amhdmitx; fdt 
> rm /picdec; fdt rm /ppmgr; fi
> if test "${nographics}" = "1"; then fdt rm /meson-vout; fdt rm /mesonstream; 
> fdt rm /meson-fb; fi
> if test "${nographics}" = "1"; then fdt rm /deinterlace; fdt rm /codec_mm; fi
> 
> booti ${loadaddr} - ${dtb_loadaddr}
> 
> and this is what get:
> GXBB:BL1:08dafd:0a8993;FEAT:EDFC318C;POC:3;RCY:0;EMMC:800;NAND:81;SD:0;READ:0;CHK:0;
> TE: 436267
> no sdio debug board detected
> 
> BL2 Built : 11:44:26, Nov 25 2015.
> gxb gfb13a3b-c2 - jcao@wonton
> 
> Board ID = 8
> set vcck to 1100 mv
> set vddee to 1050 mv
> CPU clk: 1536MHz
> DDR channel setting: DDR0 Rank0+1 same
> DDR0: 2048MB(auto) @ 912MHz(2T)-13
> DataBus test pass!
> AddrBus test pass!
> Load fip header from SD, src: 0xc200, des: 0x0140, size: 0x00b0
> Load bl30 from SD, src: 0x00010200, des: 0x0100, size: 0x9ef0
> Sending bl30OK.
> Run bl30...
> Load bl301 from SD, src: 0x0001c200, des: 0x0100, size: 0x18c0
> Wait bl30...Done
> Sending bl301...OK.
> Run bl301...
> 31 from SD, src: 0x00020200, des: 0x1010, size: 0x00011130
> 
> 
> --- UART initialized after reboot ---
> [Reset cause: unknown]
> [Image: unknown, amlogic_v1.1.3046-00db630-dirty 2016-08-31 09:24:14 
> tao.zeng@droid04]
> bl30: check_permit, count is 1
> bl30: check_permit: ok!
> chipid: ef be ad de d f0 ad ba ef be Load bl33 from SD, src: 0x00034200, des: 
> 0x0100, size: 0x00055f00
> ad de not ES chip
> [0.550974 Inits done]
> secure task start!
> high task start!
> low task start!
> NOTICE:  BL3-1: v1.0(debug):4d2e34d
> NOTICE:  BL3-1: Built : 17:08:35, Oct 29 2015
> INFO:BL3-1: Initializing runtime services
> INFO:BL3-1: Preparing for EL3 exit to normal world
> INFO:BL3-1: Next image address = 0x100
> INFO:BL3-1: Next image spsr = 0x3c9
> 
> 
> U-Boot 2017.07 (Aug 04 2017 - 21:53:09 +0300) odroid-c2
> 
> DRAM:  2 GiB
> MMC:   mmc@72000: 0, mmc@74000: 1
> Using default environment
> 
> In:serial@4c0
> Out:   serial@4c0
> Err:   serial@4c0
> Net:   eth0: ethernet@c941
> Hit any key to stop autoboot:  0
> switch to partitions #0, OK
> mmc0 is current device
> Scanning mmc 0:1...
> Found U-Boot script /boot.scr
> reading /boot.scr
> 6244 bytes read in 2 ms (3 MiB/s)
> ## Executing script at 1f00
> reading Image
> 13472384 bytes read in 578 ms (22.2 MiB/s)
> reading meson64_odroidc2.dtb
> 29264 bytes read in 3 ms (9.3 MiB/s)
> ## Flattened Device Tree blob at 0100
>Booting using the fdt blob at 0x100
>Loading Device Tree to 7df4e000, end 7df5824f ... OK
> 
> Starting kernel ...
> 
> the system stays stuck there.
> 
> any ideas how I can fix it? or even start debug it?
> 
> Thanks,
> 

I was able to track the stuckness to armv8_switch_to_el2_m.
how can I debug that macro?
what can cause the code there to get stuck?