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


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


[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


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

2017-09-12 Thread icenowy

在 2017-09-12 16:18,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.


Should I also convert DE1 simplefb to a Kconfig option?



Thanks!
Maxime

___
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,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] [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, 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, 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] [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%)
> 

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


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

2017-09-12 Thread Heiko Schocher

Hello Johann,

Am 12.09.2017 um 10:06 schrieb 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)


bootm should check before booting the kernel, if the uImage file
is OK. If the uImage is not OK, bootm should fail.

You can check an uImage in RAM with the "iminfo [address]" command.
Enable the iminfo comamnd with CONFIG_CMD_IMI.

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 Łukasz Majewski

Hi Dr. Philipp,


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?


I'm sure Marek will send PR shortly.



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 






--
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,v3] rk3288: Add Vyasa initial board support

2017-09-12 Thread Dr. Philipp Tomsich
Jagan,

please revise — after applying this patch, the build fails with:

>arm:  +   vyasa-rk3288
> +cmd/built-in.o: In function `do_usb_mass_storage':
> +cmd/usb_mass_storage.c:164: undefined reference to `board_usb_init'
> +cmd/usb_mass_storage.c:170: undefined reference to `fsg_init'
> +cmd/usb_mass_storage.c:177: undefined reference to `g_dnl_register'
> +cmd/usb_mass_storage.c:187: undefined reference to 
> `g_dnl_board_usb_cable_connected'
> +cmd/usb_mass_storage.c:194: undefined reference to 
> `g_dnl_board_usb_cable_connected'
> +cmd/usb_mass_storage.c:215: undefined reference to 
> `usb_gadget_handle_interrupts'
> +cmd/usb_mass_storage.c:217: undefined reference to `fsg_main_thread'
> +cmd/usb_mass_storage.c:233: undefined reference to `g_dnl_unregister'
> +cmd/usb_mass_storage.c:235: undefined reference to `board_usb_cleanup'
> +arm-unknown-linux-gnueabi-ld.bfd: BFD (GNU Binutils) 2.24 assertion fail 
> /home/tony/buildall/src/binutils/bfd/elf32-arm.c:7696
> +arm-unknown-linux-gnueabi-ld.bfd: error: required section '.rel.plt' not 
> found in the linker script
> +arm-unknown-linux-gnueabi-ld.bfd: final link failed: Invalid operation
> +make[1]: *** [u-boot] Error 1
> +make: *** [sub-make] Error 2


Thanks,
Philipp.

> On 12 Sep 2017, at 10:37, Philipp Tomsich 
>  wrote:
> 
>> 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 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2] cmd: usb: add check on usb_stor_curr_dev in usb dev command

2017-09-12 Thread Patrick Delaunay
If the command 'usb start' is successfully executed but
U-Boot don't found a storage device (usb_stor_curr_dev stay to -1)
the next command 'usb dev' without parameter
leads to data abort after the message "USB device -1"

The added check on usb_stor_curr_dev avoid the issue.

Signed-off-by: Patrick Delaunay 
---

Changes in v2:
- Updated the commit message
- use command_ret_t for result

 cmd/usb.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/cmd/usb.c b/cmd/usb.c
index 992d414..53305bb 100644
--- a/cmd/usb.c
+++ b/cmd/usb.c
@@ -806,6 +806,10 @@ static int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
printf("... is now current device\n");
return 0;
} else {
+   if (usb_stor_curr_dev < 0) {
+   printf("no current device selected\n");
+   return CMD_RET_FAILURE;
+   }
printf("\nUSB device %d: ", usb_stor_curr_dev);
stor_dev = blk_get_devnum_by_type(IF_TYPE_USB,
  usb_stor_curr_dev);
-- 
2.7.4

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


Re: [U-Boot] [U-Boot, v4, 3/4] usb: dwc3: add support for 16 bit UTMI+ interface

2017-09-12 Thread Dr. Philipp Tomsich
Marek,

do you know whether there's an update of the DWC3 driver planned to get us back 
in sync with the kernel driver?

Thanks,
Philipp.


> On 12 Sep 2017, at 07:02, Kever Yang  wrote:
> 
> Philipp,
> 
>I believe there are some request I think is not reasonable which stop me 
> from update new patch sets.
> 
> The usb/dwc3 is mess up now, separate in host mode and gadget mode, one need 
> init in board init
> 
> while another use DM. When I want to add a new feature like use 16bit UTMI+  
> instead of 8bit(which suppose to be very very simple),
> 
> I don't think the maintainer have an idea where it should go and how it 
> should be, and the driver now
> 
> it's far away from upstream kernel.
> 
> I have send 4 patch set for this, everything should be clear, but...
> 
> 
> 
> Thanks,
> - Kever
> On 09/11/2017 09:30 PM, Philipp Tomsich wrote:
>> 
>> Kever,
>> 
>> What is the status on this patch (and the encapsulating series)?
>> This seems to be stuck in 'changes requested' for about a year now...
>> 
>> Thanks,
>> Philipp.
>> 
>> On Thu, 1 Sep 2016, Kever Yang wrote:
>> 
>>> The dwc3 controller is using 8 bit UTMI+ interface for USB2.0 PHY,
>>> add one variable in dwc3/dwc3_device struct to support 16 bit
>>> UTMI+ interface on some SoCs like Rockchip rk3399.
>>> 
>>> Signed-off-by: Kever Yang 
>>> ---
>>> 
>>> Changes in v4:
>>> - use 1 bit for usb2_phyif_utmi_width instead of 5bit
>>> 
>>> Changes in v3:
>>> - Parse the DT for utmi+ interface width in dwc3 driver
>>> 
>>> Changes in v2:
>>> - use a variable to identify utmi+ bus width instead of CONFIG MACRO
>>> 
>>> drivers/usb/dwc3/core.c | 19 +++
>>> drivers/usb/dwc3/core.h | 12 
>>> 2 files changed, 31 insertions(+)
>>> 
>> 
> 
> 

___
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] 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] [PATCH v2] cmd: usb: add check on usb_stor_curr_dev in usb dev command

2017-09-12 Thread Patrick DELAUNAY
Hi Marek,

> Subject: [PATCH v2] cmd: usb: add check on usb_stor_curr_dev in usb dev 
> command
> 
> If the command 'usb start' is successfully executed but U-Boot don't found a
> storage device (usb_stor_curr_dev stay to -1) the next command 'usb dev'
> without parameter leads to data abort after the message "USB device -1"
> 
> The added check on usb_stor_curr_dev avoid the issue.
> 
> Signed-off-by: Patrick Delaunay 
> ---
> 
> Changes in v2:
> - Updated the commit message
> - use command_ret_t for result

After push V2 version today, I try to rebase my patch on latest version on 
v2017.09
But I have conflict with the patch wich introduce blk_common_cmd() usage.

So I check that the issue is still present with the same test on sandbox
before to found a way to solve the merge conflict,
And in fact the issue is now solved without patch.

He confirmes it with code review for the 2 case in  blk_print_device_num()
=> Loop in get_desc() for blk-uclass.c (-1 is no more used as index)
=> check devnum < 0 in get_desc() for blk_legacy.c

So I will abandon my patch

Test done on sandbox :

Remove flash-stick for node usb@1  in arch/sandbox/dts/sandbox.dts

$> make sandbox_defconfig
$> make
$> ./u-boot -d u-boot.dtb


U-Boot 2017.09-1-gdbdb82c (Sep 12 2017 - 10:59:47 +0200)

Model: sandbox
DRAM:  128 MiB
MMC:   
Using default environment

In:cros-ec-keyb
Out:   vidconsole
Err:   vidconsole
Model: sandbox
SCSI:  Net:   eth0: eth@10002000, eth1: eth@8000, eth5: eth@9000
IDE:   Bus 0: not available  
=> usb start
starting USB...
USB0:   scanning bus 0 for devices... 1 USB Device(s) found
   scanning usb for storage devices... 0 Storage Device(s) found
=> usb dev

no usb devices available
=>

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


Re: [U-Boot] [PATCH v2] i2c: muxes: pca954x: Add support for GPIO reset line

2017-09-12 Thread Heiko Schocher

Hallo Moritz,

Am 12.09.2017 um 06:27 schrieb Heiko Schocher:

Hello Moritz,

Am 11.09.2017 um 20:19 schrieb Moritz Fischer:

This commit adds support for GPIO reset lines matching the
common linux "reset-gpios" devicetree binding.

Signed-off-by: Moritz Fischer 
---

Changes from v1:
- Simon's feedback on ifdef vs IS_ENABLED()

---
  drivers/i2c/muxes/pca954x.c | 42 +-
  1 file changed, 41 insertions(+), 1 deletion(-)


Reviewed-by: Heiko Schocher 


Hmm.. your patch

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

breaks the mvebu travis build, see:

https://travis-ci.org/hsdenx/u-boot-i2c/jobs/274457946

for example:
   arm:  +   turris_omnia
+drivers/i2c/muxes/pca954x.c: In function ?pca954x_probe?:
+drivers/i2c/muxes/pca954x.c:120:10: error: ?struct pca954x_priv? has no member 
named ?gpio_mux_reset?
+ &priv->gpio_mux_reset, GPIOD_IS_OUT);
+  ^~

but your patch seems to do it correct:

+   if (IS_ENABLED(CONFIG_DM_GPIO)) {

Hmm... I know Simon suggested exactly this change ... but this seems
to produce errors here ... when I look into the ".config" file after

"make turris_omnia_defconfig"

I see:

# CONFIG_DM_GPIO is not set

Hmm... using

#ifdef CONFIG_DM_GPIO

instead "if (IS_ENABLED(CONFIG_DM_GPIO)) {" and it compiles clean.

So it seems we have a problem here with "IS_ENABLED()" ...

@Simon, Masahiro: any ideas?

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] [RFC 1/1] efi_loader: fix building of helloworld.efi on x86_64

2017-09-12 Thread Alexander Graf



On 12.09.17 10:18, 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.

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?


That's what Bin just explained, no? Running U-Boot on x86 as 32bit 
binary was/is quite common, but usually you're running on a 64bit UEFI 
implementation.


Or you want to run 64-bit U-Boot on an older Mac which only has 32bit 
UEFI...



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


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

2017-09-12 Thread Johann Obermayr
Hello Heiko,

Thank you very much.

I think iminfo is the one I've been looking for

Regards
  Johann

-Ursprüngliche Nachricht-
Von: Heiko Schocher [mailto:h...@denx.de] 
Gesendet: Dienstag, 12. September 2017 10:43
An: Johann Obermayr 
Cc: U-Boot Mailing List 
Betreff: Re: [U-Boot] u-boot ubifsload & verify uImage

Hello Johann,

Am 12.09.2017 um 10:06 schrieb 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)

bootm should check before booting the kernel, if the uImage file is OK. If the 
uImage is not OK, bootm should fail.

You can check an uImage in RAM with the "iminfo [address]" command.
Enable the iminfo comamnd with CONFIG_CMD_IMI.

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, v4, 3/4] usb: dwc3: add support for 16 bit UTMI+ interface

2017-09-12 Thread Marek Vasut
On 09/12/2017 11:09 AM, Dr. Philipp Tomsich wrote:
> Marek,
> 
> do you know whether there's an update of the DWC3 driver planned to get us 
> back in sync with the kernel driver?

To my knowledge, no. Patches welcome.

btw please stop top-posting

> Thanks,
> Philipp.
> 
> 
>> On 12 Sep 2017, at 07:02, Kever Yang  wrote:
>>
>> Philipp,
>>
>>I believe there are some request I think is not reasonable which stop me 
>> from update new patch sets.
>>
>> The usb/dwc3 is mess up now, separate in host mode and gadget mode, one need 
>> init in board init
>>
>> while another use DM. When I want to add a new feature like use 16bit UTMI+  
>> instead of 8bit(which suppose to be very very simple),
>>
>> I don't think the maintainer have an idea where it should go and how it 
>> should be, and the driver now
>>
>> it's far away from upstream kernel.
>>
>> I have send 4 patch set for this, everything should be clear, but...
>>
>>
>>
>> Thanks,
>> - Kever
>> On 09/11/2017 09:30 PM, Philipp Tomsich wrote:
>>>
>>> Kever,
>>>
>>> What is the status on this patch (and the encapsulating series)?
>>> This seems to be stuck in 'changes requested' for about a year now...
>>>
>>> Thanks,
>>> Philipp.
>>>
>>> On Thu, 1 Sep 2016, Kever Yang wrote:
>>>
 The dwc3 controller is using 8 bit UTMI+ interface for USB2.0 PHY,
 add one variable in dwc3/dwc3_device struct to support 16 bit
 UTMI+ interface on some SoCs like Rockchip rk3399.

 Signed-off-by: Kever Yang 
 ---

 Changes in v4:
 - use 1 bit for usb2_phyif_utmi_width instead of 5bit

 Changes in v3:
 - Parse the DT for utmi+ interface width in dwc3 driver

 Changes in v2:
 - use a variable to identify utmi+ bus width instead of CONFIG MACRO

 drivers/usb/dwc3/core.c | 19 +++
 drivers/usb/dwc3/core.h | 12 
 2 files changed, 31 insertions(+)

>>>
>>
>>
> 


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


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

2017-09-12 Thread Marek Vasut
On 09/12/2017 10:23 AM, Masahiro Yamada wrote:
> 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 {
  ^ Shouldn't you fix it here instead ?

>   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" },
> 


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


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

2017-09-12 Thread Holger Dengler
Hi Heiko,

sorry, my fault. I missed, that the function has been renamed. I'll resend the 
patch.

On 09/12/2017 09:35 AM, Heiko Schocher wrote:
> 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

-- 
Gruß,
Holger Dengler
--
phone: +49 7556 25 999 14; fax: +49 7556 25 999 99



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


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

2017-09-12 Thread 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(+)

diff --git a/cmd/ubi.c b/cmd/ubi.c
index 222be5a357..ac9a582437 100644
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
@@ -334,6 +334,7 @@ int ubi_volume_read(char *volume, char *buf, size_t size)
unsigned long long tmp;
struct ubi_volume *vol;
loff_t offp = 0;
+   size_t len_read;
 
vol = ubi_find_volume(volume);
if (vol == NULL)
@@ -373,6 +374,7 @@ int ubi_volume_read(char *volume, char *buf, size_t size)
tmp = offp;
off = do_div(tmp, vol->usable_leb_size);
lnum = tmp;
+   len_read = size;
do {
if (off + len >= vol->usable_leb_size)
len = vol->usable_leb_size - off;
@@ -398,6 +400,9 @@ int ubi_volume_read(char *volume, char *buf, size_t size)
len = size > tbuf_size ? tbuf_size : size;
} while (size);
 
+   if (!size)
+   env_set_hex("filesize", len_read);
+
free(tbuf);
return err;
 }
-- 
2.14.1

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


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

2017-09-12 Thread 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 
---

Changes in v2:
- use renamed env_set_hex() function

 cmd/ubi.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/cmd/ubi.c b/cmd/ubi.c
index 222be5a357..ac9a582437 100644
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
@@ -334,6 +334,7 @@ int ubi_volume_read(char *volume, char *buf, size_t size)
unsigned long long tmp;
struct ubi_volume *vol;
loff_t offp = 0;
+   size_t len_read;
 
vol = ubi_find_volume(volume);
if (vol == NULL)
@@ -373,6 +374,7 @@ int ubi_volume_read(char *volume, char *buf, size_t size)
tmp = offp;
off = do_div(tmp, vol->usable_leb_size);
lnum = tmp;
+   len_read = size;
do {
if (off + len >= vol->usable_leb_size)
len = vol->usable_leb_size - off;
@@ -398,6 +400,9 @@ int ubi_volume_read(char *volume, char *buf, size_t size)
len = size > tbuf_size ? tbuf_size : size;
} while (size);
 
+   if (!size)
+   env_set_hex("filesize", len_read);
+
free(tbuf);
return err;
 }
-- 
2.14.1

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


Re: [U-Boot] [U-Boot, v4, 3/4] usb: dwc3: add support for 16 bit UTMI+ interface

2017-09-12 Thread Dr. Philipp Tomsich
Kever,

> On 12 Sep 2017, at 12:22, Marek Vasut  wrote:
> 
> On 09/12/2017 11:09 AM, Dr. Philipp Tomsich wrote:
>> Marek,
>> 
>> do you know whether there's an update of the DWC3 driver planned to get us 
>> back in sync with the kernel driver?
> 
> To my knowledge, no. Patches welcome.

Could you summarise (for everyone involved) what the impact of this series not 
being merged is
in terms of functionality?

Once everyone is aware of what the objectives are, we can then try to revive 
the discussion and
agree on a specific set of changes (to the series) to move forward...

Cheers,
Philipp.

> 
>> Thanks,
>> Philipp.
>> 
>> 
>>> On 12 Sep 2017, at 07:02, Kever Yang  wrote:
>>> 
>>> Philipp,
>>> 
>>>   I believe there are some request I think is not reasonable which stop me 
>>> from update new patch sets.
>>> 
>>> The usb/dwc3 is mess up now, separate in host mode and gadget mode, one 
>>> need init in board init
>>> 
>>> while another use DM. When I want to add a new feature like use 16bit UTMI+ 
>>>  instead of 8bit(which suppose to be very very simple),
>>> 
>>> I don't think the maintainer have an idea where it should go and how it 
>>> should be, and the driver now
>>> 
>>> it's far away from upstream kernel.
>>> 
>>> I have send 4 patch set for this, everything should be clear, but...
>>> 
>>> 
>>> 
>>> Thanks,
>>> - Kever
>>> On 09/11/2017 09:30 PM, Philipp Tomsich wrote:
 
 Kever,
 
 What is the status on this patch (and the encapsulating series)?
 This seems to be stuck in 'changes requested' for about a year now...
 
 Thanks,
 Philipp.
 
 On Thu, 1 Sep 2016, Kever Yang wrote:
 
> The dwc3 controller is using 8 bit UTMI+ interface for USB2.0 PHY,
> add one variable in dwc3/dwc3_device struct to support 16 bit
> UTMI+ interface on some SoCs like Rockchip rk3399.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v4:
> - use 1 bit for usb2_phyif_utmi_width instead of 5bit
> 
> Changes in v3:
> - Parse the DT for utmi+ interface width in dwc3 driver
> 
> Changes in v2:
> - use a variable to identify utmi+ bus width instead of CONFIG MACRO
> 
> drivers/usb/dwc3/core.c | 19 +++
> drivers/usb/dwc3/core.h | 12 
> 2 files changed, 31 insertions(+)
> 
 
>>> 
>>> 
>> 
> 
> 
> -- 
> Best regards,
> Marek Vasut

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


Re: [U-Boot] [PATCH v3 2/2] dm: test: replace dm_scan_dt() by of dm_extended_scan_fdt() in dm_do_test

2017-09-12 Thread sjg
On 4 September 2017 at 06:55,   wrote:
> From: Patrice Chotard 
>
> This allows to scan the DT including all "clocks" node's sub-nodes
> in which fixed-clock are defined.
> All fixed-clock should be defined inside a clocks node which collect all
> external oscillators. Until now, all clocks sub-nodes can't be binded except
> if the "simple-bus" compatible string is added which is a hack.
>
> Update test.dts by moving clk_fixed node inside clocks.
>
> Signed-off-by: Patrice Chotard 
> Reviewed-by: Simon Glass 
> ---
>
>
>  arch/sandbox/dts/test.dts | 10 ++
>  test/dm/test-main.c   |  2 +-
>  2 files changed, 7 insertions(+), 5 deletions(-)

Reviewed-by: Simon Glass 

Applied to u-boot-dm, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3] patman: add support for omitting bouncing addresses

2017-09-12 Thread sjg
> On 1 Sep 2017, at 10:57, Chris Packham  wrote:
>
> Add support for reading a list of bouncing addresses from a in-tree file
> (doc/bounces) and from the ~/.patman config file. These addresses are
> stripped from the Cc list.
>
> Signed-off-by: Chris Packham 
> Reviewed-by: Simon Glass 

Reviewed-by: Philipp Tomsich mailto:philipp.toms...@theobroma-systems.com>>


Applied to u-boot-dm, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/2] dm: core: add clocks node scan

2017-09-12 Thread sjg
On 4 September 2017 at 06:55,   wrote:
> From: Patrice Chotard 
>
> Currently, all fixed-clock declared in "clocks" node in device tree
> can be binded by clk_fixed_rate.c driver only if each of them have
> the "simple-bus" compatible string.
> This constraint has been invoked here [1].
>
> This patch offers a solution to avoid adding "simple-bus" compatible
> string to nodes that are not busses.
>
> [1] https://patchwork.ozlabs.org/patch/558837/
>
> Signed-off-by: Patrice Chotard 
> ---
>
> v3: _ rename dm_extended_scan_dt() to dm_extended_scan_fdt() to insure
>   function naming consistency
> _ update dm_extended_scan_fdt() description
>
>  drivers/core/root.c | 34 --
>  include/dm/root.h   | 14 ++
>  2 files changed, 46 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass 

Applied to u-boot-dm, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 01/19] bootstage: adjust Makefile to allow including bootstage in SPL, but not in TPL

2017-09-12 Thread Philipp Tomsich
> For timing our bootstages on the RK3368, which has a minimal TPL
> (and where we consequently don't want to time the bootstages) and a
> full-featured SPL (where we can bootstage recording), we need to
> adjust the Makefile.
> 
> Use the $(SPL_TPL_) macro in the Makefile for bootstage.o
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Simon Glass 
> Acked-by: Philipp Tomsich 
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  common/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 1/2] rockchip: board: lion_rk3368: update README flash instructions

2017-09-12 Thread Philipp Tomsich
> Add a section to the README on how to flash the on-board eMMC
> with the rkdeveloptool.
> 
> Signed-off-by: Klaus Goger 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Philipp Tomsich 
> Acked-by: Philipp Tomsich 
> ---
> 
> Changes in v2: None
> 
>  board/theobroma-systems/lion_rk3368/README | 24 ++--
>  1 file changed, 22 insertions(+), 2 deletions(-)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v3,04/19] dm: core: add dev_read_addr_ptr()

2017-09-12 Thread Philipp Tomsich
> The dev_read_addr_ptr() mimics the behaviour of the devfdt_get_addr_ptr(),
> retrieving the first address of the node's reg-property and returning
> it as a pointer (or NULL on failure).
> 
> Signed-off-by: Philipp Tomsich 
> Acked-by: Philipp Tomsich 
> ---
> 
> Changes in v3: None
> Changes in v2:
> - implements the dev_read_addr_ptr() function
> 
>  drivers/core/read.c |  7 +++
>  include/dm/read.h   | 15 +++
>  2 files changed, 22 insertions(+)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 09/19] rockchip: timer: Convert to livetree

2017-09-12 Thread Philipp Tomsich
> Update the Rockchip timer driver to support a live device tree.
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Simon Glass 
> Acked-by: Philipp Tomsich 
> ---
> 
> Changes in v3: None
> Changes in v2:
> - use the new dev_read_addr_ptr() function
> - improve error handling, in case dev_read_addr_ptr returns NULL
> 
>  drivers/timer/rockchip_timer.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 03/19] dm: timer: handle being called before dm_root is ready

2017-09-12 Thread Philipp Tomsich
> When used with bootstage recording, dm_timer_init may be called
> surprisingly early: i.e. before dm_root is ready. To deal with
> this case, we explicitly check for this condition and return
> -EAGAIN to the caller (refer to drivers/timer/rockchip_timer.c
> for a case where this is needed/used).
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Simon Glass 
> Acked-by: Philipp Tomsich 
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  drivers/timer/timer-uclass.c | 7 +++
>  1 file changed, 7 insertions(+)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 06/19] net: phy: micrel: Convert to livetree

2017-09-12 Thread Philipp Tomsich
> Update the Micrel KSZ90x1 driver for a live tree.
> 
> Signed-off-by: Philipp Tomsich 
> Acked-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
> ---
> 
> Changes in v3:
> - added Joe's Acked-by: tag (which I had lost)
> 
> Changes in v2: None
> 
>  drivers/net/phy/micrel_ksz90x1.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] sandbox: Convert SANDBOX_BITS_PER_LONG to Kconfig

2017-09-12 Thread sjg
Hi Bin,

On 13 August 2017 at 19:26, Bin Meng  wrote:
> Hi Simon,
>
> On Sun, Aug 13, 2017 at 11:35 PM, Simon Glass  wrote:
>> Hi Bin,
>>
>> On 6 August 2017 at 03:13, Bin Meng  wrote:
>>> Hi Simon,
>>>
>>> On Sun, Aug 6, 2017 at 1:16 PM, Simon Glass  wrote:
 Hi Bin,

 On 3 August 2017 at 18:17, Bin Meng  wrote:
> Hi Simon,
>
> On Thu, Aug 3, 2017 at 11:24 PM, Simon Glass  wrote:
>> Hi Bin,
>>
>> On 1 August 2017 at 17:33, Bin Meng  wrote:
>>> Convert SANDBOX_BITS_PER_LONG to Kconfig and assign it a correct
>>> number depending on which host we are going to build and run.
>>>
>>> Signed-off-by: Bin Meng 
>>> ---
>>>
>>>  arch/sandbox/Kconfig | 5 +
>>>  board/sandbox/README.sandbox | 7 +++
>>>  scripts/config_whitelist.txt | 1 -
>>>  3 files changed, 8 insertions(+), 5 deletions(-)
>>
>> Reviewed-by: Simon Glass 
>>
>> Is it OK to build 64-bit sandbox on a 32-bit machine? Does that actually 
>> work?
>>
>> If then I think we need a 3-way setting like:
>>
>> - 32-bit
>> - 64-bit
>> - native (i.e. whatever the host is)
>
> That means cross-compiling sandbox. So far this is not working. I will
> take a look.

 Or perhaps we just require it to use the bit size of the host? Does
 compiling 64-bit U-Boot on a 32-bit machine actually work?

>>>
>>> I have not looked into that further but I suspect there is more work
>>> than the bit size of the host, for example, linking 64-bit vs. 32-bit
>>> libraries?
>>
>> But does it compile 64-bit sandbox OK on a 32-bit machine? I would
>> have thought it would complain.
>>
>
> No. Compiling 64-bit sandbox never worked on a 32-bit machine. So far
> sandbox build only supports:
>
> 1). build from a 32-bit host and run from a 32-bit host
> 2). build from a 64-bit host and run from a 64-bit host (current
> default setting)
>
>> I'm not really asking for this feature, it's just that I don't
>> understand how your patch works, and don't necessarily want to lose
>> the ability to build a 32-bit sandbox. It is to some extent a helpful
>> build/unit test for 32-bit boards which we still have many of.
>>
>
> This patch does not introduce any functional changes. It just converts
> SANDBOX_BITS_PER_LONG to Kconfig so that this can be changed from
> defconfigs or 'make menuconfig' to make it more user friendly if we
> are building (a 32-bit) sandbox on a 32-bit host. Ideally we should
> add such cross-build functionality to sandbox build.

Then I think this patch is fine.

Regards,
Simon

Applied to u-boot-dm, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v3,07/19] rockchip: mmc: convert to livetree

2017-09-12 Thread Philipp Tomsich
> Update the Rockchip-specific wrapper for the Designware driver to
> support a live device tree.
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Simon Glass 
> Acked-by: Philipp Tomsich 
> 
> Version-changes: 2
> - use the dev_read_addr_ptr function in rockchip_dw_mmc.c
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  drivers/mmc/rockchip_dw_mmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] moveconfig: Use fd.write() instead of print >>

2017-09-12 Thread sjg
Adjust this code so that it can work with Python 2 and 3.

Fixes: d73fcb1 (moveconfig: Support building a simple config database)
Reported-by: Chris Packham 
Signed-off-by: Simon Glass 
---

 lib/libfdt/pylibfdt/libfdt.i | 2 ++
 tools/moveconfig.py  | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

Applied to u-boot-dm, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 2/2] dm: core: Show driver name with 'dm tree'

2017-09-12 Thread sjg
It is often useful to see which driver was actually selected for each
device. Add a new 'Driver' column to provide this information. Sample
output:

 Class   Probed   Driver Name

 root[ + ]root_drive root_driver
 keyboard[ + ]i8042_kbd  |-- keyboard
 serial  [ + ]ns16550_se |-- serial
 rtc [   ]rtc_mc1468 |-- rtc
 timer   [ + ]tsc_timer  |-- tsc-timer
 syscon  [ + ]ich6_pinct |-- pch_pinctrl
 pci [ + ]pci_x86|-- pci
 northbridge [ + ]bd82x6x_no |   |-- northbridge@0,0
 video   [ + ]bd82x6x_vi |   |-- gma@2,0
 vidconsole0 [ + ]vidconsole |   |   `-- gma@2,0.vidconsole0
...

Signed-off-by: Simon Glass 
Reviewed-by: Bin Meng 
Tested-by: Bin Meng 
---

Changes in v2:
- Drop one space between 'Probed' and 'Driver'

 drivers/core/dump.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Applied to u-boot-dm, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v3,02/19] dm: timer: Convert to livetree

2017-09-12 Thread Philipp Tomsich
> This updates dm_timer_init to support a live tree and deals with
> some fallout (i.e. the need to restructure the code such, that we
> don't need multiple discontinuous #if CONFIG_IS_ENABLED blocks).
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Simon Glass 
> Acked-by: Philipp Tomsich 
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  drivers/timer/timer-uclass.c | 45 
> ++--
>  1 file changed, 23 insertions(+), 22 deletions(-)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 17/19] rockchip: gpio: remove outdated/misleading comment

2017-09-12 Thread Philipp Tomsich
> Remove a comment claiming that this driver only supports the RK3288,
> as we also use it on the RK3368, RK3399 and (most likely) on other
> variants.
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Simon Glass 
> Acked-by: Philipp Tomsich 
> 
> Version-changes: 2
> - use the dev_read_addr_ptr function in rk_gpio.c
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  drivers/gpio/rk_gpio.c | 1 -
>  1 file changed, 1 deletion(-)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] genconfig.py: Print defconfig next to warnings

2017-09-12 Thread sjg
At present we sometimes see warnings of the form:

/tmp/tmpMA89kB:36: warning: overriding the value of CMD_SPL.
Old value: "y", new value: "y".

This is not very useful as it does not show whch defconfig file it relates
to. Update the tool to show this.

Signed-off-by: Simon Glass 
---

 tools/buildman/kconfiglib.py | 22 --
 tools/genboardscfg.py|  7 +--
 2 files changed, 21 insertions(+), 8 deletions(-)

Applied to u-boot-dm, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 05/19] net: designware: Convert to livetree

2017-09-12 Thread Philipp Tomsich
> Update the Designware Ethernet MAC driver to support a live device
> tree.
> 
> Signed-off-by: Philipp Tomsich 
> Acked-by: Joe Hershberger 
> ---
> 
> Changes in v3:
> - added Joe's Acked-by: tag (which I had lost)
> 
> Changes in v2: None
> 
>  drivers/net/designware.c | 11 +++
>  1 file changed, 3 insertions(+), 8 deletions(-)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 0/4] move rockchip sdram driver to driver/ram

2017-09-12 Thread Dr. Philipp Tomsich
Kever,

> On 6 Sep 2017, at 12:00, Kever Yang  wrote:
> 
> 
> move all the Rockchip sdram driver which support CONFIG_RAM into
> driver/ram folder
> 
> 
> Kever Yang (4):
>  rockchip: rk3399: move sdram driver to driver/ram
>  rockchip: rk3188: move sdram driver to driver/ram
>  rockchip: rk3288: move sdram driver to driver/ram
>  rockchip: rk3328: move sdram driver to driver/ram
> 
> arch/arm/mach-rockchip/rk3188/Makefile| 1 -
> arch/arm/mach-rockchip/rk3288/Makefile| 1 -
> arch/arm/mach-rockchip/rk3328/Makefile| 1 -
> arch/arm/mach-rockchip/rk3399/Makefile| 1 -
> drivers/ram/rockchip/Makefile | 4 

All of the patches in this series fail to apply cleanly due to a conflict
in drivers/ram/rockchip/Makefile.

Could you resubmit against u-boot-rockchip/master?

Thanks,
Philipp.

> .../arm/mach-rockchip/rk3188 => drivers/ram/rockchip}/sdram_rk3188.c  | 0
> .../arm/mach-rockchip/rk3288 => drivers/ram/rockchip}/sdram_rk3288.c  | 0
> .../arm/mach-rockchip/rk3328 => drivers/ram/rockchip}/sdram_rk3328.c  | 0
> .../arm/mach-rockchip/rk3399 => drivers/ram/rockchip}/sdram_rk3399.c  | 0
> 9 files changed, 4 insertions(+), 4 deletions(-)
> rename {arch/arm/mach-rockchip/rk3188 => drivers/ram/rockchip}/sdram_rk3188.c 
> (100%)
> rename {arch/arm/mach-rockchip/rk3288 => drivers/ram/rockchip}/sdram_rk3288.c 
> (100%)
> rename {arch/arm/mach-rockchip/rk3328 => drivers/ram/rockchip}/sdram_rk3328.c 
> (100%)
> rename {arch/arm/mach-rockchip/rk3399 => drivers/ram/rockchip}/sdram_rk3399.c 
> (100%)
> 
> -- 
> 1.9.1
> 

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


Re: [U-Boot] [PATCH v2 1/2] dm: core: Drop use of strlcpy()

2017-09-12 Thread sjg
On Thu, Aug 3, 2017 at 2:12 AM, Simon Glass  wrote:
> We can use printf() to limit the string width. Adjust the code to do this
> instead of using strlcpy() which is a bit clumbsy.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2:
> - Add new patch to drop use of strlcpy()
>
>  drivers/core/dump.c | 6 ++
>  1 file changed, 2 insertions(+), 4 deletions(-)
>

Reviewed-by: Bin Meng 
Tested-by: Bin Meng 

Applied to u-boot-dm, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 08/19] rockchip: timer: implement timer_get_boot_us

2017-09-12 Thread Philipp Tomsich
> To make the Rockchip DM timer driver useful for the timing of
> bootstages, we need a few enhancements:
>  - This implements timer_get_boot_us.
>  - This avoids reinitialising the timer, if it has already been
>set up (e.g. by our TPL and SPL stages). Now, we have a single
>timebase ticking from TPL through the full U-Boot.
>  - This adds support for reading the timer even before the
>device-model is ready: we find the timer via /chosen/tick-timer,
>then read its address and clock-frequency, and finally read the
>timeval directly).
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Simon Glass 
> Acked-by: Philipp Tomsich 
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  drivers/timer/rockchip_timer.c | 72 
> +++---
>  1 file changed, 67 insertions(+), 5 deletions(-)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] sandbox: Introduce Kconfig option for 32/64 bit host

2017-09-12 Thread sjg
On 1 August 2017 at 17:33, Bin Meng  wrote:
> It seems most of the time we are building and running sandbox on 64-bit host.
> But we do support 32-bit host as well. Introduce Kconfig option for this.
>
> Signed-off-by: Bin Meng 
> ---
>
>  arch/sandbox/Kconfig | 17 +
>  1 file changed, 17 insertions(+)

Reviewed-by: Simon Glass 

>
Applied to u-boot-dm, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 18/19] rockchip: dts: rk3368-lion: add /chosen/tick-timer

2017-09-12 Thread Philipp Tomsich
> To support bootstage recording, we want to mark our DM timer as the
> tick-timer; this triggers the support for 'trying harder' to read the
> timer in the Rockchip DM timer driver, even if the device model isn't
> ready yet.
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Simon Glass 
> Acked-by: Philipp Tomsich 
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  arch/arm/dts/rk3368-lion-u-boot.dtsi | 2 ++
>  1 file changed, 2 insertions(+)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 14/19] rockchip: rk8xx: remove unused header includes

2017-09-12 Thread Philipp Tomsich
> Remove header file includes that have been left over after the
> conversion to livetree-support.
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Simon Glass 
> Acked-by: Philipp Tomsich 
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  drivers/power/pmic/rk8xx.c | 2 --
>  1 file changed, 2 deletions(-)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 10/19] rockchip: clk: rk3368: Convert to livetree

2017-09-12 Thread Philipp Tomsich
> Update the clock driver for the RK3368 to support a live device tree.
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Simon Glass 
> Acked-by: Philipp Tomsich 
> 
> Version-changes: 2
> - use the dev_read_addr_ptr function in   clk_rk3368.c
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  drivers/clk/rockchip/clk_rk3368.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v3,12/19] rockchip: spi: Convert to livetree

2017-09-12 Thread Philipp Tomsich
> Update the Rockchip SPI driver to support a live device tree.
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Simon Glass 
> Reviewed-by: Jagan Teki 
> Acked-by: Philipp Tomsich 
> ---
> 
> Changes in v3:
> - added Jagan's Reviewed-by: tag.
> 
> Changes in v2: None
> 
>  drivers/spi/rk_spi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 19/19] rockchip: lion-rk3368: defconfig: resync w/ OF_LIVE and BOOTSTAGE enabled

2017-09-12 Thread Philipp Tomsich
> This adds OF_LIVE and BOOTSTAGE support for the RK3368-uQ7 and
> regenerates the defconfig (picking up a few changes/reorderings) from
> upstream Kconfig changes.
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Simon Glass 
> Acked-by: Philipp Tomsich 
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  configs/lion-rk3368_defconfig | 7 +++
>  1 file changed, 7 insertions(+)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 1/2] rockchip: rk3368: add ENV_MEM_LAYOUT to extra env settings

2017-09-12 Thread Philipp Tomsich
> Add the ENV_MEM_LAYOUT_SETTINGS to CONFIG_EXTRA_ENV_SETTINGS
> 
> Signed-off-by: Andy Yan 
> ---
> 
>  include/configs/rk3368_common.h | 1 +
>  1 file changed, 1 insertion(+)
> 

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


[U-Boot] Please pull u-boot-dm

2017-09-12 Thread Simon Glass
Hi Tom,

Here is an assortment of minor changes related to driver model,
sandbox and patman/other tools.


The following changes since commit c98ac3487e413c71e5d36322ef3324b21c6f60f9:

  Prepare v2017.09 (2017-09-11 14:10:40 -0400)

are available in the git repository at:

  git://git.denx.de/u-boot-dm.git

for you to fetch changes up to ee87a097b0f66158ce2985940a5f28ba15a3552d:

  dm: test: replace dm_scan_dt() by of dm_extended_scan_fdt() in
dm_do_test (2017-09-11 21:43:58 -0600)


Bin Meng (2):
  sandbox: Introduce Kconfig option for 32/64 bit host
  sandbox: Convert SANDBOX_BITS_PER_LONG to Kconfig

Chris Packham (1):
  patman: add support for omitting bouncing addresses

Jean-Jacques Hiblot (1):
  blk: dm: make blk_create_device() take a number of block instead of a size

Patrice Chotard (2):
  dm: core: add clocks node scan
  dm: test: replace dm_scan_dt() by of dm_extended_scan_fdt() in dm_do_test

Simon Glass (5):
  dm: core: Drop use of strlcpy()
  dm: core: Show driver name with 'dm tree'
  genconfig.py: Print defconfig next to warnings
  dm: core: Add ofnode_for_each_subnode()
  moveconfig: Use fd.write() instead of print >>

 arch/arm/mach-tegra/xusb-padctl-common.c |  8 ++--
 arch/sandbox/Kconfig | 22 +
 arch/sandbox/dts/test.dts| 10 ++
 board/sandbox/README.sandbox |  7 +++
 doc/bounces  |  3 +++
 drivers/block/blk-uclass.c   |  8 
 drivers/block/sandbox.c  |  2 +-
 drivers/core/dump.c  |  8 +++-
 drivers/core/ofnode.c|  9 +
 drivers/core/root.c  | 34 ++--
 drivers/misc/cros_ec.c   |  3 +--
 drivers/power/pmic/pmic-uclass.c |  4 +---
 drivers/scsi/scsi.c  |  2 +-
 include/blk.h|  8 
 include/dm/ofnode.h  | 24 ++
 include/dm/root.h| 14 +
 lib/libfdt/pylibfdt/libfdt.i |  2 ++
 scripts/config_whitelist.txt |  1 -
 test/dm/blk.c|  6 +++---
 test/dm/test-main.c  |  2 +-
 tools/buildman/kconfiglib.py | 22 +++--
 tools/genboardscfg.py|  7 +--
 tools/moveconfig.py  |  6 +++---
 tools/patman/README  | 12 +++
 tools/patman/series.py   |  5 +
 tools/patman/settings.py | 18 +
 26 files changed, 191 insertions(+), 56 deletions(-)
 create mode 100644 doc/bounces

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


Re: [U-Boot] [U-Boot, v2, 2/2] rockchip: board: puma_rk3399: update README flash instructions

2017-09-12 Thread Philipp Tomsich
> Puma supports other boot sources then SD-Card. Update README to include
> the required steps.
> 
>  * how to package a SPI-NOR SPL
>  * how to flash eMMC with rkdeveloptool
> 
> Signed-off-by: Klaus Goger 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Philipp Tomsich 
> Acked-by: Philipp Tomsich 
> ---
> 
> Changes in v2:
> - add missing ./configure step while building rkdeveloptool
> 
>  board/theobroma-systems/puma_rk3399/README | 51 
> +-
>  1 file changed, 43 insertions(+), 8 deletions(-)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 2/2] rockchip: rk3368: add the missing target and pinctrl config for sheep board

2017-09-12 Thread Philipp Tomsich
> Add the missing target and pinctrl config for rk3368 sheep board
> 
> Signed-off-by: Andy Yan 
> Reviewed-by: Simon Glass 
> ---
> 
>  configs/sheep-rk3368_defconfig | 2 ++
>  1 file changed, 2 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, v3, 13/19] rockchip: sdhci: Convert to livetree

2017-09-12 Thread Philipp Tomsich
> Update the Rockchip SDHCI wrapper to support a live device tree.
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Simon Glass 
> Acked-by: Philipp Tomsich 
> 
> Version-changes: 2
> - use the dev_read_addr_ptr function in   rockchip_sdhci.c
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  drivers/mmc/rockchip_sdhci.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v3,15/19] rockchip: i2c: Convert to livetree

2017-09-12 Thread Philipp Tomsich
> Update the Rockchip I2C driver to support livetree.
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Simon Glass 
> Acked-by: Philipp Tomsich 
> Acked-by: Heiko Schocher 
> ---
> 
> Changes in v3:
> - added Heiko's Acked-by: tag.
> 
> Changes in v2:
> - use the dev_read_addr_ptr function in rk_i2c.c
> 
>  drivers/i2c/rk_i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 11/19] rockchip: pinctrl: rk3368: Convert to livetree

2017-09-12 Thread Philipp Tomsich
> Update the pinctrl driver for the RK3368 to support a live device tree.
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Simon Glass 
> Acked-by: Philipp Tomsich 
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  drivers/pinctrl/rockchip/pinctrl_rk3368.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 

Applied to u-boot-rockchip, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v3,16/19] rockchip: gpio: convert to livetree

2017-09-12 Thread Philipp Tomsich
> Update the Rockchip GPIO-bank driver to support a live tree.
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Simon Glass 
> Acked-by: Philipp Tomsich 
> 
> Version-changes: 2
> - use the dev_read_addr_ptr function in rk_gpio.c
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  drivers/gpio/rk_gpio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to u-boot-rockchip, thanks!
___
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 Jagan Teki
On Tue, Sep 12, 2017 at 2:23 PM, Dr. Philipp Tomsich
 wrote:
> Jagan,
>
> please revise — after applying this patch, the build fails with:
>
>arm:  +   vyasa-rk3288
> +cmd/built-in.o: In function `do_usb_mass_storage':
> +cmd/usb_mass_storage.c:164: undefined reference to `board_usb_init'
> +cmd/usb_mass_storage.c:170: undefined reference to `fsg_init'
> +cmd/usb_mass_storage.c:177: undefined reference to `g_dnl_register'
> +cmd/usb_mass_storage.c:187: undefined reference to
> `g_dnl_board_usb_cable_connected'
> +cmd/usb_mass_storage.c:194: undefined reference to
> `g_dnl_board_usb_cable_connected'
> +cmd/usb_mass_storage.c:215: undefined reference to
> `usb_gadget_handle_interrupts'
> +cmd/usb_mass_storage.c:217: undefined reference to `fsg_main_thread'
> +cmd/usb_mass_storage.c:233: undefined reference to `g_dnl_unregister'
> +cmd/usb_mass_storage.c:235: undefined reference to `board_usb_cleanup'
> +arm-unknown-linux-gnueabi-ld.bfd: BFD (GNU Binutils) 2.24 assertion fail
> /home/tony/buildall/src/binutils/bfd/elf32-arm.c:7696
> +arm-unknown-linux-gnueabi-ld.bfd: error: required section '.rel.plt' not
> found in the linker script
> +arm-unknown-linux-gnueabi-ld.bfd: final link failed: Invalid operation
> +make[1]: *** [u-boot] Error 1
> +make: *** [sub-make] Error 2

commit[1] from Tom, as moved USB configs to defconfig, this patch
missed that since Tom pushed after this patch.
will send v4 by including updated changes.

[1] 
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=ecad7051b07b11fb17196ce45ed0cbe2f1c3234e

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


[U-Boot] [PATCH v4] rk3288: Add Vyasa initial board support

2017-09-12 Thread Jagan Teki
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 
Acked-by: Philipp Tomsich 
---
Changes for v4:
- Undef CONFIG_CMD_USB_MASS_STORAGE since USB support not added in this
  patch, will remove once USB added
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|  23 +++
 9 files changed, 457 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

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 762429c..8f19219 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -41,6 +41,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
rk3288-veyron-jerry.dtb \
rk3288-veyron-mickey.dtb \
rk3288-veyron-minnie.dtb \
+   rk3288-vyasa.dtb \
rk3328-evb.dtb \
rk3368-lion.dtb \
rk3368-sheep.dtb \
diff --git a/arch/arm/dts/rk3288-vyasa.dts b/arch/arm/dts/rk3288-vyasa.dts
new file mode 100644
index 000..93a9c5e
--- /dev/null
+++ b/arch/arm/dts/rk3288-vyasa.dts
@@ -0,0 +1,327 @@
+/*
+ * Copyright (C) 2017 Jagan Teki 
+ *
+ * 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.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "rk3288.dtsi"
+
+/ {
+   model = "Amarula Vyasa-RK3288";
+   compatible = "amarula,vyasa-rk3288", "rockchip,rk3288";
+
+   chosen {
+   stdout-path = &uart2;
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0 0x8000>;
+   };
+
+   vcc_sd: sdmmc-regulator {
+   compatible = "regulator-fixed";
+   

Re: [U-Boot] [PATCH] arm: am33xx: Make pin multiplexing functions optional

2017-09-12 Thread Felix Brack


On 07.09.2017 17:14, Tom Rini wrote:
> On Wed, Sep 06, 2017 at 04:57:52PM +0200, Felix Brack wrote:
>> On 01.09.2017 17:21, Tom Rini wrote:
>>> On Thu, Aug 31, 2017 at 03:16:17PM +0200, Felix Brack wrote:
>>>
 Boards using the single-register-pin-controller can  configure all
 pins by means of the device tree. This renders the implementation of
 the two functions set_uart_mux_conf and set_mux_conf_regs obsolete.
 Using the weak attribute for these two function declarations allows
 the omission of the respective definitions.

 Signed-off-by: Felix Brack 
 ---

  arch/arm/include/asm/arch-am33xx/sys_proto.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

 diff --git a/arch/arm/include/asm/arch-am33xx/sys_proto.h 
 b/arch/arm/include/asm/arch-am33xx/sys_proto.h
 index 4e78aaf..e31c25c 100644
 --- a/arch/arm/include/asm/arch-am33xx/sys_proto.h
 +++ b/arch/arm/include/asm/arch-am33xx/sys_proto.h
 @@ -31,8 +31,8 @@ void enable_gpmc_cs_config(const u32 *gpmc_config, const 
 struct gpmc_cs *cs, u32
u32 size);
  int omap_nand_switch_ecc(uint32_t, uint32_t);
  
 -void set_uart_mux_conf(void);
 -void set_mux_conf_regs(void);
 +__weak void set_uart_mux_conf(void);
 +__weak void set_mux_conf_regs(void);
  void sdram_init(void);
  u32 wait_on_value(u32, u32, void *, u32);
  #ifdef CONFIG_NOR_BOOT
>>>
>>> This seems wrong in a few ways.  First, this (and the matching ones for
>>> omap3, etc) should be full of externs instead and in that case __weak
>>> makes no sense.  Then, on the technical side, what you're describing
>>> isn't quite true in that you're likely relying on having the ROM to have
>>> setup the 'normal' UART still for you, as it so often does, I believe.
>>> Or in the case I'm wrong, then yes, you do get UART to work once we have
>>> parsed the DT, but the "usual" case is that we want UART and thus
>>> printf/etc to be available asap in case of errors, so it's still not a
>>> recommended way to go.  Thanks!
>>>
>>
>> Hi Tom,
>>
>> Could you please explain what you mean by "... should be full of externs
>> instead and in that case __weak makes no sense"?
> 
> I mean it's a header file.  We should only be declaring function
> prototypes, and thus using 'extern' here.  It's not the right place to
> have an inline weak function.
> 

Reflecting once more on my patch and after some tests I must admit that
the patch is based on a fundamental misunderstanding of the attribute
'weak' that could even lead to segmentation faults :$.
The patch, as such, should therefore be discarded. However I will retain
the idea behind the patch (see below).

>> The pins of the UART I use are not configured by the ROM, it is the pin
>> controller driver configuring them.
>> You are of course right in that UART output is not available before the
>> pin controller driver has executed correctly. In my case the UART is
>> available in 'spl_board_init()'. I know that many things can go wrong
>> before this and therefore configuring UART pins in 'set_uart_mux_conf()'
>> while using 'CONFIG_DEBUG_UART' is fine. In this context the word
>> 'obsolete' may be wrong. The idea behind the patch is to not force the
>> implementation of those two (potentially empty) functions.
> 
> I'm open to discussing making these functions be not required but then
> the weak empty function should be under arch/arm/mach-omap2/ somewhere.

How about adding a 'weak', default, empty implementation of these two
functions to arch/arm/mach-omap2/am33xx/mux.c?

> Thanks!
> 

-- 
Felix
___
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 Dr. Philipp Tomsich

> On 12 Sep 2017, at 13:08, Jagan Teki  wrote:
> 
> On Tue, Sep 12, 2017 at 2:23 PM, Dr. Philipp Tomsich
>  > wrote:
>> Jagan,
>> 
>> please revise — after applying this patch, the build fails with:
>> 
>>   arm:  +   vyasa-rk3288
>> +cmd/built-in.o: In function `do_usb_mass_storage':
>> +cmd/usb_mass_storage.c:164: undefined reference to `board_usb_init'
>> +cmd/usb_mass_storage.c:170: undefined reference to `fsg_init'
>> +cmd/usb_mass_storage.c:177: undefined reference to `g_dnl_register'
>> +cmd/usb_mass_storage.c:187: undefined reference to
>> `g_dnl_board_usb_cable_connected'
>> +cmd/usb_mass_storage.c:194: undefined reference to
>> `g_dnl_board_usb_cable_connected'
>> +cmd/usb_mass_storage.c:215: undefined reference to
>> `usb_gadget_handle_interrupts'
>> +cmd/usb_mass_storage.c:217: undefined reference to `fsg_main_thread'
>> +cmd/usb_mass_storage.c:233: undefined reference to `g_dnl_unregister'
>> +cmd/usb_mass_storage.c:235: undefined reference to `board_usb_cleanup'
>> +arm-unknown-linux-gnueabi-ld.bfd: BFD (GNU Binutils) 2.24 assertion fail
>> /home/tony/buildall/src/binutils/bfd/elf32-arm.c:7696
>> +arm-unknown-linux-gnueabi-ld.bfd: error: required section '.rel.plt' not
>> found in the linker script
>> +arm-unknown-linux-gnueabi-ld.bfd: final link failed: Invalid operation
>> +make[1]: *** [u-boot] Error 1
>> +make: *** [sub-make] Error 2
> 
> commit[1] from Tom, as moved USB configs to defconfig, this patch
> missed that since Tom pushed after this patch.
> will send v4 by including updated changes.

Thanks for revising/rebasing.  I am trying to get as much of my backlog into
an early PR and this is among those patches.

> 
> [1] 
> http://git.denx.de/?p=u-boot.git;a=commitdiff;h=ecad7051b07b11fb17196ce45ed0cbe2f1c3234e
>  
> 
> 
> thanks!
> -- 
> Jagan Teki
> Free Software Engineer | www.openedev.com 
> U-Boot, Linux | Upstream Maintainer
> Hyderabad, India.

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


Re: [U-Boot] [PATCH 1/1] x86: ivybridge: remove unused variables

2017-09-12 Thread Simon Glass
On 11 September 2017 at 19:40, Heinrich Schuchardt  wrote:
>
> legacy_hole_base_k and legacy_hole_size_k are defined but
> not used.
>
> Signed-off-by: Heinrich Schuchardt 
> ---
>  arch/x86/cpu/ivybridge/northbridge.c | 10 --
>  1 file changed, 10 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 02/13] usb: gadget: Move USBNET_HOST_ADDR to Kconfig

2017-09-12 Thread Simon Glass
On 8 September 2017 at 11:34, 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 | 4 
>  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, 11 insertions(+), 6 deletions(-)
>
[..]

> index d52626908846..84c8bf84da5f 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -125,4 +125,8 @@ config USBNET_DEVADDR
> string "USB Gadget Ethernet device mac address"
> default "de:ad:be:ef:00:01"
>
> +config USBNET_HOST_ADDR
> +   string "USB Gadget Ethernet host mac address"
> +   default "de:ad:be:ef:00:00"

Please can you add help for this?
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 05/13] usb: gadget: Make g_dnl USB settings common

2017-09-12 Thread Simon Glass
Hi Maxime,

On 8 September 2017 at 11:34, Maxime Ripard
 wrote:
> The g_dnl USB settings for the vendor ID, product ID and manufacturer are
> actually common settings that can and should be shared by all the gadgets.
>
> Make them common by renaming them, and convert all the users.
>
> Signed-off-by: Maxime Ripard 
> ---
>  board/samsung/common/gadget.c|  4 ++--
>  board/siemens/common/factoryset.c|  4 ++--
>  configs/A13-OLinuXino_defconfig  |  6 +++---
>  configs/A20-OLinuXino-Lime2-eMMC_defconfig   |  6 +++---
>  configs/A20-OLinuXino-Lime2_defconfig|  6 +++---
>  configs/CHIP_defconfig   |  6 +++---
>  configs/CHIP_pro_defconfig   |  6 +++---
>  configs/Cubietruck_defconfig |  6 +++---
>  configs/Nintendo_NES_Classic_Edition_defconfig   |  6 +++---
>  configs/Sinlinx_SinA33_defconfig |  6 +++---
>  configs/am335x_baltos_defconfig  |  6 +++---
>  configs/am335x_boneblack_defconfig   |  6 +++---
>  configs/am335x_boneblack_vboot_defconfig |  6 +++---
>  configs/am335x_evm_defconfig |  6 +++---
>  configs/am335x_evm_nor_defconfig |  6 +++---
>  configs/am335x_evm_norboot_defconfig |  6 +++---
>  configs/am335x_evm_spiboot_defconfig |  6 +++---
>  configs/am335x_evm_usbspl_defconfig  |  6 +++---
>  configs/am335x_hs_evm_defconfig  |  6 +++---
>  configs/am43xx_evm_defconfig |  6 +++---
>  configs/am43xx_evm_ethboot_defconfig |  6 +++---
>  configs/am43xx_evm_qspiboot_defconfig|  6 +++---
>  configs/am43xx_evm_usbhost_boot_defconfig|  6 +++---
>  configs/am43xx_hs_evm_defconfig  |  6 +++---
>  configs/am57xx_evm_defconfig |  6 +++---
>  configs/am57xx_evm_nodt_defconfig|  6 +++---
>  configs/am57xx_hs_evm_defconfig  |  6 +++---
>  configs/apalis-tk1_defconfig |  6 +++---
>  configs/apalis_imx6_defconfig|  6 +++---
>  configs/apalis_imx6_nospl_com_defconfig  |  6 +++---
>  configs/apalis_imx6_nospl_it_defconfig   |  6 +++---
>  configs/apalis_t30_defconfig |  6 +++---
>  configs/bcm11130_defconfig   |  6 +++---
>  configs/bcm11130_nand_defconfig  |  6 +++---
>  configs/bcm23550_w1d_defconfig   |  6 +++---
>  configs/bcm28155_ap_defconfig|  6 +++---
>  configs/bcm28155_w1d_defconfig   |  6 +++---
>  configs/beaver_defconfig |  6 +++---
>  configs/birdland_bav335a_defconfig   |  6 +++---
>  configs/birdland_bav335b_defconfig   |  6 +++---
>  configs/cei-tk1-som_defconfig|  6 +++---
>  configs/cgtqmx6eval_defconfig|  6 +++---
>  configs/chromebit_mickey_defconfig   |  6 +++---
>  configs/chromebook_jerry_defconfig   |  6 +++---
>  configs/chromebook_minnie_defconfig  |  6 +++---
>  configs/colibri_imx6_defconfig   |  6 +++---
>  configs/colibri_imx6_nospl_defconfig |  6 +++---
>  configs/colibri_imx7_defconfig   |  6 +++---
>  configs/colibri_t20_defconfig|  6 +++---
>  configs/colibri_t30_defconfig|  6 +++---
>  configs/colibri_vf_defconfig |  6 +++---
>  configs/corvus_defconfig |  6 +++---
>  configs/dalmore_defconfig|  6 +++---
>  configs/dms-ba16-1g_defconfig|  6 +++---
>  configs/dms-ba16_defconfig   |  6 +++---
>  configs/dra7xx_evm_defconfig |  6 +++---
>  configs/dra7xx_hs_evm_defconfig  |  6 +++---
>  configs/draco_defconfig  |  6 +++---
>  configs/e2220-1170_defconfig |  6 +++---
>  configs/edison_defconfig |  6 +++---
>  configs/etamin_defconfig |  6 +++---
>  configs/evb-rk3036_defconfig |  6 +++---
>  configs/evb-rk3229_defconfig |  6 +++---
>  configs/evb-rk3288_defconfig |  6 +++---
>  configs/evb-rk3328_defconfig |  6 +++---
>  configs/fennec-rk3288_defconfig  |  6 +++---
>  configs/firefly-rk3288_defconfig |  6 +++---
>  configs/gwventana_emmc_defconfig |  6 +++---
>  configs/gwventana_gw5904_defconfig   |  6 +++---
>  configs/gwventana_nand_defconfig |  6 +++---
>  configs/jetson-tk1_defconfig |  6 +++---
>  configs/kc1_defconfig|  6 +++---
>  configs/kylin-rk3036_defconfig   |  6 +++---
>  confi

Re: [U-Boot] [PATCH] lib: strto: fix incorrect handling of specified base

2017-09-12 Thread Simon Glass
On 11 September 2017 at 14:53, Rob Clark  wrote:
>
> The strto functions should honor the specified base (if non-zero) rather
> than permitting a hex or octal string when the user wanted (for example)
> base 10.
>
> This has been fixed somewhere along the way in the upstream linux kernel
> src tree, at some point after these was copied in to u-boot.  And also
> in a way that duplicates less code.  So port _parse_integer_fixup_radix()
> to u-boot.
>
> Signed-off-by: Rob Clark 
> ---
>  lib/strto.c | 45 +++--
>  1 file changed, 19 insertions(+), 26 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 01/13] usb: gadget: Move USBNET_DEVADDR option out of g_dnl

2017-09-12 Thread Simon Glass
On 8 September 2017 at 11:34, Maxime Ripard
 wrote:
> The USBNET_DEVADDR has nothing to do with the USB download gadget, but
> rather with the USB Ethernet gadget. Move it out of the if statement.
>
> Signed-off-by: Maxime Ripard 
> ---
>  drivers/usb/gadget/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass 

Would be good to add help for this option
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 09/13] cmd: fastboot: Rework fastboot dependency

2017-09-12 Thread Simon Glass
On 8 September 2017 at 11:34, Maxime Ripard
 wrote:
> Fastboot need a bunch of options to be operating properly, such as the
> g_dnl gadget, the fastboot command, and some options that make sense. Since
> fastboot is now part of Kconfig, make sure we have them right.
>
> That will also reduce the boilerplate in the defconfigs.
>
> Signed-off-by: Maxime Ripard 
> ---
>  arch/arm/Kconfig   | 2 --
>  cmd/fastboot/Kconfig   | 4 
>  configs/A13-OLinuXino_defconfig| 1 -
>  configs/A20-OLinuXino-Lime2-eMMC_defconfig | 1 -
>  configs/A20-OLinuXino-Lime2_defconfig  | 1 -
>  configs/CHIP_defconfig | 1 -
>  configs/CHIP_pro_defconfig | 1 -
>  configs/Cubietruck_defconfig   | 1 -
>  configs/Nintendo_NES_Classic_Edition_defconfig | 1 -
>  configs/Sinlinx_SinA33_defconfig   | 1 -
>  configs/am335x_boneblack_defconfig | 2 --
>  configs/am335x_boneblack_vboot_defconfig   | 2 --
>  configs/am335x_evm_defconfig   | 2 --
>  configs/am335x_evm_nor_defconfig   | 2 --
>  configs/am335x_evm_norboot_defconfig   | 2 --
>  configs/am335x_evm_spiboot_defconfig   | 2 --
>  configs/am335x_evm_usbspl_defconfig| 2 --
>  configs/am57xx_evm_defconfig   | 2 --
>  configs/am57xx_evm_nodt_defconfig  | 3 ---
>  configs/am57xx_hs_evm_defconfig| 2 --
>  configs/bcm23550_w1d_defconfig | 3 ---
>  configs/bcm28155_ap_defconfig  | 3 ---
>  configs/birdland_bav335a_defconfig | 3 ---
>  configs/birdland_bav335b_defconfig | 3 ---
>  configs/cgtqmx6eval_defconfig  | 3 ---
>  configs/chromebit_mickey_defconfig | 1 -
>  configs/chromebook_jerry_defconfig | 1 -
>  configs/chromebook_minnie_defconfig| 1 -
>  configs/dra7xx_evm_defconfig   | 2 --
>  configs/dra7xx_hs_evm_defconfig| 2 --
>  configs/evb-rk3036_defconfig   | 1 -
>  configs/evb-rk3229_defconfig   | 1 -
>  configs/evb-rk3288_defconfig   | 1 -
>  configs/fennec-rk3288_defconfig| 1 -
>  configs/firefly-rk3288_defconfig   | 1 -
>  configs/kc1_defconfig  | 3 ---
>  configs/kylin-rk3036_defconfig | 1 -
>  configs/miqi-rk3288_defconfig  | 1 -
>  configs/mx6qsabrelite_defconfig| 3 ---
>  configs/nitrogen6dl2g_defconfig| 3 ---
>  configs/nitrogen6dl_defconfig  | 3 ---
>  configs/nitrogen6q2g_defconfig | 3 ---
>  configs/nitrogen6q_defconfig   | 3 ---
>  configs/nitrogen6s1g_defconfig | 3 ---
>  configs/nitrogen6s_defconfig   | 3 ---
>  configs/omap3_beagle_defconfig | 3 ---
>  configs/omap3_logic_defconfig  | 2 --
>  configs/parrot_r16_defconfig   | 1 -
>  configs/phycore-rk3288_defconfig   | 1 -
>  configs/popmetal-rk3288_defconfig  | 1 -
>  configs/rock2_defconfig| 1 -
>  configs/sniper_defconfig   | 3 ---
>  configs/tinker-rk3288_defconfig| 1 -
>  53 files changed, 4 insertions(+), 97 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/21] part: extract MBR signature from partitions

2017-09-12 Thread Simon Glass
Hi Rob,

On 10 September 2017 at 05:21, Rob Clark  wrote:
> From: Peter Jones 
>
> EFI client programs need the signature information from the partition
> table to determine the disk a partition is on, so we need to fill that
> in here.
>
> Signed-off-by: Peter Jones 
> [separated from efi_loader part, and fixed build-errors for non-
>  CONFIG_EFI_PARTITION case]
> Signed-off-by: Rob Clark 
> ---
>  disk/part_dos.c | 12 +---
>  disk/part_efi.c | 20 
>  include/blk.h   | 15 +++
>  3 files changed, 44 insertions(+), 3 deletions(-)
>

Reviewed-by: Simon Glass 

Please see below.

> diff --git a/disk/part_dos.c b/disk/part_dos.c
> index 7ede15ec26..850a538e83 100644
> --- a/disk/part_dos.c
> +++ b/disk/part_dos.c
> @@ -89,14 +89,20 @@ static int test_block_type(unsigned char *buffer)
>
>  static int part_test_dos(struct blk_desc *dev_desc)
>  {
> -   ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);
> +   ALLOC_CACHE_ALIGN_BUFFER(legacy_mbr, mbr, dev_desc->blksz);
>
> -   if (blk_dread(dev_desc, 0, 1, (ulong *)buffer) != 1)
> +   if (blk_dread(dev_desc, 0, 1, (ulong *)mbr) != 1)
> return -1;
>
> -   if (test_block_type(buffer) != DOS_MBR)
> +   if (test_block_type((unsigned char *)mbr) != DOS_MBR)
> return -1;
>
> +   if (dev_desc->sig_type == SIG_TYPE_NONE &&
> +   mbr->unique_mbr_signature != 0) {
> +   dev_desc->sig_type = SIG_TYPE_MBR;
> +   dev_desc->mbr_sig = mbr->unique_mbr_signature;
> +   }
> +
> return 0;
>  }
>
> diff --git a/disk/part_efi.c b/disk/part_efi.c
> index 2973d52f6a..208bb14ee8 100644
> --- a/disk/part_efi.c
> +++ b/disk/part_efi.c
> @@ -923,11 +923,19 @@ static int is_pmbr_valid(legacy_mbr * mbr)
>  static int is_gpt_valid(struct blk_desc *dev_desc, u64 lba,
> gpt_header *pgpt_head, gpt_entry **pgpt_pte)
>  {
> +   ALLOC_CACHE_ALIGN_BUFFER(legacy_mbr, mbr, dev_desc->blksz);
> +
> if (!dev_desc || !pgpt_head) {
> printf("%s: Invalid Argument(s)\n", __func__);
> return 0;
> }
>
> +   /* Read MBR Header from device */
> +   if (blk_dread(dev_desc, 0, 1, (ulong *)mbr) != 1) {
> +   printf("*** ERROR: Can't read MBR header ***\n");
> +   return 0;
> +   }
> +
> /* Read GPT Header from device */
> if (blk_dread(dev_desc, (lbaint_t)lba, 1, pgpt_head) != 1) {
> printf("*** ERROR: Can't read GPT header ***\n");
> @@ -937,6 +945,18 @@ static int is_gpt_valid(struct blk_desc *dev_desc, u64 
> lba,
> if (validate_gpt_header(pgpt_head, (lbaint_t)lba, dev_desc->lba))
> return 0;
>
> +   if (dev_desc->sig_type == SIG_TYPE_NONE) {
> +   efi_guid_t empty = {};
> +   if (memcmp(&pgpt_head->disk_guid, &empty, sizeof(empty))) {
> +   dev_desc->sig_type = SIG_TYPE_GUID;
> +   memcpy(&dev_desc->guid_sig, &pgpt_head->disk_guid,
> + sizeof(empty));
> +   } else if (mbr->unique_mbr_signature != 0) {
> +   dev_desc->sig_type = SIG_TYPE_MBR;
> +   dev_desc->mbr_sig = mbr->unique_mbr_signature;
> +   }
> +   }
> +
> /* Read and allocate Partition Table Entries */
> *pgpt_pte = alloc_read_gpt_entries(dev_desc, pgpt_head);
> if (*pgpt_pte == NULL) {
> diff --git a/include/blk.h b/include/blk.h
> index a106f9ca0e..3c59fdb3d4 100644
> --- a/include/blk.h
> +++ b/include/blk.h
> @@ -8,6 +8,8 @@
>  #ifndef BLK_H
>  #define BLK_H
>
> +#include 
> +
>  #ifdef CONFIG_SYS_64BIT_LBA
>  typedef uint64_t lbaint_t;
>  #define LBAFlength "ll"
> @@ -36,6 +38,14 @@ enum if_type {
> IF_TYPE_COUNT,  /* Number of interface types */
>  };
>
> +enum sig_type {

Please add a comment about what this is

> +   SIG_TYPE_NONE,
> +   SIG_TYPE_MBR,
> +   SIG_TYPE_GUID,
> +
> +   SIG_TYPE_COUNT  /* Number of signature types */
> +};
> +
>  /*
>   * With driver model (CONFIG_BLK) this is uclass platform data, accessible
>   * with dev_get_uclass_platdata(dev)
> @@ -63,6 +73,11 @@ struct blk_desc {
> charvendor[40+1];   /* IDE model, SCSI Vendor */
> charproduct[20+1];  /* IDE Serial no, SCSI product */
> charrevision[8+1];  /* firmware revision */
> +   enum sig_type   sig_type;   /* Partition table signature type */
> +   union {
> +   uint32_t mbr_sig;   /* MBR integer signature */
> +   efi_guid_t guid_sig;/* GPT GUID Signature */
> +   };
>  #if CONFIG_IS_ENABLED(BLK)
> /*
>  * For now we have a few functions which take struct blk_desc as a
> --
> 2.13.5
>

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.d

Re: [U-Boot] [PATCH 10/13] musb: sunxi: switch to the device model

2017-09-12 Thread Simon Glass
On 8 September 2017 at 11:34, Maxime Ripard
 wrote:
> The device model was implemented so far using a hook that needed to be
> called from the board support, without DT support and only for the host.
>
> Switch to probing both in peripheral and host mode through the DT.
>
> Signed-off-by: Maxime Ripard 
> ---
>  arch/arm/include/asm/arch-sunxi/usb_phy.h |  7 +---
>  board/sunxi/board.c   |  1 +-
>  drivers/usb/musb-new/sunxi.c  | 56 +++-
>  3 files changed, 27 insertions(+), 37 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] i2c: muxes: pca954x: Add support for GPIO reset line

2017-09-12 Thread Simon Glass
+Tom for question below

Hi Moritz,

On 8 September 2017 at 23:27, Moritz Fischer  wrote:
> Hi Simon,
>
> On Fri, Sep 8, 2017 at 9:55 PM, Simon Glass  wrote:
>> On 5 September 2017 at 12:24, Moritz Fischer  
>> wrote:
>>> This commit adds support for GPIO reset lines matching the
>>> common linux "reset-gpios" devicetree binding.
>>>
>>> Signed-off-by: Moritz Fischer 
>>> Cc: Heiko Schocher 
>>> Cc: Stefan Roese 
>>> Cc: Marek Behún 
>>> Cc: Simon Glass 
>>> Cc: Michal Simek 
>>>
>>> ---
>>>  drivers/i2c/muxes/pca954x.c | 44 
>>> +++-
>>>  1 file changed, 43 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
>>> index 383f72f552..dd28ff057b 100644
>>> --- a/drivers/i2c/muxes/pca954x.c
>>> +++ b/drivers/i2c/muxes/pca954x.c
>>> @@ -1,5 +1,6 @@
>>>  /*
>>>   * Copyright (C) 2015 - 2016 Xilinx, Inc.
>>> + * Copyright (C) 2017 National Instruments Corp
>>>   * Written by Michal Simek
>>>   *
>>>   * SPDX-License-Identifier:GPL-2.0+
>>> @@ -9,7 +10,10 @@
>>>  #include 
>>>  #include 
>>>  #include 
>>> -#include 
>>> +
>>> +#if CONFIG_DM_GPIO
>>> +# include 
>>> +#endif /* CONFIG_DM_GPIO */
>>
>> Can we drop the #ifdef?
>
> Yeah, will do.
>>
>>>
>>>  DECLARE_GLOBAL_DATA_PTR;
>>>
>>> @@ -30,6 +34,9 @@ struct chip_desc {
>>>  struct pca954x_priv {
>>> u32 addr; /* I2C mux address */
>>> u32 width; /* I2C mux width - number of busses */
>>> +#ifdef CONFIG_DM_GPIO
>>> +   struct gpio_desc gpio_mux_reset;
>>> +#endif /* CONFIG_DM_GPIO */
>>>  };
>>>
>>>  static const struct chip_desc chips[] = {
>>> @@ -105,10 +112,45 @@ static int pca954x_ofdata_to_platdata(struct udevice 
>>> *dev)
>>> return 0;
>>>  }
>>>
>>> +static int pca954x_probe(struct udevice *dev)
>>> +{
>>> +#ifdef CONFIG_DM_GPIO
>>
>> Can we use if (IS_ENABLED(CONFIG_DM_GPIO)) ?
>
> I suppose. I was wondering. Is this in general preferable?

Well one benefit is that it reduces build-time code branching so we
can potentially detect build errors more easily (e.g. this driver
could be enabled for sandbox). We have traditionally had loads of
#ifdefs in U-Boot and IMO they make the code harder to read. Note that
using if() relies on not using -O0 in many cases but I think we gave
up on supporting -O0 some time ago since debugging of optimised code
is better these days.

Tom, what do you think?

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


Re: [U-Boot] [PATCH 07/13] sunxi: provide default USB gadget setup

2017-09-12 Thread Simon Glass
On 8 September 2017 at 11:34, Maxime Ripard
 wrote:
> All the Allwinner boards use the same manufacturer, VID and PID for the
> gadgets. Make them the defaults to remove some boilerplate from our
> defconfigs.
>
> Signed-off-by: Maxime Ripard 
> ---
>  configs/A13-OLinuXino_defconfig| 3 ---
>  configs/A20-OLinuXino-Lime2-eMMC_defconfig | 3 ---
>  configs/A20-OLinuXino-Lime2_defconfig  | 3 ---
>  configs/CHIP_defconfig | 3 ---
>  configs/CHIP_pro_defconfig | 3 ---
>  configs/Cubietruck_defconfig   | 3 ---
>  configs/Nintendo_NES_Classic_Edition_defconfig | 3 ---
>  configs/Sinlinx_SinA33_defconfig   | 3 ---
>  configs/parrot_r16_defconfig   | 3 ---
>  drivers/usb/gadget/Kconfig | 3 +++
>  10 files changed, 3 insertions(+), 27 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 03/13] usb: gadget: Convert USB_ETHER to Kconfig

2017-09-12 Thread Simon Glass
Hi Maxime,

On 8 September 2017 at 11:34, 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   | 10 ++
>  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|  1 -
>  include/configs/vinco.h  |  1 -
>  include/configs/warp7.h  |  1 -
>  include/configs/xfi3.h   |  1 -
>  scripts/config_whitelist.txt |  1 -
>  60 files changed, 49 insertions(+), 20 deletions(-)

[..]

> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -121,6 +121,14 @@ config G_DNL_PRODUCT_NUM
>
>  endif # USB_GADGET_DOWNLOAD
>
> +config USB_ETHER
> +   bool "USB Ethernet Gadget"
> +   help
> + Creates an Ethernet network card through an USB peripheral
> + controller.

'a USB'

I think 'device' is better than 'card'?

Can you expand this help a bit?

- what it is used for
- pointer to docs on how to use it
- how it interacts with host-mode USB

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


Re: [U-Boot] [PATCH 04/13] usb: gadget: usb_ether: Move the interfaces to Kconfig

2017-09-12 Thread Simon Glass
Hi Maxime,

On 8 September 2017 at 11:34, 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 | 12 
>  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, 27 insertions(+), 32 deletions(-)

[..]

> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index 4f29beba1c52..878495fd5d03 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -129,6 +129,18 @@ config USB_ETHER
>
>  if USB_ETHER
>
> +choice
> +   prompt "USB Ethernet Gadget Model"
> +   default USB_ETH_RNDIS
> +
> +config USB_ETH_CDC
> +   bool "CDC-Ethernet model"
> +
> +config USB_ETH_RNDIS
> +   bool "RNDIS model"
> +
> +endchoice
> +

Please add help for these including spelling out the acronyms.

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


Re: [U-Boot] [PATCH v2] i2c: muxes: pca954x: Add support for GPIO reset line

2017-09-12 Thread Simon Glass
On 11 September 2017 at 12:19, Moritz Fischer  wrote:
> This commit adds support for GPIO reset lines matching the
> common linux "reset-gpios" devicetree binding.
>
> Signed-off-by: Moritz Fischer 
> ---
>
> Changes from v1:
> - Simon's feedback on ifdef vs IS_ENABLED()
>
> ---
>  drivers/i2c/muxes/pca954x.c | 42 +-
>  1 file changed, 41 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
> index 383f72f552..7dee12166d 100644
> --- a/drivers/i2c/muxes/pca954x.c
> +++ b/drivers/i2c/muxes/pca954x.c
> @@ -1,5 +1,6 @@
>  /*
>   * Copyright (C) 2015 - 2016 Xilinx, Inc.
> + * Copyright (C) 2017 National Instruments Corp
>   * Written by Michal Simek
>   *
>   * SPDX-License-Identifier:GPL-2.0+
> @@ -9,7 +10,8 @@
>  #include 
>  #include 
>  #include 
> -#include 
> +
> +#include 
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> @@ -30,6 +32,9 @@ struct chip_desc {
>  struct pca954x_priv {
> u32 addr; /* I2C mux address */
> u32 width; /* I2C mux width - number of busses */
> +#ifdef CONFIG_DM_GPIO
> +   struct gpio_desc gpio_mux_reset;
> +#endif /* CONFIG_DM_GPIO */

You should drop the #ifdef here.

Otherwise:

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


Re: [U-Boot] Enc: Uboot compatible with board Tegra124-nyan-big (ChromeBook G3 HP 14")

2017-09-12 Thread Simon Glass
Hi Alexandre,

On 8 September 2017 at 12:33, Alexandre N. Perfeito
 wrote:
>
> FYI
>

This doesn't seem to come through properly on the list. Please can you
send this as a fresh email with your quesiton/problem:

- to the list
- cc Tom Warren and me

With mailing lists your reply should go below the previous email as
otherwise things get very confusing (i.e. no top posting). I'm sorry
if this is frustrating for you, but by having these problems easily
searchable it helps others deal with the same issue later.

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


Re: [U-Boot] [PATCH v2 4/5] vsprintf.c: add GUID printing

2017-09-12 Thread Simon Glass
On 9 September 2017 at 04:47, Rob Clark  wrote:
> This works (roughly) the same way as linux's, but we currently always
> print lower-case (ie. we just keep %pUB and %pUL for compat with linux),
> mostly just because that is what uuid_bin_to_str() supports.
>
>   %pUb:   01020304-0506-0708-090a-0b0c0d0e0f10
>   %pUl:   04030201-0605-0807-090a-0b0c0d0e0f10
>
> It will be used by a later efi_loader paths for efi variables and for
> device-path-to-text protocol, and also quite useful for debug prints
> of protocol GUIDs.
>
> Signed-off-by: Rob Clark 
> Tested-by: Heinrich Schuchardt 
> ---
>  examples/api/Makefile  |  1 +
>  include/config_fallbacks.h |  1 +
>  lib/vsprintf.c | 46 
> --
>  3 files changed, 46 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] [PATCH 2/2] add pytests for 'gpt guid' command in sandbox

2017-09-12 Thread Simon Glass
On 10 September 2017 at 00:47,   wrote:
> From: Alison Chaiken 
>
> Run unit tests for the 'gpt guid' command, making use of the block
> device created by test/py/make_test_disk.py.  Remove this device at
> the end of the tests.
>
> Signed-off-by: Alison Chaiken 
> ---
>  test/py/tests/test_gpt.py | 38 ++
>  1 file changed, 38 insertions(+)
>  create mode 100644 test/py/tests/test_gpt.py

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


Re: [U-Boot] [PATCH v3 9/9] fs/fat: Clean up open-coded sector <-> cluster conversions

2017-09-12 Thread Simon Glass
On 9 September 2017 at 11:16, Rob Clark  wrote:
> Use the clust_to_sect() helper that was introduced earlier, and add an
> inverse sect_to_clust(), plus update the various spots that open-coded
> this conversion previously.
>
> Signed-off-by: Rob Clark 
> ---
>  fs/fat/fat.c   | 8 +++-
>  fs/fat/fat_write.c | 8 +++-
>  include/fat.h  | 6 +-
>  3 files changed, 11 insertions(+), 11 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 14/21] efi_loader: efi variable support

2017-09-12 Thread Simon Glass
Hi Rob,

On 10 September 2017 at 05:21, Rob Clark  wrote:
> Add EFI variable support, mapping to u-boot environment variables.
> Variables are pretty important for setting up boot order, among other
> things.  If the board supports saveenv, then it will be called in
> ExitBootServices() to persist variables set by the efi payload.  (For
> example, fallback.efi configuring BootOrder and Boot load-option
> variables.)
>
> Variables are *not* currently exposed at runtime, post ExitBootServices.
> On boards without a dedicated device for storage, which the loaded OS
> is not trying to also use, this is rather tricky.  One idea, at least
> for boards that can persist RAM across reboot, is to keep a "journal"
> of modified variables in RAM, and then turn halt into a reboot into
> u-boot, plus store variables, plus halt.  Whatever the solution, it
> likely involves some per-board support.
>
> Mapping between EFI variables and u-boot variables:
>
>   efi_$guid_$varname = {attributes}(type)value
>
> For example:
>
>   efi_8be4df61-93ca-11d2-aa0d-00e098032b8c_OsIndicationsSupported=
>  "{ro,boot,run}(blob)"
>   efi_8be4df61-93ca-11d2-aa0d-00e098032b8c_BootOrder=
>  "(blob)0001"
>
> The attributes are a comma separated list of these possible
> attributes:
>
>   + ro   - read-only
>   + boot - boot-services access
>   + run  - runtime access
>
> NOTE: with current implementation, no variables are available after
> ExitBootServices, and all are persisted (if possible).
>
> If not specified, the attributes default to "{boot}".
>
> The required type is one of:
>
>   + utf8 - raw utf8 string
>   + blob - arbitrary length hex string
>
> Signed-off-by: Rob Clark 
> ---
>  cmd/bootefi.c |   4 +
>  include/efi.h |  19 +++
>  include/efi_loader.h  |  10 ++
>  lib/efi_loader/Makefile   |   2 +-
>  lib/efi_loader/efi_boottime.c |   6 +
>  lib/efi_loader/efi_runtime.c  |  17 ++-
>  lib/efi_loader/efi_variable.c | 335 
> ++
>  7 files changed, 388 insertions(+), 5 deletions(-)
>  create mode 100644 lib/efi_loader/efi_variable.c

What does hex2mem() do? Please add a comment

This code looks fine but we need a simple way to test it. I think
Herinrich is working on a single hello world test. That could be
enhanced to set and read variables.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 21/21] efi_loader: Some console improvements for vidconsole

2017-09-12 Thread Simon Glass
On 10 September 2017 at 05:21, Rob Clark  wrote:
> 1) use fputs() to reduce cache flushes from once-per-char to
>once-per-string
> 2) handle \r, \t, and \b in addition to just \n for tracking
>cursor position
> 3) cursor row/col are zero based, not one based
>
> Signed-off-by: Rob Clark 
> ---
>  include/efi_api.h|  6 +++--
>  lib/efi_loader/efi_console.c | 58 
> ++--
>  2 files changed, 39 insertions(+), 25 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 05/21] efi_loader: add device-path utils

2017-09-12 Thread Simon Glass
Hi Rob,

On 10 September 2017 at 05:21, Rob Clark  wrote:
> Helpers to construct device-paths from devices, partitions, files, and
> for parsing and manipulating device-paths.
>
> For non-legacy devices, this will use u-boot's device-model to construct
> device-paths which include bus hierarchy to construct device-paths.  For
> legacy devices we still fake it, but slightly more convincingly.
>
> Signed-off-by: Rob Clark 
> ---
>  include/efi_api.h|  10 +
>  include/efi_loader.h |  26 ++
>  lib/efi_loader/Makefile  |   2 +-
>  lib/efi_loader/efi_boottime.c|  13 +-
>  lib/efi_loader/efi_device_path.c | 563 
> +++
>  5 files changed, 611 insertions(+), 3 deletions(-)
>  create mode 100644 lib/efi_loader/efi_device_path.c

Since this is new code we should not need the ifdef CONFIG_BLK,
DM_MMC, etc. here, right?

The deadline for CONFIG_BLK has been set as 2018.05.

Also can we add some simple unit tests for this code somewhere?

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


Re: [U-Boot] [PATCH 12/13] sunxi: Imply USB_ETHER

2017-09-12 Thread Simon Glass
On 8 September 2017 at 11:34, Maxime Ripard
 wrote:
> Now that we can enable the usb_ether gadget, do it. This will be especially
> useful for boards that don't have any ethernet controller, such as the ones
> based on the A13 or A33.
>
> Signed-off-by: Maxime Ripard 
> ---
>  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 v3 5/9] fs/fat: implement opendir/readdir/closedir

2017-09-12 Thread Simon Glass
On 9 September 2017 at 11:15, Rob Clark  wrote:
> Implement the readdir interface using the directory iterators.
>
> Signed-off-by: Rob Clark 
> Reviewed-by: Łukasz Majewski 
> ---
>  fs/fat/fat.c | 61 
> 
>  1 file changed, 61 insertions(+)

Reviewed-by: Simon Glass 

But I still feel unconvinced that you need to add the typedef.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


  1   2   3   4   5   >