Re: [U-Boot] [PATCH] cmd: set filesize variable in ubi read

2017-09-12 Thread Heiko Schocher

Hello Holger,

Am 31.08.2017 um 09:25 schrieb Heiko Schocher:

Hello Holger,

Am 30.08.2017 um 18:38 schrieb Holger Dengler:

After a successful read of a UBI volume, the variable filesize is set
to the number of read bytes. To boot linux with a raw initramfs/initrd,
you must specify the exact size of the initramfs/initrd image in boot
command. If the initramfs/inird is read from UBI volume, $filesize is
required to access the number of read bytes.

Example:
   ubi read ${loadaddr} kernelvol
   ubi read ${fdtaddr} dtbvol
   ubi read ${initrd_addr} initrdvol
   bootz ${loadaddr} ${initrd_addr}:${filesize} ${fdt_addr}

Signed-off-by: Holger Dengler 
---
  cmd/ubi.c | 5 +
  1 file changed, 5 insertions(+)


Thanks!

Reviewed-by: Heiko Schocher 

As new release is near, I pickup this patch when the next merge window
opens.


Just tried a travis build, and it breaks a lot of boards, see

https://travis-ci.org/hsdenx/u-boot-ubi/builds/274457374

Do you have time to look into?

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


Re: [U-Boot] [U-Boot,V9,1/4] usb: rockchip: add the rockusb gadget

2017-09-12 Thread Dr. Philipp Tomsich
Hi Lukasz,

> On 12 Sep 2017, at 10:14, Łukasz Majewski  wrote:
> 
> Hi Philipp,
> 
> This patch series is waiting for opening new merge window. It is already 
> applied to usb-next tree.

Didn’t the new merge window just open yesterday?

Regards,
Philipp.

> 
>>> this patch implement rockusb protocol on the device side. this is based on 
>>> USB
>>> download gadget infrastructure. the rockusb function implements the rd, wl, 
>>> rid
>>> commands. it can work with rkdeveloptool
>>> 
>>> Signed-off-by: Eddie Cai 
>>> Reviewed-by: Simon Glass 
>>> 
>>> Changes in v9:
>>> -fix compile error
>>> 
>>> Changes in v8:
>>> -none
>>> 
>>> Changes in v7:
>>> -none
>>> 
>>> Changes in v6:
>>> -move some data to f_rockusb structure
>>> 
>>> Changes in v5:
>>> -fix build error when build non-rockchip board
>>> -fix checkpatch error
>>> 
>>> Changes in v4:
>>> -use enum instead of macro define
>>> -move some structure define and macro to f_rockusb.h
>>> -add some function comment as Simon required
>>> -address other comment from Simon
>>> -fix build error as Lukasz point out
>>> ---
>>>  arch/arm/include/asm/arch-rockchip/f_rockusb.h | 132 +
>>>  drivers/usb/gadget/Kconfig |   8 +
>>>  drivers/usb/gadget/Makefile|   1 +
>>>  drivers/usb/gadget/f_rockusb.c | 691 
>>> +
>>>  4 files changed, 832 insertions(+)
>>>  create mode 100644 arch/arm/include/asm/arch-rockchip/f_rockusb.h
>>>  create mode 100644 drivers/usb/gadget/f_rockusb.c
>>> 
>> Acked-by: Philipp Tomsich 
> 
> 
> -- 
> 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


Re: [U-Boot] [PATCH] cmd: usb: check usb_stor_curr_dev in usb dev with no parameter

2017-09-12 Thread Patrick DELAUNAY
Hi Marek,

> 
> On 08/03/2017 03:25 PM, Patrick DELAUNAY wrote:
> > Hi Marek,
> 
> Hi,
> 
> please stop top-posting.
> 

Sorry, bad habit


> > Do think that this minor patch could be integrated in v2017.09 ?
> >
> > http://patchwork.ozlabs.org/patch/762328/
> 
> Fix up the commit message, detail a bit more how to trigger the issue and use
> errno.h return value (-ENODEV ?) in the new code . Send V2 and I'll pick it.

Ok, I will send a V2 version today after a long delay due to holiday and other 
task.

For the result, I can't use errno.h because it is a command result, so I use 
CMD_RET_FAILURE is V2

> > Regards
> > Patrick
> >
> 
> --
> Best regards,
> Marek Vasut


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


Re: [U-Boot] [PATCH v1] cmd: set filesize variable in ubi read

2017-09-12 Thread Heiko Schocher

Hello Holger,

thanks for the fast fix! Hm... some nitpick:

This is v2 not v1 ... seems patchwork has a problem, as your patch
does not popup at:
http://patchwork.ozlabs.org/project/uboot/list/?page=1

(or patchwork does work slowly today ...)

Am 12.09.2017 um 09:58 schrieb Holger Dengler:

After a successful read of a UBI volume, the variable filesize is set
to the number of read bytes. To boot linux with a raw initramfs/initrd,
you must specify the exact size of the initramfs/initrd image in boot
command. If the initramfs/inird is read from UBI volume, $filesize is
required to access the number of read bytes.

Example:
   ubi read ${loadaddr} kernelvol
   ubi read ${fdtaddr} dtbvol
   ubi read ${initrd_addr} initrdvol
   bootz ${loadaddr} ${initrd_addr}:${filesize} ${fdt_addr}

Signed-off-by: Holger Dengler 
---


add here please a summary, what has changed since v1. You may
use patman ... see u-boot:tools/patman/README

Thanks!

Nevertheless, I started a new travis build with this patch, see:
https://travis-ci.org/hsdenx/u-boot-ubi/builds/274502903

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


Re: [U-Boot] [U-Boot,V9,1/4] usb: rockchip: add the rockusb gadget

2017-09-12 Thread Philipp Tomsich
> this patch implement rockusb protocol on the device side. this is based on USB
> download gadget infrastructure. the rockusb function implements the rd, wl, 
> rid
> commands. it can work with rkdeveloptool
> 
> Signed-off-by: Eddie Cai 
> Reviewed-by: Simon Glass 
> 
> Changes in v9:
>   
> -fix compile error
> 
> Changes in v8:
>   
> -none
> 
> Changes in v7:
> -none
> 
> Changes in v6:
> -move some data to f_rockusb structure
> 
> Changes in v5:
> -fix build error when build non-rockchip board
> -fix checkpatch error
> 
> Changes in v4:
> -use enum instead of macro define
> -move some structure define and macro to f_rockusb.h
> -add some function comment as Simon required
> -address other comment from Simon
> -fix build error as Lukasz point out
> ---
>  arch/arm/include/asm/arch-rockchip/f_rockusb.h | 132 +
>  drivers/usb/gadget/Kconfig |   8 +
>  drivers/usb/gadget/Makefile|   1 +
>  drivers/usb/gadget/f_rockusb.c | 691 
> +
>  4 files changed, 832 insertions(+)
>  create mode 100644 arch/arm/include/asm/arch-rockchip/f_rockusb.h
>  create mode 100644 drivers/usb/gadget/f_rockusb.c
> 

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


Re: [U-Boot] [U-Boot,2/3] rk3288: vyasa: Add falcon mode support

2017-09-12 Thread Philipp Tomsich
> From: Jagan Teki 
> 
> Add Falcon mode support in vyasa rk3288 board.
> 
> Signed-off-by: Jagan Teki 
> Reviewed-by: Philipp Tomsich 
> ---
>  board/amarula/vyasa-rk3288/vyasa-rk3288.c | 13 +
>  include/configs/vyasa-rk3288.h| 17 +
>  2 files changed, 30 insertions(+)
> 

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


Re: [U-Boot] [U-Boot, 1/4] rockchip: rk3399: move sdram driver to driver/ram

2017-09-12 Thread Philipp Tomsich
> Since we have CONFIG_RAM framwork and its driver folder, move the driver
> into it.
> 
> Signed-off-by: Kever Yang 
> ---
> 
>  arch/arm/mach-rockchip/rk3399/Makefile | 1 -
>  drivers/ram/rockchip/Makefile  | 1 +
>  {arch/arm/mach-rockchip/rk3399 => drivers/ram/rockchip}/sdram_rk3399.c | 0
>  3 files changed, 1 insertion(+), 1 deletion(-)
>  rename {arch/arm/mach-rockchip/rk3399 => 
> drivers/ram/rockchip}/sdram_rk3399.c (100%)
> 

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


Re: [U-Boot] [U-Boot,3/3] rk3288: spl: Add dram_init_banksize

2017-09-12 Thread Philipp Tomsich
> From: Jagan Teki 
> 
> Falcon mode, is updating DDR dt node configuration through
> spl_fixup_fdt() so add appropriate DDR base and size through
> dram_init_banksize.
> 
> Signed-off-by: Jagan Teki 
> Reviewed-by: Philipp Tomsich 
> ---
>  arch/arm/mach-rockchip/rk3288-board-spl.c | 17 +
>  1 file changed, 17 insertions(+)
> 

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


Re: [U-Boot] SPI NAND support

2017-09-12 Thread Suresh Gupta
Thanks Jagan for your response. 
NXP is coming up with SPI-NAND in their new SOCs/boards and we are in 
discussion that how we add this support in u-boot. 

Thanks
SuresH 

> -Original Message-
> From: Jagan Teki [mailto:jagannadh.t...@gmail.com]
> Sent: Tuesday, September 12, 2017 12:43 PM
> To: Suresh Gupta 
> Cc: u-boot@lists.denx.de
> Subject: Re: [U-Boot] SPI NAND support
> 
> On Tue, Sep 12, 2017 at 10:56 AM, Suresh Gupta 
> wrote:
> > Hi All,
> >
> > Do we have NAND support in SPI framework. Please provide me pointers so
> that I analyze/understand that for my purpose.
> 
> Currently not, we're working on driver-model based SPI Flash handling..that
> might be a starting point to add spi-nand (but not sure). And if you have any
> thoughts please post the changes or inputs.
> 
> Do you have any-idea about hardware that support spi-nand in market?
> 
> 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] SPI NAND support

2017-09-12 Thread Jagan Teki
On Tue, Sep 12, 2017 at 10:56 AM, Suresh Gupta  wrote:
> Hi All,
>
> Do we have NAND support in SPI framework. Please provide me pointers so that 
> I analyze/understand that for my purpose.

Currently not, we're working on driver-model based SPI Flash
handling..that might be a starting point to add spi-nand (but not
sure). And if you have any thoughts please post the changes or inputs.

Do you have any-idea about hardware that support spi-nand in market?

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] [U-Boot,V9,1/4] usb: rockchip: add the rockusb gadget

2017-09-12 Thread Łukasz Majewski

Hi Philipp,

This patch series is waiting for opening new merge window. It is already 
applied to usb-next tree.



this patch implement rockusb protocol on the device side. this is based on USB
download gadget infrastructure. the rockusb function implements the rd, wl, rid
commands. it can work with rkdeveloptool

Signed-off-by: Eddie Cai 
Reviewed-by: Simon Glass 

Changes in v9:
-fix compile error

Changes in v8:
-none

Changes in v7:
-none

Changes in v6:
-move some data to f_rockusb structure

Changes in v5:
-fix build error when build non-rockchip board
-fix checkpatch error

Changes in v4:
-use enum instead of macro define
-move some structure define and macro to f_rockusb.h
-add some function comment as Simon required
-address other comment from Simon
-fix build error as Lukasz point out
---
  arch/arm/include/asm/arch-rockchip/f_rockusb.h | 132 +
  drivers/usb/gadget/Kconfig |   8 +
  drivers/usb/gadget/Makefile|   1 +
  drivers/usb/gadget/f_rockusb.c | 691 +
  4 files changed, 832 insertions(+)
  create mode 100644 arch/arm/include/asm/arch-rockchip/f_rockusb.h
  create mode 100644 drivers/usb/gadget/f_rockusb.c



Acked-by: Philipp Tomsich 




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


Re: [U-Boot] [U-Boot, 2/4] rockchip: rk3188: move sdram driver to driver/ram

2017-09-12 Thread Philipp Tomsich
> Since we have CONFIG_RAM framwork and its driver folder, move the driver
> into it.
> 
> Signed-off-by: Kever Yang 
> ---
> 
>  arch/arm/mach-rockchip/rk3188/Makefile | 1 -
>  drivers/ram/rockchip/Makefile  | 1 +
>  {arch/arm/mach-rockchip/rk3188 => drivers/ram/rockchip}/sdram_rk3188.c | 0
>  3 files changed, 1 insertion(+), 1 deletion(-)
>  rename {arch/arm/mach-rockchip/rk3188 => 
> drivers/ram/rockchip}/sdram_rk3188.c (100%)
> 

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


Re: [U-Boot] [U-Boot, 2/4] rockchip: rk3188: move sdram driver to driver/ram

2017-09-12 Thread Philipp Tomsich
> Since we have CONFIG_RAM framwork and its driver folder, move the driver
> into it.
> 
> Signed-off-by: Kever Yang 
> ---
> 
>  arch/arm/mach-rockchip/rk3188/Makefile | 1 -
>  drivers/ram/rockchip/Makefile  | 1 +
>  {arch/arm/mach-rockchip/rk3188 => drivers/ram/rockchip}/sdram_rk3188.c | 0
>  3 files changed, 1 insertion(+), 1 deletion(-)
>  rename {arch/arm/mach-rockchip/rk3188 => 
> drivers/ram/rockchip}/sdram_rk3188.c (100%)
> 

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


Re: [U-Boot] [U-Boot, 3/4] rockchip: rk3288: move sdram driver to driver/ram

2017-09-12 Thread Philipp Tomsich
> Since we have CONFIG_RAM framwork and its driver folder, move the driver
> into it.
> 
> Signed-off-by: Kever Yang 
> ---
> 
>  arch/arm/mach-rockchip/rk3288/Makefile | 1 -
>  drivers/ram/rockchip/Makefile  | 1 +
>  {arch/arm/mach-rockchip/rk3288 => drivers/ram/rockchip}/sdram_rk3288.c | 0
>  3 files changed, 1 insertion(+), 1 deletion(-)
>  rename {arch/arm/mach-rockchip/rk3288 => 
> drivers/ram/rockchip}/sdram_rk3288.c (100%)
> 

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


Re: [U-Boot] [linux-sunxi] [PATCH v2 1/2] video: sunxi: extract simplefb match code to a new file

2017-09-12 Thread Andre Przywara
Hi Icenowy,

thanks for sending this!

On 11/09/17 16:54, Icenowy Zheng wrote:
> As the DE2 simplefb setup code can also benefit from the simplefb match
> code, extract it to a new source file.
> 
> Signed-off-by: Icenowy Zheng 
> ---
>  drivers/video/sunxi/Makefile  |  2 +-
>  drivers/video/sunxi/simplefb_common.c | 29 +
>  drivers/video/sunxi/simplefb_common.h | 22 ++
>  drivers/video/sunxi/sunxi_display.c   | 13 ++---
>  4 files changed, 54 insertions(+), 12 deletions(-)
>  create mode 100644 drivers/video/sunxi/simplefb_common.c
>  create mode 100644 drivers/video/sunxi/simplefb_common.h
> 
> diff --git a/drivers/video/sunxi/Makefile b/drivers/video/sunxi/Makefile
> index 0d64c2021f..10862edaca 100644
> --- a/drivers/video/sunxi/Makefile
> +++ b/drivers/video/sunxi/Makefile
> @@ -5,5 +5,5 @@
>  # SPDX-License-Identifier:   GPL-2.0+
>  #
>  
> -obj-$(CONFIG_VIDEO_SUNXI) += sunxi_display.o lcdc.o tve_common.o 
> ../videomodes.o
> +obj-$(CONFIG_VIDEO_SUNXI) += sunxi_display.o simplefb_common.o lcdc.o 
> tve_common.o ../videomodes.o
>  obj-$(CONFIG_VIDEO_DE2) += sunxi_de2.o sunxi_dw_hdmi.o lcdc.o ../dw_hdmi.o
> diff --git a/drivers/video/sunxi/simplefb_common.c 
> b/drivers/video/sunxi/simplefb_common.c
> new file mode 100644
> index 00..4823f13a0c
> --- /dev/null
> +++ b/drivers/video/sunxi/simplefb_common.c
> @@ -0,0 +1,29 @@
> +/*
> + * Common code for Allwinner SimpleFB with pipeline.
> + *
> + * (C) Copyright 2014-2015 Hans de Goede 
> + * (C) Copyright 2017 Icenowy Zheng 
> + *
> + * SPDX-License-Identifier:  GPL-2.0+
> + */
> +
> +#include 
> +
> +int sunxi_simplefb_fdt_match(void *blob, const char *pipeline)
> +{
> + int offset, ret;
> +
> + /* Find a prefilled simpefb node, matching out pipeline config */
> + offset = fdt_node_offset_by_compatible(blob, -1,
> +"allwinner,simple-framebuffer");
> + while (offset >= 0) {
> + ret = fdt_stringlist_search(blob, offset, "allwinner,pipeline",
> + pipeline);
> + if (ret == 0)
> + break;
> + offset = fdt_node_offset_by_compatible(blob, offset,
> +"allwinner,simple-framebuffer");
> + }
> +
> + return offset;
> +}
> diff --git a/drivers/video/sunxi/simplefb_common.h 
> b/drivers/video/sunxi/simplefb_common.h
> new file mode 100644
> index 00..ac9bfcb087
> --- /dev/null
> +++ b/drivers/video/sunxi/simplefb_common.h
> @@ -0,0 +1,22 @@
> +/*
> + * (C) Copyright 2017 Icenowy Zheng 
> + *
> + * SPDX-License-Identifier:  GPL-2.0+
> + */
> +
> +#ifndef __SIMPLEFB_COMMON_H
> +#define __SIMPLEFB_COMMON_H
> +
> +/*

Just a nit, but I think kerndoc requires two asterisks here ("/**").

The rest looks fine to me, so:

Reviewed-by: Andre Przywara 

Cheers,
Andre.

> + * sunxi_simplefb_fdt_match() - match a sunxi simplefb node
> + *
> + * Match a sunxi simplefb device node with a specified pipeline, and
> + * return its offset.
> + *
> + * @blob: device tree blob
> + * @pipeline: display pipeline
> + * @return device node offset in blob, or negative values if failed
> + */
> +int sunxi_simplefb_fdt_match(void *blob, const char *pipeline);
> +
> +#endif
> diff --git a/drivers/video/sunxi/sunxi_display.c 
> b/drivers/video/sunxi/sunxi_display.c
> index de768ba94a..7f25ed5f26 100644
> --- a/drivers/video/sunxi/sunxi_display.c
> +++ b/drivers/video/sunxi/sunxi_display.c
> @@ -29,6 +29,7 @@
>  #include "../anx9804.h"
>  #include "../hitachi_tx18d42vm_lcd.h"
>  #include "../ssd2828.h"
> +#include "simplefb_common.h"
>  
>  #ifdef CONFIG_VIDEO_LCD_BL_PWM_ACTIVE_LOW
>  #define PWM_ON 0
> @@ -1377,17 +1378,7 @@ int sunxi_simplefb_setup(void *blob)
>   break;
>   }
>  
> - /* Find a prefilled simpefb node, matching out pipeline config */
> - offset = fdt_node_offset_by_compatible(blob, -1,
> -"allwinner,simple-framebuffer");
> - while (offset >= 0) {
> - ret = fdt_stringlist_search(blob, offset, "allwinner,pipeline",
> - pipeline);
> - if (ret == 0)
> - break;
> - offset = fdt_node_offset_by_compatible(blob, offset,
> -"allwinner,simple-framebuffer");
> - }
> + offset = sunxi_simplefb_fdt_match(blob, pipeline);
>   if (offset < 0) {
>   eprintf("Cannot setup simplefb: node not found\n");
>   return 0; /* Keep older kernels working */
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v3] rk3288: Add Vyasa initial board support

2017-09-12 Thread Philipp Tomsich
> From: Jagan Teki 
> 
> This patch adds support for Vyasa RK3288 initial board
> from Amarula Solutions.
> 
> Boot from SDMMC:
> ---
> U-Boot SPL 2017.09-rc1-00111-g3656991-dirty (Aug 10 2017 - 11:40:45)
> Trying to boot from MMC1
> 
> U-Boot 2017.09-rc1-00111-g3656991-dirty (Aug 10 2017 - 11:40:45 +0530)
> 
> Model: Amarula Vyasa-RK3288
> DRAM:  2 GiB
> MMC:   dwmmc@ff0c: 1
> *** Warning - bad CRC, using default environment
> 
> In:serial@ff69
> Out:   serial@ff69
> Err:   serial@ff69
> Model: Amarula Vyasa-RK3288
> Net:   Net Initialization Skipped
> No ethernet found.
> Hit any key to stop autoboot:  0
> =>
> 
> Reviewed-by: Simon Glass 
> Signed-off-by: Jagan Teki 
> Reviewed-by: Philipp Tomsich 
> ---
> Changes for v3:
> - Remove CONFIG_ENV_IS_IN_MMC from include file
> - Update commit message with company name
> - Fix proper board name on MAINTAINERS file
> Changes for v2:
> - Fix commit message
> - Move CONFIG_ENV_IS_IN_MMC to configs
> 
>  arch/arm/dts/Makefile |   1 +
>  arch/arm/dts/rk3288-vyasa.dts | 327 
> ++
>  arch/arm/mach-rockchip/rk3288/Kconfig |  11 +
>  board/amarula/vyasa-rk3288/Kconfig|  12 ++
>  board/amarula/vyasa-rk3288/MAINTAINERS|   6 +
>  board/amarula/vyasa-rk3288/Makefile   |   7 +
>  board/amarula/vyasa-rk3288/vyasa-rk3288.c |   7 +
>  configs/vyasa-rk3288_defconfig|  63 ++
>  include/configs/vyasa-rk3288.h|  22 ++
>  9 files changed, 456 insertions(+)
>  create mode 100644 arch/arm/dts/rk3288-vyasa.dts
>  create mode 100644 board/amarula/vyasa-rk3288/Kconfig
>  create mode 100644 board/amarula/vyasa-rk3288/MAINTAINERS
>  create mode 100644 board/amarula/vyasa-rk3288/Makefile
>  create mode 100644 board/amarula/vyasa-rk3288/vyasa-rk3288.c
>  create mode 100644 configs/vyasa-rk3288_defconfig
>  create mode 100644 include/configs/vyasa-rk3288.h
> 

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


Re: [U-Boot] [U-Boot, 1/4] rockchip: rk3399: move sdram driver to driver/ram

2017-09-12 Thread Philipp Tomsich
> Since we have CONFIG_RAM framwork and its driver folder, move the driver
> into it.
> 
> Signed-off-by: Kever Yang 
> ---
> 
>  arch/arm/mach-rockchip/rk3399/Makefile | 1 -
>  drivers/ram/rockchip/Makefile  | 1 +
>  {arch/arm/mach-rockchip/rk3399 => drivers/ram/rockchip}/sdram_rk3399.c | 0
>  3 files changed, 1 insertion(+), 1 deletion(-)
>  rename {arch/arm/mach-rockchip/rk3399 => 
> drivers/ram/rockchip}/sdram_rk3399.c (100%)
> 

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


Re: [U-Boot] [U-Boot, 4/4] rockchip: rk3328: move sdram driver to driver/ram

2017-09-12 Thread Philipp Tomsich
> Since we have CONFIG_RAM framwork and its driver folder, move the driver
> into it.
> 
> Signed-off-by: Kever Yang 
> ---
> 
>  arch/arm/mach-rockchip/rk3328/Makefile | 1 -
>  drivers/ram/rockchip/Makefile  | 1 +
>  {arch/arm/mach-rockchip/rk3328 => drivers/ram/rockchip}/sdram_rk3328.c | 0
>  3 files changed, 1 insertion(+), 1 deletion(-)
>  rename {arch/arm/mach-rockchip/rk3328 => 
> drivers/ram/rockchip}/sdram_rk3328.c (100%)
> 

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


[U-Boot] [PATCH] ARM: socfpga: fix duplicate const specifier warning

2017-09-12 Thread Masahiro Yamada
GCC 7.1 warns:
duplicate ‘const’ declaration specifier [-Wduplicate-decl-specifier]

Signed-off-by: Masahiro Yamada 
---

 arch/arm/mach-socfpga/misc_gen5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-socfpga/misc_gen5.c 
b/arch/arm/mach-socfpga/misc_gen5.c
index 2f1da74..91ddb79 100644
--- a/arch/arm/mach-socfpga/misc_gen5.c
+++ b/arch/arm/mach-socfpga/misc_gen5.c
@@ -144,7 +144,7 @@ static const struct {
const u16   pn;
const char  *name;
const char  *var;
-} const socfpga_fpga_model[] = {
+} socfpga_fpga_model[] = {
/* Cyclone V E */
{ 0x2b15, "Cyclone V, E/A2", "cv_e_a2" },
{ 0x2b05, "Cyclone V, E/A4", "cv_e_a4" },
-- 
2.7.4

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


[U-Boot] u-boot ubifsload & verify uImage

2017-09-12 Thread Johann Obermayr
Hello,

we use ubifsload to load the uImage and start it with bootm
Is there a way to verify the uImage file ?
Sometime we have the problem, that uImage is corrupt (powerdown while update)

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


Re: [U-Boot] [PATCH v2 2/2] sunxi: setup simplefb for Allwinner DE2

2017-09-12 Thread Maxime Ripard
Hi,

On Mon, Sep 11, 2017 at 11:54:58PM +0800, Icenowy Zheng wrote:
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index 1373b1f037..c240fe4403 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -288,6 +288,10 @@ extern int soft_i2c_gpio_scl;
>  
>  #endif /* CONFIG_VIDEO */
>  
> +#ifdef CONFIG_VIDEO_DE2
> +#define CONFIG_VIDEO_DT_SIMPLEFB
> +#endif
> +

Please use a Kconfig option for that one.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


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


Re: [U-Boot] [RFC 1/1] efi_loader: fix building of helloworld.efi on x86_64

2017-09-12 Thread Heinrich Schuchardt
On 09/12/2017 05:00 AM, Bin Meng wrote:
> Hi Heinrich,
> 
> On Sun, Sep 10, 2017 at 4:55 PM, Heinrich Schuchardt  
> wrote:
>> Variable EFI_LDS is set based on CONFIG_EFI_STUB_64BIT.
>> It influences which lds script is used for compiling helloworld.efi.
>> This results in building helloworld.efi failing on x86_64 if
>> CONFIG_EFI_STUB_64BIT is not set. CONFIG_EFI_STUB_64BIT is only
>> visible if EFI_STUB is selected. We should be able to compile a 64bit
>> helloworld.efi irrespective of EFI_STUB.
>>
>> With the patch the bitness of the efi build is taken from the
>> architecture choice.
>>
>> Signed-off-by: Heinrich Schuchardt 
>> ---
>> For proper testing
>> https://lists.denx.de/pipermail/u-boot/2017-September/305184.html
>> must be fixed.
>>
>> So I send this as RFC.
> 
> Sorry I missed this. This does not go to the U-Boot ML. Did you intend
> to keep the discussion among us?
> 
CC: U-Boot Mailing List 

>>
>> Alex, do you remember why CONFIG_EFI_STUB_64BIT was introduced in the
>> first place.
>>
> 
> The CONFIG_EFI_STUB_64BIT was introduced to support booting from a
> 64-bit EFI BIOS.
> 
>> Would you ever use a stub with a different bitness than U-Boot?
>>
> 
> Yes, for example U-Boot x86 32-bit to boot a 64-bit EFI payload.

My understanding is that the EFI stub is used if U-Boot is loaded as an
EFI application.

It has nothing to do with the EFI application or driver loaded by
U-boot's bootefi command, which I assume you reference as "to boot a
64-bit EFI payload".

A stub with different bitness than U-Boot would be needed if we wanted
to load 64 bit U-Boot as a 32 bit EFI application or a 32 bit U-Boot as
a 64 bit EFI application. Is this required in any scenario?

Regards

Heinrich

> 
>> Regards
>>
>> Heinrich
>> ---
>>  arch/x86/config.mk | 12 ++--
>>  lib/efi/Kconfig| 18 --
>>  2 files changed, 6 insertions(+), 24 deletions(-)
>>
>> diff --git a/arch/x86/config.mk b/arch/x86/config.mk
>> index fe8639aef6..a87dd33837 100644
>> --- a/arch/x86/config.mk
>> +++ b/arch/x86/config.mk
>> @@ -93,16 +93,16 @@ endif
>>
>>  ifneq 
>> ($(CONFIG_EFI_STUB)$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE)$(CONFIG_CMD_SELFTEST_COMPILE),)
>>
>> -ifneq ($(CONFIG_EFI_STUB_64BIT),)
>> -EFI_LDS := elf_x86_64_efi.lds
>> -EFI_CRT0 := crt0_x86_64_efi.o
>> -EFI_RELOC := reloc_x86_64_efi.o
>> -EFI_TARGET := --target=efi-app-ia32
>> -else
>> +ifeq ($(IS_32BIT),y)
>>  EFI_LDS := elf_ia32_efi.lds
>>  EFI_CRT0 := crt0_ia32_efi.o
>>  EFI_RELOC := reloc_ia32_efi.o
>>  EFI_TARGET := --target=efi-app-x86_64
>> +else
>> +EFI_LDS := elf_x86_64_efi.lds
>> +EFI_CRT0 := crt0_x86_64_efi.o
>> +EFI_RELOC := reloc_x86_64_efi.o
>> +EFI_TARGET := --target=efi-app-ia32
>>  endif
>>
>>  endif
>> diff --git a/lib/efi/Kconfig b/lib/efi/Kconfig
>> index 919e314a0c..8c0bc2a529 100644
>> --- a/lib/efi/Kconfig
>> +++ b/lib/efi/Kconfig
>> @@ -34,21 +34,3 @@ config EFI_RAM_SIZE
>>   use. U-Boot allocates this from EFI on start-up (along with a few
>>   other smaller amounts) and it can never be increased after that.
>>   It is used as the RAM size in with U-Boot.
>> -
>> -choice
>> -   prompt "EFI 32/64-bit selection"
>> -   depends on EFI_STUB
>> -   help
>> - EFI does not support mixing 32-bit and 64-bit modes. This is a
>> - significant problem because it means that you must build a stub 
>> with
>> - the correct type for EFI to load it correctly. If you are using
>> - 32-bit EFI, select 32-bit here, else select 64-bit. Failure to do
>> - this may produce no error message - it just won't start!
>> -
>> -config EFI_STUB_32BIT
>> -   bool "Produce a stub for running with 32-bit EFI"
>> -
>> -config EFI_STUB_64BIT
>> -   bool "Produce a stub for running with 64-bit EFI"
>> -
>> -endchoice
>> --
> 
> Regards,
> Bin
> 

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


Re: [U-Boot] [U-Boot, 4/4] rockchip: rk3328: move sdram driver to driver/ram

2017-09-12 Thread Philipp Tomsich
> Since we have CONFIG_RAM framwork and its driver folder, move the driver
> into it.
> 
> Signed-off-by: Kever Yang 
> ---
> 
>  arch/arm/mach-rockchip/rk3328/Makefile | 1 -
>  drivers/ram/rockchip/Makefile  | 1 +
>  {arch/arm/mach-rockchip/rk3328 => drivers/ram/rockchip}/sdram_rk3328.c | 0
>  3 files changed, 1 insertion(+), 1 deletion(-)
>  rename {arch/arm/mach-rockchip/rk3328 => 
> drivers/ram/rockchip}/sdram_rk3328.c (100%)
> 

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


Re: [U-Boot] [U-Boot, 3/4] rockchip: rk3288: move sdram driver to driver/ram

2017-09-12 Thread Philipp Tomsich
> Since we have CONFIG_RAM framwork and its driver folder, move the driver
> into it.
> 
> Signed-off-by: Kever Yang 
> ---
> 
>  arch/arm/mach-rockchip/rk3288/Makefile | 1 -
>  drivers/ram/rockchip/Makefile  | 1 +
>  {arch/arm/mach-rockchip/rk3288 => drivers/ram/rockchip}/sdram_rk3288.c | 0
>  3 files changed, 1 insertion(+), 1 deletion(-)
>  rename {arch/arm/mach-rockchip/rk3288 => 
> drivers/ram/rockchip}/sdram_rk3288.c (100%)
> 

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


[U-Boot] [PATCH v3 2/3] video: add an option for video simplefb via DT

2017-09-12 Thread Icenowy Zheng
Add an option to indicate that the video driver should setup a SimpleFB
node that passes the video framebuffer initialized by U-Boot to the
operating system kernel.

Currently only the Allwinner DE2 driver uses this option.

Signed-off-by: Icenowy Zheng 
---
 drivers/video/Kconfig | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 082cc4a528..e4e71763f5 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -601,4 +601,14 @@ config VIDEO_DW_HDMI
  rather requires a SoC-specific glue driver to call it), it
  can not be enabled from the configuration menu.
 
+config VIDEO_DT_SIMPLEFB
+   bool "Enable SimpleFB support for passing framebuffer to OS"
+   depends on VIDEO_DE2
+   default y
+   help
+ Enables the code to pass the framebuffer to the kernel as a
+ simple framebuffer in the device tree.
+ The video output is initialized by U-Boot, and kept by the
+ kernel.
+
 endmenu
-- 
2.13.5

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


[U-Boot] [PATCH 3/3] nds32: ftmac100: Fix write mac addr fail problem.

2017-09-12 Thread Andes
From: rick 

After soft reset complete, write mac address immediately will fail.
Add delay to work around this problem.

Signed-off-by: rick 
---
 drivers/net/ftmac100.c |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index 4e45f00..e64bf3d 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -40,7 +40,12 @@ static void ftmac100_reset(struct ftmac100_data *priv)
writel (FTMAC100_MACCR_SW_RST, >maccr);
 
while (readl (>maccr) & FTMAC100_MACCR_SW_RST)
-   ;
+   mdelay(1);
+   /*
+* When soft reset complete, write mac address immediately maybe fail 
somehow
+*  Wait for a while can avoid this problem
+*/
+   mdelay(1);
 }
 
 /*
-- 
1.7.9.5

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


Re: [U-Boot] Compile failure encountered on latest (2017-07-20) git://git.denx.de/u-boot-usb.git branch master for target ls1021atwr_nor_defconfig

2017-09-12 Thread Bin Meng
Hi Ran,

On Wed, Jul 26, 2017 at 3:58 PM, Ran Wang  wrote:
> Hi Bin
>
>> -Original Message-
>> From: Bin Meng [mailto:bmeng...@gmail.com]
>> Sent: Wednesday, July 26, 2017 3:56 PM
>> To: Ran Wang 
>> Cc: Marek Vasut ; Patrice Chotard ;
>> Simon Glass ; Masahiro Yamada
>> ; Jiafei Pan ; u-
>> b...@lists.denx.de; Xiaobo Xie 
>> Subject: Re: Compile failure encountered on latest (2017-07-20)
>> git://git.denx.de/u-boot-usb.git branch master for target
>> ls1021atwr_nor_defconfig
>>
>> Hi Ran,
>>
>> On Wed, Jul 26, 2017 at 3:46 PM, Ran Wang  wrote:
>> > Hi Bin
>> >
>> >> -Original Message-
>> >> From: Bin Meng [mailto:bmeng...@gmail.com]
>> >> Sent: Wednesday, July 26, 2017 3:34 PM
>> >> To: Ran Wang 
>> >> Cc: Marek Vasut ; Patrice Chotard
>> >> ; Simon Glass ; Masahiro
>> >> Yamada ; Jiafei Pan
>> >> ; u- b...@lists.denx.de; Xiaobo Xie
>> >> 
>> >> Subject: Re: Compile failure encountered on latest (2017-07-20)
>> >> git://git.denx.de/u-boot-usb.git branch master for target
>> >> ls1021atwr_nor_defconfig
>> >>
>> >> Hi Ran,
>> >>
>> >> On Wed, Jul 26, 2017 at 2:37 PM, Ran Wang  wrote:
>> >> > Hi Bin
>> >> >
>> >> >> -Original Message-
>> >> >> From: Bin Meng [mailto:bmeng...@gmail.com]
>> >> >> Sent: Wednesday, July 26, 2017 12:41 PM
>> >> >> To: Ran Wang 
>> >> >> Cc: Marek Vasut ; Patrice Chotard
>> >> >> ; Simon Glass ; Masahiro
>> >> >> Yamada ; Jiafei Pan
>> >> >> ; u- b...@lists.denx.de; Xiaobo Xie
>> >> >> 
>> >> >> Subject: Re: Compile failure encountered on latest (2017-07-20)
>> >> >> git://git.denx.de/u-boot-usb.git branch master for target
>> >> >> ls1021atwr_nor_defconfig
>> >> >>
>> >> >> Hi Ran,
>> >> >>
>> >> >> On Wed, Jul 26, 2017 at 11:30 AM, Ran Wang 
>> >> wrote:
>> >> >> > Hi Bin
>> >> >> >> -Original Message-
>> >> >> >> From: Bin Meng [mailto:bmeng...@gmail.com]
>> >> >> >> Sent: Tuesday, July 25, 2017 8:22 PM
>> >> >> >> To: Ran Wang 
>> >> >> >> Cc: Marek Vasut ; Patrice Chotard
>> >> >> >> ; Simon Glass ;
>> >> >> >> Masahiro Yamada ; Jiafei Pan
>> >> >> >> ; u- b...@lists.denx.de; Xiaobo Xie
>> >> >> >> 
>> >> >> >> Subject: Re: Compile failure encountered on latest (2017-07-20)
>> >> >> >> git://git.denx.de/u-boot-usb.git branch master for target
>> >> >> >> ls1021atwr_nor_defconfig
>> >> >> >>
>> >> >> >> Hi Ran,
>> >> >> >>
>> >> >> >> On Tue, Jul 25, 2017 at 7:01 PM, Ran Wang 
>> >> wrote:
>> >> >> >> >> -Original Message-
>> >> >> >> >> From: Bin Meng [mailto:bmeng...@gmail.com]
>> >> >> >> >> Sent: Friday, July 21, 2017 8:29 PM
>> >> >> >> >> To: Ran Wang 
>> >> >> >> >> Cc: Marek Vasut ; Patrice Chotard
>> >> >> >> >> ; Simon Glass ;
>> >> >> >> >> Masahiro Yamada ; Jiafei Pan
>> >> >> >> >> ; u- b...@lists.denx.de
>> >> >> >> >> Subject: Re: Compile failure encountered on latest
>> >> >> >> >> (2017-07-20) git://git.denx.de/u-boot-usb.git branch master
>> >> >> >> >> for target ls1021atwr_nor_defconfig
>> >> >> >> >>
>> >> >> >> >> Hi Ran,
>> >> >> >> > Hi Bin.
>> >> >> >> >>
>> >> >> >> >> On Thu, Jul 20, 2017 at 5:47 PM, Ran Wang
>> >> >> >> >> 
>> >> >> wrote:
>> >> >> >> >> > Hi All,
>> >> >> >> >> > Actually I just plan to try feature of support SS hub
>> >> >> >> >> > which just enabled this
>> >> >> >> >> yesterday on LS1021ATWR (I know need to enable DM_USB for
>> >> >> >> >> 1021
>> >> first).
>> >> >> >> >>
>> >> >> >> >> Should the DM_USB enablement be this patch done by Alison?
>> >> >> >> >> https://patchwork.ozlabs.org/patch/785387/
>> >> >> >> >>
>> >> >> >> >> > Per your knowledge, if I revert the patches I pasted
>> >> >> >> >> > in last mail,  the SS hub
>> >> >> >> >> support feature will be impacted or not?
>> >> >> >> >> > Thanks.
>> >> >> >> >>
>> >> >> >> >> Note the SS hub support only exists in DM USB. If you revert
>> >> >> >> >> the dwc3-xhci patchset which converts dwc3 to DM USB, you
>> >> >> >> >> will not get the SS
>> >> >> >> hub support.
>> >> >> >> > Thanks for your information, I will re-check this impact with my 
>> >> >> >> > board.
>> >> >> >> > Actually I have encountered enumeration random fail issue
>> >> >> >> > with an USB
>> >> >> >> > 3.0 thumb 

[U-Boot] [PATCH V2] dm: gpio: Add DM compatibilty to GPIO driver for Davinci

2017-09-12 Thread Adam Ford
This adds DM compatibility for the davinici GPIO driver.
Tested on da850-evm.

Signed-off-by: Adam Ford 
---
V2:  The bank calculation needs to take into account the size of the struct
 Whitespace fixes

 arch/arm/mach-davinci/include/mach/gpio.h |  14 +-
 board/davinci/da8xxevm/da850evm.c |   2 +
 configs/da850evm_defconfig|   3 +-
 drivers/gpio/da8xx_gpio.c | 208 +++---
 include/configs/da850evm.h|   1 +
 5 files changed, 205 insertions(+), 23 deletions(-)

diff --git a/arch/arm/mach-davinci/include/mach/gpio.h 
b/arch/arm/mach-davinci/include/mach/gpio.h
index 7da0060..32cae3a 100644
--- a/arch/arm/mach-davinci/include/mach/gpio.h
+++ b/arch/arm/mach-davinci/include/mach/gpio.h
@@ -40,7 +40,7 @@ struct davinci_gpio_bank {
unsigned int irq_num;
unsigned int irq_mask;
unsigned long *in_use;
-   unsigned long base;
+   struct davinci_gpio *base;
 };
 
 #define davinci_gpio_bank01 ((struct davinci_gpio *)DAVINCI_GPIO_BANK01)
@@ -49,7 +49,9 @@ struct davinci_gpio_bank {
 #define davinci_gpio_bank67 ((struct davinci_gpio *)DAVINCI_GPIO_BANK67)
 #define davinci_gpio_bank8 ((struct davinci_gpio *)DAVINCI_GPIO_BANK8)
 
+#ifndef CONFIG_DM_GPIO
 #define gpio_status()  gpio_info()
+#endif
 #define GPIO_NAME_SIZE 20
 #if defined(CONFIG_SOC_DM644X)
 /* GPIO0 to GPIO53, omit the V3.3 volts one */
@@ -64,4 +66,14 @@ struct davinci_gpio_bank {
 
 void gpio_info(void);
 
+#ifdef CONFIG_DM_GPIO
+
+/* Information about a GPIO bank */
+struct davinci_gpio_platdata {
+   int bank_index;
+   ulong base; /* address of registers in physical memory */
+   const char *port_name;
+};
+#endif
+
 #endif
diff --git a/board/davinci/da8xxevm/da850evm.c 
b/board/davinci/da8xxevm/da850evm.c
index 42bc0f4..2a54d0f 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -10,6 +10,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -24,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #ifdef CONFIG_MMC_DAVINCI
 #include 
diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
index b966fa7..24507da 100644
--- a/configs/da850evm_defconfig
+++ b/configs/da850evm_defconfig
@@ -20,14 +20,15 @@ CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot > "
 # CONFIG_CMD_IMLS is not set
 CONFIG_CRC32_VERIFY=y
+# CONFIG_CMD_EEPROM is not set
 # CONFIG_CMD_FLASH is not set
-# CONFIG_CMD_GPIO is not set
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_MTDPARTS=y
 CONFIG_CMD_DIAG=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_DM=y
+CONFIG_DM_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_DM_I2C_COMPAT=y
 CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
diff --git a/drivers/gpio/da8xx_gpio.c b/drivers/gpio/da8xx_gpio.c
index fa3a394..b64f936 100644
--- a/drivers/gpio/da8xx_gpio.c
+++ b/drivers/gpio/da8xx_gpio.c
@@ -8,16 +8,20 @@
  */
 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
 
+#ifndef CONFIG_DM_GPIO
 static struct gpio_registry {
int is_registered;
char name[GPIO_NAME_SIZE];
 } gpio_registry[MAX_NUM_GPIOS];
 
+
 #if defined(CONFIG_SOC_DA8XX)
 #define pinmux(x)   (_syscfg_regs->pinmux[x])
 
@@ -334,42 +338,30 @@ int gpio_free(unsigned gpio)
/* Do not configure as input or change pin mux here */
return 0;
 }
+#endif
 
-int gpio_direction_input(unsigned gpio)
+static int _gpio_direction_output(struct davinci_gpio *bank, unsigned gpio, 
int value)
 {
-   struct davinci_gpio *bank;
-
-   bank = GPIO_BANK(gpio);
-   setbits_le32(>dir, 1U << GPIO_BIT(gpio));
+   clrbits_le32(>dir, 1U << GPIO_BIT(gpio));
+   gpio_set_value(gpio, value);
return 0;
 }
 
-int gpio_direction_output(unsigned gpio, int value)
+static int _gpio_direction_input(struct davinci_gpio *bank, unsigned gpio)
 {
-   struct davinci_gpio *bank;
-
-   bank = GPIO_BANK(gpio);
-   clrbits_le32(>dir, 1U << GPIO_BIT(gpio));
-   gpio_set_value(gpio, value);
+   setbits_le32(>dir, 1U << GPIO_BIT(gpio));
return 0;
 }
 
-int gpio_get_value(unsigned gpio)
+static int _gpio_get_value(struct davinci_gpio *bank, unsigned gpio)
 {
-   struct davinci_gpio *bank;
unsigned int ip;
-
-   bank = GPIO_BANK(gpio);
ip = in_le32(>in_data) & (1U << GPIO_BIT(gpio));
return ip ? 1 : 0;
 }
 
-int gpio_set_value(unsigned gpio, int value)
+static int _gpio_set_value(struct davinci_gpio *bank, unsigned gpio, int value)
 {
-   struct davinci_gpio *bank;
-
-   bank = GPIO_BANK(gpio);
-
if (value)
bank->set_data = 1U << GPIO_BIT(gpio);
else
@@ -378,6 +370,13 @@ int gpio_set_value(unsigned gpio, int value)
return 0;
 }
 
+static int _gpio_get_dir(struct davinci_gpio *bank, unsigned gpio)
+{
+   return in_le32(>dir) & (1U << GPIO_BIT(gpio));
+}
+
+#ifndef CONFIG_DM_GPIO
+
 void gpio_info(void)
 {

Re: [U-Boot] [PATCH v5 1/3] armv8:fsl-layerscape: Consolidate registers space defination for CCI-400 bus

2017-09-12 Thread York Sun
On 08/10/2017 10:39 PM, Ashish Kumar wrote:
> CoreLink Cache Coherent Interconnect (CCI) is ARM BUS which
> provides full cache coherency between two clusters of multi-core
> CPUs and I/O coherency for devices and I/O masters.
> 
> This patch add new CONFIG defination "SYS_FSL_HAS_CCI400" and
> moves existing register space definaton of CCI-400 bus
> from immap_lsch2 to fsl_immap, so that it can be used
> for both chasis 2 and chasis 3.
> 
> "CONFIG_SYS_CCI400_ADDR" is depricated and new SYS_CCI400_OFFSET
> is introduced in Kconfig
> 
> Signed-off-by: Ashish Kumar 
> Signed-off-by: Prabhakar Kushwaha 
> ---
> v3:
>   This is v3 for 
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fpatch%2F731464%2F=01%7C01%7Cyork.sun%40nxp.com%7C4f61d387ca34498ea03508d4e07b6201%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0=%2Bws6L80BORcRZtZd6O6Maun425cZ7bfUhGik1eJaO1I%3D=0
> v4:
>   Header file included in middle of the file in cpu.c
> v5:
>   Moving ls1021aqds to 2/3-armv7 of this patch-set
> 

Squashed three patches into one commit. Applied to fsl-qoriq master. Thanks.

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


[U-Boot] [PATCH 1/3] nds32: ftmac100: support cache enable.

2017-09-12 Thread Andes
From: rick 

Add cache inval and flush when rx and tx.

Signed-off-by: rick 
---
 drivers/net/ftmac100.c |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index f231e6b..4e45f00 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -79,7 +79,6 @@ static int _ftmac100_init(struct ftmac100_data *priv, 
unsigned char enetaddr[6])
struct ftmac100_rxdes *rxdes = priv->rxdes;
unsigned int maccr;
int i;
-
debug ("%s()\n", __func__);
 
ftmac100_reset(priv);
@@ -156,7 +155,6 @@ static int __ftmac100_recv(struct ftmac100_data *priv)
unsigned short rxlen;
 
curr_des = >rxdes[priv->rx_index];
-
if (curr_des->rxdes0 & FTMAC100_RXDES0_RXDMA_OWN)
return 0;
 
@@ -169,7 +167,7 @@ static int __ftmac100_recv(struct ftmac100_data *priv)
}
 
rxlen = FTMAC100_RXDES0_RFL (curr_des->rxdes0);
-
+   invalidate_dcache_range(curr_des->rxdes2,curr_des->rxdes2+rxlen);
debug ("%s(): RX buffer %d, %x received\n",
   __func__, priv->rx_index, rxlen);
 
@@ -196,6 +194,7 @@ static int _ftmac100_send(struct ftmac100_data *priv, void 
*packet, int length)
 
/* initiate a transmit sequence */
 
+   flush_dcache_range((u32)packet,(u32)packet+length);
curr_des->txdes2 = (unsigned int)packet;/* TXBUF_BADR */
 
curr_des->txdes1 &= FTMAC100_TXDES1_EDOTR;
-- 
1.7.9.5

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


Re: [U-Boot] [PATCH v3 5/5] spl: fit: Add booting OS first

2017-09-12 Thread York Sun
On 08/15/2017 11:15 AM, York Sun wrote:
> If CONFIG_SPL_OS_BOOT is enabled, boot OS if kernel image is found
> in FIT structure.
> 
> Signed-off-by: York Sun 
> Reviewed-by: Tom Rini 
> 
> ---
> This presums the kernel image doesn't exist in a FIT image intended for
> U-Boot. If kernel image normally co-exists with U-Boot and other images
> and user intends to boot U-Boot, this patch needs to rewrite to favor
> "loadables" over either "firmware" or "kernel" so user can select which
> image to boot.
> 
> Changes in v3:
> Update doc/uImage.FIT/multi_spl.its to explain the priority of booting image.
> 
> Changes in v2:
> Split from previous patch, rebased on top of "SPL: FIT: allow loading
> multiple images" by Andre Przywara.

Applied to fsl-qoriq master.

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


Re: [U-Boot] [PATCH v3 3/5] spl: fit: Eanble GZIP support for image decompression

2017-09-12 Thread York Sun
On 08/15/2017 11:15 AM, York Sun wrote:
> Add Kconfig option SPL_GZIP and SPL_ZLIB to enable gunzip support for
> SPL boot, eg. falcon boot compressed kernel image.
> 
> Signed-off-by: York Sun 
> Reviewed-by: Tom Rini 
> 
> ---
> 
> Changes in v3:
> Replace ifdef with if IS_ENABLED().
> Add help to new Kconfig optons.
> 
> Changes in v2:
> Combine Kconfig change and actual code into one patch
> 

Applied to fsl-qoriq master.

York

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


Re: [U-Boot] [PATCH] armv8: fsl-layerscape: Fix final MMU table for QSPI and IFC

2017-09-12 Thread York Sun
On 08/29/2017 06:42 AM, Suresh Gupta wrote:
> For QSPI and IFC addresses execution shouldn't be allowed
> when u-boot running from DDR. Revise the MMU final table
> to enforce execute-never bits.
> 
> Signed-off-by: Suresh Gupta 
> ---

Applied to fsl-qoriq master. Thanks.

York

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


Re: [U-Boot] [PATCH v2 3/3] rockchip: evb-rk3399: update document for board bring up

2017-09-12 Thread Kever Yang

Hi Jagan,


On 08/31/2017 02:13 PM, Jagan Teki wrote:

Hi Kever,

On Thu, Aug 31, 2017 at 6:37 AM, Kever Yang  wrote:

Hi Jagan,



On 08/30/2017 11:10 PM, Jagan Teki wrote:

+ Philipp

On Mon, Aug 21, 2017 at 6:30 PM, Kever Yang 
wrote:

Since we support ATF in SPL and add script for it, let's make the
document up to date.

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

Changes in v2:
- typo fix, evb-firefly->firefly-rk3399

   board/rockchip/evb_rk3399/README | 79

   1 file changed, 63 insertions(+), 16 deletions(-)

diff --git a/board/rockchip/evb_rk3399/README
b/board/rockchip/evb_rk3399/README
index fb8bb19..b5c7614 100644
--- a/board/rockchip/evb_rk3399/README
+++ b/board/rockchip/evb_rk3399/README
@@ -18,8 +18,8 @@ evb key features:
   * PMIC: rk808
   * debug console: UART2

-In order to support Arm Trust Firmware(ATF), we need to use the
-miniloader from rockchip which:
+In order to support Arm Trust Firmware(ATF), we can use either SPL or
+miniloader from rockchip to do:
   * do DRAM init
   * load and verify ATF image
   * load and verify U-Boot image
@@ -32,8 +32,8 @@ Get the Source and prebuild binary
 > mkdir ~/evb_rk3399
 > cd ~/evb_rk3399
 > git clone https://github.com/ARM-software/arm-trusted-firmware.git
-  > git clone https://github.com/rockchip-linux/rkbin
-  > git clone https://github.com/rockchip-linux/rkflashtool
+  > git clone https://github.com/rockchip-linux/rkbin.git
+  > git clone https://github.com/rockchip-linux/rkdeveloptool.git

   Compile the ATF
   ===
@@ -42,32 +42,79 @@ Compile the ATF
 > make realclean
 > make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 bl31

+  Or you can get the bl31.elf directly from Rockchip:
+  cp rkbin/rk33/rk3399_bl31_v1.00.elf ../u-boot/bl31.elf
+
+  Get bl31.elf in this step, copy it to U-Boot root dir:
+  > cp bl31.elf ../u-boot/
+
   Compile the U-Boot
   ==

 > cd ../u-boot
-  > make CROSS_COMPILE=aarch64-linux-gnu- evb-rk3399_defconfig all
+  > export ARCH=arm64
+  > export CROSS_COMPILE=aarch64-linux-gnu-
+  > make evb-rk3399_defconfig
+  for firefly-rk3399, use below instead:
+  > make firefly-rk3399_defconfig
+  > make
+  > make u-boot.itb

-Compile the rkflashtool
-===
+  Get spl/u-boot-spl.bin and u-boot.itb in this step.

+Compile the rkdeveloptool
+===
+  Follow instructions in latest README
 > cd ../rkflashtool
+  > autoreconf -i
+  > ./configure
 > make
+  > sudo make install
+
+  Get rkdeveloptool in you Host in this step.
+
+Both origin binaries and Tool are ready now, choose either option 1 or
+option 2 to deploy U-Boot.
+
+Package the image
+=

-Package the image for miniloader
-
+Package the image for U-Boot SPL(option 1)
+
 > cd ..
-  > cp arm-trusted-firmware/build/rk3399/release/bl31.bin rkbin/rk33
+  > tools/mkimage -n rk3399 -T rksd -d spl/u-boot-spl.bin idbspl.img
+
+  Get idbspl.img in this step.
+
+Package the image for Rockchip miniloader(option 2)
+--
+  > cd ..
+  > cp arm-trusted-firmware/build/rk3399/release/bl31.elf rkbin/rk33
 > ./rkbin/tools/trust_merger rkbin/tools/RK3399TRUST.ini
 > ./rkbin/tools/loaderimage --pack --uboot u-boot/u-boot-dtb.bin
uboot.img
-  > mkdir image
-  > mv trust.img ./image/
-  > mv uboot.img ./image/rk3399evb-uboot.bin

-Flash the image
-===
+  Get trust.img and uboot.img in this step.
+
+Flash the image to eMMC
+===
+
+Flash the image with U-Boot SPL(option 1)
+---
   Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then:
+  > rkdeveloptool db rkbin/rk33/rk3399_loader_v1.08.106.bin
+  > rkdeveloptool wl 64 u-boot/idbspl.img
+  > rkdeveloptool wl 512 u-boot/u-boot.itb
+  > rkdeveloptool rd

Do we still need rk3399_loader_v1.08.106.bin? if u-boot.itb has ATF,


We need this for db command for now, if we enable rockusb in U-Boot, then we
don't
need db command and we don't need rk3399_loader_v1.08.106.bin

rk3399_loader_v1.08.106.bin will be there for Windows flash tool like
rkdeveloptool in Linux.

Ok, thanks for the info.

I'm trying to boot from SDMMC and written SPL and u-boot.itb
(ATF+Cortex-M0) like

# dd if=spl of=/dev/mmcblk0 seek=64
# dd if=u-boot.itb of=/dev/mmcblk0 seek=512

With this ROM picked boot image from eMMC instead of SDMMC and hang at
'try to start rockusb' [1]


In the boot rom, the eMMC has higher priority if it have firmware.
So what you need to do is override the firmware in eMMC, then you can 
use SD card.

You can do this.
dd if=/dev/zero of=out count=4096

rkdeveloptool db rkxx_loader_vx.xx.bin
rkdeveloptool wl 0x40 out
rkdeveloptool rd

After this, the bootrom should not able to found 

[U-Boot] patman complains "ConfigParser.NoSectionError: No section: 'bounces'"

2017-09-12 Thread Bin Meng
Hi,

With commit e11aa602abd3e8007dfd3ed23ebb829101abcfec: patman: add
support for omitting bouncing addresses, running patman it complains:

Traceback (most recent call last):
  File "./tools/patman/patman", line 18, in 
from patman import checkpatch, command, gitutil, patchstream, \
  File "/tools/patman/patman.py", line 76, in 
settings.Setup(parser, options.project, '')
  File "/tools/patman/settings.py", line 310, in Setup
for name, value in config.items('bounces'):
  File "/tools/patman/settings.py", line 145, in items
self, section, *args, **kwargs
  File "/usr/local/lib/python2.7/ConfigParser.py", line 642, in items
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'bounces'

Can we get this fixed?

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


[U-Boot] [PATCH v5 0/9] board: atmel: Add new board SAMA5D27-SOM1-EK board.

2017-09-12 Thread Wenyou Yang
The SAMA5D27-SOM1-EK board embeds a SAMA5D27 SOM1 module, which includes
a SAMA5D27-SiP chip and QSPI flash, Phy and MAC EEPROM. The SAMA5D27 SiP
integrates the SAMA5D2 with 1Gbit DDR2-SDRAM in a single package.

Changes in v5:
 - Rebase the u-boot/master (8a33cb8b6bd).
 - Drop the applied patches.

Changes in v4:
 - Rebase the uboot/master (84a4206).
 - Remove the default config file for the spiflash.
 - Integrate the following patches into this patch series.
   1./ [PATCH v2 0/3] board: atmel: Set the ethernet mac address from eeprom
   2./ [PATCH 1/7] lib: at91: Add logo files used by API from DM_VIDEO
   3./ [PATCH 2/7] atmel: common: Add function to display via DM_VIDEO's API
   4./ [PATCH] board: sama5d2_xplained: Make SPL work on spiflash
 - Remove the dependency on [PATCH 0/5] configs: at91: Remove value of 
CONFIG_SYS_EXTRA_OPTIONS option.

Changes in v3:
 - Rebase on the PATCH: Atmel PIT timer driver and Remove 
CONFIG_SYS_EXTRA_OPTIONS.
 - Use the new Atmel PIT timer driver.
 - Remove "SAMA5D2" from CONFIG_SYS_EXTRA_OPTIONS options.
 - Move CONFIG_ENV_IS_IN_FAT to Kconfig.

Changes in v2:
 - Add the reviewed-by tag.
 - Add the help in Kconfig to describe the board and peripherals.
 - Add the code to display the company's logo and board information.
 - Replace the code to set the ethernet mac address with the common
   code from the board/atmel/common folder.

Wenyou Yang (9):
  lib: at91: Add logo files used via API of DM_VIDEO
  atmel: common: Add function to display via DM_VIDEO's API
  ARM: at91: spl: Adjust switching to oscillator for SAMA5D2
  ARM: at91: spl: Add mck function to lower rate while switching
  board: sama5d2_xplained: Make SPL work on spiflash
  ARM: at91: spl: Add boot device for boot from QSPI
  ARM: at91: mach: Add missing defines of MPDDRC
  ARM: at91: Get the Chip ID of SAMA5D2 SiP
  board: atmel: Add SAMA5D27 SOM1 EK board

 arch/arm/dts/Makefile   |3 +
 arch/arm/dts/at91-sama5d27_som1_ek.dts  |  215 
 arch/arm/dts/sama5d2.dtsi   |   20 +
 arch/arm/dts/sama5d27_som1.dtsi |  159 +++
 arch/arm/mach-at91/Kconfig  |   14 +
 arch/arm/mach-at91/armv7/clock.c|   36 +
 arch/arm/mach-at91/armv7/sama5d2_devices.c  |   26 +-
 arch/arm/mach-at91/include/mach/at91_common.h   |2 +
 arch/arm/mach-at91/include/mach/at91_pmc.h  |2 +
 arch/arm/mach-at91/include/mach/atmel_mpddrc.h  |4 +
 arch/arm/mach-at91/include/mach/sama5d2.h   |7 +-
 arch/arm/mach-at91/spl.c|2 +
 arch/arm/mach-at91/spl_atmel.c  |   18 +-
 board/atmel/common/Makefile |1 +
 board/atmel/common/video_display.c  |   72 ++
 board/atmel/sama5d27_som1_ek/Kconfig|   15 +
 board/atmel/sama5d27_som1_ek/MAINTAINERS|6 +
 board/atmel/sama5d27_som1_ek/Makefile   |8 +
 board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c |  189 
 board/atmel/sama5d2_xplained/sama5d2_xplained.c |   10 +
 configs/sama5d27_som1_ek_mmc_defconfig  |   88 ++
 include/atmel_lcd.h |9 +
 include/configs/sama5d27_som1_ek.h  |   92 ++
 include/configs/sama5d2_xplained.h  |2 +-
 lib/Makefile|1 +
 lib/at91/Makefile   |8 +
 lib/at91/at91.c |   30 +
 lib/at91/atmel_logo_8bpp.h  | 1310 +++
 lib/at91/microchip_logo_8bpp.h  | 1082 +++
 tools/logos/microchip.bmp   |  Bin 0 -> 12726 bytes
 30 files changed, 3426 insertions(+), 5 deletions(-)
 create mode 100644 arch/arm/dts/at91-sama5d27_som1_ek.dts
 create mode 100644 arch/arm/dts/sama5d27_som1.dtsi
 create mode 100644 board/atmel/common/video_display.c
 create mode 100644 board/atmel/sama5d27_som1_ek/Kconfig
 create mode 100644 board/atmel/sama5d27_som1_ek/MAINTAINERS
 create mode 100644 board/atmel/sama5d27_som1_ek/Makefile
 create mode 100644 board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
 create mode 100644 configs/sama5d27_som1_ek_mmc_defconfig
 create mode 100644 include/configs/sama5d27_som1_ek.h
 create mode 100644 lib/at91/Makefile
 create mode 100644 lib/at91/at91.c
 create mode 100644 lib/at91/atmel_logo_8bpp.h
 create mode 100644 lib/at91/microchip_logo_8bpp.h
 create mode 100644 tools/logos/microchip.bmp

-- 
2.13.0

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


[U-Boot] [PATCH v5 2/9] atmel: common: Add function to display via DM_VIDEO's API

2017-09-12 Thread Wenyou Yang
Add a function to display the company's logo and board information
via the API from DM_VIDEO. This function can be shared by other
atmel boards, so locate it in board/atmel/common folder.

Signed-off-by: Wenyou Yang 
---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/mach-at91/include/mach/at91_common.h |  1 +
 board/atmel/common/Makefile   |  1 +
 board/atmel/common/video_display.c| 72 +++
 3 files changed, 74 insertions(+)
 create mode 100644 board/atmel/common/video_display.c

diff --git a/arch/arm/mach-at91/include/mach/at91_common.h 
b/arch/arm/mach-at91/include/mach/at91_common.h
index a95fe41610..5416eb455d 100644
--- a/arch/arm/mach-at91/include/mach/at91_common.h
+++ b/arch/arm/mach-at91/include/mach/at91_common.h
@@ -37,5 +37,6 @@ void redirect_int_from_saic_to_aic(void);
 void configure_2nd_sram_as_l2_cache(void);
 
 int at91_set_ethaddr(int offset);
+int at91_video_show_board_info(void);
 
 #endif /* AT91_COMMON_H */
diff --git a/board/atmel/common/Makefile b/board/atmel/common/Makefile
index 6d9c6850b5..8a6850bc19 100644
--- a/board/atmel/common/Makefile
+++ b/board/atmel/common/Makefile
@@ -8,4 +8,5 @@
 obj-y += board.o
 ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_I2C_EEPROM) += mac_eeprom.o
+obj-$(CONFIG_DM_VIDEO) += video_display.o
 endif
diff --git a/board/atmel/common/video_display.c 
b/board/atmel/common/video_display.c
new file mode 100644
index 00..39ad619819
--- /dev/null
+++ b/board/atmel/common/video_display.c
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2017 Microchip
+ *   Wenyou Yang 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int at91_video_show_board_info(void)
+{
+   ulong dram_size, nand_size;
+   int i;
+   u32 len = 0;
+   char buf[255];
+   char *corp = "2017 Microchip Technology Inc.\n";
+   char temp[32];
+   struct udevice *dev, *con;
+   const char *s;
+   vidinfo_t logo_info;
+   int ret;
+
+   len += sprintf([len], "%s\n", U_BOOT_VERSION);
+   memcpy([len], corp, strlen(corp));
+   len += strlen(corp);
+   len += sprintf([len], "%s CPU at %s MHz\n", get_cpu_name(),
+   strmhz(temp, get_cpu_clk_rate()));
+
+   dram_size = 0;
+   for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
+   dram_size += gd->bd->bi_dram[i].size;
+
+   nand_size = 0;
+#ifdef CONFIG_NAND_ATMEL
+   for (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++)
+   nand_size += nand_info[i]->size;
+#endif
+
+   len += sprintf([len], "%ld MB SDRAM, %ld MB NAND\n",
+  dram_size >> 20, nand_size >> 20);
+
+   ret = uclass_get_device(UCLASS_VIDEO, 0, );
+   if (ret)
+   return ret;
+
+   microchip_logo_info(_info);
+   ret = video_bmp_display(dev, logo_info.logo_addr,
+   logo_info.logo_x_offset,
+   logo_info.logo_y_offset, false);
+   if (ret)
+   return ret;
+
+   ret = uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, );
+   if (ret)
+   return ret;
+
+   vidconsole_position_cursor(con, 0, logo_info.logo_height);
+   for (s = buf, i = 0; i < len; s++, i++)
+   vidconsole_put_char(con, *s);
+
+   return 0;
+}
-- 
2.13.0

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


[U-Boot] [PATCH v5 3/9] ARM: at91: spl: Adjust switching to oscillator for SAMA5D2

2017-09-12 Thread Wenyou Yang
As said in 29.5.7 section of SAMA5D2 datasheet, before switching to
the crystal oscillator, a check must be carried out to ensure that
the oscillator is present and that its freqency is valid.

Signed-off-by: Wenyou Yang 
Reviewed-by: Simon Glass 
---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/mach-at91/include/mach/at91_pmc.h |  2 ++
 arch/arm/mach-at91/spl_atmel.c | 18 +-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h 
b/arch/arm/mach-at91/include/mach/at91_pmc.h
index 2875ff20b1..08ad1bf2d0 100644
--- a/arch/arm/mach-at91/include/mach/at91_pmc.h
+++ b/arch/arm/mach-at91/include/mach/at91_pmc.h
@@ -87,6 +87,8 @@ typedef struct at91_pmc {
 
 #define AT91_PMC_MCFR_MAINRDY  0x0001
 #define AT91_PMC_MCFR_MAINF_MASK   0x
+#define AT91_PMC_MCFR_RCMEAS   0x0010
+#define AT91_PMC_MCFR_CCSS_XTAL_OSC0x0100
 
 #define AT91_PMC_MCKR_CSS_SLOW 0x
 #define AT91_PMC_MCKR_CSS_MAIN 0x0001
diff --git a/arch/arm/mach-at91/spl_atmel.c b/arch/arm/mach-at91/spl_atmel.c
index b75c2ccefd..ce16ef3bdb 100644
--- a/arch/arm/mach-at91/spl_atmel.c
+++ b/arch/arm/mach-at91/spl_atmel.c
@@ -32,6 +32,20 @@ static void switch_to_main_crystal_osc(void)
while (!(readl(>sr) & AT91_PMC_IXR_MOSCS))
;
 
+#if defined(CONFIG_SAMA5D2)
+   /* Enable a measurement of the external oscillator */
+   tmp = readl(>mcfr);
+   tmp |= AT91_PMC_MCFR_CCSS_XTAL_OSC;
+   tmp |= AT91_PMC_MCFR_RCMEAS;
+   writel(tmp, >mcfr);
+
+   while (!(readl(>mcfr) & AT91_PMC_MCFR_MAINRDY))
+   ;
+
+   if (!(readl(>mcfr) & AT91_PMC_MCFR_MAINF_MASK))
+   hang();
+#endif
+
tmp = readl(>mor);
tmp &= ~AT91_PMC_MOR_OSCBYPASS;
tmp &= ~AT91_PMC_MOR_KEY(0xff);
@@ -47,11 +61,13 @@ static void switch_to_main_crystal_osc(void)
while (!(readl(>sr) & AT91_PMC_IXR_MOSCSELS))
;
 
+#if !defined(CONFIG_SAMA5D2)
/* Wait until MAINRDY field is set to make sure main clock is stable */
while (!(readl(>mcfr) & AT91_PMC_MAINRDY))
;
+#endif
 
-#ifndef CONFIG_SAMA5D4
+#if !defined(CONFIG_SAMA5D4) && !defined(CONFIG_SAMA5D2)
tmp = readl(>mor);
tmp &= ~AT91_PMC_MOR_MOSCRCEN;
tmp &= ~AT91_PMC_MOR_KEY(0xff);
-- 
2.13.0

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


[U-Boot] [PATCH v3 0/3] Allwinner DE2 HDMI SimpleFB support

2017-09-12 Thread Icenowy Zheng
This patchset is for Allwinner DE2 HDMI SimpleFB support.

The framebuffer initialized by the Allwinner DE2 driver can be
passed by to the kernel as simplefb, and this can enable the
kernel to display graphics without having full DE2 driver.

Add the suppot of simplefb in DE2 code.

The code to find a simplefb with sunxi extension and a suitable
pipeline is extracted to a new source file in video/sunxi/.

An option is added for device tree simplefb, and furtherly
the DE1 simplefb support should also be converted to it.

Icenowy Zheng (3):
  video: sunxi: extract simplefb match code to a new file
  video: add an option for video simplefb via DT
  sunxi: setup simplefb for Allwinner DE2

 drivers/video/Kconfig | 10 +
 drivers/video/sunxi/Makefile  |  4 +-
 drivers/video/sunxi/simplefb_common.c | 29 ++
 drivers/video/sunxi/simplefb_common.h | 22 +++
 drivers/video/sunxi/sunxi_de2.c   | 72 +++
 drivers/video/sunxi/sunxi_display.c   | 13 +--
 6 files changed, 137 insertions(+), 13 deletions(-)
 create mode 100644 drivers/video/sunxi/simplefb_common.c
 create mode 100644 drivers/video/sunxi/simplefb_common.h

-- 
2.13.5

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


Re: [U-Boot] [Patch v2] QE: Set QE_IRAM_READY after uploading firmware

2017-09-12 Thread York Sun
On 08/13/2017 07:39 PM, Zhao Qiang wrote:
> QE_IRAM_READY should be set only after successfully uploading the
> firmware.
> 
> Signed-off-by: Zhao Qiang 
> ---
> Changes for v2:
>   - modify commit msg to make it more understandable

Applied to fsl-qoriq master. Thanks.

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


[U-Boot] [PATCH 2/3] nds32: ftmac100 support cache enable.

2017-09-12 Thread Andes
From: rick 

Enable cache and ftmac100 performance can be improved.

Signed-off-by: rick 
---
 arch/nds32/cpu/n1213/start.S |   29 -
 arch/nds32/include/asm/io.h  |   21 +
 include/configs/adp-ae3xx.h  |3 +--
 include/configs/adp-ag101p.h |3 +--
 4 files changed, 51 insertions(+), 5 deletions(-)

diff --git a/arch/nds32/cpu/n1213/start.S b/arch/nds32/cpu/n1213/start.S
index f9f..0d98d03 100644
--- a/arch/nds32/cpu/n1213/start.S
+++ b/arch/nds32/cpu/n1213/start.S
@@ -119,19 +119,46 @@ set_ivb:
/* set IVIC, vector size: 4 bytes, base: 0x0 */
mtsr$r0, $ivb
 /*
- * MMU_CTL NTC0 Cacheable/Write-Back
+ * MMU_CTL NTC0 Non-cacheable
  */
+   li  $r0, ~0x6
+   mfsr$r1, $mr0
+   and $r1, $r1, $r0
+   mtsr$r1, $mr0
+
li  $r0, ~0x3
mfsr$r1, $mr8
and $r1, $r1, $r0
mtsr$r1, $mr8
 #if (!defined(CONFIG_SYS_ICACHE_OFF) || !defined(CONFIG_SYS_DCACHE_OFF))
+/*
+ * MMU_CTL NTC0 Cacheable/Write-Back
+ */
li  $r0, 0x4
mfsr$r1, $mr0
or  $r1, $r1, $r0
mtsr$r1, $mr0
 #endif
 
+#ifndef CONFIG_SYS_DCACHE_OFF
+#ifdef CONFIG_ARCH_MAP_SYSMEM
+/*
+ * MMU_CTL NTC1 Non-cacheable
+ */
+   li  $r0, ~0x18
+   mfsr$r1, $mr0
+   and $r1, $r1, $r0
+   mtsr$r1, $mr0
+/*
+ * MMU_CTL NTM1 mapping for partition 0
+ */
+   li  $r0, ~0x6000
+   mfsr$r1, $mr0
+   and $r1, $r1, $r0
+   mtsr$r1, $mr0
+#endif
+#endif
+
 #if !defined(CONFIG_SYS_ICACHE_OFF)
li  $r0, 0x1
mfsr$r1, $mr8
diff --git a/arch/nds32/include/asm/io.h b/arch/nds32/include/asm/io.h
index b2c4d0e..e8ee961 100644
--- a/arch/nds32/include/asm/io.h
+++ b/arch/nds32/include/asm/io.h
@@ -48,6 +48,27 @@ static inline void sync(void)
 #define MAP_WRBACK (0)
 #define MAP_WRTHROUGH  (0)
 
+#ifdef CONFIG_ARCH_MAP_SYSMEM
+static inline void *map_sysmem(phys_addr_t paddr, unsigned long len)
+{
+   if(paddr https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 1/3] video: sunxi: extract simplefb match code to a new file

2017-09-12 Thread Icenowy Zheng
As the DE2 simplefb setup code can also benefit from the simplefb match
code, extract it to a new source file.

Signed-off-by: Icenowy Zheng 
Reviewed-by: Andre Przywara 
---
Changes in v3:
- Use /** to start kerndoc.

 drivers/video/sunxi/Makefile  |  2 +-
 drivers/video/sunxi/simplefb_common.c | 29 +
 drivers/video/sunxi/simplefb_common.h | 22 ++
 drivers/video/sunxi/sunxi_display.c   | 13 ++---
 4 files changed, 54 insertions(+), 12 deletions(-)
 create mode 100644 drivers/video/sunxi/simplefb_common.c
 create mode 100644 drivers/video/sunxi/simplefb_common.h

diff --git a/drivers/video/sunxi/Makefile b/drivers/video/sunxi/Makefile
index 0d64c2021f..10862edaca 100644
--- a/drivers/video/sunxi/Makefile
+++ b/drivers/video/sunxi/Makefile
@@ -5,5 +5,5 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-obj-$(CONFIG_VIDEO_SUNXI) += sunxi_display.o lcdc.o tve_common.o 
../videomodes.o
+obj-$(CONFIG_VIDEO_SUNXI) += sunxi_display.o simplefb_common.o lcdc.o 
tve_common.o ../videomodes.o
 obj-$(CONFIG_VIDEO_DE2) += sunxi_de2.o sunxi_dw_hdmi.o lcdc.o ../dw_hdmi.o
diff --git a/drivers/video/sunxi/simplefb_common.c 
b/drivers/video/sunxi/simplefb_common.c
new file mode 100644
index 00..4823f13a0c
--- /dev/null
+++ b/drivers/video/sunxi/simplefb_common.c
@@ -0,0 +1,29 @@
+/*
+ * Common code for Allwinner SimpleFB with pipeline.
+ *
+ * (C) Copyright 2014-2015 Hans de Goede 
+ * (C) Copyright 2017 Icenowy Zheng 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+
+int sunxi_simplefb_fdt_match(void *blob, const char *pipeline)
+{
+   int offset, ret;
+
+   /* Find a prefilled simpefb node, matching out pipeline config */
+   offset = fdt_node_offset_by_compatible(blob, -1,
+  "allwinner,simple-framebuffer");
+   while (offset >= 0) {
+   ret = fdt_stringlist_search(blob, offset, "allwinner,pipeline",
+   pipeline);
+   if (ret == 0)
+   break;
+   offset = fdt_node_offset_by_compatible(blob, offset,
+  "allwinner,simple-framebuffer");
+   }
+
+   return offset;
+}
diff --git a/drivers/video/sunxi/simplefb_common.h 
b/drivers/video/sunxi/simplefb_common.h
new file mode 100644
index 00..1a2bfabf00
--- /dev/null
+++ b/drivers/video/sunxi/simplefb_common.h
@@ -0,0 +1,22 @@
+/*
+ * (C) Copyright 2017 Icenowy Zheng 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#ifndef __SIMPLEFB_COMMON_H
+#define __SIMPLEFB_COMMON_H
+
+/**
+ * sunxi_simplefb_fdt_match() - match a sunxi simplefb node
+ *
+ * Match a sunxi simplefb device node with a specified pipeline, and
+ * return its offset.
+ *
+ * @blob: device tree blob
+ * @pipeline: display pipeline
+ * @return device node offset in blob, or negative values if failed
+ */
+int sunxi_simplefb_fdt_match(void *blob, const char *pipeline);
+
+#endif
diff --git a/drivers/video/sunxi/sunxi_display.c 
b/drivers/video/sunxi/sunxi_display.c
index de768ba94a..7f25ed5f26 100644
--- a/drivers/video/sunxi/sunxi_display.c
+++ b/drivers/video/sunxi/sunxi_display.c
@@ -29,6 +29,7 @@
 #include "../anx9804.h"
 #include "../hitachi_tx18d42vm_lcd.h"
 #include "../ssd2828.h"
+#include "simplefb_common.h"
 
 #ifdef CONFIG_VIDEO_LCD_BL_PWM_ACTIVE_LOW
 #define PWM_ON 0
@@ -1377,17 +1378,7 @@ int sunxi_simplefb_setup(void *blob)
break;
}
 
-   /* Find a prefilled simpefb node, matching out pipeline config */
-   offset = fdt_node_offset_by_compatible(blob, -1,
-  "allwinner,simple-framebuffer");
-   while (offset >= 0) {
-   ret = fdt_stringlist_search(blob, offset, "allwinner,pipeline",
-   pipeline);
-   if (ret == 0)
-   break;
-   offset = fdt_node_offset_by_compatible(blob, offset,
-  "allwinner,simple-framebuffer");
-   }
+   offset = sunxi_simplefb_fdt_match(blob, pipeline);
if (offset < 0) {
eprintf("Cannot setup simplefb: node not found\n");
return 0; /* Keep older kernels working */
-- 
2.13.5

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


[U-Boot] [PATCH v3 2/2] imx_common: detect USB serial downloader reliably

2017-09-12 Thread Stefan Agner
From: Stefan Agner 

The current mechanism using SCR/GPR registers work well when
the serial downloader boot mode has been selected explicitly
(either via boot mode pins or using bmode command). However,
in case the system entered boot ROM due to unbootable primary
boot devices (e.g. empty eMMC), the SPL fails to detect that
it has been downloaded through serial loader and tries to
continue booting from eMMC:
  Trying to boot from MMC1
  mmc_load_image_raw_sector: mmc block read error
  SPL: failed to boot from all boot devices
  ### ERROR ### Please RESET the board ###

The only known way to reliably detect USB serial downloader
is by checking the USB PHY receiver block power state...

Signed-off-by: Stefan Agner 
Acked-by: Marcel Ziswiler 
Tested-by: Fabio Estevam 
---

Changes in v3:
- Fix spelling and grammar

Changes in v2:
- Add comment that we infer boot ROM behavior from USB PHY state

 arch/arm/mach-imx/spl.c | 12 
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
index 258578ac25..522ab9f260 100644
--- a/arch/arm/mach-imx/spl.c
+++ b/arch/arm/mach-imx/spl.c
@@ -31,6 +31,18 @@ u32 spl_boot_device(void)
if (((bmode >> 24) & 0x03) == 0x01) /* Serial Downloader */
return BOOT_DEVICE_BOARD;
 
+   /*
+* The above method does not detect that the boot ROM used
+* serial downloader in case the boot ROM decided to use the
+* serial downloader as a fall back (primary boot source failed).
+*
+* Infer that the boot ROM used the USB serial downloader by
+* checking whether the USB PHY is currently active... This
+* assumes that SPL did not (yet) initialize the USB PHY...
+*/
+   if (is_usbphy_active())
+   return BOOT_DEVICE_BOARD;
+
/* BOOT_CFG1[7:4] - see IMX6DQRM Table 8-8 */
switch ((reg & IMX6_BMODE_MASK) >> IMX6_BMODE_SHIFT) {
 /* EIM: See 8.5.1, Table 8-9 */
-- 
2.14.1

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


[U-Boot] [PATCH v3 1/2] imx: add macro to detect whether USB PHY is active

2017-09-12 Thread Stefan Agner
From: Stefan Agner 

This macro allows to detect whether the USB PHY is active. This
is helpful to detect if the boot ROM has previously started the
USB serial downloader.

The idea is taken from the mfgtool support in the NXP U-Boot:
http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/?h=imx_v2016.03_4.1.15_2.0.0_ga=a352ed3c5184b95c4c9f7468f5fbb5f43de5e412

Signed-off-by: Stefan Agner 
Acked-by: Marcel Ziswiler 
Tested-by: Fabio Estevam 
---

Changes in v3: None
Changes in v2:
- Move macro to sys_proto.h
- Renamed from is_boot_from_usb() to is_usbphy_active()
- Use defines for register offset and field
- Remove tab after define
- Remove comment since the actual "magic" is happening and
  documented at usage side

 arch/arm/include/asm/arch-mx6/sys_proto.h | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h 
b/arch/arm/include/asm/arch-mx6/sys_proto.h
index 14f5d948c9..9d4b1d6768 100644
--- a/arch/arm/include/asm/arch-mx6/sys_proto.h
+++ b/arch/arm/include/asm/arch-mx6/sys_proto.h
@@ -6,3 +6,10 @@
  */
 
 #include 
+
+#define USBPHY_PWD 0x
+
+#define USBPHY_PWD_RXPWDRX (1 << 20) /* receiver block power down */
+
+#define is_usbphy_active(void) (!(readl(USB_PHY0_BASE_ADDR + USBPHY_PWD) & \
+  USBPHY_PWD_RXPWDRX))
-- 
2.14.1

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


Re: [U-Boot] [PATCH v3 1/5] tools: pblimage: Fix address calculation

2017-09-12 Thread York Sun
On 08/15/2017 11:15 AM, York Sun wrote:
> The image size should be added to the initial pbl command, not bit
> "ORed".
> 
> Signed-off-by: York Sun 
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 

Applied to fsl-qoriq master.

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


Re: [U-Boot] [PATCH v3 4/5] spl: fit: Support both external and embedded data

2017-09-12 Thread York Sun
On 08/15/2017 11:15 AM, York Sun wrote:
> SPL supports U-Boot image in FIT format which has data outside of
> FIT structure. This adds support for embedded data for normal FIT
> images.
> 
> Signed-off-by: York Sun 
> Reviewed-by: Tom Rini 
> 
> ---
> 
> Changes in v3:
> Update doc/uImage.FIT/source_file_format.txt with embedded and external data
> 
> Changes in v2:
> Rebase on top of "SPL: FIT: factor out spl_load_fit_image()" by Andre Przywara
> 

Applied to fsl-qoriq master.

York


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


Re: [U-Boot] [RFC 1/1] efi_loader: fix building of helloworld.efi on x86_64

2017-09-12 Thread Heinrich Schuchardt
On 09/12/2017 03:24 PM, Bin Meng wrote:
> Hi Heinrich,
> 
> On Tue, Sep 12, 2017 at 4:18 PM, Heinrich Schuchardt  
> wrote:
>> On 09/12/2017 05:00 AM, Bin Meng wrote:
>>> Hi Heinrich,
>>>
>>> On Sun, Sep 10, 2017 at 4:55 PM, Heinrich Schuchardt  
>>> wrote:
 Variable EFI_LDS is set based on CONFIG_EFI_STUB_64BIT.
 It influences which lds script is used for compiling helloworld.efi.
 This results in building helloworld.efi failing on x86_64 if
 CONFIG_EFI_STUB_64BIT is not set. CONFIG_EFI_STUB_64BIT is only
 visible if EFI_STUB is selected. We should be able to compile a 64bit
 helloworld.efi irrespective of EFI_STUB.

 With the patch the bitness of the efi build is taken from the
 architecture choice.

 Signed-off-by: Heinrich Schuchardt 
 ---
 For proper testing
 https://lists.denx.de/pipermail/u-boot/2017-September/305184.html
 must be fixed.

 So I send this as RFC.
>>>
>>> Sorry I missed this. This does not go to the U-Boot ML. Did you intend
>>> to keep the discussion among us?
>>>
>> CC: U-Boot Mailing List 
>>

 Alex, do you remember why CONFIG_EFI_STUB_64BIT was introduced in the
 first place.

>>>
>>> The CONFIG_EFI_STUB_64BIT was introduced to support booting from a
>>> 64-bit EFI BIOS.
>>>
 Would you ever use a stub with a different bitness than U-Boot?

>>>
>>> Yes, for example U-Boot x86 32-bit to boot a 64-bit EFI payload.
>>
>> My understanding is that the EFI stub is used if U-Boot is loaded as an
>> EFI application.
>>
> 
> Maybe there is some confusion. I was referring to the EFI payload as
> documented in doc/README.efi. Are you referring to the same EFI
> application in that doc?
> 

Ok, "U-Boot on EFI".

So I guess we have to separate the $LDS_EFI used for the stub from the
one used for helloworld.efi.

>> It has nothing to do with the EFI application or driver loaded by
>> U-boot's bootefi command, which I assume you reference as "to boot a
>> 64-bit EFI payload".
>>
>> A stub with different bitness than U-Boot would be needed if we wanted
>> to load 64 bit U-Boot as a 32 bit EFI application or a 32 bit U-Boot as
>> a 64 bit EFI application. Is this required in any scenario?
>>
> 
> Regards,
> Bin
> 

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


Re: [U-Boot] [PATCH 01/10] rockchip: rk3399: make spl_board_init board-specific

2017-09-12 Thread Simon Glass
Hi Philipp,

On 11 September 2017 at 05:59, Philipp Tomsich
 wrote:
>
> The later-stage spl_board_init (as opposed to board_init_f) should set
> up board-specific details: these differ between the EVB-RK3399 and the
> RK3399-Q7 (Puma).
>
> This moves spl_board_init back into the individual boards and removes
> the unneeded functionality from Puma.
>
> As we are touching these files, we also sort the #include directives
> and drop the inclusion of unneeded files.

Well that can go in its own patch :-)

>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  arch/arm/mach-rockchip/rk3399-board-spl.c | 27 ---
>  board/rockchip/evb_rk3399/evb-rk3399.c| 32 
> +--
>  board/theobroma-systems/puma_rk3399/puma-rk3399.c | 15 ---
>  3 files changed, 41 insertions(+), 33 deletions(-)
>
> diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c 
> b/arch/arm/mach-rockchip/rk3399-board-spl.c
> index 1c39d9b..8e38ef1 100644
> --- a/arch/arm/mach-rockchip/rk3399-board-spl.c
> +++ b/arch/arm/mach-rockchip/rk3399-board-spl.c
> @@ -149,33 +149,6 @@ void board_init_f(ulong dummy)
> }
>  }
>
> -void spl_board_init(void)
> -{
> -   struct udevice *pinctrl;
> -   int ret;
> -
> -   ret = uclass_get_device(UCLASS_PINCTRL, 0, );
> -   if (ret) {
> -   debug("%s: Cannot find pinctrl device\n", __func__);
> -   goto err;
> -   }
> -
> -   /* Enable debug UART */
> -   ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_UART_DBG);
> -   if (ret) {
> -   debug("%s: Failed to set up console UART\n", __func__);
> -   goto err;
> -   }
> -
> -   preloader_console_init();
> -   return;
> -err:
> -   printf("spl_board_init: Error %d\n", ret);
> -
> -   /* No way to report error here */
> -   hang();
> -}
> -
>  #ifdef CONFIG_SPL_LOAD_FIT
>  int board_fit_config_name_match(const char *name)
>  {
> diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c 
> b/board/rockchip/evb_rk3399/evb-rk3399.c
> index d50c59d..506efff 100644
> --- a/board/rockchip/evb_rk3399/evb-rk3399.c
> +++ b/board/rockchip/evb_rk3399/evb-rk3399.c
> @@ -3,13 +3,14 @@
>   *
>   * SPDX-License-Identifier: GPL-2.0+
>   */
> +
>  #include 
> +#include 

Actually this was correct. Please see:

https://www.denx.de/wiki/U-Boot/CodingStyle

>  #include 
> -#include 
>  #include 
>  #include 
> -#include 
>  #include 
> +#include 
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> @@ -67,3 +68,30 @@ int board_init(void)
>  out:
> return 0;
>  }
> +
> +void spl_board_init(void)
> +{
> +   struct udevice *pinctrl;
> +   int ret;
> +
> +   ret = uclass_get_device(UCLASS_PINCTRL, 0, );
> +   if (ret) {
> +   debug("%s: Cannot find pinctrl device\n", __func__);
> +   goto err;
> +   }
> +
> +   /* Enable debug UART */
> +   ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_UART_DBG);
> +   if (ret) {
> +   debug("%s: Failed to set up console UART\n", __func__);
> +   goto err;
> +   }
> +
> +   preloader_console_init();
> +   return;
> +err:
> +   printf("spl_board_init: Error %d\n", ret);
> +
> +   /* No way to report error here */
> +   hang();
> +}
> diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c 
> b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
> index c6f8eed..01b90e3 100644
> --- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c
> +++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
> @@ -3,15 +3,16 @@
>   *
>   * SPDX-License-Identifier: GPL-2.0+
>   */
> +
>  #include 
> +#include 
> +#include 

Similarly here. In any case, this should go in a separate patch.

>  #include 
> -#include 
> -#include 
>  #include 
>  #include 
> -#include 
> -#include 
> +#include 
>  #include 
> +#include 
>  #include 
>
>  DECLARE_GLOBAL_DATA_PTR;
> @@ -59,6 +60,12 @@ out:
> return 0;
>  }
>
> +void spl_board_init(void)
> +{
> +   preloader_console_init();
> +   return;
> +}
> +
>  static void setup_macaddr(void)
>  {
>  #if CONFIG_IS_ENABLED(CMD_NET)
> --
> 2.1.4
>

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


Re: [U-Boot] [PATCH 1/2] rockchip: clk: rk3399: add clk_enable function and support USB HOST0/1

2017-09-12 Thread Simon Glass
On 11 September 2017 at 09:29, Philipp Tomsich
 wrote:
> The generic ehci-driver (ehci-generic.c) will try to enable the clocks
> listed in the DTSI. If this fails (e.g. due to clk_enable not being
> implemented in a driver and -ENOSYS being returned by the clk-uclass),
> the driver will bail our and print an error message.
>
> This implements a minimal clk_enable for the RK3399 and supports the
> clocks mandatory for the EHCI controllers; as these are enabled by
> default we simply return success.
>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  drivers/clk/rockchip/clk_rk3399.c | 15 +++
>  1 file changed, 15 insertions(+)

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


Re: [U-Boot] [PATCH 1/3] rockchip: make boot_mode releated codes reused across all platforms

2017-09-12 Thread Simon Glass
On 12 September 2017 at 07:57, Andy Yan  wrote:
> setup_boot_mode function use the same logic but different
> mode register address across all the rockchip platforms,
> so it's better to make this function reused across all the
> platforms, and let the mode register address setting from
> the config file.
>
> Signed-off-by: Andy Yan 
>
> ---
>
>  arch/arm/include/asm/arch-rockchip/boot_mode.h |  2 ++
>  arch/arm/mach-rockchip/Kconfig | 14 +++
>  arch/arm/mach-rockchip/Makefile|  5 +++-
>  arch/arm/mach-rockchip/boot_mode.c | 33 
> ++
>  arch/arm/mach-rockchip/rk3036-board.c  | 24 ---
>  arch/arm/mach-rockchip/rk322x-board.c  | 24 ---
>  arch/arm/mach-rockchip/rk3288-board.c  | 25 ---
>  arch/arm/mach-rockchip/rk3399-board.c  | 14 +++
>  8 files changed, 67 insertions(+), 74 deletions(-)
>  create mode 100644 arch/arm/mach-rockchip/boot_mode.c
>  create mode 100644 arch/arm/mach-rockchip/rk3399-board.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 04/10] rockchip: spl: support a 'same-as-spl'-specifier in the spl-boot-order

2017-09-12 Thread Simon Glass
On 11 September 2017 at 05:59, Philipp Tomsich
 wrote:
> It is often desirable to configure the spl-boot-order (i.e. the order
> that SPL probes devices to find the FIT image containing a full U-Boot)
> such that it contains 'the same device the SPL stage was booted from'
> early on.  To support this, we introduce the 'same-as-spl' specifier
> for the spl-boot-order property.
>
> This commit adds:
>  - documentation for the new board_spl_was_booted_from() function that
>individual SoCs/boards should provide, if they can determine where
>the SPL was booted from
>  - implements the new board_spl_was_booted_from() stub function
>  - adds support for handling the 'same-as-spl' specifier and calling
>into the per-SoC/per-board support code.
>
> This also updates the documentation for the 'u-boot,spl-boot-order'
> property.
>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  arch/arm/mach-rockchip/spl-boot-order.c | 29 -
>  doc/device-tree-bindings/chosen.txt | 12 +++-
>  2 files changed, 39 insertions(+), 2 deletions(-)

Can that weak function be declared in a header file somewhere?

One day we should have SPL pass to U-Boot a structure containing this
information and other things it wants to pass on...

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


Re: [U-Boot] [PATCH 09/10] power: spl: add SPL_DM_REGULATOR_FIXED in Kconfig

2017-09-12 Thread Simon Glass
On 11 September 2017 at 05:59, Philipp Tomsich
 wrote:
> The Makefile already tests for SPL_DM_REGULATOR_FIXED, but Kconfig
> does not provide it.  This adds SPL_DM_REGULATOR_FIXED to Kconfig.
>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  drivers/power/regulator/Kconfig | 7 +++
>  1 file changed, 7 insertions(+)
>

Reviewed-by: Simon Glass 

Should that default to y?
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] rockchip: enable TPL_SYSRESET for all rockchip SoCs

2017-09-12 Thread Simon Glass
On 12 September 2017 at 19:39, Kever Yang  wrote:
> With Makefiles testing for $(SPL_TPL_)SYSRESET, we need TPL_SYSRESET
> for do_reset() in TPL for Rockchip SoCs.
>
> References: 87c16d4 "drivers: spl: consistently use the $(SPL_TPL_)
> macro"
>
> Signed-off-by: Kever Yang 
> ---
>
>  arch/arm/Kconfig | 1 +
>  1 file changed, 1 insertion(+)

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


Re: [U-Boot] [PATCH v5 4/9] ARM: at91: spl: Add mck function to lower rate while switching

2017-09-12 Thread Simon Glass
On 12 September 2017 at 20:10, Wenyou Yang  wrote:
> Refer to the commit 70f8c8316ad(PMC: add new mck function to lower
> rate while switching) from AT91Bootstrap.
>
> While switching to a lower clock source, we must switch the clock
> source first instead of last. Otherwise, we could end up with
> too high frequency on internal bus and peripherals.
> This happen on SAMA5D2 as we exit from ROM code @396MHz.
>
> Add a function pmc_mck_init_down() to allow this sequence.
>
> Signed-off-by: Wenyou Yang 
> ---
>
> Changes in v5: None
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
>
>  arch/arm/mach-at91/armv7/clock.c  | 36 
> +++
>  arch/arm/mach-at91/include/mach/at91_common.h |  1 +
>  2 files changed, 37 insertions(+)

Reviewed-by: Simon Glass 

>
> diff --git a/arch/arm/mach-at91/armv7/clock.c 
> b/arch/arm/mach-at91/armv7/clock.c
> index 2e55953799..8ae01f4020 100644
> --- a/arch/arm/mach-at91/armv7/clock.c
> +++ b/arch/arm/mach-at91/armv7/clock.c
> @@ -150,6 +150,42 @@ void at91_mck_init(u32 mckr)
> ;
>  }
>
> +void at91_mck_init_down(u32 mckr)
> +{
> +   struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
> +   u32 tmp;
> +
> +   tmp = readl(>mckr);
> +   tmp &= (~AT91_PMC_MCKR_CSS_MASK);
> +   tmp |= (mckr & AT91_PMC_MCKR_CSS_MASK);
> +   writel(tmp, >mckr);
> +
> +   while (!(readl(>sr) & AT91_PMC_MCKRDY))
> +   ;
> +
> +#ifdef CPU_HAS_H32MXDIV
> +   tmp = readl(>mckr);
> +   tmp &= (~AT91_PMC_MCKR_H32MXDIV);
> +   tmp |= (mckr & AT91_PMC_MCKR_H32MXDIV);
> +   writel(tmp, >mckr);
> +#endif
> +
> +   tmp = readl(>mckr);
> +   tmp &= (~AT91_PMC_MCKR_PLLADIV_MASK);
> +   tmp |= (mckr & AT91_PMC_MCKR_PLLADIV_MASK);
> +   writel(tmp, >mckr);
> +
> +   tmp = readl(>mckr);
> +   tmp &= (~AT91_PMC_MCKR_MDIV_MASK);
> +   tmp |= (mckr & AT91_PMC_MCKR_MDIV_MASK);
> +   writel(tmp, >mckr);
> +
> +   tmp = readl(>mckr);
> +   tmp &= (~AT91_PMC_MCKR_PRES_MASK);
> +   tmp |= (mckr & AT91_PMC_MCKR_PRES_MASK);
> +   writel(tmp, >mckr);
> +}
> +
>  int at91_enable_periph_generated_clk(u32 id, u32 clk_source, u32 div)
>  {
> struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
> diff --git a/arch/arm/mach-at91/include/mach/at91_common.h 
> b/arch/arm/mach-at91/include/mach/at91_common.h
> index 5416eb455d..0b09ce7b2e 100644
> --- a/arch/arm/mach-at91/include/mach/at91_common.h
> +++ b/arch/arm/mach-at91/include/mach/at91_common.h
> @@ -25,6 +25,7 @@ void at91_lcd_hw_init(void);
>  void at91_plla_init(u32 pllar);
>  void at91_pllb_init(u32 pllar);
>  void at91_mck_init(u32 mckr);
> +void at91_mck_init_down(u32 mckr);

Function comment?

>  void at91_pmc_init(void);
>  void mem_init(void);
>  void at91_phy_reset(void);
> --
> 2.13.0
>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 10/10] rockchip: defconfig: puma-rk3399: update for DM_REGULATOR support in SPL

2017-09-12 Thread Simon Glass
On 11 September 2017 at 05:59, Philipp Tomsich
 wrote:
> The RK3399-Q7 requires DM regulator support in SPL, so we can use the
> regulator framework to reenable the eMMC and SPI, if these had been
> turned of by the BIOS_DISABLE signal.
>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  configs/puma-rk3399_defconfig | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

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


Re: [U-Boot] [PATCH v2 03/14] usb: gadget: Move USBNET_HOST_ADDR to Kconfig

2017-09-12 Thread Simon Glass
On 12 September 2017 at 13:01, Maxime Ripard
 wrote:
> While the USB Ethernet device address is already defined in Kconfig, the
> host address isn't. Convert it.
>
> Signed-off-by: Maxime Ripard 
> ---
>  configs/am335x_baltos_defconfig| 1 +
>  configs/am335x_boneblack_defconfig | 1 +
>  configs/am335x_evm_norboot_defconfig   | 1 +
>  configs/pxm2_defconfig | 1 +
>  configs/rastaban_defconfig | 1 +
>  configs/warp7_defconfig| 1 +
>  configs/warp7_secure_defconfig | 1 +
>  drivers/usb/gadget/Kconfig | 7 +++
>  include/configs/am335x_evm.h   | 1 -
>  include/configs/baltos.h   | 1 -
>  include/configs/h2200.h| 1 -
>  include/configs/siemens-am33x-common.h | 1 -
>  include/configs/warp7.h| 1 -
>  scripts/config_whitelist.txt   | 1 -
>  14 files changed, 14 insertions(+), 6 deletions(-)
>

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


Re: [U-Boot] [PATCH v5 9/9] board: atmel: Add SAMA5D27 SOM1 EK board

2017-09-12 Thread Simon Glass
On 12 September 2017 at 20:10, Wenyou Yang  wrote:
> From: Wenyou Yang 
>
> The SAMA5D27-SiP (System in Package) integrates the SAMA5D2
> with 1Gbit DDR2-SDRAM in a single package.
>
> The SAMA5D27 SOM1 embeds a 64Mbit QSPI flash, KSZ8081 Phy and
> Mac-address EEPROM.
>
> Signed-off-by: Wenyou Yang 
> ---
>
> Changes in v5:
>  - Rebase the u-boot/master (8a33cb8b6bd).
>  - Drop the applied patches.
>
> Changes in v4:
>  - Rebase the uboot/master (84a4206).
>  - Remove the default config file for the spiflash.
>  - Integrate the following patches into this patch series.
>1./ [PATCH v2 0/3] board: atmel: Set the ethernet mac address from eeprom
>2./ [PATCH 1/7] lib: at91: Add logo files used by API from DM_VIDEO
>3./ [PATCH 2/7] atmel: common: Add function to display via DM_VIDEO's API
>4./ [PATCH] board: sama5d2_xplained: Make SPL work on spiflash
>  - Remove the dependency on [PATCH 0/5] configs: at91: Remove value of 
> CONFIG_SYS_EXTRA_OPTIONS option.
>
> Changes in v3:
>  - Rebase on the PATCH: Atmel PIT timer driver and Remove 
> CONFIG_SYS_EXTRA_OPTIONS.
>  - Use the new Atmel PIT timer driver.
>  - Remove "SAMA5D2" from CONFIG_SYS_EXTRA_OPTIONS options.
>  - Move CONFIG_ENV_IS_IN_FAT to Kconfig.
>
> Changes in v2:
>  - Add the reviewed-by tag.
>  - Add the help in Kconfig to describe the board and peripherals.
>  - Add the code to display the company's logo and board information.
>  - Replace the code to set the ethernet mac address with the common
>code from the board/atmel/common folder.
>
>  arch/arm/dts/Makefile   |   3 +
>  arch/arm/dts/at91-sama5d27_som1_ek.dts  | 215 
> 
>  arch/arm/dts/sama5d2.dtsi   |  20 +++
>  arch/arm/dts/sama5d27_som1.dtsi | 159 ++
>  arch/arm/mach-at91/Kconfig  |  14 ++
>  board/atmel/sama5d27_som1_ek/Kconfig|  15 ++
>  board/atmel/sama5d27_som1_ek/MAINTAINERS|   6 +
>  board/atmel/sama5d27_som1_ek/Makefile   |   8 +
>  board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c | 189 +
>  configs/sama5d27_som1_ek_mmc_defconfig  |  88 ++
>  include/configs/sama5d27_som1_ek.h  |  92 ++
>  11 files changed, 809 insertions(+)
>  create mode 100644 arch/arm/dts/at91-sama5d27_som1_ek.dts
>  create mode 100644 arch/arm/dts/sama5d27_som1.dtsi
>  create mode 100644 board/atmel/sama5d27_som1_ek/Kconfig
>  create mode 100644 board/atmel/sama5d27_som1_ek/MAINTAINERS
>  create mode 100644 board/atmel/sama5d27_som1_ek/Makefile
>  create mode 100644 board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
>  create mode 100644 configs/sama5d27_som1_ek_mmc_defconfig
>  create mode 100644 include/configs/sama5d27_som1_ek.h

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


Re: [U-Boot] [RESEND PATCH 2/6] rockchip: xhci: Convert to livetree

2017-09-12 Thread Simon Glass
On 12 September 2017 at 09:32, Philipp Tomsich
 wrote:
> Update the Rockchip xhci wrapper driver to support a live device tree.
>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  drivers/usb/host/xhci-rockchip.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

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


Re: [U-Boot] [PATCH 1/1] spl: u-boot-spl-nodtb.bin: remove .got and .got.plt sections

2017-09-12 Thread Bin Meng
Hi Heinrich,

On Tue, Sep 12, 2017 at 8:50 AM, Heinrich Schuchardt  wrote:
> On 09/12/2017 01:19 AM, Dr. Philipp Tomsich wrote:
>>> On 12 Sep 2017, at 00:40, Heinrich Schuchardt  wrote:
>>>
>>> For qemu-x86_64_defconfig on Debian Stretch
>>> ld 2.28 creates a .got and a .got.plt section in
>>> u-boot-spl.
>>>
>>> If we do not ignore these sections objcopy generates an
>>> u-boot-spl-nodtb.bin file of 4 GiB which leads to
>>> subsequent failure of the build process.
>>>
>>> According to
>>> https://sourceware.org/bugzilla/show_bug.cgi?id=22120#c2
>>> objcopy can not generate files with holes.
>>>
>>> With the patch we can run qemu with the generated u-boot.rom.
>>>
>>> Signed-off-by: Heinrich Schuchardt 
>>> ---
>>> I ran the Travis CI tests with no error reported:
>>> https://travis-ci.org/xypron2/u-boot/builds/274042004
>>>
>>> It is unclear to me why on Debian Stretch the .got and .got.plt sections
>>> are generated. The problem does not exist on Debian Jessie which uses
>>> binutils 2.25.
>>>
>>> I found this comment in the BFD code which describes under which
>>> circumstances the .got.plt section is not generated:
>>>
>>> https://sourceware.org/viewvc/src/bfd/elf64-x86-64.c?view=markup#l2921
>>>
>>> Don't allocate .got.plt section if there are no GOT nor PLT
>>> entries and there is no reference to _GLOBAL_OFFSET_TABLE_.

Can we have some binutils guys to look at this? Why does the behavior
get changes between versions?

>>> ---
>>> scripts/Makefile.spl | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
>>> index dd8065d87d..3b2d79d562 100644
>>> --- a/scripts/Makefile.spl
>>> +++ b/scripts/Makefile.spl
>>> @@ -286,7 +286,8 @@ quiet_cmd_objcopy = OBJCOPY $@
>>> cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
>>>
>>> OBJCOPYFLAGS_$(SPL_BIN)-nodtb.bin = $(SPL_OBJCFLAGS) -O binary \
>>> -$(if $(CONFIG_SPL_X86_16BIT_INIT),-R .start16 -R .resetvec)
>>> +$(if $(CONFIG_SPL_X86_16BIT_INIT), \
>>> +-R .start16 -R .resetvec -R .got -R .got.plt)
>>

Simon, would you take a look at this?

>> If there is a non-empty .got, it can not be safely removed. The remaining 
>> code
>> can (and will) reference data within the .got.
>> Did you check the contents of the .got and where these are referenced from?
>
> This is from spl/u-boot-spl.map:
>
> .text   0xfffd 0xa032
>  *(.text*)
>  .text  0xfffd   0xcc arch/x86/cpu/start.o
> 0xfffd_x86boot_start
> 0xfffd0020_start
>
> .got0x00120x4
>  .got   0x00120x4 arch/x86/cpu/start.o
>
> .got.plt0x001200040xc
>  .got.plt   0x001200040xc arch/x86/cpu/start.o
> 0x00120004_GLOBAL_OFFSET_TABLE_
>
> So in .got there is just the reference to the BIOS start address.
> And .got.plt contains additionally a pointer to .got.
>
>> Did you check the contents of the .got and where these are referenced
>> from?
> It is unclear to me what additional information is needed and how it can
> be extracted.
>

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


[U-Boot] [PATCH v2] blk: Remove various places that do flush cache after read

2017-09-12 Thread Bin Meng
All these places seem to inherit the codes from the MMC driver where
a FIXME was put in the comment. However the correct operation after
read should be cache invalidate, not flush.

The underlying drivers should be responsible for the cache operation.
Remove these codes completely.

Signed-off-by: Bin Meng 
Reviewed-by: Stefan Roese 
Reviewed-by: York Sun 
Reviewed-by: Joe Hershberger 
Reviewed-by: Simon Glass 
Tested-by: York Sun 

---

Changes in v2:
- rebase on top of u-boot/master

 arch/arm/cpu/armv8/fsl-layerscape/ppa.c | 15 ---
 board/toradex/common/tdx-cfg-block.c|  2 --
 cmd/mmc.c   |  2 --
 drivers/block/blk-uclass.c  |  3 ---
 drivers/block/blk_legacy.c  |  3 ---
 drivers/net/fm/fm.c |  2 --
 drivers/net/phy/cortina.c   |  2 --
 drivers/qe/qe.c |  2 --
 8 files changed, 31 deletions(-)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c 
b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
index 24ddb5d..bbf8bba 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
@@ -107,9 +107,6 @@ int ppa_init(void)
return -EIO;
}
 
-   /* flush cache after read */
-   flush_cache((ulong)fitp, cnt * 512);
-
ret = fdt_check_header(fitp);
if (ret) {
free(fitp);
@@ -134,9 +131,6 @@ int ppa_init(void)
}
debug("Read PPA header to 0x%p\n", ppa_hdr_ddr);
 
-   /* flush cache after read */
-   flush_cache((ulong)ppa_hdr_ddr, cnt * 512);
-
ppa_esbc_hdr = (uintptr_t)ppa_hdr_ddr;
 #endif
 
@@ -164,9 +158,6 @@ int ppa_init(void)
return -EIO;
}
 
-   /* flush cache after read */
-   flush_cache((ulong)ppa_fit_addr, cnt * 512);
-
 #elif defined(CONFIG_SYS_LS_PPA_FW_IN_NAND)
struct fdt_header fit;
 
@@ -208,9 +199,6 @@ int ppa_init(void)
}
debug("Read PPA header to 0x%p\n", ppa_hdr_ddr);
 
-   /* flush cache after read */
-   flush_cache((ulong)ppa_hdr_ddr, fw_length);
-
ppa_esbc_hdr = (uintptr_t)ppa_hdr_ddr;
 #endif
 
@@ -232,9 +220,6 @@ int ppa_init(void)
   CONFIG_SYS_LS_PPA_FW_ADDR);
return -EIO;
}
-
-   /* flush cache after read */
-   flush_cache((ulong)ppa_fit_addr, fw_length);
 #else
 #error "No CONFIG_SYS_LS_PPA_FW_IN_xxx defined"
 #endif
diff --git a/board/toradex/common/tdx-cfg-block.c 
b/board/toradex/common/tdx-cfg-block.c
index 328c4c0..f850a3c 100644
--- a/board/toradex/common/tdx-cfg-block.c
+++ b/board/toradex/common/tdx-cfg-block.c
@@ -129,8 +129,6 @@ static int tdx_cfg_block_mmc_storage(u8 *config_block, int 
write)
ret = -EIO;
goto out;
}
-   /* Flush cache after read */
-   flush_cache((ulong)(unsigned char *)config_block, 512);
} else {
/* Just writing one 512 byte block */
if (blk_dwrite(mmc_get_blk_desc(mmc), blk_start, 1,
diff --git a/cmd/mmc.c b/cmd/mmc.c
index 00697fc..5def4ea 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -293,8 +293,6 @@ static int do_mmc_read(cmd_tbl_t *cmdtp, int flag,
   curr_device, blk, cnt);
 
n = blk_dread(mmc_get_blk_desc(mmc), blk, cnt, addr);
-   /* flush cache after read */
-   flush_cache((ulong)addr, cnt * 512); /* FIXME */
printf("%d blocks read: %s\n", n, (n == cnt) ? "OK" : "ERROR");
 
return (n == cnt) ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c
index aee2a50..537cf5f 100644
--- a/drivers/block/blk-uclass.c
+++ b/drivers/block/blk-uclass.c
@@ -294,9 +294,6 @@ ulong blk_read_devnum(enum if_type if_type, int devnum, 
lbaint_t start,
if (IS_ERR_VALUE(n))
return n;
 
-   /* flush cache after read */
-   flush_cache((ulong)buffer, blkcnt * desc->blksz);
-
return n;
 }
 
diff --git a/drivers/block/blk_legacy.c b/drivers/block/blk_legacy.c
index 981872e..16d3bfe 100644
--- a/drivers/block/blk_legacy.c
+++ b/drivers/block/blk_legacy.c
@@ -232,9 +232,6 @@ ulong blk_read_devnum(enum if_type if_type, int devnum, 
lbaint_t start,
if (IS_ERR_VALUE(n))
return n;
 
-   /* flush cache after read */
-   flush_cache((ulong)buffer, blkcnt * desc->blksz);
-
return n;
 }
 
diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c
index 451dfde..261f1b9 100644
--- a/drivers/net/fm/fm.c
+++ b/drivers/net/fm/fm.c
@@ -405,8 +405,6 @@ int fm_init_common(int index, struct ccsr_fman *reg)
mmc_init(mmc);
(void)mmc->block_dev.block_read(>block_dev, blk, cnt,
addr);
-   /* flush cache after read */
-   

[U-Boot] [PATCH v2] cmd: blk: Use LBAFU in the common block command

2017-09-12 Thread Bin Meng
There is already a macro LBAFU to aid formatted print with lbaint_t
variables. Let's use it in the common block command codes.

Signed-off-by: Bin Meng 

---

Changes in v2:
- rebase on top of u-boot/master

 cmd/blk_common.c | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/cmd/blk_common.c b/cmd/blk_common.c
index 86c75e7..0c0c23e 100644
--- a/cmd/blk_common.c
+++ b/cmd/blk_common.c
@@ -68,9 +68,8 @@ int blk_common_cmd(int argc, char * const argv[], enum 
if_type if_type,
ulong cnt = simple_strtoul(argv[4], NULL, 16);
ulong n;
 
-   printf("\n%s read: device %d block # %lld, count %ld 
... ",
-  if_name, *cur_devnump, (unsigned long long)blk,
-  cnt);
+   printf("\n%s read: device %d block # "LBAFU", count %lu 
... ",
+  if_name, *cur_devnump, blk, cnt);
 
n = blk_read_devnum(if_type, *cur_devnump, blk, cnt,
(ulong *)addr);
@@ -84,9 +83,8 @@ int blk_common_cmd(int argc, char * const argv[], enum 
if_type if_type,
ulong cnt = simple_strtoul(argv[4], NULL, 16);
ulong n;
 
-   printf("\n%s write: device %d block # %lld, count %ld 
... ",
-  if_name, *cur_devnump, (unsigned long long)blk,
-  cnt);
+   printf("\n%s write: device %d block # "LBAFU", count 
%lu ... ",
+  if_name, *cur_devnump, blk, cnt);
 
n = blk_write_devnum(if_type, *cur_devnump, blk, cnt,
 (ulong *)addr);
-- 
2.9.2

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


[U-Boot] Uboot send pull request

2017-09-12 Thread uboot
 Hi Tom,

 Please pull the following patch from u-boot-nds32 into your tree.
 Thanks!

The following changes since commit 8a33cb8b6bdf8a35f931fcc3d8aa15254cfc4b23:

  Merge git://git.denx.de/u-boot-fsl-qoriq (2017-09-12 12:02:50 -0400)

are available in the git repository at:


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

for you to fetch changes up to 2d7417f517d734b53b6f1906d9b28cdcaf0cb7eb:

  nds32: bootm: Fix warning of struct tag_serialnr declared (2017-09-13 
09:20:52 +0800)


rick (2):
  nds32: board: Fix andestech adp-ae3xx.c make fail problem.
  nds32: bootm: Fix warning of struct tag_serialnr declared

 arch/nds32/include/asm/bootm.h|2 ++
 arch/nds32/lib/bootm.c|1 -
 board/AndesTech/adp-ae3xx/adp-ae3xx.c |1 +
 3 files changed, 3 insertions(+), 1 deletion(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v5 8/9] ARM: at91: Get the Chip ID of SAMA5D2 SiP

2017-09-12 Thread Wenyou Yang
From: Wenyou Yang 

The SAMA5D2 SiP(System in Package) has different Chip IDs in the
CHIPID and CHIP_EXID registers.

Signed-off-by: Wenyou Yang 
Reviewed-by: Simon Glass 
---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/mach-at91/armv7/sama5d2_devices.c | 26 --
 arch/arm/mach-at91/include/mach/sama5d2.h  |  7 ++-
 2 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-at91/armv7/sama5d2_devices.c 
b/arch/arm/mach-at91/armv7/sama5d2_devices.c
index 978eac29bd..de1d9b5bfb 100644
--- a/arch/arm/mach-at91/armv7/sama5d2_devices.c
+++ b/arch/arm/mach-at91/armv7/sama5d2_devices.c
@@ -10,11 +10,20 @@
 #include 
 #include 
 
-char *get_cpu_name()
+int cpu_is_sama5d2(void)
 {
+   unsigned int chip_id = get_chip_id();
+
+   return ((chip_id == ARCH_ID_SAMA5D2) ||
+   (chip_id == ARCH_ID_SAMA5D2_SIP)) ? 1 : 0;
+}
+
+char *get_cpu_name(void)
+{
+   unsigned int chip_id = get_chip_id();
unsigned int extension_id = get_extension_chip_id();
 
-   if (cpu_is_sama5d2()) {
+   if (chip_id == ARCH_ID_SAMA5D2) {
switch (extension_id) {
case ARCH_EXID_SAMA5D21CU:
return "SAMA5D21";
@@ -41,6 +50,19 @@ char *get_cpu_name()
}
}
 
+   if ((chip_id == ARCH_ID_SAMA5D2) || (chip_id == ARCH_ID_SAMA5D2_SIP)) {
+   switch (extension_id) {
+   case ARCH_EXID_SAMA5D225C_D1M:
+   return "SAMA5D225 128M bits DDR2 SDRAM";
+   case ARCH_EXID_SAMA5D27C_D5M:
+   return "SAMA5D27 512M bits DDR2 SDRAM";
+   case ARCH_EXID_SAMA5D27C_D1G:
+   return "SAMA5D27 1G bits DDR2 SDRAM";
+   case ARCH_EXID_SAMA5D28C_D1G:
+   return "SAMA5D28 1G bits DDR2 SDRAM";
+   }
+   }
+
return "Unknown CPU type";
 }
 
diff --git a/arch/arm/mach-at91/include/mach/sama5d2.h 
b/arch/arm/mach-at91/include/mach/sama5d2.h
index 25c85411e5..49283ed86b 100644
--- a/arch/arm/mach-at91/include/mach/sama5d2.h
+++ b/arch/arm/mach-at91/include/mach/sama5d2.h
@@ -222,7 +222,11 @@
 #define ARCH_EXID_SAMA5D28CU   0x0010
 #define ARCH_EXID_SAMA5D28CN   0x0020
 
-#define cpu_is_sama5d2()   (get_chip_id() == ARCH_ID_SAMA5D2)
+#define ARCH_ID_SAMA5D2_SIP0x8a5c08c2
+#define ARCH_EXID_SAMA5D225C_D1M   0x0053
+#define ARCH_EXID_SAMA5D27C_D5M0x0032
+#define ARCH_EXID_SAMA5D27C_D1G0x0033
+#define ARCH_EXID_SAMA5D28C_D1G0x0013
 
 /* PIT Timer(PIT_PIIR) */
 #define CONFIG_SYS_TIMER_COUNTER   0xf804803c
@@ -233,6 +237,7 @@
 #ifndef __ASSEMBLY__
 unsigned int get_chip_id(void);
 unsigned int get_extension_chip_id(void);
+int cpu_is_sama5d2(void);
 unsigned int has_lcdc(void);
 char *get_cpu_name(void);
 #endif
-- 
2.13.0

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


[U-Boot] [PATCH v5 9/9] board: atmel: Add SAMA5D27 SOM1 EK board

2017-09-12 Thread Wenyou Yang
From: Wenyou Yang 

The SAMA5D27-SiP (System in Package) integrates the SAMA5D2
with 1Gbit DDR2-SDRAM in a single package.

The SAMA5D27 SOM1 embeds a 64Mbit QSPI flash, KSZ8081 Phy and
Mac-address EEPROM.

Signed-off-by: Wenyou Yang 
---

Changes in v5:
 - Rebase the u-boot/master (8a33cb8b6bd).
 - Drop the applied patches.

Changes in v4:
 - Rebase the uboot/master (84a4206).
 - Remove the default config file for the spiflash.
 - Integrate the following patches into this patch series.
   1./ [PATCH v2 0/3] board: atmel: Set the ethernet mac address from eeprom
   2./ [PATCH 1/7] lib: at91: Add logo files used by API from DM_VIDEO
   3./ [PATCH 2/7] atmel: common: Add function to display via DM_VIDEO's API
   4./ [PATCH] board: sama5d2_xplained: Make SPL work on spiflash
 - Remove the dependency on [PATCH 0/5] configs: at91: Remove value of 
CONFIG_SYS_EXTRA_OPTIONS option.

Changes in v3:
 - Rebase on the PATCH: Atmel PIT timer driver and Remove 
CONFIG_SYS_EXTRA_OPTIONS.
 - Use the new Atmel PIT timer driver.
 - Remove "SAMA5D2" from CONFIG_SYS_EXTRA_OPTIONS options.
 - Move CONFIG_ENV_IS_IN_FAT to Kconfig.

Changes in v2:
 - Add the reviewed-by tag.
 - Add the help in Kconfig to describe the board and peripherals.
 - Add the code to display the company's logo and board information.
 - Replace the code to set the ethernet mac address with the common
   code from the board/atmel/common folder.

 arch/arm/dts/Makefile   |   3 +
 arch/arm/dts/at91-sama5d27_som1_ek.dts  | 215 
 arch/arm/dts/sama5d2.dtsi   |  20 +++
 arch/arm/dts/sama5d27_som1.dtsi | 159 ++
 arch/arm/mach-at91/Kconfig  |  14 ++
 board/atmel/sama5d27_som1_ek/Kconfig|  15 ++
 board/atmel/sama5d27_som1_ek/MAINTAINERS|   6 +
 board/atmel/sama5d27_som1_ek/Makefile   |   8 +
 board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c | 189 +
 configs/sama5d27_som1_ek_mmc_defconfig  |  88 ++
 include/configs/sama5d27_som1_ek.h  |  92 ++
 11 files changed, 809 insertions(+)
 create mode 100644 arch/arm/dts/at91-sama5d27_som1_ek.dts
 create mode 100644 arch/arm/dts/sama5d27_som1.dtsi
 create mode 100644 board/atmel/sama5d27_som1_ek/Kconfig
 create mode 100644 board/atmel/sama5d27_som1_ek/MAINTAINERS
 create mode 100644 board/atmel/sama5d27_som1_ek/Makefile
 create mode 100644 board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c
 create mode 100644 configs/sama5d27_som1_ek_mmc_defconfig
 create mode 100644 include/configs/sama5d27_som1_ek.h

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 10d397d700..85ce68789a 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -420,6 +420,9 @@ dtb-$(CONFIG_TARGET_OMAP3_LOGIC) += \
 dtb-$(CONFIG_TARGET_SAMA5D2_XPLAINED) += \
at91-sama5d2_xplained.dtb
 
+dtb-$(CONFIG_TARGET_SAMA5D27_SOM1_EK) += \
+   at91-sama5d27_som1_ek.dtb
+
 dtb-$(CONFIG_TARGET_SAMA5D3XEK) += \
sama5d31ek.dtb \
sama5d33ek.dtb \
diff --git a/arch/arm/dts/at91-sama5d27_som1_ek.dts 
b/arch/arm/dts/at91-sama5d27_som1_ek.dts
new file mode 100644
index 00..5e62d4af71
--- /dev/null
+++ b/arch/arm/dts/at91-sama5d27_som1_ek.dts
@@ -0,0 +1,215 @@
+/*
+ * at91-sama5d27_som1_ek.dts - Device Tree file for SAMA5D27 SOM1 EK board
+ *
+ *  Copyright (C) 2017 Microchip Corporation
+ * Wenyou Yang 
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ 

[U-Boot] [PATCH v5 7/9] ARM: at91: mach: Add missing defines of MPDDRC

2017-09-12 Thread Wenyou Yang
Add missing defines of Multiport DDR-SDRAM Controller (MPDDRC).

Signed-off-by: Wenyou Yang 
Reviewed-by: Simon Glass 
---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/mach-at91/include/mach/atmel_mpddrc.h | 4 
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/mach-at91/include/mach/atmel_mpddrc.h 
b/arch/arm/mach-at91/include/mach/atmel_mpddrc.h
index 803501f5cf..40e1cf0a0a 100644
--- a/arch/arm/mach-at91/include/mach/atmel_mpddrc.h
+++ b/arch/arm/mach-at91/include/mach/atmel_mpddrc.h
@@ -96,6 +96,10 @@ int ddr3_init(const unsigned int base,
 #define ATMEL_MPDDRC_CR_DLL_RESET_ENABLED  (0x1 << 7)
 #define ATMEL_MPDDRC_CR_DIC_DS (0x1 << 8)
 #define ATMEL_MPDDRC_CR_DIS_DLL(0x1 << 9)
+#define ATMEL_MPDDRC_CR_ZQ_INIT(0x0 << 10)
+#define ATMEL_MPDDRC_CR_ZQ_LONG(0x1 << 10)
+#define ATMEL_MPDDRC_CR_ZQ_SHORT   (0x2 << 10)
+#define ATMEL_MPDDRC_CR_ZQ_RESET   (0x3 << 10)
 #define ATMEL_MPDDRC_CR_OCD_DEFAULT(0x7 << 12)
 #define ATMEL_MPDDRC_CR_DQMS_SHARED(0x1 << 16)
 #define ATMEL_MPDDRC_CR_ENRDM_ON   (0x1 << 17)
-- 
2.13.0

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


[U-Boot] [PATCH v5 4/9] ARM: at91: spl: Add mck function to lower rate while switching

2017-09-12 Thread Wenyou Yang
Refer to the commit 70f8c8316ad(PMC: add new mck function to lower
rate while switching) from AT91Bootstrap.

While switching to a lower clock source, we must switch the clock
source first instead of last. Otherwise, we could end up with
too high frequency on internal bus and peripherals.
This happen on SAMA5D2 as we exit from ROM code @396MHz.

Add a function pmc_mck_init_down() to allow this sequence.

Signed-off-by: Wenyou Yang 
---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/mach-at91/armv7/clock.c  | 36 +++
 arch/arm/mach-at91/include/mach/at91_common.h |  1 +
 2 files changed, 37 insertions(+)

diff --git a/arch/arm/mach-at91/armv7/clock.c b/arch/arm/mach-at91/armv7/clock.c
index 2e55953799..8ae01f4020 100644
--- a/arch/arm/mach-at91/armv7/clock.c
+++ b/arch/arm/mach-at91/armv7/clock.c
@@ -150,6 +150,42 @@ void at91_mck_init(u32 mckr)
;
 }
 
+void at91_mck_init_down(u32 mckr)
+{
+   struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
+   u32 tmp;
+
+   tmp = readl(>mckr);
+   tmp &= (~AT91_PMC_MCKR_CSS_MASK);
+   tmp |= (mckr & AT91_PMC_MCKR_CSS_MASK);
+   writel(tmp, >mckr);
+
+   while (!(readl(>sr) & AT91_PMC_MCKRDY))
+   ;
+
+#ifdef CPU_HAS_H32MXDIV
+   tmp = readl(>mckr);
+   tmp &= (~AT91_PMC_MCKR_H32MXDIV);
+   tmp |= (mckr & AT91_PMC_MCKR_H32MXDIV);
+   writel(tmp, >mckr);
+#endif
+
+   tmp = readl(>mckr);
+   tmp &= (~AT91_PMC_MCKR_PLLADIV_MASK);
+   tmp |= (mckr & AT91_PMC_MCKR_PLLADIV_MASK);
+   writel(tmp, >mckr);
+
+   tmp = readl(>mckr);
+   tmp &= (~AT91_PMC_MCKR_MDIV_MASK);
+   tmp |= (mckr & AT91_PMC_MCKR_MDIV_MASK);
+   writel(tmp, >mckr);
+
+   tmp = readl(>mckr);
+   tmp &= (~AT91_PMC_MCKR_PRES_MASK);
+   tmp |= (mckr & AT91_PMC_MCKR_PRES_MASK);
+   writel(tmp, >mckr);
+}
+
 int at91_enable_periph_generated_clk(u32 id, u32 clk_source, u32 div)
 {
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
diff --git a/arch/arm/mach-at91/include/mach/at91_common.h 
b/arch/arm/mach-at91/include/mach/at91_common.h
index 5416eb455d..0b09ce7b2e 100644
--- a/arch/arm/mach-at91/include/mach/at91_common.h
+++ b/arch/arm/mach-at91/include/mach/at91_common.h
@@ -25,6 +25,7 @@ void at91_lcd_hw_init(void);
 void at91_plla_init(u32 pllar);
 void at91_pllb_init(u32 pllar);
 void at91_mck_init(u32 mckr);
+void at91_mck_init_down(u32 mckr);
 void at91_pmc_init(void);
 void mem_init(void);
 void at91_phy_reset(void);
-- 
2.13.0

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


[U-Boot] [PATCH v5 5/9] board: sama5d2_xplained: Make SPL work on spiflash

2017-09-12 Thread Wenyou Yang
Because before switching to a lower clock source, we must switch
the clock source first instead of last. So before configuring the
PMC_MCKR register, invoke at91_mck_init_down() first.

As said in datasheet, the the size of SPL must not exceed the maximum
size allowed(64Kbytes).

Signed-off-by: Wenyou Yang 
---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 board/atmel/sama5d2_xplained/sama5d2_xplained.c | 10 ++
 include/configs/sama5d2_xplained.h  |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c 
b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
index 7e0cb4228f..5758653030 100644
--- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c
+++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
@@ -247,6 +247,16 @@ void at91_pmc_init(void)
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
u32 tmp;
 
+   /*
+* while coming from the ROM code, we run on PLLA @ 492 MHz / 164 MHz
+* so we need to slow down and configure MCKR accordingly.
+* This is why we have a special flavor of the switching function.
+*/
+   tmp = AT91_PMC_MCKR_PLLADIV_2 |
+ AT91_PMC_MCKR_MDIV_3 |
+ AT91_PMC_MCKR_CSS_MAIN;
+   at91_mck_init_down(tmp);
+
tmp = AT91_PMC_PLLAR_29 |
  AT91_PMC_PLLXR_PLLCOUNT(0x3f) |
  AT91_PMC_PLLXR_MUL(82) |
diff --git a/include/configs/sama5d2_xplained.h 
b/include/configs/sama5d2_xplained.h
index 891218d83e..aedd5684c4 100644
--- a/include/configs/sama5d2_xplained.h
+++ b/include/configs/sama5d2_xplained.h
@@ -61,7 +61,7 @@
 /* SPL */
 #define CONFIG_SPL_FRAMEWORK
 #define CONFIG_SPL_TEXT_BASE   0x20
-#define CONFIG_SPL_MAX_SIZE0x18000
+#define CONFIG_SPL_MAX_SIZE0x1
 #define CONFIG_SPL_BSS_START_ADDR  0x2000
 #define CONFIG_SPL_BSS_MAX_SIZE0x8
 #define CONFIG_SYS_SPL_MALLOC_START0x2008
-- 
2.13.0

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


Re: [U-Boot] [PATCH 1/3] armv8: ls1088a: fix the MMU table for pcie config space

2017-09-12 Thread York Sun
On 09/03/2017 08:05 PM, Zhiqiang Hou wrote:
> From: Hou Zhiqiang 
> 
> The pcie config space of ls1088a is different from ls2080a.
> 
> Signed-off-by: Hou Zhiqiang 
> ---

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] patman complains "ConfigParser.NoSectionError: No section: 'bounces'"

2017-09-12 Thread Simon Glass
+Tom

Hi Bin,

On 12 September 2017 at 19:53, Bin Meng  wrote:
>
> Hi,
>
> With commit e11aa602abd3e8007dfd3ed23ebb829101abcfec: patman: add
> support for omitting bouncing addresses, running patman it complains:
>
> Traceback (most recent call last):
>   File "./tools/patman/patman", line 18, in 
> from patman import checkpatch, command, gitutil, patchstream, \
>   File "/tools/patman/patman.py", line 76, in 
> settings.Setup(parser, options.project, '')
>   File "/tools/patman/settings.py", line 310, in Setup
> for name, value in config.items('bounces'):
>   File "/tools/patman/settings.py", line 145, in items
> self, section, *args, **kwargs
>   File "/usr/local/lib/python2.7/ConfigParser.py", line 642, in items
> raise NoSectionError(section)
> ConfigParser.NoSectionError: No section: 'bounces'
>
> Can we get this fixed?

Sorry about that. I tried it out with that section. Please see:

http://patchwork.ozlabs.org/patch/813143/

>
> Regards,
> Bin

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


Re: [U-Boot] [PATCH 05/10] rockchip: spl: rk3399: implement chip-specific board_spl_was_booted_from()

2017-09-12 Thread Simon Glass
On 11 September 2017 at 05:59, Philipp Tomsich
 wrote:
> To support the new "same-as-spl" specifier in the boot-order on the
> RK3399, this implements the chip-specific mapping from the information
> obtainable from the BROM to a OF path name.
>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  arch/arm/mach-rockchip/rk3399-board-spl.c | 24 
>  1 file changed, 24 insertions(+)

Reviewed-by: Simon Glass 

This feels a bit klugey. Does SPL not have access to the same DT? If
so then (at some point when we add support) perhaps it could pass its
name through?
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 02/10] rockchip: bootrom: add definitions to retrieve BROM boot-source

2017-09-12 Thread Simon Glass
On 11 September 2017 at 05:59, Philipp Tomsich
 wrote:
> The Rockchip BROM allows reading where it booted from from SRAM.
> This adds the necessary definitions (as received from Kever) for
> the location of this information in the RK3399's SRAM and naming
> for the constants used.
>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  arch/arm/include/asm/arch-rockchip/bootrom.h | 18 ++
>  1 file changed, 18 insertions(+)

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


Re: [U-Boot] [PATCH 06/10] rockchip: dts: rk3399-puma: add 'same-as-spl' to the front of the boot-order

2017-09-12 Thread Simon Glass
On 11 September 2017 at 05:59, Philipp Tomsich
 wrote:
> In the general case, we want to continue booting the full U-Boot
> (contained in a discoverable FIT image) from the same device the SPL
> stage was loaded from.  This prepends the 'same-as-spl' specifier to
> our configurable boot-order to make this the default behaviour.
>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  arch/arm/dts/rk3399-puma.dtsi | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
Reviewed-by: Simon Glass 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH V2] dm: gpio: Add DM compatibilty to GPIO driver for Davinci

2017-09-12 Thread Simon Glass
Hi Adam,

On 12 September 2017 at 21:28, Adam Ford  wrote:
> This adds DM compatibility for the davinici GPIO driver.
> Tested on da850-evm.
>
> Signed-off-by: Adam Ford 
> ---
> V2:  The bank calculation needs to take into account the size of the struct
>  Whitespace fixes
>
>  arch/arm/mach-davinci/include/mach/gpio.h |  14 +-
>  board/davinci/da8xxevm/da850evm.c |   2 +
>  configs/da850evm_defconfig|   3 +-
>  drivers/gpio/da8xx_gpio.c | 208 
> +++---
>  include/configs/da850evm.h|   1 +
>  5 files changed, 205 insertions(+), 23 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/include/mach/gpio.h 
> b/arch/arm/mach-davinci/include/mach/gpio.h
> index 7da0060..32cae3a 100644
> --- a/arch/arm/mach-davinci/include/mach/gpio.h
> +++ b/arch/arm/mach-davinci/include/mach/gpio.h
> @@ -40,7 +40,7 @@ struct davinci_gpio_bank {
> unsigned int irq_num;
> unsigned int irq_mask;
> unsigned long *in_use;
> -   unsigned long base;
> +   struct davinci_gpio *base;
>  };
>
>  #define davinci_gpio_bank01 ((struct davinci_gpio *)DAVINCI_GPIO_BANK01)
> @@ -49,7 +49,9 @@ struct davinci_gpio_bank {
>  #define davinci_gpio_bank67 ((struct davinci_gpio *)DAVINCI_GPIO_BANK67)
>  #define davinci_gpio_bank8 ((struct davinci_gpio *)DAVINCI_GPIO_BANK8)
>
> +#ifndef CONFIG_DM_GPIO
>  #define gpio_status()  gpio_info()
> +#endif
>  #define GPIO_NAME_SIZE 20
>  #if defined(CONFIG_SOC_DM644X)
>  /* GPIO0 to GPIO53, omit the V3.3 volts one */
> @@ -64,4 +66,14 @@ struct davinci_gpio_bank {
>
>  void gpio_info(void);
>
> +#ifdef CONFIG_DM_GPIO
> +
> +/* Information about a GPIO bank */
> +struct davinci_gpio_platdata {
> +   int bank_index;
> +   ulong base; /* address of registers in physical memory */
> +   const char *port_name;
> +};
> +#endif
> +
>  #endif
> diff --git a/board/davinci/da8xxevm/da850evm.c 
> b/board/davinci/da8xxevm/da850evm.c
> index 42bc0f4..2a54d0f 100644
> --- a/board/davinci/da8xxevm/da850evm.c
> +++ b/board/davinci/da8xxevm/da850evm.c
> @@ -10,6 +10,7 @@
>   */
>
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -24,6 +25,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  #ifdef CONFIG_MMC_DAVINCI
>  #include 
> diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
> index b966fa7..24507da 100644
> --- a/configs/da850evm_defconfig
> +++ b/configs/da850evm_defconfig
> @@ -20,14 +20,15 @@ CONFIG_HUSH_PARSER=y
>  CONFIG_SYS_PROMPT="U-Boot > "
>  # CONFIG_CMD_IMLS is not set
>  CONFIG_CRC32_VERIFY=y
> +# CONFIG_CMD_EEPROM is not set
>  # CONFIG_CMD_FLASH is not set
> -# CONFIG_CMD_GPIO is not set
>  # CONFIG_CMD_SETEXPR is not set
>  CONFIG_CMD_MTDPARTS=y
>  CONFIG_CMD_DIAG=y
>  CONFIG_OF_CONTROL=y
>  CONFIG_ENV_IS_IN_SPI_FLASH=y
>  CONFIG_DM=y
> +CONFIG_DM_GPIO=y
>  CONFIG_DM_I2C=y
>  CONFIG_DM_I2C_COMPAT=y
>  CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
> diff --git a/drivers/gpio/da8xx_gpio.c b/drivers/gpio/da8xx_gpio.c
> index fa3a394..b64f936 100644
> --- a/drivers/gpio/da8xx_gpio.c
> +++ b/drivers/gpio/da8xx_gpio.c
> @@ -8,16 +8,20 @@
>   */
>
>  #include 
> +#include 
> +#include 
>  #include 
>  #include 
>  #include 
>  #include 
>
> +#ifndef CONFIG_DM_GPIO
>  static struct gpio_registry {
> int is_registered;
> char name[GPIO_NAME_SIZE];
>  } gpio_registry[MAX_NUM_GPIOS];
>
> +
>  #if defined(CONFIG_SOC_DA8XX)
>  #define pinmux(x)   (_syscfg_regs->pinmux[x])
>
> @@ -334,42 +338,30 @@ int gpio_free(unsigned gpio)
> /* Do not configure as input or change pin mux here */
> return 0;
>  }
> +#endif
>
> -int gpio_direction_input(unsigned gpio)
> +static int _gpio_direction_output(struct davinci_gpio *bank, unsigned gpio, 
> int value)
>  {
> -   struct davinci_gpio *bank;
> -
> -   bank = GPIO_BANK(gpio);
> -   setbits_le32(>dir, 1U << GPIO_BIT(gpio));
> +   clrbits_le32(>dir, 1U << GPIO_BIT(gpio));
> +   gpio_set_value(gpio, value);
> return 0;
>  }
>
> -int gpio_direction_output(unsigned gpio, int value)
> +static int _gpio_direction_input(struct davinci_gpio *bank, unsigned gpio)
>  {
> -   struct davinci_gpio *bank;
> -
> -   bank = GPIO_BANK(gpio);
> -   clrbits_le32(>dir, 1U << GPIO_BIT(gpio));
> -   gpio_set_value(gpio, value);
> +   setbits_le32(>dir, 1U << GPIO_BIT(gpio));
> return 0;
>  }
>
> -int gpio_get_value(unsigned gpio)
> +static int _gpio_get_value(struct davinci_gpio *bank, unsigned gpio)
>  {
> -   struct davinci_gpio *bank;
> unsigned int ip;
> -
> -   bank = GPIO_BANK(gpio);
> ip = in_le32(>in_data) & (1U << GPIO_BIT(gpio));
> return ip ? 1 : 0;
>  }
>
> -int gpio_set_value(unsigned gpio, int value)
> +static int _gpio_set_value(struct davinci_gpio *bank, unsigned gpio, int 
> value)
>  {
> -   struct davinci_gpio *bank;
> -
> -   bank = 

Re: [U-Boot] [RESEND PATCH 2/2] rockchip: dts: rk3399-puma: replace 'rockchip, vbus-gpio' with fixed regulator

2017-09-12 Thread Simon Glass
On 12 September 2017 at 09:30, Philipp Tomsich
 wrote:
> On the RK3399-Q7, we need to turn on the on-module USB hub before using the
> USB host interfaces (only the OTG interface is directly connected to the edge
> connector).  This drops the deprecated 'rockchip,vbus-gpio' property and uses
> a fixed regulator to turn on the USB hub.
>
> References: 26a8b80 "usb: host: xhci-rockchip: use fixed regulator to control 
> vbus"
> Signed-off-by: Philipp Tomsich 
> ---
>
>  arch/arm/dts/rk3399-puma.dtsi | 12 +++-
>  1 file changed, 11 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass 

Is this different from the previous patch?
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] Convert CONFIG_EMIF4 et al to Kconfig

2017-09-12 Thread Simon Glass
On 12 September 2017 at 14:27, Adam Ford  wrote:
> This converts the following to Kconfig:
>CONFIG_EMIF4
>CONFIG_SDRC
>
> Signed-off-by: Adam Ford 
> ---
>  arch/arm/mach-omap2/omap3/Kconfig | 15 +++
>  configs/am3517_crane_defconfig|  1 +
>  configs/am3517_evm_defconfig  |  1 +
>  configs/cm_t3517_defconfig|  1 +
>  configs/eco5pk_defconfig  |  1 +
>  configs/mcx_defconfig |  1 +
>  configs/mt_ventoux_defconfig  |  1 +
>  configs/twister_defconfig |  1 +
>  include/configs/am3517_crane.h|  1 -
>  include/configs/am3517_evm.h  |  2 --
>  include/configs/cm_t35.h  |  2 --
>  include/configs/cm_t3517.h|  2 --
>  include/configs/mcx.h |  2 --
>  include/configs/nokia_rx51.h  |  2 --
>  include/configs/sniper.h  |  1 -
>  include/configs/tam3517-common.h  |  2 --
>  include/configs/tao3530.h |  2 --
>  include/configs/ti_omap3_common.h |  3 ---
>  include/configs/tricorder.h   |  2 --
>  scripts/config_whitelist.txt  |  2 --
>  20 files changed, 22 insertions(+), 23 deletions(-)
>

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


Re: [U-Boot] [PATCH 07/10] rockchip: puma-rk3399: update board_init()

2017-09-12 Thread Simon Glass
On 11 September 2017 at 05:59, Philipp Tomsich
 wrote:
> The original initialisation code for board_init() was largely lifted
> from the code on the EVB.  However, the RK3399-Q7 can do with a much
> more concise init sequence.
>
> This cleans up the board_init() by updating it to the essentials for
> the RK3399-Q7 and getting rid of the accumulated cruft.
>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  board/theobroma-systems/puma_rk3399/puma-rk3399.c | 36 
> +++
>  1 file changed, 4 insertions(+), 32 deletions(-)

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


Re: [U-Boot] [PATCH v2 02/14] usb: gadget: Document USBNET_DEVADDR

2017-09-12 Thread Simon Glass
On 12 September 2017 at 13:01, Maxime Ripard
 wrote:
> Add an help about the USBNET_DEVADDR Kconfig option to make it clearer what
> it's about.
>
> Signed-off-by: Maxime Ripard 
> ---
>  drivers/usb/gadget/Kconfig | 3 +++
>  1 file changed, 3 insertions(+)

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


Re: [U-Boot] [RESEND PATCH 1/6] rockchip: clk: rk3399: Convert to livetree

2017-09-12 Thread Simon Glass
On 12 September 2017 at 09:32, Philipp Tomsich
 wrote:
> Update the clock driver for the RK3399  to support a live device tree.
>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  drivers/clk/rockchip/clk_rk3399.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

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


Re: [U-Boot] [RESEND PATCH 3/6] rockchip: efuse: change to use dev_read_addr_ptr

2017-09-12 Thread Simon Glass
On 12 September 2017 at 09:32, Philipp Tomsich
 wrote:
> With the dev_read_addr_ptr function available, we can change the
> efuse driver to use it (and eliminate the explicit type-cast).
>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  drivers/misc/rockchip-efuse.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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


Re: [U-Boot] [PATCH v5 5/9] board: sama5d2_xplained: Make SPL work on spiflash

2017-09-12 Thread Simon Glass
On 12 September 2017 at 20:10, Wenyou Yang  wrote:
> Because before switching to a lower clock source, we must switch
> the clock source first instead of last. So before configuring the
> PMC_MCKR register, invoke at91_mck_init_down() first.
>
> As said in datasheet, the the size of SPL must not exceed the maximum
> size allowed(64Kbytes).
>
> Signed-off-by: Wenyou Yang 
> ---
>
> Changes in v5: None
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
>
>  board/atmel/sama5d2_xplained/sama5d2_xplained.c | 10 ++
>  include/configs/sama5d2_xplained.h  |  2 +-
>  2 files changed, 11 insertions(+), 1 deletion(-)
>

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


Re: [U-Boot] [RESEND PATCH 4/6] usb: dwc2: convert to livetree

2017-09-12 Thread Simon Glass
On 12 September 2017 at 09:32, Philipp Tomsich
 wrote:
> Update the DWC2 USB driver to support a live tree.
>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  drivers/usb/host/dwc2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

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


Re: [U-Boot] [PATCH 08/10] rockchip: rk3399-puma: add boot-on regulator to override BIOS_DISABLE

2017-09-12 Thread Simon Glass
On 11 September 2017 at 05:59, Philipp Tomsich
 wrote:
> The (Qseven) BIOS_DISABLE signal on the RK3399-Q7 (Puma) keeps the
> eMMC and SPI in reset initially and we need to write a GPIO to turn
> them on before continuing the boot-up.
>
> This adds the DTS entries for the additional regulator and makes
> pinctrl and gpio3 available during SPL.  It also adds a hook to the
> spl_board_init() to ensure that the regulator gets probed and enabled.
>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  arch/arm/dts/rk3399-puma.dtsi | 23 
> +++
>  board/theobroma-systems/puma_rk3399/puma-rk3399.c | 10 ++
>  2 files changed, 33 insertions(+)

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


Re: [U-Boot] [PATCH v2 04/14] usb: gadget: Convert USB_ETHER to Kconfig

2017-09-12 Thread Simon Glass
On 12 September 2017 at 13:01, Maxime Ripard
 wrote:
> The USB Ethernet gadget option has not yet been moved to Kconfig, let's
> deal with that.
>
> Signed-off-by: Maxime Ripard 
> ---
>  configs/am335x_baltos_defconfig  |  1 +
>  configs/am335x_boneblack_defconfig   |  1 +
>  configs/am335x_boneblack_vboot_defconfig |  1 +
>  configs/am335x_evm_defconfig |  1 +
>  configs/am335x_evm_nor_defconfig |  1 +
>  configs/am335x_evm_norboot_defconfig |  1 +
>  configs/am335x_evm_spiboot_defconfig |  1 +
>  configs/am335x_evm_usbspl_defconfig  |  1 +
>  configs/am335x_hs_evm_defconfig  |  1 +
>  configs/draco_defconfig  |  1 +
>  configs/etamin_defconfig |  1 +
>  configs/gwventana_emmc_defconfig |  1 +
>  configs/gwventana_gw5904_defconfig   |  1 +
>  configs/gwventana_nand_defconfig |  1 +
>  configs/ma5d4evk_defconfig   |  1 +
>  configs/mx6qsabrelite_defconfig  |  1 +
>  configs/nitrogen6dl2g_defconfig  |  1 +
>  configs/nitrogen6dl_defconfig|  1 +
>  configs/nitrogen6q2g_defconfig   |  1 +
>  configs/nitrogen6q_defconfig |  1 +
>  configs/nitrogen6s1g_defconfig   |  1 +
>  configs/nitrogen6s_defconfig |  1 +
>  configs/novena_defconfig |  1 +
>  configs/omap3_beagle_defconfig   |  1 +
>  configs/omap3_evm_defconfig  |  1 +
>  configs/omap3_logic_defconfig|  1 +
>  configs/pcm051_rev1_defconfig|  1 +
>  configs/pcm051_rev3_defconfig|  1 +
>  configs/pxm2_defconfig   |  1 +
>  configs/rastaban_defconfig   |  1 +
>  configs/rut_defconfig|  1 +
>  configs/sama5d2_ptc_nandflash_defconfig  |  1 +
>  configs/sama5d2_ptc_spiflash_defconfig   |  1 +
>  configs/sansa_fuze_plus_defconfig|  1 +
>  configs/thuban_defconfig |  1 +
>  configs/vinco_defconfig  |  1 +
>  configs/warp7_defconfig  |  1 +
>  configs/warp7_secure_defconfig   |  1 +
>  configs/xfi3_defconfig   |  1 +
>  drivers/usb/gadget/Kconfig   | 14 ++
>  include/configs/am335x_evm.h |  1 -
>  include/configs/am3517_evm.h |  1 -
>  include/configs/baltos.h |  1 -
>  include/configs/gw_ventana.h |  1 -
>  include/configs/h2200.h  |  1 -
>  include/configs/ma5d4evk.h   |  1 -
>  include/configs/nitrogen6x.h |  1 -
>  include/configs/novena.h |  1 -
>  include/configs/omap3_beagle.h   |  1 -
>  include/configs/omap3_evm.h  |  1 -
>  include/configs/omap3_logic.h|  1 -
>  include/configs/pcm051.h |  1 -
>  include/configs/sama5d2_ptc.h|  1 -
>  include/configs/sansa_fuze_plus.h|  1 -
>  include/configs/siemens-am33x-common.h   |  1 -
>  include/configs/tao3530.h|  2 --
>  include/configs/vinco.h  |  1 -
>  include/configs/warp7.h  |  1 -
>  include/configs/xfi3.h   |  1 -
>  scripts/config_whitelist.txt |  1 -
>  60 files changed, 53 insertions(+), 21 deletions(-)
>

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


Re: [U-Boot] [PATCH] fs/fat: fix fatbuf leak

2017-09-12 Thread Simon Glass
On 12 September 2017 at 14:40, Rob Clark  wrote:
> A new fatbuf was allocated by get_fs_info() (called by fat_itr_root()),
> but not freed, resulting in eventually running out of memory.  Spotted
> by running 'ls -r' in a large FAT filesystem from Shell.efi.
>
> fatbuf is mainly used to cache FAT entry lookups (get_fatent())..
> possibly once fat_write.c it can move into the iterator to simplify
> this.
>
> Signed-off-by: Rob Clark 
> ---
> I can squash this back in to the earlier readdir patches and resend
> them if that is preferred.
>
>  fs/fat/fat.c | 23 ---
>  1 file changed, 16 insertions(+), 7 deletions(-)

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


Re: [U-Boot] [PATCH v5 08/10] fdtdec: sort include files

2017-09-12 Thread Simon Glass
Hi Jean-Jacques,

On 12 September 2017 at 08:45, Jean-Jacques Hiblot  wrote:
> Sort include files in accordance to U-Boot coding style.
>
> Signed-off-by: Jean-Jacques Hiblot 
> ---
>  lib/fdtdec.c | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/lib/fdtdec.c b/lib/fdtdec.c
> index 630e040..ee398d1 100644
> --- a/lib/fdtdec.c
> +++ b/lib/fdtdec.c
> @@ -4,17 +4,17 @@
>   */
>
>  #ifndef USE_HOSTCC
> +#include 
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
> -#include 
> -#include 
> -#include 
>  #include 
> -#include 
> -#include 
> +#include 
> +#include 
>  #include 
> +#include 

The asm and linux things come at the end. Please see:

https://www.denx.de/wiki/U-Boot/CodingStyle

>
>  DECLARE_GLOBAL_DATA_PTR;
>
> --
> 1.9.1
>

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


Re: [U-Boot] [RESEND PATCH 1/2] rockchip: clk: rk3399: add clk_enable function and support USB HOST0/1

2017-09-12 Thread Simon Glass
On 12 September 2017 at 09:30, Philipp Tomsich
 wrote:
> The generic ehci-driver (ehci-generic.c) will try to enable the clocks
> listed in the DTSI. If this fails (e.g. due to clk_enable not being
> implemented in a driver and -ENOSYS being returned by the clk-uclass),
> the driver will bail our and print an error message.
>
> This implements a minimal clk_enable for the RK3399 and supports the
> clocks mandatory for the EHCI controllers; as these are enabled by
> default we simply return success.
>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  drivers/clk/rockchip/clk_rk3399.c | 15 +++
>  1 file changed, 15 insertions(+)
>

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


Re: [U-Boot] [PATCH 2/2] rockchip: dts: rk3399-puma: replace 'rockchip, vbus-gpio' with fixed regulator

2017-09-12 Thread Simon Glass
On 11 September 2017 at 09:29, Philipp Tomsich
 wrote:
> On the RK3399-Q7, we need to turn on the on-module USB hub before using the
> USB host interfaces (only the OTG interface is directly connected to the edge
> connector).  This drops the deprecated 'rockchip,vbus-gpio' property and uses
> a fixed regulator to turn on the USB hub.
>
> References: 26a8b80 "usb: host: xhci-rockchip: use fixed regulator to control 
> vbus"
> Signed-off-by: Philipp Tomsich 
> ---
>
>  arch/arm/dts/rk3399-puma.dtsi | 12 +++-
>  1 file changed, 11 insertions(+), 1 deletion(-)

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


Re: [U-Boot] [PATCH 2/3] rockchip: add support for backing to bootrom download mode

2017-09-12 Thread Simon Glass
Hi Andy,

On 12 September 2017 at 07:57, Andy Yan  wrote:
> Rockchip bootrom will enter download mode if it returns from
> spl/tpl with a none-zero value and couldn't find a valid image
> in the backup partition.
> This patch provide a method to instruct the system to back to
> bootrom download mode by checking the BROM_DOWNLOAD_FLAG register.
> As the bootrom download function relys on some modules such as
> interrupts, so we need to back to bootrom as early as possbile
> before the tpl/tps code override the interrupt settings.
>
> Signed-off-by: Andy Yan 
> Reviewed-by: Kever Yang 
> ---
>
>  arch/arm/include/asm/arch-rockchip/boot_mode.h |  4 ++
>  arch/arm/include/asm/arch-rockchip/bootrom.h   |  2 +-
>  arch/arm/mach-rockchip/Kconfig |  1 +
>  arch/arm/mach-rockchip/bootrom.c   |  2 +-
>  arch/arm/mach-rockchip/save_boot_param.S   | 56 
> +-
>  5 files changed, 54 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-rockchip/boot_mode.h 
> b/arch/arm/include/asm/arch-rockchip/boot_mode.h
> index 163b2e7..6b2a610 100644
> --- a/arch/arm/include/asm/arch-rockchip/boot_mode.h
> +++ b/arch/arm/include/asm/arch-rockchip/boot_mode.h
> @@ -15,7 +15,11 @@
>  #define BOOT_CHARGING  (REBOOT_FLAG + 11)
>  /* enter usb mass storage mode */
>  #define BOOT_UMS   (REBOOT_FLAG + 12)
> +/* enter bootrom download mode */
> +#define BOOT_BROM_DOWNLOAD 0xEF08A53C
>
> +#ifndef __ASSEMBLY__
>  int setup_boot_mode(void);
> +#endif
>
>  #endif
> diff --git a/arch/arm/include/asm/arch-rockchip/bootrom.h 
> b/arch/arm/include/asm/arch-rockchip/bootrom.h
> index 92eb878..6ae3e94 100644
> --- a/arch/arm/include/asm/arch-rockchip/bootrom.h
> +++ b/arch/arm/include/asm/arch-rockchip/bootrom.h
> @@ -22,6 +22,6 @@ void back_to_bootrom(void);
>  /**
>   * Assembler component for the above (do not call this directly)
>   */
> -void _back_to_bootrom_s(void);
> +void _back_to_bootrom_s(int mode);

Please document the arg

>
>  #endif
> diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
> index 527ca60..a2b7a7e 100644
> --- a/arch/arm/mach-rockchip/Kconfig
> +++ b/arch/arm/mach-rockchip/Kconfig
> @@ -113,6 +113,7 @@ config ROCKCHIP_RK3399
> select SPL_SERIAL_SUPPORT
> select SPL_DRIVERS_MISC_SUPPORT
> select ENABLE_ARM_SOC_BOOT0_HOOK
> +   select ROCKCHIP_BROM_HELPER
> select DEBUG_UART_BOARD_INIT
> select BOARD_LATE_INIT
> help
> diff --git a/arch/arm/mach-rockchip/bootrom.c 
> b/arch/arm/mach-rockchip/bootrom.c
> index 8380e4e..6f0d583 100644
> --- a/arch/arm/mach-rockchip/bootrom.c
> +++ b/arch/arm/mach-rockchip/bootrom.c
> @@ -12,5 +12,5 @@ void back_to_bootrom(void)
>  #if CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT)
> puts("Returning to boot ROM...\n");
>  #endif
> -   _back_to_bootrom_s();
> +   _back_to_bootrom_s(0);

What does 0 mean? Should this be an enum / #define ?

>  }
> diff --git a/arch/arm/mach-rockchip/save_boot_param.S 
> b/arch/arm/mach-rockchip/save_boot_param.S
> index 50fce20..325e81e 100644
> --- a/arch/arm/mach-rockchip/save_boot_param.S
> +++ b/arch/arm/mach-rockchip/save_boot_param.S
> @@ -6,12 +6,25 @@
>   */
>
>  #include 
> +#include 
>
>  #if defined(CONFIG_ARM64)
>  .globl SAVE_SP_ADDR
>  SAVE_SP_ADDR:
> .quad 0
>
> +ENTRY(check_back_to_brom_dnl_flag)
> +   ldr x8, =CONFIG_ROCKCHIP_BOOT_MODE_REG
> +   ldr x9, [x8]
> +   ldr x0, =BOOT_BROM_DOWNLOAD
> +   cmp x9, x0
> +   b.nesave_boot_params_ret
> +   mov x9, xzr
> +   str x9, [x8]/* clear flag */
> +   mov x0, #1  /* indicate the bootrom to enter download 
> mode */
> +   b   _back_to_bootrom_s
> +ENDPROC(check_back_to_brom_dnl_flag)
> +
>  ENTRY(save_boot_params)
> sub sp, sp, #0x60
> stp x29, x30, [sp, #0x50]
> @@ -23,14 +36,22 @@ ENTRY(save_boot_params)
> ldr x8, =SAVE_SP_ADDR
> mov x9, sp
> str x9, [x8]
> +#if CONFIG_ROCKCHIP_BOOT_MODE_REG
> +   b   check_back_to_brom_dnl_flag
> +#else
> b   save_boot_params_ret  /* back to my caller */
> +#endif
>  ENDPROC(save_boot_params)
>
> +/*
> + * x0: return value for bootrom, none-zero for bootrom download
> + * mode and zero for normal boot mode
> + */
>  .globl _back_to_bootrom_s
>  ENTRY(_back_to_bootrom_s)
> -   ldr x0, =SAVE_SP_ADDR
> -   ldr x0, [x0]
> -   mov sp, x0
> +   ldr x1, =SAVE_SP_ADDR
> +   ldr x1, [x1]
> +   mov sp, x1
> ldp x29, x30, [sp, #0x50]
> ldp x27, x28, [sp, #0x40]
> ldp x25, x26, [sp, #0x30]
> @@ -38,7 +59,6 @@ ENTRY(_back_to_bootrom_s)
> ldp x21, x22, [sp, #0x10]
> ldp x19, x20, [sp]
> add sp, sp, #0x60
> -   mov x0, 

Re: [U-Boot] [PATCH v5 1/9] lib: at91: Add logo files used via API of DM_VIDEO

2017-09-12 Thread Simon Glass
On 12 September 2017 at 20:10, Wenyou Yang  wrote:
> From: Wenyou Yang 
>
> In order to display the company's logo via the API of DM_VIDEO,
> and add the logo files of both Atmel and Microchip.
>
> Signed-off-by: Wenyou Yang 
> ---
>
> Changes in v5: None
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
>
>  include/atmel_lcd.h|9 +
>  lib/Makefile   |1 +
>  lib/at91/Makefile  |8 +
>  lib/at91/at91.c|   30 +
>  lib/at91/atmel_logo_8bpp.h | 1310 
> 
>  lib/at91/microchip_logo_8bpp.h | 1082 +
>  tools/logos/microchip.bmp  |  Bin 0 -> 12726 bytes
>  7 files changed, 2440 insertions(+)
>  create mode 100644 lib/at91/Makefile
>  create mode 100644 lib/at91/at91.c
>  create mode 100644 lib/at91/atmel_logo_8bpp.h
>  create mode 100644 lib/at91/microchip_logo_8bpp.h
>  create mode 100644 tools/logos/microchip.bmp
>

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


Re: [U-Boot] [RESEND PATCH 6/6] rockchip: defconfig: puma-rk3399: enable OF_LIVE (live tree)

2017-09-12 Thread Simon Glass
On 12 September 2017 at 09:32, Philipp Tomsich
 wrote:
> With the critical drivers ready for switching to a live tree, we can
> not enable it in the defconfig for the RK3399-Q7.
>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  configs/puma-rk3399_defconfig | 1 +
>  1 file changed, 1 insertion(+)

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


Re: [U-Boot] [PATCH 3/3] rockchip: check download key before bootup

2017-09-12 Thread Simon Glass
Hi Andy,

On 12 September 2017 at 07:58, Andy Yan  wrote:
> Enter download mode if the download key pressed.
>
> Signed-off-by: Andy Yan 
> ---
>
>  arch/arm/mach-rockchip/boot_mode.c | 27 ++-
>  board/rockchip/evb_rk3399/evb-rk3399.c | 28 
>  2 files changed, 54 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-rockchip/boot_mode.c 
> b/arch/arm/mach-rockchip/boot_mode.c
> index 7b3cbc5..bff1cbc 100644
> --- a/arch/arm/mach-rockchip/boot_mode.c
> +++ b/arch/arm/mach-rockchip/boot_mode.c
> @@ -8,11 +8,36 @@
>  #include 
>  #include 
>
> +void set_back_to_bootrom_dnl_flag(void)
> +{
> +   writel(BOOT_BROM_DOWNLOAD, CONFIG_ROCKCHIP_BOOT_MODE_REG);
> +}
> +
> +/*
> + * some boards use a adc key, but some use gpio
> + */
> +__weak int rockchip_dnl_key_pressed(void)

Can you please declare this in a header file and add a full comment as
to what this does?

> +{
> +   return false;
> +}
> +
> +void rockchip_dnl_mode_check(void)
> +{
> +   if (rockchip_dnl_key_pressed()) {
> +   printf("download key pressed, enter download mode...");

should that be 'entering'?

> +   set_back_to_bootrom_dnl_flag();
> +   do_reset(NULL, 0, 0, NULL);
> +   }
> +}
> +
>  int setup_boot_mode(void)
>  {
> void* reg = (void *)CONFIG_ROCKCHIP_BOOT_MODE_REG;
> -   int boot_mode = readl(reg);
> +   int boot_mode;
> +
> +   rockchip_dnl_mode_check();
>
> +   boot_mode = readl(reg);
> debug("boot mode %x.\n", boot_mode);
>
> /* Clear boot mode */
> diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c 
> b/board/rockchip/evb_rk3399/evb-rk3399.c
> index d50c59d..738d942 100644
> --- a/board/rockchip/evb_rk3399/evb-rk3399.c
> +++ b/board/rockchip/evb_rk3399/evb-rk3399.c
> @@ -4,6 +4,7 @@
>   * SPDX-License-Identifier: GPL-2.0+
>   */
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -13,6 +14,33 @@
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> +#define KEY_DOWN_MIN_VAL   1
> +#define KEY_DOWN_MAX_VAL   20
> +
> +int rockchip_dnl_key_pressed(void)
> +{
> +   unsigned int ret;
> +   unsigned int i;
> +   unsigned int val;
> +   int cnt = 0;
> +

Please document what is going on here - why the loop? What is the
check against min/max value?

> +   for (i = 0; i < 10; i++) {
> +   ret = adc_channel_single_shot("saradc", 1, );
> +   if (ret) {
> +   printf("%s adc_channel_single_shot fail!\n", 
> __func__);
> +   break;
> +   }
> +
> +   if ((val >= KEY_DOWN_MIN_VAL) && (val <= KEY_DOWN_MAX_VAL))
> +   cnt++;
> +   }
> +
> +   if (cnt >= 8)
> +   return true;
> +   else
> +   return false;
> +}
> +
>  int board_init(void)
>  {
> struct udevice *pinctrl, *regulator;
> --
> 2.7.4
>
>

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


Re: [U-Boot] [PATCH v2 05/14] usb: gadget: usb_ether: Move the interfaces to Kconfig

2017-09-12 Thread Simon Glass
On 12 September 2017 at 13:01, Maxime Ripard
 wrote:
> We need to select an interface for the usb_ether gadget, and they haven't
> been converted to Kconfig yet. Add a choice to make sure we have an option
> selected, and convert all the users.
>
> Signed-off-by: Maxime Ripard 
> ---
>  configs/gwventana_emmc_defconfig   |  1 +-
>  configs/gwventana_gw5904_defconfig |  1 +-
>  configs/gwventana_nand_defconfig   |  1 +-
>  configs/mx6qsabrelite_defconfig|  1 +-
>  configs/nitrogen6dl2g_defconfig|  1 +-
>  configs/nitrogen6dl_defconfig  |  1 +-
>  configs/nitrogen6q2g_defconfig |  1 +-
>  configs/nitrogen6q_defconfig   |  1 +-
>  configs/nitrogen6s1g_defconfig |  1 +-
>  configs/nitrogen6s_defconfig   |  1 +-
>  configs/novena_defconfig   |  1 +-
>  configs/sansa_fuze_plus_defconfig  |  1 +-
>  configs/warp7_defconfig|  1 +-
>  configs/warp7_secure_defconfig |  1 +-
>  configs/xfi3_defconfig |  1 +-
>  drivers/usb/gadget/Kconfig | 28 +++-
>  include/configs/am335x_evm.h   |  4 +
>  include/configs/am3517_evm.h   |  4 +
>  include/configs/baltos.h   |  4 +
>  include/configs/gw_ventana.h   |  1 +-
>  include/configs/ma5d4evk.h |  1 +-
>  include/configs/nitrogen6x.h   |  1 +-
>  include/configs/novena.h   |  1 +-
>  include/configs/pcm051.h   |  4 +
>  include/configs/sama5d2_ptc.h  |  1 +-
>  include/configs/sansa_fuze_plus.h  |  1 +-
>  include/configs/siemens-am33x-common.h |  4 +
>  include/configs/vinco.h|  1 +-
>  include/configs/warp7.h|  2 +--
>  include/configs/xfi3.h |  1 +-
>  scripts/config_whitelist.txt   |  2 +--
>  31 files changed, 43 insertions(+), 32 deletions(-)
>

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


Re: [U-Boot] [RESEND PATCH 5/6] usb: host: ehci-generic: convert to livetree

2017-09-12 Thread Simon Glass
On 12 September 2017 at 09:32, Philipp Tomsich
 wrote:
> Update the generic EHCI driver to support a live tree.
>
> Signed-off-by: Philipp Tomsich 
> ---
>
>  drivers/usb/host/ehci-generic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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


Re: [U-Boot] [PATCH] patman: Fix error when the email blacklist is missing

2017-09-12 Thread Chris Packham
On Wed, Sep 13, 2017 at 2:30 PM, Simon Glass  wrote:
> This section of the settings file may be missing. Handle that gracefully
> rather than emitting an error.
>
> Also update patman to write this section when a new settings file is
> created.
>
> Fixes: e11aa602 (patman: add support for omitting bouncing addresses)
>
> Signed-off-by: Simon Glass 
> ---
>

Reviewed-by: Chris Packham 

>  tools/patman/settings.py | 28 +---
>  1 file changed, 25 insertions(+), 3 deletions(-)
>
> diff --git a/tools/patman/settings.py b/tools/patman/settings.py
> index d735ff9ba3..92379b72e7 100644
> --- a/tools/patman/settings.py
> +++ b/tools/patman/settings.py
> @@ -212,7 +212,12 @@ def CreatePatmanConfigFile(config_fname):
>  print("Couldn't create patman config file\n")
>  raise
>
> -print("[alias]\nme: %s <%s>" % (name, email), file=f)
> +print('''[alias]
> +me: %s <%s>
> +
> +[bounces]
> +nxp = Zhikang Zhang 
> +''' % (name, email), file=f)
>  f.close();
>
>  def _UpdateDefaults(parser, config):
> @@ -282,6 +287,23 @@ def _ReadBouncesFile(fname):
>  continue
>  bounces.add(line.strip())
>
> +def GetItems(config, section):
> +"""Get the items from a section of the config.
> +
> +Args:
> +config: _ProjectConfigParser object containing settings
> +section: name of section to retrieve
> +
> +Returns:
> +List of (name, value) tuples for the section
> +"""
> +try:
> +return config.items(section)
> +except ConfigParser.NoSectionError as e:
> +return []
> +except:
> +raise
> +
>  def Setup(parser, project_name, config_fname=''):
>  """Set up the settings module by reading config files.
>
> @@ -303,11 +325,11 @@ def Setup(parser, project_name, config_fname=''):
>
>  config.read(config_fname)
>
> -for name, value in config.items('alias'):
> +for name, value in GetItems(config, 'alias'):
>  alias[name] = value.split(',')
>
>  _ReadBouncesFile('doc/bounces')
> -for name, value in config.items('bounces'):
> +for name, value in GetItems(config, 'bounces'):
>  bounces.add(value)
>
>  _UpdateDefaults(parser, config)
> --
> 2.14.1.581.gf28d330327-goog
>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] patman: Fix error when the email blacklist is missing

2017-09-12 Thread Bin Meng
On Wed, Sep 13, 2017 at 12:56 PM, Chris Packham  wrote:
> On Wed, Sep 13, 2017 at 2:30 PM, Simon Glass  wrote:
>> This section of the settings file may be missing. Handle that gracefully
>> rather than emitting an error.
>>
>> Also update patman to write this section when a new settings file is
>> created.
>>
>> Fixes: e11aa602 (patman: add support for omitting bouncing addresses)
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>
> Reviewed-by: Chris Packham 
>

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


Re: [U-Boot] [PATCH][v2]drivers:net:fsl-mc: Update MC address calculation

2017-09-12 Thread York Sun
On 08/24/2017 04:14 AM, Priyanka Jain wrote:
> Update MC address calculation as per MC design requirement
> of address as least significant 512MB address
> of MC private allocated memory, i.e. address should point
> to end address masked with 512MB offset in private DRAM block.
> 
> Signed-off-by: Priyanka Jain 
> Signed-off-by: Ashish Kumar 
> ---
> Changes for v2: Updated description and code comment
>   to clarify more on MC design requirement based on York suggestion.
> 

Revised commit message. Applied to fsl-qoriq master. Thanks.

York

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


Re: [U-Boot] [U-Boot,v2,1/5] kbuild: Enable -fshort-wchar

2017-09-12 Thread Tom Rini
On Sat, Sep 09, 2017 at 06:47:39AM -0400, Rob Clark wrote:

> EFI_LOADER really wants UTF-16 strings (ie. %ls and L"string" are 16bit
> chars instead of 32bit chars).  But rather than enabling -fshort-wchar
> conditionally if EFI_LOADER is enabled, it was deemed preferrable to
> globally switch.
> 
> Signed-off-by: Rob Clark 
> Acked-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, 3/3] configs: k2g_evm: Remove PMMC loading environment commands

2017-09-12 Thread Tom Rini
On Mon, Jul 31, 2017 at 10:58:22AM -0500, Andrew F. Davis wrote:

> The PMMC firmware should be bundled with the FIT image for HS devices,
> remove the steps that load and install this firmware outside of FIT.
> 
> Signed-off-by: Andrew F. Davis 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH] armv8: fsl-lsch3: Make CCN-504 related code conditional

2017-09-12 Thread York Sun
On 08/17/2017 10:24 PM, Ashish Kumar wrote:
> LS2080 family has CCN-504 cache coherent interconnet.
> Other SoCs from LSCH3 may have differnt interconnect like
> LS1088.
> 
> Signed-off-by: Ashish Kumar 
> Signed-off-by: Prabhakar Kushwaha 
> ---

Revised commit message. Applied to fsl-qoriq master. Thanks.

York


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


Re: [U-Boot] [PATCH] armv8: fsl: Use correct conditional compile for ls1012a

2017-09-12 Thread York Sun
On 08/27/2017 07:57 PM, Ran Wang wrote:
> According current code base, CONFIG_LS1012A should be
> CONFIG_ARCH_LS1012A, or function fsl_fdt_disable(blob) will be
> wrongly called to disable all dwc3 USB nodes on LS1012A, which
> cause Linux USB function stop working at all.
> 
> Signed-off-by: Ran Wang 
> ---

Applied to fsl-qoriq master. Thanks.

York

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


  1   2   3   4   >