Re: [U-Boot] [U-Boot, v6, 2/2] common: Generic firmware loader for file system

2018-01-15 Thread Chee, Tien Fong
On Mon, 2018-01-15 at 11:36 -0500, Tom Rini wrote:
> On Wed, Dec 27, 2017 at 01:04:38PM +0800, tien.fong.c...@intel.com
> wrote:
> 
> > 
> > From: Tien Fong Chee 
> > 
> > This is file system generic loader which can be used to load
> > the file image from the storage into target such as memory.
> > The consumer driver would then use this loader to program whatever,
> > ie. the FPGA device.
> > 
> > Signed-off-by: Tien Fong Chee 
> Please add Lothar's Reviewed-by for v7.  There's a number of minor
> checkpatch.pl issues that checkpatch.pl can in turn fixup itself,
> please
> correct them.
> 
I have ran the checkpatch.pl on this patch, i didn't see any error.

> [snip]
> > 
> > diff --git a/common/Makefile b/common/Makefile
> > index cec506f..2934221 100644
> > --- a/common/Makefile
> > +++ b/common/Makefile
> > @@ -130,3 +130,4 @@ obj-$(CONFIG_CMD_DFU) += dfu.o
> >  obj-y += command.o
> >  obj-y += s_record.o
> >  obj-y += xyzModem.o
> > +obj-y += fs_loader.o
> This needs a new Kconfig option and not to be enabled globally, only
> when needed.
> 
Okay.
> > 
> > diff --git a/common/fs_loader.c b/common/fs_loader.c
> > new file mode 100644
> > index 000..56d29b6
> > --- /dev/null
> > +++ b/common/fs_loader.c
> > @@ -0,0 +1,309 @@
> > +/*
> > + * Copyright (C) 2017 Intel Corporation 
> > + *
> > + * SPDX-License-Identifier:GPL-2.0
> > + */
> > +
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> This wants  which is not globally available, so you need
> to
> come up with something here.  At least making this Kconfig-enabled
> will
> be a start and perhaps OK for now.
> 
I can enable the Kconfig, and put the caution about dependency on
 in document.
> [snip]
> > 
> > +   if (ret) {
> > +   printf("Error: %d Failed to read %s from flash
> > %lld != %d.\n",
> > +     ret, fw_priv->name, actread, firmware_p-
> > >size);
> The last %d needs to be %zu since it's a size_t, for portability.
> 
> Thanks!
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] UEFI on u-boot

2018-01-15 Thread Heinrich Schuchardt

On 01/16/2018 06:28 AM, Udit Kumar wrote:

Hi Alex,


-Original Message-
From: Alexander Graf [mailto:ag...@suse.de]
Sent: Monday, January 15, 2018 5:02 PM
To: Udit Kumar 
Cc: u-boot@lists.denx.de; Heinrich Schuchardt 
Subject: Re: UEFI on u-boot



On 15.01.18 10:32, Udit Kumar wrote:

Hi Alex


-Original Message-
From: Alexander Graf [mailto:ag...@suse.de]
Sent: Monday, January 15, 2018 2:45 PM
To: Udit Kumar 

Hi Udit,

On 15.01.18 10:09, Udit Kumar wrote:

Hi Alex,
Hope you are doing great,

Could you help on UEFI over the u-boot.
1- I couldn't locate EFI_DXE_SERVICES in u-boot, do you have plan to
add those


Right now the model is that all device drivers are implemented by
U-Boot and that only exposes their interfaces to EFI applications.
Implementing DXE in U-Boot would open quite a big can of worms, as it
would really only be useful in compilation with PI which is a terrible

interface :).


Ok,


2- If I load  a driver (with bootefi) which install few protocols,
is this ok to do with u-boot


It depends on how much the driver does, but in general yes. Heinrich
is currently working on making the iPXE iSCSI driver work, so his EFI
payload would expose an EFI block device to yet another payload running

after his.


Thanks for this,
Heinrich,  in  this driver, are you accessing underneath hardware
register by UEFI-Driver and managing UEFI protocols or you are relying
on some h/w access exposed by u-boot driver




3- if you say, 2 is ok then I hope these protocols are kept in some
data base, and this new protocol can be opened by an application


Yes, the protocol database is now global and persistent across
bootefi invocations.


Thanks


4- if there is some known limitation, like we cannot run DXE_driver
etc


What exactly are you trying to do? With the U-Boot UEFI
implementation we're trying to find a sweet spot between implementing
as much as makes sense, but not the whole UEFI world, as that would
just bloat the code needlessly.


I am trying to add a driver (DXE by definition) which
a) Access the hardware registers. (I said DXE could due to hardware
registers)
b) Update memory map as well (AddMemorySpace call)
c) Finally it export a protocol, which could be used by its test application.

For b) I am not able to find function call,


What exactly beyond efi_allocate_pages() do you need? The EFI memory
map is really only used as data source for EFI applications. The actual 1:1 U-
Boot map is not influenced by it.


I am exploring possibility,  If a driver discover memory  and want to add this 
in system.
For example,  at build time 1Gb is reserved for a given driver but at run-time
driver is told to use little less memory say 512Mb and this driver can return 
back
512Mb to system (In UEFI call is being AddMemorySpace under DXE services)



The UEFI specification defines different memory types which can be used 
when allocating memory. Whether a memory type can be used by an UEFI OS 
loader or an OS determines on the boottime exit event. Many classes of 
memory become generally available after exiting the boottime. This is 
decribed in chapter "7.2 Memory Allocation Services" of UEFI spec 2.7.


Regards

Heinrich

  

For a), if I say driver is UEFI and accessing hardware register, will this be

acceptable ?

Yes, definitely. All you'd need to do is set the efi application type to
application, then register your protocols and access hardware registers using
direct MMIO access to their respective regions.


Thanks
  


Alex


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


Re: [U-Boot] [PATCH v2] armv8: Remove dependency of SERDES for LS CHASIS3

2018-01-15 Thread Sriram Dash
>From: York Sun
>Subject: Re: [PATCH v2] armv8: Remove dependency of SERDES for LS CHASIS3
>
>On 01/10/2018 01:15 AM, Sriram Dash wrote:
>> Remove dependency of SYS_HAS_SERDES for Layerscape Chasis 3.
>>
>> Signed-off-by: Sriram Dash 
>> ---
>> Changes in v2:
>>   - Remove ifdef when including fsl_serdes.h
>>
>>  arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 6 --
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
>> b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
>> index 6c03dfb..0aa0673 100644
>> --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
>> +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
>> @@ -69,6 +69,8 @@ config ARCH_LS1088A
>>  bool
>>  select ARMV8_SET_SMPEN
>>  select FSL_LSCH3
>> +select SYS_FSL_SRDS_1
>> +select SYS_HAS_SERDES
>>  select SYS_FSL_DDR
>>  select SYS_FSL_DDR_LE
>>  select SYS_FSL_DDR_VER_50
>> @@ -102,6 +104,8 @@ config ARCH_LS2080A
>>  select ARM_ERRATA_829520
>>  select ARM_ERRATA_833471
>>  select FSL_LSCH3
>> +select SYS_FSL_SRDS_1
>> +select SYS_HAS_SERDES
>>  select SYS_FSL_DDR
>>  select SYS_FSL_DDR_LE
>>  select SYS_FSL_DDR_VER_50
>> @@ -144,8 +148,6 @@ config FSL_LSCH2
>>
>>  config FSL_LSCH3
>>  bool
>> -select SYS_FSL_SRDS_1
>> -select SYS_HAS_SERDES
>>
>>  config FSL_MC_ENET
>>  bool "Management Complex network"
>>
>
>This patch is simple but your base seems to be different. Please rebase and 
>check
>LSCH2 SoCs.
>

OK. Will rebase to latest Uboot and will include these changes for LSCH2 Socs 
also.

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


[U-Boot] [PATCH v3 1/4] arm: imx: cx9020: remove usage of mx53_dram_size

2018-01-15 Thread linux-kernel-dev
From: Patrick Bruenn 

Static variables are not available during board_init_f().
'static uint32_t mx53_dram_size[2];' was used in board specific
dram_init(), dram_init_banksize() and get_effective_memsize() to avoid
multiple calls to get_ram_size().

However multiple calls are better than undefined behavior...
This fixes:
https://lists.denx.de/pipermail/u-boot/2017-November/313214.html
https://lists.denx.de/pipermail/u-boot/2017-December/314480.html

Signed-off-by: Patrick Bruenn 

---

Changes in v3:
- rebase to v2018.01
- fix the cover-letter to make it more clear that the first patch is
  required to make the cx9020 boot again. All other patches are
  optional.

Changes in v2:
- move dram initialization into common location
- reuse fixed dram initialization for m53evk and mx53loco

 board/beckhoff/mx53cx9020/mx53cx9020.c | 14 +-
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/board/beckhoff/mx53cx9020/mx53cx9020.c 
b/board/beckhoff/mx53cx9020/mx53cx9020.c
index 021bd967c4..d8bdfc27bb 100644
--- a/board/beckhoff/mx53cx9020/mx53cx9020.c
+++ b/board/beckhoff/mx53cx9020/mx53cx9020.c
@@ -59,8 +59,6 @@ static const u32 CCAT_MODE_RUN = 0x0033DC8F;
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static uint32_t mx53_dram_size[2];
-
 phys_size_t get_effective_memsize(void)
 {
/*
@@ -74,15 +72,13 @@ phys_size_t get_effective_memsize(void)
 * U-Boot into invalid memory area close to the end of the first
 * DRAM bank.
 */
-   return mx53_dram_size[0];
+   return get_ram_size((void *)PHYS_SDRAM_1, 1 << 30);
 }
 
 int dram_init(void)
 {
-   mx53_dram_size[0] = get_ram_size((void *)PHYS_SDRAM_1, 1 << 30);
-   mx53_dram_size[1] = get_ram_size((void *)PHYS_SDRAM_2, 1 << 30);
-
-   gd->ram_size = mx53_dram_size[0] + mx53_dram_size[1];
+   gd->ram_size = get_ram_size((void *)PHYS_SDRAM_1, 1 << 30);
+   gd->ram_size += get_ram_size((void *)PHYS_SDRAM_2, 1 << 30);
 
return 0;
 }
@@ -90,10 +86,10 @@ int dram_init(void)
 int dram_init_banksize(void)
 {
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-   gd->bd->bi_dram[0].size = mx53_dram_size[0];
+   gd->bd->bi_dram[0].size = get_ram_size((void *)PHYS_SDRAM_1, 1 << 30);
 
gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
-   gd->bd->bi_dram[1].size = mx53_dram_size[1];
+   gd->bd->bi_dram[1].size = get_ram_size((void *)PHYS_SDRAM_2, 1 << 30);
 
return 0;
 }
-- 
2.11.0


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


[U-Boot] [PATCH v3 3/4] arm: imx: m53evk: remove usage of mx53_dram_size

2018-01-15 Thread linux-kernel-dev
From: Patrick Bruenn 

Static variables are not available during board_init_f().
'static uint32_t mx53_dram_size[2];' was used in board specific
dram_init(), dram_init_banksize() and get_effective_memsize() to avoid
multiple calls to get_ram_size().

Reused dram initialization functions from arch/arm/mach-imx/mx5/mx53_dram.c

Signed-off-by: Patrick Bruenn 

---

Changes in v3: None
Changes in v2: None


Only compile tested with make m53evk_defconfig

---
 arch/arm/mach-imx/mx5/Makefile |  1 +
 board/aries/m53evk/m53evk.c| 39 ---
 2 files changed, 1 insertion(+), 39 deletions(-)

diff --git a/arch/arm/mach-imx/mx5/Makefile b/arch/arm/mach-imx/mx5/Makefile
index 368cfde98b..2cc2cbc07a 100644
--- a/arch/arm/mach-imx/mx5/Makefile
+++ b/arch/arm/mach-imx/mx5/Makefile
@@ -11,4 +11,5 @@ obj-y := soc.o clock.o
 obj-y += lowlevel_init.o
 
 # common files for mx53 dram initialization
+obj-$(CONFIG_TARGET_M53EVK) += mx53_dram.o
 obj-$(CONFIG_TARGET_MX53CX9020) += mx53_dram.o
diff --git a/board/aries/m53evk/m53evk.c b/board/aries/m53evk/m53evk.c
index ece8957aaf..a798d83376 100644
--- a/board/aries/m53evk/m53evk.c
+++ b/board/aries/m53evk/m53evk.c
@@ -31,45 +31,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static uint32_t mx53_dram_size[2];
-
-phys_size_t get_effective_memsize(void)
-{
-   /*
-* WARNING: We must override get_effective_memsize() function here
-* to report only the size of the first DRAM bank. This is to make
-* U-Boot relocator place U-Boot into valid memory, that is, at the
-* end of the first DRAM bank. If we did not override this function
-* like so, U-Boot would be placed at the address of the first DRAM
-* bank + total DRAM size - sizeof(uboot), which in the setup where
-* each DRAM bank contains 512MiB of DRAM would result in placing
-* U-Boot into invalid memory area close to the end of the first
-* DRAM bank.
-*/
-   return mx53_dram_size[0];
-}
-
-int dram_init(void)
-{
-   mx53_dram_size[0] = get_ram_size((void *)PHYS_SDRAM_1, 1 << 30);
-   mx53_dram_size[1] = get_ram_size((void *)PHYS_SDRAM_2, 1 << 30);
-
-   gd->ram_size = mx53_dram_size[0] + mx53_dram_size[1];
-
-   return 0;
-}
-
-int dram_init_banksize(void)
-{
-   gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-   gd->bd->bi_dram[0].size = mx53_dram_size[0];
-
-   gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
-   gd->bd->bi_dram[1].size = mx53_dram_size[1];
-
-   return 0;
-}
-
 static void setup_iomux_uart(void)
 {
static const iomux_v3_cfg_t uart_pads[] = {
-- 
2.11.0


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


[U-Boot] [PATCH v3 2/4] arm: imx: cx9020: move dram init into common place

2018-01-15 Thread linux-kernel-dev
From: Patrick Bruenn 

Move dram_init(), dram_init_banksize() and get_effective_memsize() to
arch/arm/mach-imx/mx5/mx53_dram.c, where it can be reused by m53evk and
mx53loco.

Signed-off-by: Patrick Bruenn 

---

Changes in v3: None
Changes in v2: None

Patch-Cc:  Fabio Estevam 
Patch-Cc:  Christian Gmeiner 
Patch-Cc:  Jason Liu 
Patch-Cc:  Patrick Bruenn 
Patch-Cc:  Stefano Babic 
Patch-Cc:  u-boot@lists.denx.de
Patch-Cc:  Marek Vasut 
Patch-Cc:  Albert Aribaud 

---
 arch/arm/mach-imx/mx5/Makefile |  3 +++
 arch/arm/mach-imx/mx5/mx53_dram.c  | 45 ++
 board/beckhoff/mx53cx9020/mx53cx9020.c | 35 --
 3 files changed, 48 insertions(+), 35 deletions(-)
 create mode 100644 arch/arm/mach-imx/mx5/mx53_dram.c

diff --git a/arch/arm/mach-imx/mx5/Makefile b/arch/arm/mach-imx/mx5/Makefile
index d021842f68..368cfde98b 100644
--- a/arch/arm/mach-imx/mx5/Makefile
+++ b/arch/arm/mach-imx/mx5/Makefile
@@ -9,3 +9,6 @@
 
 obj-y := soc.o clock.o
 obj-y += lowlevel_init.o
+
+# common files for mx53 dram initialization
+obj-$(CONFIG_TARGET_MX53CX9020) += mx53_dram.o
diff --git a/arch/arm/mach-imx/mx5/mx53_dram.c 
b/arch/arm/mach-imx/mx5/mx53_dram.c
new file mode 100644
index 00..7e5fc42d1f
--- /dev/null
+++ b/arch/arm/mach-imx/mx5/mx53_dram.c
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2017  Beckhoff Automation GmbH & Co. KG
+ * Patrick Bruenn 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+phys_size_t get_effective_memsize(void)
+{
+   /*
+* WARNING: We must override get_effective_memsize() function here
+* to report only the size of the first DRAM bank. This is to make
+* U-Boot relocator place U-Boot into valid memory, that is, at the
+* end of the first DRAM bank. If we did not override this function
+* like so, U-Boot would be placed at the address of the first DRAM
+* bank + total DRAM size - sizeof(uboot), which in the setup where
+* each DRAM bank contains 512MiB of DRAM would result in placing
+* U-Boot into invalid memory area close to the end of the first
+* DRAM bank.
+*/
+   return get_ram_size((void *)PHYS_SDRAM_1, 1 << 30);
+}
+
+int dram_init(void)
+{
+   gd->ram_size = get_ram_size((void *)PHYS_SDRAM_1, 1 << 30);
+   gd->ram_size += get_ram_size((void *)PHYS_SDRAM_2, 1 << 30);
+
+   return 0;
+}
+
+int dram_init_banksize(void)
+{
+   gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+   gd->bd->bi_dram[0].size = get_ram_size((void *)PHYS_SDRAM_1, 1 << 30);
+
+   gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
+   gd->bd->bi_dram[1].size = get_ram_size((void *)PHYS_SDRAM_2, 1 << 30);
+
+   return 0;
+}
diff --git a/board/beckhoff/mx53cx9020/mx53cx9020.c 
b/board/beckhoff/mx53cx9020/mx53cx9020.c
index d8bdfc27bb..f9df3604cd 100644
--- a/board/beckhoff/mx53cx9020/mx53cx9020.c
+++ b/board/beckhoff/mx53cx9020/mx53cx9020.c
@@ -59,41 +59,6 @@ static const u32 CCAT_MODE_RUN = 0x0033DC8F;
 
 DECLARE_GLOBAL_DATA_PTR;
 
-phys_size_t get_effective_memsize(void)
-{
-   /*
-* WARNING: We must override get_effective_memsize() function here
-* to report only the size of the first DRAM bank. This is to make
-* U-Boot relocator place U-Boot into valid memory, that is, at the
-* end of the first DRAM bank. If we did not override this function
-* like so, U-Boot would be placed at the address of the first DRAM
-* bank + total DRAM size - sizeof(uboot), which in the setup where
-* each DRAM bank contains 512MiB of DRAM would result in placing
-* U-Boot into invalid memory area close to the end of the first
-* DRAM bank.
-*/
-   return get_ram_size((void *)PHYS_SDRAM_1, 1 << 30);
-}
-
-int dram_init(void)
-{
-   gd->ram_size = get_ram_size((void *)PHYS_SDRAM_1, 1 << 30);
-   gd->ram_size += get_ram_size((void *)PHYS_SDRAM_2, 1 << 30);
-
-   return 0;
-}
-
-int dram_init_banksize(void)
-{
-   gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-   gd->bd->bi_dram[0].size = get_ram_size((void *)PHYS_SDRAM_1, 1 << 30);
-
-   gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
-   gd->bd->bi_dram[1].size = get_ram_size((void *)PHYS_SDRAM_2, 1 << 30);
-
-   return 0;
-}
-
 u32 get_board_rev(void)
 {
struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
-- 
2.11.0


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


[U-Boot] [PATCH v3 4/4] arm: imx: mx53loco: remove usage of mx53_dram_size

2018-01-15 Thread linux-kernel-dev
From: Patrick Bruenn 

Static variables are not available during board_init_f().
'static uint32_t mx53_dram_size[2];' was used in board specific
dram_init(), dram_init_banksize() and get_effective_memsize() to avoid
multiple calls to get_ram_size().

Reused dram initialization functions from arch/arm/mach-imx/mx5/mx53_dram.c

Signed-off-by: Patrick Bruenn 

---

Changes in v3: None
Changes in v2: None


Only compile tested with make mx53loco_defconfig

---
 arch/arm/mach-imx/mx5/Makefile  |  1 +
 board/freescale/mx53loco/mx53loco.c | 39 -
 2 files changed, 1 insertion(+), 39 deletions(-)

diff --git a/arch/arm/mach-imx/mx5/Makefile b/arch/arm/mach-imx/mx5/Makefile
index 2cc2cbc07a..4e305e92cf 100644
--- a/arch/arm/mach-imx/mx5/Makefile
+++ b/arch/arm/mach-imx/mx5/Makefile
@@ -13,3 +13,4 @@ obj-y += lowlevel_init.o
 # common files for mx53 dram initialization
 obj-$(CONFIG_TARGET_M53EVK) += mx53_dram.o
 obj-$(CONFIG_TARGET_MX53CX9020) += mx53_dram.o
+obj-$(CONFIG_TARGET_MX53LOCO)   += mx53_dram.o
diff --git a/board/freescale/mx53loco/mx53loco.c 
b/board/freescale/mx53loco/mx53loco.c
index db0e2fbdd6..0beecf3459 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -31,45 +31,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static uint32_t mx53_dram_size[2];
-
-phys_size_t get_effective_memsize(void)
-{
-   /*
-* WARNING: We must override get_effective_memsize() function here
-* to report only the size of the first DRAM bank. This is to make
-* U-Boot relocator place U-Boot into valid memory, that is, at the
-* end of the first DRAM bank. If we did not override this function
-* like so, U-Boot would be placed at the address of the first DRAM
-* bank + total DRAM size - sizeof(uboot), which in the setup where
-* each DRAM bank contains 512MiB of DRAM would result in placing
-* U-Boot into invalid memory area close to the end of the first
-* DRAM bank.
-*/
-   return mx53_dram_size[0];
-}
-
-int dram_init(void)
-{
-   mx53_dram_size[0] = get_ram_size((void *)PHYS_SDRAM_1, 1 << 30);
-   mx53_dram_size[1] = get_ram_size((void *)PHYS_SDRAM_2, 1 << 30);
-
-   gd->ram_size = mx53_dram_size[0] + mx53_dram_size[1];
-
-   return 0;
-}
-
-int dram_init_banksize(void)
-{
-   gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-   gd->bd->bi_dram[0].size = mx53_dram_size[0];
-
-   gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
-   gd->bd->bi_dram[1].size = mx53_dram_size[1];
-
-   return 0;
-}
-
 u32 get_board_rev(void)
 {
struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
-- 
2.11.0


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


[U-Boot] [PATCH v3 0/4] arm: imx53: remove usage of mx53_dram_size

2018-01-15 Thread linux-kernel-dev
From: Patrick Bruenn 

Global variables are not available during board_init_f().
The i.MX53 boards m53evk, mx53cx9020 and mx53loco are using the exact
same dram initialization code, which uses
'static uint32_t mx53_dram_size[2];' in dram_init(),
dram_init_banksize() and get_effective_memsize() to avoid multiple
calls to get_ram_size().

This series replaces the static variable with multiple calls to
get_ram_size() and moves the shared code into arch/arm/mach-imx/mx5/.

The first patch is required to let cx9020 boot again. Please include at
least this one. Without that patch u-boot on cx9020 is broken.

The second patch moves that code to a common place to be reused by
m53evk and mx53loco. Pick it only if you think this change is useful for
one of these boards and you are willing to include the third and/or last
patch.
Pick the third patch if you want to use the changed code for m53evk.
Pick the last patch if you want to use the changed code for mx53loco.


Changes in v3:
- rebase to v2018.01
- fix the cover-letter to make it more clear that the first patch is
  required to make the cx9020 boot again. All other patches are
  optional.

Changes in v2:
- move dram initialization into common location
- reuse fixed dram initialization for m53evk and mx53loco

Patrick Bruenn (4):
  arm: imx: cx9020: remove usage of mx53_dram_size
  arm: imx: cx9020: move dram init into common place
  arm: imx: m53evk: remove usage of mx53_dram_size
  arm: imx: mx53loco: remove usage of mx53_dram_size

 arch/arm/mach-imx/mx5/Makefile |  5 
 arch/arm/mach-imx/mx5/mx53_dram.c  | 45 ++
 board/aries/m53evk/m53evk.c| 39 -
 board/beckhoff/mx53cx9020/mx53cx9020.c | 39 -
 board/freescale/mx53loco/mx53loco.c| 39 -
 5 files changed, 50 insertions(+), 117 deletions(-)
 create mode 100644 arch/arm/mach-imx/mx5/mx53_dram.c

-- 
2.11.0


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


Re: [U-Boot] [U-Boot, v2, 01/12] riscv: cpu: Add nx25 to support RISC-V

2018-01-15 Thread 陳建志
 Actually I have checked with checkpatch.pl and cleaned most before
sending patchs.
But it seem still left some, I will keep fixing them.

Thanks for Tom and Wolfgang's help.

Rick

2018-01-15 21:52 GMT+08:00 Tom Rini :
> On Tue, Dec 26, 2017 at 01:55:48PM +0800, Andes wrote:
>
>> From: Rick Chen 
>>
>> Add Andes nx25 cpu core (called AndesStar V5) to support RISC-V arch
>>
>> Verifications:
>> 1. startup and relocation ok.
>> 2. boot from rom or ram both ok.
>> 2. timer driver ok.
>> 3. uart driver ok
>> 4. mmc driver ok
>> 5. spi driver ok.
>> 6. 32/64 bit both ok.
>>
>> Detail verification message please see doc/README.ae250.
>>
>> Signed-off-by: Rick Chen 
>> Signed-off-by: Rick Chen 
>> Signed-off-by: Greentime Hu 
>> Cc: Padmarao Begari 
>
> Applied to u-boot/master.
>
> But that said, the whole of arch/riscv/ and board/AndesTech/nx25-ae250/
> introduces some checkpatch.pl issues, please investigate and fix
> appropriate ones, thanks!
>
> --
> Tom
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 2/2] armv8: ls1088ardb: Add environment variable address location for QSPI-NOR

2018-01-15 Thread Ashish Kumar


> -Original Message-
> From: York Sun
> Sent: Monday, January 15, 2018 11:36 PM
> To: Ashish Kumar ; u-boot@lists.denx.de
> Subject: Re: [PATCH v2 2/2] armv8: ls1088ardb: Add environment variable
> address location for QSPI-NOR
> 
> On 12/14/2017 04:06 AM, Ashish Kumar wrote:
> > Signed-off-by: Ashish Kumar 
> > ---
> >  include/configs/ls1088a_common.h | 6 ++
> >  include/configs/ls1088aqds.h | 1 -
> >  include/configs/ls1088ardb.h | 2 +-
> >  3 files changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/configs/ls1088a_common.h
> > b/include/configs/ls1088a_common.h
> > index b99257e..c96d48d 100644
> > --- a/include/configs/ls1088a_common.h
> > +++ b/include/configs/ls1088a_common.h
> > @@ -32,6 +32,12 @@
> >
> >  #define CONFIG_SUPPORT_RAW_INITRD
> >
> > +#ifdef CONFIG_QSPI_BOOT
> > +#define CONFIG_SYS_FSL_QSPI_BASE   0x2000
> > +#define CONFIG_ENV_OFFSET  0x30/* 3MB */
> > +#define CONFIG_ENV_ADDR(CONFIG_SYS_FSL_QSPI_BASE
> + \
> > +   CONFIG_ENV_OFFSET)
> > +#endif
> >
> >  #define CONFIG_SKIP_LOWLEVEL_INIT
> >
> > diff --git a/include/configs/ls1088aqds.h
> > b/include/configs/ls1088aqds.h index e97091d..6b94667 100644
> > --- a/include/configs/ls1088aqds.h
> > +++ b/include/configs/ls1088aqds.h
> > @@ -21,7 +21,6 @@ unsigned long get_board_ddr_clk(void);
> >
> >  #if defined(CONFIG_QSPI_BOOT)
> >  #define CONFIG_ENV_SIZE0x2000  /* 8KB */
> > -#define CONFIG_ENV_OFFSET  0x30/* 3MB */
> >  #define CONFIG_ENV_SECT_SIZE   0x4
> >  #elif defined(CONFIG_SD_BOOT)
> >  #define CONFIG_ENV_OFFSET  (3 * 1024 * 1024)
> > diff --git a/include/configs/ls1088ardb.h
> > b/include/configs/ls1088ardb.h index 1da8153..bffaa76 100644
> > --- a/include/configs/ls1088ardb.h
> > +++ b/include/configs/ls1088ardb.h
> > @@ -12,8 +12,8 @@
> >  #define CONFIG_DISPLAY_BOARDINFO_LATE
> >
> >  #if defined(CONFIG_QSPI_BOOT)
> > +#define CONFIG_SYS_FSL_QSPI_BASE   0x2000
> 
> Looks like you are redefining this macro. Will remove when I merge it.
Yes. Thanks York.
> 
> York
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 1/3] power: regulator: s2mps11: add a regulator driver for s2mps11

2018-01-15 Thread Jaehoon Chung
exynos5422 has the s2mps11 PMIC.
s2mps11 pmic has the 10-BUCK and 38-LDO regulators.
Each IP and devices in exynos5422 can be controlled by each regulators.
This patch is support for s2mps11 regulator driver.

Signed-off-by: Jaehoon Chung 
---
 drivers/power/regulator/Kconfig |   8 +
 drivers/power/regulator/Makefile|   1 +
 drivers/power/regulator/s2mps11_regulator.c | 597 
 include/power/s2mps11.h |  55 +++
 4 files changed, 661 insertions(+)
 create mode 100644 drivers/power/regulator/s2mps11_regulator.c

diff --git a/drivers/power/regulator/Kconfig b/drivers/power/regulator/Kconfig
index 26fb9368ea..5b4ac10462 100644
--- a/drivers/power/regulator/Kconfig
+++ b/drivers/power/regulator/Kconfig
@@ -101,6 +101,14 @@ config REGULATOR_RK8XX
by the PMIC device. This driver is controlled by a device tree node
which includes voltage limits.
 
+config DM_REGULATOR_S2MPS11
+   bool "Enable driver for S2MPS11 regulator"
+   depends on DM_REGULATOR && PMIC_S2MPS11
+   ---help---
+   This enables implementation of driver-model regulator uclass
+   features for REGULATOR S2MPS11.
+   The driver implements get/set api for: value and enable.
+
 config REGULATOR_S5M8767
bool "Enable support for S5M8767 regulator"
depends on DM_REGULATOR && PMIC_S5M8767
diff --git a/drivers/power/regulator/Makefile b/drivers/power/regulator/Makefile
index 7a2e76dc82..728e8144de 100644
--- a/drivers/power/regulator/Makefile
+++ b/drivers/power/regulator/Makefile
@@ -14,6 +14,7 @@ obj-$(CONFIG_REGULATOR_PWM) += pwm_regulator.o
 obj-$(CONFIG_$(SPL_)DM_REGULATOR_FIXED) += fixed.o
 obj-$(CONFIG_$(SPL_)DM_REGULATOR_GPIO) += gpio-regulator.o
 obj-$(CONFIG_REGULATOR_RK8XX) += rk8xx.o
+obj-$(CONFIG_DM_REGULATOR_S2MPS11) += s2mps11_regulator.o
 obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o
 obj-$(CONFIG_DM_REGULATOR_SANDBOX) += sandbox.o
 obj-$(CONFIG_REGULATOR_TPS65090) += tps65090_regulator.o
diff --git a/drivers/power/regulator/s2mps11_regulator.c 
b/drivers/power/regulator/s2mps11_regulator.c
new file mode 100644
index 00..3af20e60dd
--- /dev/null
+++ b/drivers/power/regulator/s2mps11_regulator.c
@@ -0,0 +1,597 @@
+/*
+ *  Copyright (C) 2018 Samsung Electronics
+ *  Jaehoon Chung 
+ *
+ * SPDX-License-Identifier:GPL-2.0
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define MODE(_id, _val, _name) { \
+   .id = _id, \
+   .register_value = _val, \
+   .name = _name, \
+}
+
+/* BUCK : 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 */
+static struct dm_regulator_mode s2mps11_buck_modes[] = {
+   MODE(OP_OFF, S2MPS11_BUCK_MODE_OFF, "OFF"),
+   MODE(OP_STANDBY, S2MPS11_BUCK_MODE_STANDBY, "ON/OFF"),
+   MODE(OP_ON, S2MPS11_BUCK_MODE_STANDBY, "ON"),
+};
+
+static struct dm_regulator_mode s2mps11_ldo_modes[] = {
+   MODE(OP_OFF, S2MPS11_LDO_MODE_OFF, "OFF"),
+   MODE(OP_STANDBY, S2MPS11_LDO_MODE_STANDBY, "ON/OFF"),
+   MODE(OP_STANDBY_LPM, S2MPS11_LDO_MODE_STANDBY_LPM, "ON/LPM"),
+   MODE(OP_ON, S2MPS11_LDO_MODE_ON, "ON"),
+};
+
+static const char s2mps11_buck_ctrl[] = {
+   0xff, 0x25, 0x27, 0x29, 0x2b, 0x2d, 0x33, 0x35, 0x37, 0x39, 0x3b
+};
+
+static const char s2mps11_buck_out[] = {
+   0xff, 0x26, 0x28, 0x2a, 0x2c, 0x2f, 0x34, 0x36, 0x38, 0x3a, 0x3c
+};
+
+static int s2mps11_buck_hex2volt(int buck, int hex)
+{
+   unsigned int uV = 0;
+
+   if (hex < 0)
+   goto bad;
+
+   switch (buck) {
+   case 7:
+   case 8:
+   case 10:
+   if (hex > S2MPS11_BUCK7_8_10_VOLT_MAX_HEX)
+   goto bad;
+
+   uV = hex * S2MPS11_BUCK_HSTEP + S2MPS11_BUCK_UV_HMIN;
+   break;
+   case 9:
+   if (hex > S2MPS11_BUCK9_VOLT_MAX_HEX)
+   goto bad;
+   uV = hex * S2MPS11_BUCK9_STEP * 2 + S2MPS11_BUCK9_UV_MIN;
+   break;
+   default:
+   if (buck == 5 && hex > S2MPS11_BUCK5_VOLT_MAX_HEX)
+   goto bad;
+   else if (buck != 5 && hex > S2MPS11_BUCK_VOLT_MAX_HEX)
+   goto bad;
+
+   uV = hex * S2MPS11_BUCK_LSTEP + S2MPS11_BUCK_UV_MIN;
+   break;
+   }
+
+   return uV;
+bad:
+   pr_err("Value: %#x is wrong for BUCK%d", hex, buck);
+   return -EINVAL;
+}
+
+static int s2mps11_buck_volt2hex(int buck, int uV)
+{
+   int hex;
+
+   switch (buck) {
+   case 7:
+   case 8:
+   case 10:
+   hex = (uV - S2MPS11_BUCK_UV_HMIN) / S2MPS11_BUCK_HSTEP;
+   if (hex > S2MPS11_BUCK7_8_10_VOLT_MAX_HEX)
+   goto bad;
+
+   break;
+   case 9:
+   hex = (uV - S2MPS11_BUCK9_UV_MIN) / S2MPS11_BUCK9_STEP;
+   if (hex > S2MPS11_BUCK9_VOLT_MAX_HEX)
+

[U-Boot] [PATCH 3/3] configs: odroid-xu3: enable the configs relevant to regulator

2018-01-15 Thread Jaehoon Chung
Enable the CONFIG_CMD_REGULATOR and CONFIG_DM_REGULATOR_S2MPS11.

Signed-off-by: Jaehoon Chung 
---
 configs/odroid-xu3_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig
index 976c06a29d..11b1c8bf11 100644
--- a/configs/odroid-xu3_defconfig
+++ b/configs/odroid-xu3_defconfig
@@ -22,6 +22,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_TIME=y
 CONFIG_CMD_PMIC=y
 CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_REGULATOR=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_ADC=y
 CONFIG_ADC_EXYNOS=y
@@ -35,6 +36,7 @@ CONFIG_SMC911X_BASE=0x500
 CONFIG_DM_PMIC=y
 CONFIG_PMIC_S2MPS11=y
 CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_S2MPS11=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
-- 
2.15.1

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


[U-Boot] [PATCH 0/3] power: s2mps11: Support the DM regulator

2018-01-15 Thread Jaehoon Chung
S2MPS11 has the 10-bucks and 38-ldos regulators.
To control the each power, add the s2mps11 regulator driver.
Tested with Odroid-xu3 board (Exynos5422)

ODROID-XU3 # regulator list
| Device  | regulator-name  | Parent
| LDO1| vdd_ldo1| s2mps11_pmic@66
| LDO3| vddq_mmc0   | s2mps11_pmic@66
| LDO4| vdd_adc | s2mps11_pmic@66
| LDO5| vdd_ldo5| s2mps11_pmic@66
| LDO6| vdd_ldo6| s2mps11_pmic@66
| LDO7| vdd_ldo7| s2mps11_pmic@66
| LDO8| vdd_ldo8| s2mps11_pmic@66
| LDO9| vdd_ldo9| s2mps11_pmic@66
| LDO10   | vdd_ldo10   | s2mps11_pmic@66
| LDO11   | vdd_ldo11   | s2mps11_pmic@66
| LDO12   | vdd_ldo12   | s2mps11_pmic@66
| LDO13   | vddq_mmc2   | s2mps11_pmic@66
| LDO15   | vdd_ldo15   | s2mps11_pmic@66
| LDO16   | vdd_ldo16   | s2mps11_pmic@66
| LDO17   | vdd_ldo17   | s2mps11_pmic@66
| LDO18   | vdd_emmc_1V8| s2mps11_pmic@66
| LDO19   | vdd_sd  | s2mps11_pmic@66
| LDO24   | tsp_io  | s2mps11_pmic@66
| LDO26   | vdd_ldo26   | s2mps11_pmic@66
| BUCK1   | vdd_mif | s2mps11_pmic@66
| BUCK2   | vdd_arm | s2mps11_pmic@66
| BUCK3   | vdd_int | s2mps11_pmic@66
| BUCK4   | vdd_g3d | s2mps11_pmic@66
| BUCK5   | vdd_mem | s2mps11_pmic@66
| BUCK6   | vdd_kfc | s2mps11_pmic@66
| BUCK7   | vdd_1.0v_ldo| s2mps11_pmic@66
| BUCK8   | vdd_1.8v_ldo| s2mps11_pmic@66
| BUCK9   | vdd_2.8v_ldo| s2mps11_pmic@66
| BUCK10  | vdd_vmem| s2mps11_pmic@66

ODROID-XU3 # regulator status
Name EnableduV mA Mode
vdd_ldo1 enabled   100  - ON
vddq_mmc0enabled   180  - ON
vdd_adc  enabled   180  - ON
vdd_ldo5 enabled   180  - ON
vdd_ldo6 enabled   100  - ON
vdd_ldo7 enabled   180  - ON
vdd_ldo8 enabled   180  - ON
vdd_ldo9 enabled   330  - ON
vdd_ldo10enabled   180  - ON
vdd_ldo11enabled   100  - ON
vdd_ldo12enabled   180  - ON
vddq_mmc2enabled   330  - ON
vdd_ldo15enabled   330  - ON
vdd_ldo16disabled  220  - OFF
vdd_ldo17enabled   330  - ON
vdd_emmc_1V8 disabled  180  - OFF
vdd_sd   enabled   330  - ON
tsp_io   disabled  280  - OFF
vdd_ldo26enabled   300  - ON
vdd_mif  enabled   110  - ON
vdd_arm  enabled   100  - ON
vdd_int  enabled   100  - ON
vdd_g3d  enabled   100  - ON
vdd_mem  enabled   120  - ON
vdd_kfc  enabled   1025000  - ON
vdd_1.0v_ldo enabled   135  - ON
vdd_1.8v_ldo enabled   200  - ON
vdd_2.8v_ldo enabled   220  - ON
vdd_vmem disabled  285  - OFF

Jaehoon Chung (3):
  power: regulator: s2mps11: add a regulator driver for s2mps11
  power: pmic: s2mps11: probe the regulator driver
  configs: odroid-xu3: enable the configs relevant to regulator

 configs/odroid-xu3_defconfig|   2 +
 drivers/power/pmic/s2mps11.c|  28 ++
 drivers/power/regulator/Kconfig |   8 +
 drivers/power/regulator/Makefile|   1 +
 drivers/power/regulator/s2mps11_regulator.c | 597 
 include/power/s2mps11.h |  55 +++
 6 files changed, 691 insertions(+)
 create mode 100644 drivers/power/regulator/s2mps11_regulator.c

-- 
2.15.1

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


[U-Boot] [PATCH 2/3] power: pmic: s2mps11: probe the regulator driver

2018-01-15 Thread Jaehoon Chung
Add the probe function to support the s2mps11 regulator driver.

Signed-off-by: Jaehoon Chung 
---
 drivers/power/pmic/s2mps11.c | 28 
 1 file changed, 28 insertions(+)

diff --git a/drivers/power/pmic/s2mps11.c b/drivers/power/pmic/s2mps11.c
index 522105e5ff..3f9525b67d 100644
--- a/drivers/power/pmic/s2mps11.c
+++ b/drivers/power/pmic/s2mps11.c
@@ -15,6 +15,12 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+static const struct pmic_child_info pmic_children_info[] = {
+   { .prefix = S2MPS11_OF_LDO_PREFIX, .driver = S2MPS11_LDO_DRIVER },
+   { .prefix = S2MPS11_OF_BUCK_PREFIX, .driver = S2MPS11_BUCK_DRIVER },
+   { },
+};
+
 static int s2mps11_reg_count(struct udevice *dev)
 {
return S2MPS11_REG_COUNT;
@@ -43,6 +49,27 @@ static int s2mps11_read(struct udevice *dev, uint reg, 
uint8_t *buff, int len)
return ret;
 }
 
+static int s2mps11_probe(struct udevice *dev)
+{
+   ofnode regulators_node;
+   int children;
+
+   regulators_node = dev_read_subnode(dev, "voltage-regulators");
+   if (!ofnode_valid(regulators_node)) {
+   debug("%s: %s regulators subnode not found!", __func__,
+dev->name);
+   return -ENXIO;
+   }
+
+   debug("%s: '%s' - found regulators subnode\n", __func__, dev->name);
+
+   children = pmic_bind_children(dev, regulators_node, pmic_children_info);
+   if (!children)
+   debug("%s: %s - no child found\n", __func__, dev->name);
+
+   return 0;
+}
+
 static struct dm_pmic_ops s2mps11_ops = {
.reg_count = s2mps11_reg_count,
.read = s2mps11_read,
@@ -59,4 +86,5 @@ U_BOOT_DRIVER(pmic_s2mps11) = {
.id = UCLASS_PMIC,
.of_match = s2mps11_ids,
.ops = _ops,
+   .probe = s2mps11_probe,
 };
-- 
2.15.1

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


Re: [U-Boot] checkpatch.pl checking

2018-01-15 Thread Heiko Schocher

Hello Tom,

Am 15.01.2018 um 22:50 schrieb Tom Rini:

Hey all,

As came up in another thread, yes, we do care about what checkpatch.pl
says.  I've been lax about it as I'd not seen a good way ot integrate it
when I looked last.  Turns out it's easier to integrate now with the
--git arg, so I've got that in my scripts now.  Since it would be unfair
to reject PRs due to checkpatch.pl issues today, I'm not rejecting, I'm
just pointing out the problems it sees.  And there will be false
positives as sometimes it's fine to go more than 80 chars wide for
example (dts files, pinmux stuff).  But in general, it shouldn't be
complaining, so please take a look.  Thanks all!


I check my patches in my patchwork todo list automatically with tbot
in my weekly automated U-Boot mainline tests. For each patch checkpatch.pl
script is called (but tbot does not fail, if errors found, but you
can configure tbot to stop on checkpatch failures ...)

Last test from this night (for example for the corvus board):

http://xeidos.ddns.net/tests/test_db_auslesen.php

And as a good example, there are 2 checkpatch failures for patches
on my ToDo list!

http://xeidos.ddns.net/tbot/id_590/tbot.txt

search for "wget http://patchwork; and you can see the wget command
for each patch in my patchworktodo list, and the following checkpatch
call (and the following git am ...)

The test fails, as the last patch does not apply to u-boot mainline,
and this is an error which tbot stops ... just restarted this test
after I reviewed the 2 patches, set them to patchwork state
"changes requested", so they are not visible in the next test.

I only have to look on tuesday morning, if my results webpage
has only new green lines ... if not I have to look deeper.

If all is green, I scan for checkpatch errors in the log and decide
if I want to accept this errors/warnings (or not), than I review
the patch ...

Also, I can be sure, U-Boot code compiles clean with this patches, and
do not break my boards (do some cmdline tests, also call u-boots test/py
framework) ... so I can concentrate on review tasks ...

After all is fine, I send the tree to my github account, and trigger
with this a travis build ... and if there all is clean, you get a pull
request ... the boring tasks are automated, only reviewing is human
work :-D

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] ubi: Fix filesystem corruption on detach when fastmap enabled

2018-01-15 Thread Heiko Schocher

Hello Martin,

added Richard to cc

Am 15.01.2018 um 13:13 schrieb Martin Townsend:

Hi Heiko,


On Mon, Jan 15, 2018 at 11:30 AM, Heiko Schocher  wrote:

Hello Martin,


Am 12.01.2018 um 20:03 schrieb Martin Townsend:


 From d35b7ea298fbd6c9d08b1b7132d43b9289d2b914 Mon Sep 17 00:00:00 2001


From: Martin Townsend 
Date: Fri, 12 Jan 2018 18:59:23 +
Subject: [PATCH] ubi: Fix filesystem corruption on detach when fastmap
enabled
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

When detaching using "ubi detach" it calls ubi_detach_mtd_dev which
calls ubi_update_fastmap twice when fastmap is enabled.  The second
invocation was corrupting the ubifs as it was called after uif_close.
Moved all calls to ubi_wl_close before uif_close.

Signed-off-by: Martin Townsend 
---
   drivers/mtd/ubi/build.c | 4 ++--
   1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index baf4e2d..795ea34 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -1082,9 +1082,9 @@ out_debugfs:
   out_uif:
get_device(>dev);
ubi_assert(ref);
+ ubi_wl_close(ubi);
uif_close(ubi);
   out_detach:
- ubi_wl_close(ubi);
ubi_free_internal_volumes(ubi);
vfree(ubi->vtbl);
   out_free:
@@ -1161,9 +1161,9 @@ int ubi_detach_mtd_dev(int ubi_num, int anyway)
get_device(>dev);

ubi_debugfs_exit_dev(ubi);
+ ubi_wl_close(ubi);
uif_close(ubi);

- ubi_wl_close(ubi);
ubi_free_internal_volumes(ubi);
vfree(ubi->vtbl);
put_mtd_device(ubi->mtd);



Could you please try the following patch:

diff --git a/drivers/mtd/ubi/fastmap-wl.c b/drivers/mtd/ubi/fastmap-wl.c
index a33d4063e0..2923d21836 100644
--- a/drivers/mtd/ubi/fastmap-wl.c
+++ b/drivers/mtd/ubi/fastmap-wl.c
@@ -339,8 +339,6 @@ static void ubi_fastmap_close(struct ubi_device *ubi)

  #ifndef __UBOOT__
 flush_work(>fm_work);
-#else
-   update_fastmap_work_fn(ubi);
  #endif
 return_unused_pool_pebs(ubi, >fm_pool);
 return_unused_pool_pebs(ubi, >fm_wl_pool);

Your problem is (I think) because U-Boot Code accidentially calls
update_fastmap_work_fn(ubi), but we do not need it here anymore, as
U-Boot does all UBI work immediately.

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


That was my original fix so can confirm this also works.


Ok, great.


My reasoning for opting for the reordering was: I think the problem is
uif_close frees up some UBI data structures so we have to ensure no
updating of the filesystem occurs after this. What if
ubi_fastmap_close or ubi_wl_close change in future and these changes
result in updates to the filesystem, the same problem will occur and
for our board it corrupts the UBIFS. So I opted to change the order in
build.c.


Hmm... may Richard can comment here, because your change changes
code from linux, so if there is a potentiall problem, we should fix it
also in linux (or may this is fixed in mainline linux already?)

BTW: your patch has checkpatch problems, see my weekly tbot tests:

http://xeidos.ddns.net/tbot/id_590/tbot.txt
search for "2018-01-16 02:42" to see the wget command to get your patch
 from patchwork
search for "2018-01-16 02:42:19" to see the checkpatch cmd output


WARNING: Possible unwrapped commit description (prefer a maximum 75 
chars per line)
#19:
Subject: [PATCH] ubi: Fix filesystem corruption on detach when fastmap enabled

WARNING: please, no spaces at the start of a line
#42: FILE: drivers/mtd/ubi/build.c:1085:
+ ubi_wl_close(ubi);$

WARNING: please, no spaces at the start of a line
#53: FILE: drivers/mtd/ubi/build.c:1164:
+ ubi_wl_close(ubi);$

Please fix this also in a v2, thanks!

Huch, and search for "2018-01-16 02:42" ... your patch does not apply
to mainline U-Boot:

2018-01-16 02:42:20,650:CON:tbotlib   # tb_ctrl: Applying: ubi: Fix filesystem corruption on 
detach when fastmap enabled

Using index info to reconstruct a base tree...
error: patch failed: drivers/mtd/ubi/build.c:1082
error: drivers/mtd/ubi/build.c: patch does not apply
error: Did you hand edit your patch?
It does not apply to blobs recorded in its index.
Patch failed at 0001 ubi: Fix filesystem corruption on detach when fastmap 
enabled
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

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

Re: [U-Boot] [PATCH] i2c: imx: bus arbitration fix when reading block data

2018-01-15 Thread Heiko Schocher

Hello Jim,

Am 27.12.2017 um 02:05 schrieb Jim Brennan:

 From e643f91ccfa544b7e3153a7721fba66e0e494759 Mon Sep 17 00:00:00 2001
From: Jim Brennan 
Date: Wed, 13 Dec 2017 13:44:02 -0800
Subject: [PATCH] i2c: imx: bus arbitration fix when reading block data

Fixes arbitration failure on imx platform due to incorrect
chip address use when reading a block of data.  Add support
for both reading or writing a block of data or any combination.

Signed-off-by: Jim Brennan 

---

  drivers/i2c/mxc_i2c.c | 65 ---
  1 file changed, 41 insertions(+), 24 deletions(-)


Your patch drops a lot of checkpatch warnings, see:

http://xeidos.ddns.net/tbot/id_590/tbot.txt

and search for "2018-01-16 02:41:58" to see the wget cmd, to get your patch 
from aptchwork
and search for "2018-01-16 02:42:00" to see the checkpatch.pl command.

ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("")' - ie: 
'commit fatal: bad o ("721fba66e0e494759")'
#15: 

>From e643f91ccfa544b7e3153a7721fba66e0e494759 Mon Sep 17 00:00:00 2001 



ERROR: DOS line endings
#42: FILE: drivers/i2c/mxc_i2c.c:28:
+#include ^M$
[...]

Please fix this, and resend your patch, thanks!

And some Tested-by would be helpful ...

@Stefano, @Fabio: Any chance to test this change? Thanks!

bye,
Heiko


diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index 205274e947..bd2a39ebe6 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -25,6 +25,7 @@
  #include 
  #include 
  #include 
+#include 
  
  DECLARE_GLOBAL_DATA_PTR;
  
@@ -275,7 +276,7 @@ static void i2c_imx_stop(struct mxc_i2c_bus *i2c_bus)

   * write register address
   */
  static int i2c_init_transfer_(struct mxc_i2c_bus *i2c_bus, u8 chip,
- u32 addr, int alen)
+ u32 addr, int alen, bool read)
  {
unsigned int temp;
int ret;
@@ -317,9 +318,17 @@ static int i2c_init_transfer_(struct mxc_i2c_bus *i2c_bus, 
u8 chip,
temp |= I2CR_MTX | I2CR_TX_NO_AK;
writeb(temp, base + (I2CR << reg_shift));
  
-	if (alen >= 0)	{

-   /* write slave address */
-   ret = tx_byte(i2c_bus, chip << 1);
+   /* write slave address */
+   u8 slave_address = (chip << 1);
+
+   if (read)
+   slave_address |= 1;
+   ret = tx_byte(i2c_bus, slave_address);
+   if (ret < 0)
+   return ret;
+
+   while (alen--) {
+   ret = tx_byte(i2c_bus, (addr >> (alen * 8)) & 0xff);
if (ret < 0)
return ret;
  
@@ -413,7 +422,7 @@ exit:

  #endif
  
  static int i2c_init_transfer(struct mxc_i2c_bus *i2c_bus, u8 chip,

-u32 addr, int alen)
+u32 addr, int alen, bool read)
  {
int retry;
int ret;
@@ -424,7 +433,7 @@ static int i2c_init_transfer(struct mxc_i2c_bus *i2c_bus, 
u8 chip,
return -EINVAL;
  
  	for (retry = 0; retry < 3; retry++) {

-   ret = i2c_init_transfer_(i2c_bus, chip, addr, alen);
+   ret = i2c_init_transfer_(i2c_bus, chip, addr, alen, read);
if (ret >= 0)
return 0;
i2c_imx_stop(i2c_bus);
@@ -536,7 +545,7 @@ static int bus_i2c_read(struct mxc_i2c_bus *i2c_bus, u8 
chip, u32 addr,
VF610_I2C_REGSHIFT : IMX_I2C_REGSHIFT;
ulong base = i2c_bus->base;
  
-	ret = i2c_init_transfer(i2c_bus, chip, addr, alen);

+   ret = i2c_init_transfer(i2c_bus, chip, addr, alen, false);
if (ret < 0)
return ret;
  
@@ -566,7 +575,7 @@ static int bus_i2c_write(struct mxc_i2c_bus *i2c_bus, u8 chip, u32 addr,

  {
int ret = 0;
  
-	ret = i2c_init_transfer(i2c_bus, chip, addr, alen);

+   ret = i2c_init_transfer(i2c_bus, chip, addr, alen, false);
if (ret < 0)
return ret;
  
@@ -817,7 +826,7 @@ static int mxc_i2c_probe_chip(struct udevice *bus, u32 chip_addr,

int ret;
struct mxc_i2c_bus *i2c_bus = dev_get_priv(bus);
  
-	ret = i2c_init_transfer(i2c_bus, chip_addr, 0, 0);

+   ret = i2c_init_transfer(i2c_bus, chip_addr, 0, 0, false);
if (ret < 0) {
debug("%s failed, ret = %d\n", __func__, ret);
return ret;
@@ -841,35 +850,43 @@ static int mxc_i2c_xfer(struct udevice *bus, struct 
i2c_msg *msg, int nmsgs)
 * because here we only want to send out chip address. The register
 * address is wrapped in msg.
 */
-   ret = i2c_init_transfer(i2c_bus, msg->addr, 0, 0);
+
+   bool read = (msg->flags & I2C_M_RD) ? true : false;
+
+   ret = i2c_init_transfer(i2c_bus, msg->addr, 0, 0, read);
if (ret < 0) {
debug("i2c_init_transfer error: %d\n", ret);
return ret;
}
  
  	for (; nmsgs > 0; nmsgs--, msg++) {

+   bool current_is_read = 

[U-Boot] [PATCH v1] driver: fsl-mc: Perform fsl-mc fdt fixup for lazyapply dpl

2018-01-15 Thread Yogesh Gaur
For for case of lazyapply method, API fdt_fixup_board_enet() gets invoked
before DPL being deployed.
This leads to an issue that fsl-mc fdt fixup status marked as fail and
dprc driver didn't get registered in linux boot.

Fixes this issue by calling fdt_fixup_board_enet() for case when
DPL is deployed successfully in lazyapply method.

Signed-off-by: Yogesh Gaur 

v1: Incorporated York's review comments.
---
 drivers/net/fsl-mc/mc.c | 4 +++-
 include/fdt_support.h   | 3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index f36fe06..760a124 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -1415,7 +1415,9 @@ int fsl_mc_ldpaa_exit(bd_t *bd)
bool mc_boot_status = false;
 
if (bd && mc_lazy_dpl_addr && !fsl_mc_ldpaa_exit(NULL)) {
-   mc_apply_dpl(mc_lazy_dpl_addr);
+   err = mc_apply_dpl(mc_lazy_dpl_addr);
+   if (!err)
+   fdt_fixup_board_enet(working_fdt);
mc_lazy_dpl_addr = 0;
}
 
diff --git a/include/fdt_support.h b/include/fdt_support.h
index 1e1f8f7..097d9d0 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -275,4 +275,7 @@ int fdtdec_get_int(const void *blob, int node, const char 
*prop_name,
 #ifdef CONFIG_FMAN_ENET
 int fdt_update_ethernet_dt(void *blob);
 #endif
+#ifdef CONFIG_FSL_MC_ENET
+void fdt_fixup_board_enet(void *blob);
+#endif
 #endif /* ifndef __FDT_SUPPORT_H */
-- 
1.9.1

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


Re: [U-Boot] [PATCH] driver: fsl-mc: Perform fsl-mc fdt fixup for lazyapply dpl

2018-01-15 Thread Yogesh Narayan Gaur


> -Original Message-
> From: York Sun
> Sent: Monday, January 15, 2018 10:49 PM
> To: Yogesh Narayan Gaur ; u-
> b...@lists.denx.de
> Subject: Re: [PATCH] driver: fsl-mc: Perform fsl-mc fdt fixup for lazyapply 
> dpl
> 
> On 01/11/2018 09:19 PM, Yogesh Gaur wrote:
> > For for case of lazyapply method, API fdt_fixup_board_enet() gets
> > invoked before DPL being deployed.
> > This leads to an issue that fsl-mc fdt fixup status marked as fail and
> > dprc driver didn't get registered in linux boot.
> >
> > Fixes this issue by calling fdt_fixup_board_enet() for case when DPL
> > is deployed successfully in lazyapply method.
> >
> > Signed-off-by: Yogesh Gaur 
> > ---
> >  drivers/net/fsl-mc/mc.c | 6 +-
> >  include/fdt_support.h   | 3 +++
> >  2 files changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index
> > f36fe06..ab2cce1 100644
> > --- a/drivers/net/fsl-mc/mc.c
> > +++ b/drivers/net/fsl-mc/mc.c
> > @@ -1415,7 +1415,11 @@ int fsl_mc_ldpaa_exit(bd_t *bd)
> > bool mc_boot_status = false;
> >
> > if (bd && mc_lazy_dpl_addr && !fsl_mc_ldpaa_exit(NULL)) {
> > -   mc_apply_dpl(mc_lazy_dpl_addr);
> > +   err = mc_apply_dpl(mc_lazy_dpl_addr); #ifdef
> CONFIG_FSL_MC_ENET
> 
> Is this really needed? We have this in Makefile
> drivers/net/Makefile:72:obj-$(CONFIG_FSL_MC_ENET) += fsl-mc/
> 
+#ifdef CONFIG_FSL_MC_ENET
Is not required, would send next version of this patch after removing #ifdef 
CONFIG_FSL_MC_ENET
--
Regards
Yogesh Gaur

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


Re: [U-Boot] [PATCH RFC] sandbox: Add 64-bit sandbox

2018-01-15 Thread Simon Glass
Hi Mario,

On 14 January 2018 at 23:23, Mario Six  wrote:
> Hi Simon,
>
> On Fri, Dec 29, 2017 at 4:13 AM, Simon Glass  wrote:
>> Hi Mario,
>>
>> On 20 December 2017 at 07:31, Mario Six  wrote:
>>> From: Mario Six 
>>>
>>> To debug device tree issues involving 32- and 64-bit platforms, it is 
>>> useful to
>>> have a generic 64-bit platform available.
>>>
>>> Add a version of the sandbox that uses 64-bit integers for its physical
>>> addresses as well as a modified device tree.
>>>
>>> Signed-off-by: Mario Six 
>>>
>>> ---
>>>  arch/sandbox/Kconfig |   6 +
>>>  arch/sandbox/cpu/cpu.c   |   2 +-
>>>  arch/sandbox/dts/Makefile|   4 +
>>>  arch/sandbox/dts/sandbox64.dts   | 317 
>>> +++
>>>  arch/sandbox/include/asm/io.h|   6 +
>>>  arch/sandbox/include/asm/types.h |  14 +-
>>>  cmd/demo.c   |   6 +-
>>>  configs/sandbox64_defconfig  | 200 
>>>  drivers/demo/demo-simple.c   |   2 +-
>>>  9 files changed, 550 insertions(+), 7 deletions(-)
>>>  create mode 100644 arch/sandbox/dts/sandbox64.dts
>>>  create mode 100644 configs/sandbox64_defconfig
>>
>> Reviewed-by: Simon Glass 
>>
>> Can you please update the sandbox README?
>>
>
> Sure, I'll extend the README.
>
>> Also, how does this play with CONFIG_SANDBOX_64BIT and CONFIG_PHYS_64BIT ?
>>
>
> Yeah, the names of the config options are all a bit confusing (hence why I
> added the RFC to see if someone may have a better idea). Setting the
> CONFIG_PHYS_64BIT is not strictly necessary for the 64-bit sandbox, but some
> architectures use the option to decide whether they run on a 32- or 64-bit
> system, so I thought it was consistent to also set it, just in case. The
> CONFIG_SANDBOX_64BIT option causes a 64-bit sandbox *binary* to be built. This
> binary still uses 32-bit-wide types in the device tree (phys_addr_t and
> phys_size_t, mostly, so the width of the physical addresses are still 32-bit),
> so that's not what we want in this case. I decided to override the type
> definitions in arch/sandbox/include/asm/types.h based on CONFIG_SANDBOX64
> directly, since I didn't want to introduce yet another option that has the
> words sandbox and 64 in its name. But it's pretty confusing still, I admit.
>
> Maybe we could rename CONFIG_SANDBOX_64BIT to CONFIG_HOST_64BIT, and use
> CONFIG_PHYS_64BIT to control the width of the physical addresses in types.h
> (which is what it is used for in arch/arm/include/asm/types.h now that I'm
> taking a closer look); that would at least make the names congruent with their
> actual semantics. We would then have the options CONFIG_HOST_64BIT,
> CONFIG_PHYS_64BIT, and CONFIG_SANDBOX64 as the "board option".
>
> Maybe that's a cleaner solution?

Yes I think that is a good idea.

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


Re: [U-Boot] [PATCH] ARM: dts: Freescale: re-license device tree files under X11

2018-01-15 Thread Tom Rini
On Tue, Jan 16, 2018 at 03:27:09AM +, Pankaj Bansal wrote:
> HI,
> 
> > -Original Message-
> > From: Tom Rini [mailto:tr...@konsulko.com]
> > Sent: Tuesday, January 16, 2018 8:32 AM
> > To: Pankaj Bansal 
> > Cc: u-boot@lists.denx.de; albert.u.b...@aribaud.net; Priyanka Jain
> > ; Varun Sethi ; Mingkai Hu
> > 
> > Subject: Re: [U-Boot] [PATCH] ARM: dts: Freescale: re-license device tree 
> > files
> > under X11
> > 
> > On Tue, Jan 16, 2018 at 08:03:54AM +0530, Pankaj Bansal wrote:
> > 
> > > The current GPL only licensing on the device trees makes it very
> > > impractical for other software components licensed under another
> > > license.
> > >
> > > To make it easier to reuse them, re-license the the device trees for
> > > Freescale (now NXP) SoCs and boards under license X11.
> > >
> > > Cc: Priyanka Jain 
> > > Cc: Mingkai Hu 
> > > Cc: York Sun 
> > > Signed-off-by: Pankaj Bansal 
> > > ---
> > >  arch/arm/dts/fsl-ls1012a-frdm.dts   | 2 +-
> > >  arch/arm/dts/fsl-ls1012a-frdm.dtsi  | 2 +-
> > >  arch/arm/dts/fsl-ls1012a-qds.dts| 2 +-
> > >  arch/arm/dts/fsl-ls1012a-qds.dtsi   | 2 +-
> > >  arch/arm/dts/fsl-ls1012a-rdb.dts| 2 +-
> > >  arch/arm/dts/fsl-ls1012a-rdb.dtsi   | 4 +---
> > >  arch/arm/dts/fsl-ls1012a.dtsi   | 2 +-
> > >  arch/arm/dts/fsl-ls1043a-qds-duart.dts  | 2 +-
> > > arch/arm/dts/fsl-ls1043a-qds-lpuart.dts | 2 +-
> > >  arch/arm/dts/fsl-ls1043a-qds.dtsi   | 4 +---
> > >  arch/arm/dts/fsl-ls1043a-rdb.dts| 4 +---
> > >  arch/arm/dts/fsl-ls1043a.dtsi   | 4 +---
> > >  arch/arm/dts/fsl-ls1046a-qds-duart.dts  | 2 +-
> > > arch/arm/dts/fsl-ls1046a-qds-lpuart.dts | 2 +-
> > >  arch/arm/dts/fsl-ls1046a-qds.dtsi   | 4 +---
> > >  arch/arm/dts/fsl-ls1046a-rdb.dts| 4 +---
> > >  arch/arm/dts/fsl-ls1046a.dtsi   | 4 +---
> > >  arch/arm/dts/fsl-ls1088a-qds.dts| 2 +-
> > >  arch/arm/dts/fsl-ls1088a-rdb.dts| 2 +-
> > >  arch/arm/dts/fsl-ls1088a.dtsi   | 2 +-
> > >  arch/arm/dts/fsl-ls2080a-qds.dts| 2 +-
> > >  arch/arm/dts/fsl-ls2080a-rdb.dts| 2 +-
> > >  arch/arm/dts/fsl-ls2080a.dtsi   | 2 +-
> > >  arch/arm/dts/fsl-ls2081a-rdb.dts| 2 +-
> > >  arch/arm/dts/fsl-ls2088a-rdb-qspi.dts   | 2 +-
> > >  25 files changed, 25 insertions(+), 39 deletions(-)
> > 
> > How do these changes match up to the kernel?  Thanks!
> 
> The kernel dts files are GPLv2 and X11 dual licensed. E.g. 
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
> 
> To avoid dual licensing, we used X11 only. See
> https://www.gnu.org/licenses/license-list.en.html#X11License

Why would we not want to match the kernel here?

-- 
Tom


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


Re: [U-Boot] [PATCH] ARM: dts: Freescale: re-license device tree files under X11

2018-01-15 Thread Pankaj Bansal
HI,

> -Original Message-
> From: Tom Rini [mailto:tr...@konsulko.com]
> Sent: Tuesday, January 16, 2018 8:32 AM
> To: Pankaj Bansal 
> Cc: u-boot@lists.denx.de; albert.u.b...@aribaud.net; Priyanka Jain
> ; Varun Sethi ; Mingkai Hu
> 
> Subject: Re: [U-Boot] [PATCH] ARM: dts: Freescale: re-license device tree 
> files
> under X11
> 
> On Tue, Jan 16, 2018 at 08:03:54AM +0530, Pankaj Bansal wrote:
> 
> > The current GPL only licensing on the device trees makes it very
> > impractical for other software components licensed under another
> > license.
> >
> > To make it easier to reuse them, re-license the the device trees for
> > Freescale (now NXP) SoCs and boards under license X11.
> >
> > Cc: Priyanka Jain 
> > Cc: Mingkai Hu 
> > Cc: York Sun 
> > Signed-off-by: Pankaj Bansal 
> > ---
> >  arch/arm/dts/fsl-ls1012a-frdm.dts   | 2 +-
> >  arch/arm/dts/fsl-ls1012a-frdm.dtsi  | 2 +-
> >  arch/arm/dts/fsl-ls1012a-qds.dts| 2 +-
> >  arch/arm/dts/fsl-ls1012a-qds.dtsi   | 2 +-
> >  arch/arm/dts/fsl-ls1012a-rdb.dts| 2 +-
> >  arch/arm/dts/fsl-ls1012a-rdb.dtsi   | 4 +---
> >  arch/arm/dts/fsl-ls1012a.dtsi   | 2 +-
> >  arch/arm/dts/fsl-ls1043a-qds-duart.dts  | 2 +-
> > arch/arm/dts/fsl-ls1043a-qds-lpuart.dts | 2 +-
> >  arch/arm/dts/fsl-ls1043a-qds.dtsi   | 4 +---
> >  arch/arm/dts/fsl-ls1043a-rdb.dts| 4 +---
> >  arch/arm/dts/fsl-ls1043a.dtsi   | 4 +---
> >  arch/arm/dts/fsl-ls1046a-qds-duart.dts  | 2 +-
> > arch/arm/dts/fsl-ls1046a-qds-lpuart.dts | 2 +-
> >  arch/arm/dts/fsl-ls1046a-qds.dtsi   | 4 +---
> >  arch/arm/dts/fsl-ls1046a-rdb.dts| 4 +---
> >  arch/arm/dts/fsl-ls1046a.dtsi   | 4 +---
> >  arch/arm/dts/fsl-ls1088a-qds.dts| 2 +-
> >  arch/arm/dts/fsl-ls1088a-rdb.dts| 2 +-
> >  arch/arm/dts/fsl-ls1088a.dtsi   | 2 +-
> >  arch/arm/dts/fsl-ls2080a-qds.dts| 2 +-
> >  arch/arm/dts/fsl-ls2080a-rdb.dts| 2 +-
> >  arch/arm/dts/fsl-ls2080a.dtsi   | 2 +-
> >  arch/arm/dts/fsl-ls2081a-rdb.dts| 2 +-
> >  arch/arm/dts/fsl-ls2088a-rdb-qspi.dts   | 2 +-
> >  25 files changed, 25 insertions(+), 39 deletions(-)
> 
> How do these changes match up to the kernel?  Thanks!

The kernel dts files are GPLv2 and X11 dual licensed. E.g. 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi

To avoid dual licensing, we used X11 only. See
https://www.gnu.org/licenses/license-list.en.html#X11License

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


Re: [U-Boot] [PATCH] ARM: dts: Freescale: re-license device tree files under X11

2018-01-15 Thread Tom Rini
On Tue, Jan 16, 2018 at 08:03:54AM +0530, Pankaj Bansal wrote:

> The current GPL only licensing on the device trees makes it very
> impractical for other software components licensed under another
> license.
> 
> To make it easier to reuse them, re-license the the device trees for
> Freescale (now NXP) SoCs and boards under license X11.
> 
> Cc: Priyanka Jain 
> Cc: Mingkai Hu 
> Cc: York Sun 
> Signed-off-by: Pankaj Bansal 
> ---
>  arch/arm/dts/fsl-ls1012a-frdm.dts   | 2 +-
>  arch/arm/dts/fsl-ls1012a-frdm.dtsi  | 2 +-
>  arch/arm/dts/fsl-ls1012a-qds.dts| 2 +-
>  arch/arm/dts/fsl-ls1012a-qds.dtsi   | 2 +-
>  arch/arm/dts/fsl-ls1012a-rdb.dts| 2 +-
>  arch/arm/dts/fsl-ls1012a-rdb.dtsi   | 4 +---
>  arch/arm/dts/fsl-ls1012a.dtsi   | 2 +-
>  arch/arm/dts/fsl-ls1043a-qds-duart.dts  | 2 +-
>  arch/arm/dts/fsl-ls1043a-qds-lpuart.dts | 2 +-
>  arch/arm/dts/fsl-ls1043a-qds.dtsi   | 4 +---
>  arch/arm/dts/fsl-ls1043a-rdb.dts| 4 +---
>  arch/arm/dts/fsl-ls1043a.dtsi   | 4 +---
>  arch/arm/dts/fsl-ls1046a-qds-duart.dts  | 2 +-
>  arch/arm/dts/fsl-ls1046a-qds-lpuart.dts | 2 +-
>  arch/arm/dts/fsl-ls1046a-qds.dtsi   | 4 +---
>  arch/arm/dts/fsl-ls1046a-rdb.dts| 4 +---
>  arch/arm/dts/fsl-ls1046a.dtsi   | 4 +---
>  arch/arm/dts/fsl-ls1088a-qds.dts| 2 +-
>  arch/arm/dts/fsl-ls1088a-rdb.dts| 2 +-
>  arch/arm/dts/fsl-ls1088a.dtsi   | 2 +-
>  arch/arm/dts/fsl-ls2080a-qds.dts| 2 +-
>  arch/arm/dts/fsl-ls2080a-rdb.dts| 2 +-
>  arch/arm/dts/fsl-ls2080a.dtsi   | 2 +-
>  arch/arm/dts/fsl-ls2081a-rdb.dts| 2 +-
>  arch/arm/dts/fsl-ls2088a-rdb-qspi.dts   | 2 +-
>  25 files changed, 25 insertions(+), 39 deletions(-)

How do these changes match up to the kernel?  Thanks!

-- 
Tom


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


[U-Boot] [PATCH] ARM: dts: Freescale: re-license device tree files under X11

2018-01-15 Thread Pankaj Bansal
The current GPL only licensing on the device trees makes it very
impractical for other software components licensed under another
license.

To make it easier to reuse them, re-license the the device trees for
Freescale (now NXP) SoCs and boards under license X11.

Cc: Priyanka Jain 
Cc: Mingkai Hu 
Cc: York Sun 
Signed-off-by: Pankaj Bansal 
---
 arch/arm/dts/fsl-ls1012a-frdm.dts   | 2 +-
 arch/arm/dts/fsl-ls1012a-frdm.dtsi  | 2 +-
 arch/arm/dts/fsl-ls1012a-qds.dts| 2 +-
 arch/arm/dts/fsl-ls1012a-qds.dtsi   | 2 +-
 arch/arm/dts/fsl-ls1012a-rdb.dts| 2 +-
 arch/arm/dts/fsl-ls1012a-rdb.dtsi   | 4 +---
 arch/arm/dts/fsl-ls1012a.dtsi   | 2 +-
 arch/arm/dts/fsl-ls1043a-qds-duart.dts  | 2 +-
 arch/arm/dts/fsl-ls1043a-qds-lpuart.dts | 2 +-
 arch/arm/dts/fsl-ls1043a-qds.dtsi   | 4 +---
 arch/arm/dts/fsl-ls1043a-rdb.dts| 4 +---
 arch/arm/dts/fsl-ls1043a.dtsi   | 4 +---
 arch/arm/dts/fsl-ls1046a-qds-duart.dts  | 2 +-
 arch/arm/dts/fsl-ls1046a-qds-lpuart.dts | 2 +-
 arch/arm/dts/fsl-ls1046a-qds.dtsi   | 4 +---
 arch/arm/dts/fsl-ls1046a-rdb.dts| 4 +---
 arch/arm/dts/fsl-ls1046a.dtsi   | 4 +---
 arch/arm/dts/fsl-ls1088a-qds.dts| 2 +-
 arch/arm/dts/fsl-ls1088a-rdb.dts| 2 +-
 arch/arm/dts/fsl-ls1088a.dtsi   | 2 +-
 arch/arm/dts/fsl-ls2080a-qds.dts| 2 +-
 arch/arm/dts/fsl-ls2080a-rdb.dts| 2 +-
 arch/arm/dts/fsl-ls2080a.dtsi   | 2 +-
 arch/arm/dts/fsl-ls2081a-rdb.dts| 2 +-
 arch/arm/dts/fsl-ls2088a-rdb-qspi.dts   | 2 +-
 25 files changed, 25 insertions(+), 39 deletions(-)

diff --git a/arch/arm/dts/fsl-ls1012a-frdm.dts 
b/arch/arm/dts/fsl-ls1012a-frdm.dts
index 983e599..eb33782 100644
--- a/arch/arm/dts/fsl-ls1012a-frdm.dts
+++ b/arch/arm/dts/fsl-ls1012a-frdm.dts
@@ -3,7 +3,7 @@
  *
  * Copyright 2016, Freescale Semiconductor
  *
- * SPDX-License-Identifier:GPL-2.0+
+ * SPDX-License-Identifier:X11
  */
 
 /dts-v1/;
diff --git a/arch/arm/dts/fsl-ls1012a-frdm.dtsi 
b/arch/arm/dts/fsl-ls1012a-frdm.dtsi
index 25dcdd2..19fc2e8 100644
--- a/arch/arm/dts/fsl-ls1012a-frdm.dtsi
+++ b/arch/arm/dts/fsl-ls1012a-frdm.dtsi
@@ -3,7 +3,7 @@
  *
  * Copyright 2016, Freescale Semiconductor
  *
- * SPDX-License-Identifier:GPL-2.0+
+ * SPDX-License-Identifier:X11
  */
 
 /include/ "fsl-ls1012a.dtsi"
diff --git a/arch/arm/dts/fsl-ls1012a-qds.dts b/arch/arm/dts/fsl-ls1012a-qds.dts
index 76db36c..cda1d57 100644
--- a/arch/arm/dts/fsl-ls1012a-qds.dts
+++ b/arch/arm/dts/fsl-ls1012a-qds.dts
@@ -1,7 +1,7 @@
 /*
  * Copyright 2016 Freescale Semiconductor
  *
- * SPDX-License-Identifier:GPL-2.0+
+ * SPDX-License-Identifier:X11
  */
 
 /dts-v1/;
diff --git a/arch/arm/dts/fsl-ls1012a-qds.dtsi 
b/arch/arm/dts/fsl-ls1012a-qds.dtsi
index d17cd99..f6f39c0 100644
--- a/arch/arm/dts/fsl-ls1012a-qds.dtsi
+++ b/arch/arm/dts/fsl-ls1012a-qds.dtsi
@@ -1,7 +1,7 @@
 /*
  * Copyright 2016 Freescale Semiconductor
  *
- * SPDX-License-Identifier:GPL-2.0+
+ * SPDX-License-Identifier:X11
  */
 
 /include/ "fsl-ls1012a.dtsi"
diff --git a/arch/arm/dts/fsl-ls1012a-rdb.dts b/arch/arm/dts/fsl-ls1012a-rdb.dts
index f683812..0fd5ed2 100644
--- a/arch/arm/dts/fsl-ls1012a-rdb.dts
+++ b/arch/arm/dts/fsl-ls1012a-rdb.dts
@@ -3,7 +3,7 @@
  *
  * Copyright 2016, Freescale Semiconductor
  *
- * SPDX-License-Identifier:GPL-2.0+
+ * SPDX-License-Identifier:X11
  */
 
 /dts-v1/;
diff --git a/arch/arm/dts/fsl-ls1012a-rdb.dtsi 
b/arch/arm/dts/fsl-ls1012a-rdb.dtsi
index bf407ae..4eec847 100644
--- a/arch/arm/dts/fsl-ls1012a-rdb.dtsi
+++ b/arch/arm/dts/fsl-ls1012a-rdb.dtsi
@@ -3,9 +3,7 @@
  *
  * Copyright 2016, Freescale Semiconductor
  *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
+ * SPDX-License-Identifier:X11
  */
 
 /include/ "fsl-ls1012a.dtsi"
diff --git a/arch/arm/dts/fsl-ls1012a.dtsi b/arch/arm/dts/fsl-ls1012a.dtsi
index 23b3cec..1ec4bb0 100644
--- a/arch/arm/dts/fsl-ls1012a.dtsi
+++ b/arch/arm/dts/fsl-ls1012a.dtsi
@@ -1,7 +1,7 @@
 /*
  * Copyright 2016 Freescale Semiconductor
  *
- * SPDX-License-Identifier:GPL-2.0+
+ * SPDX-License-Identifier:X11
  */
 
 /include/ "skeleton64.dtsi"
diff --git a/arch/arm/dts/fsl-ls1043a-qds-duart.dts 
b/arch/arm/dts/fsl-ls1043a-qds-duart.dts
index 2124e38..ce2670d 100644
--- a/arch/arm/dts/fsl-ls1043a-qds-duart.dts
+++ b/arch/arm/dts/fsl-ls1043a-qds-duart.dts
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2015, Freescale Semiconductor
  *
- * SPDX-License-Identifier:GPL-2.0+
+ * SPDX-License-Identifier:X11
  */
 
 /dts-v1/;
diff --git a/arch/arm/dts/fsl-ls1043a-qds-lpuart.dts 
b/arch/arm/dts/fsl-ls1043a-qds-lpuart.dts
index 18adb97..4b830dd 100644
--- a/arch/arm/dts/fsl-ls1043a-qds-lpuart.dts
+++ b/arch/arm/dts/fsl-ls1043a-qds-lpuart.dts

Re: [U-Boot] UEFI on u-boot

2018-01-15 Thread Udit Kumar
Hi Alex

> -Original Message-
> From: Alexander Graf [mailto:ag...@suse.de]
> Sent: Monday, January 15, 2018 2:45 PM
> To: Udit Kumar 
> 
> Hi Udit,
> 
> On 15.01.18 10:09, Udit Kumar wrote:
> > Hi Alex,
> > Hope you are doing great,
> >
> > Could you help on UEFI over the u-boot.
> > 1- I couldn't locate EFI_DXE_SERVICES in u-boot, do you have plan to
> > add those
> 
> Right now the model is that all device drivers are implemented by U-Boot
> and that only exposes their interfaces to EFI applications. Implementing DXE
> in U-Boot would open quite a big can of worms, as it would really only be
> useful in compilation with PI which is a terrible interface :).

Ok, 
 
> > 2- If I load  a driver (with bootefi) which install few protocols,  is
> > this ok to do with u-boot
> 
> It depends on how much the driver does, but in general yes. Heinrich is
> currently working on making the iPXE iSCSI driver work, so his EFI payload
> would expose an EFI block device to yet another payload running after his.

Thanks for this, 
Heinrich,  in  this driver, are you accessing underneath hardware register 
by UEFI-Driver and managing UEFI protocols
or you are relying on some h/w access exposed by u-boot driver


 
> > 3- if you say, 2 is ok then I hope these protocols are kept in some
> > data base, and this new protocol can be opened by an application
> 
> Yes, the protocol database is now global and persistent across bootefi
> invocations.

Thanks 
 
> > 4- if there is some known limitation, like we cannot run DXE_driver
> > etc
> 
> What exactly are you trying to do? With the U-Boot UEFI implementation
> we're trying to find a sweet spot between implementing as much as makes
> sense, but not the whole UEFI world, as that would just bloat the code
> needlessly.

I am trying to add a driver (DXE by definition) which 
a) Access the hardware registers. (I said DXE could due to hardware registers)
b) Update memory map as well (AddMemorySpace call)
c) Finally it export a protocol, which could be used by its test application. 

For b) I am not able to find function call, 
For a), if I say driver is UEFI and accessing hardware register, will this be 
acceptable ?  
 
> 
> Alex
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] gpio: sunxi: Add compatible string for H5 PIO

2018-01-15 Thread Chris Blake
Due to the changes in 
https://github.com/linux-sunxi/u-boot-sunxi/commit/8faac0941cd409c6ff3738fbf658de2296f48e9a,
 allwinner,sun50i-h5-pinctrl needs to be defined otherwise PIO does not work on 
H5 based boards.

Signed-off-by: Chris Blake 
---
 drivers/gpio/sunxi_gpio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c
index b47cc66..856b7ef 100644
--- a/drivers/gpio/sunxi_gpio.c
+++ b/drivers/gpio/sunxi_gpio.c
@@ -345,6 +345,7 @@ static const struct udevice_id sunxi_gpio_ids[] = {
ID("allwinner,sun4i-a10-pinctrl",   a_all),
ID("allwinner,sun5i-a10s-pinctrl",  a_all),
ID("allwinner,sun5i-a13-pinctrl",   a_all),
+   ID("allwinner,sun50i-h5-pinctrl",   a_all),
ID("allwinner,sun6i-a31-pinctrl",   a_all),
ID("allwinner,sun6i-a31s-pinctrl",  a_all),
ID("allwinner,sun7i-a20-pinctrl",   a_all),
--
2.7.4
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] UEFI on u-boot

2018-01-15 Thread Udit Kumar
Hi Alex, 
Hope you are doing great, 

Could you help on UEFI over the u-boot.
1- I couldn't locate EFI_DXE_SERVICES in u-boot, do you have plan to add those 
2- If I load  a driver (with bootefi) which install few protocols,  is this ok 
to do with u-boot
3- if you say, 2 is ok then I hope these protocols are kept in some data base, 
and this new protocol can be opened by an application 
4- if there is some known limitation, like we cannot run DXE_driver  etc

Thanks
Udit

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


Re: [U-Boot] Pull request: u-boot-net.git master

2018-01-15 Thread Tom Rini
On Mon, Jan 15, 2018 at 12:06:17PM -0600, Joe Hershberger wrote:

> Hi Tom,
> 
> The following changes since commit 3dde8f20377c3a051dda64497bdf0cdb23e03a2d:
> 
>   Merge git://git.denx.de/u-boot-mmc (2018-01-14 22:26:38 -0500)
> 
> are available in the git repository at:
> 
> 
>   git://git.denx.de/u-boot-net.git master
> 
> for you to fetch changes up to 1e2d2597a667e16adfe0a8a9be22e904cee84727:
> 
>   phy: atheros: set auto-negotiation for AR8021 (2018-01-15 12:05:27 -0600)
> 

Applied to u-boot/master, thanks!

But please note from ceheckpatch.pl (which is actually pretty good):

WARNING: please write a paragraph that describes the config symbol fully
#37: FILE: drivers/net/Kconfig:188:
+config MACB_ZYNQ

total: 0 errors, 1 warnings, 0 checks, 213 lines checked
ERROR: Unrecognized email address: 'Coverity (CID: 144423)'
#8: 
Reported-by: Coverity (CID: 144423)

total: 1 errors, 0 warnings, 0 checks, 19 lines checked
WARNING: please write a paragraph that describes the config symbol fully
#34: FILE: drivers/net/phy/Kconfig:15:
+config B53_SWITCH

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#67: 
new file mode 100644

CHECK: Prefer using the BIT macro
#134: FILE: drivers/net/phy/b53.c:63:
+#define   PORT_OVERRIDE_SPEED_100M (1 << PORT_OVERRIDE_SPEED_S)

total: 0 errors, 2 warnings, 1 checks, 675 lines checked
CHECK: Unbalanced braces around else statement
#38: FILE: net/bootp.c:396:
+   } else

total: 0 errors, 0 warnings, 1 checks, 24 lines checked
WARNING: A patch subject line should describe the change not the tool that 
found it
#4: 
Subject: [PATCH] net: sh-eth: Fix coding style checked by checkpatch.pl

WARNING: 'alligned' may be misspelled - perhaps 'aligned'?
#10: 
Change from alligned to aligned.

total: 0 errors, 2 warnings, 0 checks, 92 lines checked
WARNING: please write a paragraph that describes the config symbol fully
#277: FILE: drivers/net/Kconfig:279:
+config SH_ETHER

total: 0 errors, 1 warnings, 0 checks, 273 lines checked

-- 
Tom


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


Re: [U-Boot] [PULL] Please pull u-boot-imx

2018-01-15 Thread Tom Rini
On Mon, Jan 15, 2018 at 06:52:01PM +0100, Stefano Babic wrote:

> Hi Tom,
> 
> please pull from u-boot-imx, thanks !
> 
> The following changes since commit 373b9003410b44a1133060c2e63483b278fb476b:
> 
>   Merge git://git.denx.de/u-boot-sunxi (2018-01-11 14:14:19 -0500)
> 
> are available in the git repository at:
> 
>   git://www.denx.de/git/u-boot-imx.git master
> 
> for you to fetch changes up to 9587b0d61133c025d48ebf480aa021fc2fdd53a7:
> 
>   arm: imx: hab: Add hab_failsafe console command (2018-01-14 17:26:30
> +0100)
> 

Applied to u-boot/master, thanks!

But please note that checkpatch has a lot to say, some of which should
probably be addressed:

WARNING: please write a paragraph that describes the config symbol fully
#51: FILE: arch/arm/mach-imx/mx6/Kconfig:380:
+config TARGET_SKSIMX6

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#67: 
new file mode 100644

WARNING: line over 80 characters
#171: FILE: board/sks-kinkel/sksimx6/sksimx6.c:62:
+   IOMUX_PADS(PAD_NANDF_D0__GPIO2_IO00 | MUX_PAD_CTRL(NO_PAD_CTRL)),/* CD 
*/

CHECK: Blank lines aren't necessary after an open brace '{'
#215: FILE: board/sks-kinkel/sksimx6/sksimx6.c:106:
+{
+

CHECK: Blank lines aren't necessary before a close brace '}'
#245: FILE: board/sks-kinkel/sksimx6/sksimx6.c:136:
+
+}

CHECK: Prefer kernel type 'u32' over 'uint32_t'
#249: FILE: board/sks-kinkel/sksimx6/sksimx6.c:140:
+   uint32_t base = IMX_FEC_BASE;

CHECK: Alignment should match open parenthesis
#261: FILE: board/sks-kinkel/sksimx6/sksimx6.c:152:
+   phydev = phy_find_by_mask(bus, (0xf << CONFIG_FEC_MXC_PHYADDR),
+   PHY_INTERFACE_MODE_RGMII);

WARNING: unnecessary whitespace before a quoted newline
#333: FILE: board/sks-kinkel/sksimx6/sksimx6.c:224:
+   printf("Warning: failed to initialize mmc dev \n");

CHECK: Please don't use multiple blank lines
#350: FILE: board/sks-kinkel/sksimx6/sksimx6.c:241:
+
+

WARNING: line over 80 characters
#471: FILE: board/sks-kinkel/sksimx6/sksimx6.c:362:
+   mx6_dram_cfg(_qdl, _1g_mmdc_calib, 
_125);

CHECK: Please don't use multiple blank lines
#601: FILE: include/configs/sksimx6.h:7:
+
+

WARNING: please, no space before tabs
#670: FILE: include/configs/sksimx6.h:76:
+^I"addmisc=setenv bootargs ${bootargs} ${miscargs}\0" ^I^I\$

WARNING: please, no space before tabs
#675: FILE: include/configs/sksimx6.h:81:
+^I"fdt_addr_r=0x1800\0" ^I^I^I^I^I\$

WARNING: please, no space before tabs
#677: FILE: include/configs/sksimx6.h:83:
+^I"fdt_high=0x\0" ^I^I^I^I^I\$

WARNING: please, no space before tabs
#678: FILE: include/configs/sksimx6.h:84:
+^I"kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" ^I^I\$

WARNING: please, no space before tabs
#681: FILE: include/configs/sksimx6.h:87:
+^I"mmcboot=if run mmcload;then " ^I^I^I^I^I\$

WARNING: please, no space before tabs
#683: FILE: include/configs/sksimx6.h:89:
+^I^I^I"bootm;fi\0" ^I^I^I^I^I\$

total: 0 errors, 11 warnings, 6 checks, 611 lines checked
WARNING: line over 80 characters
#38: FILE: drivers/misc/mxc_ocotp.c:356:
+   printf("mxc_ocotp: The word has been programmed, no 
more write\n");

total: 0 errors, 1 warnings, 0 checks, 23 lines checked
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#34: 
new file mode 100644

WARNING: line over 80 characters
#549: FILE: arch/arm/dts/imx6sx-sdb.dtsi:367:
+   MX6SX_PAD_ENET2_RX_CLK__ENET2_REF_CLK_25M   
0x91

WARNING: line over 80 characters
#555: FILE: arch/arm/dts/imx6sx-sdb.dtsi:373:
+   MX6SX_PAD_ENET2_COL__GPIO2_IO_6 
0x8000

WARNING: line over 80 characters
#585: FILE: arch/arm/dts/imx6sx-sdb.dtsi:403:
+   MX6SX_PAD_GPIO1_IO01__I2C1_SDA  
0x4001b8b1

WARNING: line over 80 characters
#586: FILE: arch/arm/dts/imx6sx-sdb.dtsi:404:
+   MX6SX_PAD_GPIO1_IO00__I2C1_SCL  
0x4001b8b1

WARNING: line over 80 characters
#592: FILE: arch/arm/dts/imx6sx-sdb.dtsi:410:
+   MX6SX_PAD_KEY_ROW4__I2C3_SDA
0x4001b8b1

WARNING: line over 80 characters
#593: FILE: arch/arm/dts/imx6sx-sdb.dtsi:411:
+   MX6SX_PAD_KEY_COL4__I2C3_SCL
0x4001b8b1

WARNING: line over 80 characters
#599: FILE: arch/arm/dts/imx6sx-sdb.dtsi:417:
+   MX6SX_PAD_CSI_DATA07__I2C4_SDA  
0x4001b8b1

WARNING: line over 80 characters
#600: FILE: arch/arm/dts/imx6sx-sdb.dtsi:418:
+   MX6SX_PAD_CSI_DATA06__I2C4_SCL  
0x4001b8b1

WARNING: line over 80 characters
#640: FILE: arch/arm/dts/imx6sx-sdb.dtsi:458:
+   MX6SX_PAD_QSPI1A_DATA0__GPIO4_IO_16 
0x8000

WARNING: line over 80 characters
#740: FILE: arch/arm/dts/imx6sx-sdb.dtsi:558:
+   MX6SX_PAD_KEY_COL0__GPIO2_IO_10 0x17059 

[U-Boot] checkpatch.pl checking

2018-01-15 Thread Tom Rini
Hey all,

As came up in another thread, yes, we do care about what checkpatch.pl
says.  I've been lax about it as I'd not seen a good way ot integrate it
when I looked last.  Turns out it's easier to integrate now with the
--git arg, so I've got that in my scripts now.  Since it would be unfair
to reject PRs due to checkpatch.pl issues today, I'm not rejecting, I'm
just pointing out the problems it sees.  And there will be false
positives as sometimes it's fine to go more than 80 chars wide for
example (dts files, pinmux stuff).  But in general, it shouldn't be
complaining, so please take a look.  Thanks all!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v1, 03/07] db410c: replace reset driver with psci

2018-01-15 Thread Tom Rini
On Wed, Jan 10, 2018 at 11:34:36AM +0100, Jorge Ramirez-Ortiz wrote:

> From: Jorge Ramirez-Ortiz 
> 
> this should be the norm for armv8 platforms.
> 
> Signed-off-by: Jorge Ramirez-Ortiz 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v1, 05/07] db410c: use the device tree parsed by the lk loader.

2018-01-15 Thread Tom Rini
On Wed, Jan 10, 2018 at 11:34:38AM +0100, Jorge Ramirez-Ortiz wrote:

> From: Jorge Ramirez-Ortiz 
> 
> We dont need to keep copies of the properties that we are going to
> fixup since we will be using the dtb provided by the firmware.
> 
> Signed-off-by: Jorge Ramirez-Ortiz 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v1, 06/07] db410c: add reserved-memory node to dts

2018-01-15 Thread Tom Rini
On Wed, Jan 10, 2018 at 11:34:39AM +0100, Jorge Ramirez-Ortiz wrote:

> From: Rob Clark 
> 
> If lk lights up display and populates simple-framebuffer node, it will
> also setup a reserved-memory node (needed by simplefb on linux).  But
> it isn't clever enough to cope when the reserved-memory node is not
> present.
> 
> Signed-off-by: Rob Clark 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v1, 07/07] db410c: on aarch64 the fdtfile is in per-vendor subdirectory

2018-01-15 Thread Tom Rini
On Wed, Jan 10, 2018 at 11:34:40AM +0100, Jorge Ramirez-Ortiz wrote:

> From: Rob Clark 
> 
> Signed-off-by: Rob Clark 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v1, 04/07] fdtdec: allow board to provide fdt for CONFIG_OF_SEPARATE

2018-01-15 Thread Tom Rini
On Wed, Jan 10, 2018 at 11:34:37AM +0100, Jorge Ramirez-Ortiz wrote:

> From: Rob Clark 
> 
> Similar to CONFIG_OF_BOARD, but in this case the fdt is still built by
> u-boot build.  This allows the board to patch the fdt, etc.
> 
> In the specific case of dragonboard 410c, we pass the u-boot generated
> fdt to the previous stage of bootloader (by embedding it in the
> u-boot.img that is loaded by lk/aboot), which patches the fdt and passes
> it back to u-boot.
> 
> Signed-off-by: Rob Clark 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v1, 01/05] env: enable accessing the environment in an EXT4 partition

2018-01-15 Thread Tom Rini
On Wed, Jan 10, 2018 at 11:33:48AM +0100, Jorge Ramirez-Ortiz wrote:

> From: Jorge Ramirez-Ortiz 
> 
> For example to store the environment in a file named "/uboot.env" in MMC
> "0", where partition "1" contains the EXT4 filesystem, the following
> configs should be added to the board's default config:
> 
>   CONFIG_ENV_IS_IN_EXT4=y
>   CONFIG_ENV_EXT4_DEVICE_AND_PART="0:1"
>   CONFIG_ENV_EXT4_FILE="/uboot.env"
>   CONFIG_ENV_EXT4_INTERFACE="mmc"
> 
> Signed-off-by: Jorge Ramirez-Ortiz 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v1, 02/07] db410c: update wlan and bt mac addresses from firmware

2018-01-15 Thread Tom Rini
On Wed, Jan 10, 2018 at 11:34:35AM +0100, Jorge Ramirez-Ortiz wrote:

> From: Jorge Ramirez-Ortiz 
> 
> The firmware that runs before u-boot modifies u-boot's device tree
> adding the local-mac-address and local-bd-address properties for the
> compatibles "qcom,wcnss-bt" and "qcom,wcnss-wlan".
> 
> This commit reads that firmware, retrieves the properties and fixups
> the device tree that is passed to the kernel before booting.
> 
> Signed-off-by: Jorge Ramirez-Ortiz 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v1, 01/07] db410c: configs: increase gunzip buffer size for the kernel

2018-01-15 Thread Tom Rini
On Wed, Jan 10, 2018 at 11:34:34AM +0100, Jorge Ramirez-Ortiz wrote:

> From: Jorge Ramirez-Ortiz 
> 
> the kernel fails to boot when it goes over the limit.
> 
> Signed-off-by: Jorge Ramirez-Ortiz 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v1, 04/05] db820c: enable pmic gpios for pm8994

2018-01-15 Thread Tom Rini
On Wed, Jan 10, 2018 at 11:33:51AM +0100, Jorge Ramirez-Ortiz wrote:

> From: Jorge Ramirez-Ortiz 
> 
> Signed-off-by: Jorge Ramirez-Ortiz 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v1, 02/05] arm: mach-snapdragon: refactor clock driver

2018-01-15 Thread Tom Rini
On Wed, Jan 10, 2018 at 11:33:49AM +0100, Jorge Ramirez-Ortiz wrote:

> From: Jorge Ramirez-Ortiz 
> 
> In preparation to add support for the Dragonboard820c (APQ8096),
> refactor the current Snapdragon clock driver.
> 
> No new functionality has been added.
> 
> Signed-off-by: Jorge Ramirez-Ortiz 

Applied to u-boot/master, thanks!

But please note that this code, along with the board code, generates a
handful of checkpatch.pl issues, please investigate and fix, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v1,03/03] dm: core: parse chosen node

2018-01-15 Thread Tom Rini
On Wed, Jan 10, 2018 at 11:33:30AM +0100, Jorge Ramirez-Ortiz wrote:

> From: Rob Clark 
> 
> This is the node that would contain, for example, the framebuffer setup
> by an earlier stage.
> 
> Signed-off-by: Rob Clark 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v1, 05/05] db820c: stop autoboot when vol- pressed

2018-01-15 Thread Tom Rini
On Wed, Jan 10, 2018 at 11:33:52AM +0100, Jorge Ramirez-Ortiz wrote:

> From: Jorge Ramirez-Ortiz 
> 
> Signed-off-by: Jorge Ramirez-Ortiz 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v1, 03/05] db820c: add qualcomm dragonboard 820C support

2018-01-15 Thread Tom Rini
On Wed, Jan 10, 2018 at 11:33:50AM +0100, Jorge Ramirez-Ortiz wrote:

> From: Jorge Ramirez-Ortiz 
> 
> This commit adds support for 96Boards Dragonboard820C.
> 
> The board is based on APQ8086 Qualcomm Soc, complying with the
> 96Boards specification.
> 
> Features
>  - 4x Kyro CPU (64 bit) up to 2.15GHz
>  - USB2.0
>  - USB3.0
>  - ISP
>  - Qualcomm Hexagon DSP
>  - SD 3.0 (UHS-I)
>  - UFS 2.0
>  - Qualcomm Adreno 530 GPU
>  - GPS
>  - BT 4.2
>  - Wi-Fi 2.4GHz, 5GHz (802.11ac)
>  - PCIe 2.0
>  - MIPI-CSI, MIPI-DSI
>  - I2S
> 
> U-Boot boots chained from LK (LK implements the fastboot protocol) in
> 64-bit mode.
> 
> For detailed build instructions see readme.txt in the board directory.
> 
> Signed-off-by: Jorge Ramirez-Ortiz 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v1, 02/03] poplar: configs: increase gunzip buffer size for the kernel

2018-01-15 Thread Tom Rini
On Wed, Jan 10, 2018 at 11:33:29AM +0100, Jorge Ramirez-Ortiz wrote:

> From: Jorge Ramirez-Ortiz 
> 
> Signed-off-by: Jorge Ramirez-Ortiz 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v1, 01/03] spmi: msm: display the PMIC Arb version (debug)

2018-01-15 Thread Tom Rini
On Wed, Jan 10, 2018 at 11:33:28AM +0100, Jorge Ramirez-Ortiz wrote:

> From: Jorge Ramirez-Ortiz 
> 
> Signed-off-by: Jorge Ramirez-Ortiz 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH] mmc: fsl_esdhc: Fix i.MX53 eSDHCv3 clock

2018-01-15 Thread Stefano Babic
Hi Benoît,

On 15/01/2018 22:11, Benoît Thébaudeau wrote:
> Hi Stefano,
> 
> On Mon, Jan 15, 2018 at 11:59 AM, Stefano Babic  wrote:
>> On 15/01/2018 00:46, Benoît Thébaudeau wrote:
>>> + int pre_div = regs == (struct fsl_esdhc *)MMC_SDHC3_BASE_ADDR ? 2 : 1;
>>
>> It is surely a question of taste - but is it not cleared to surround the
>> expression with parenthesis ? (regs ==  )
> 
> I can send a v2 for that if you want. Which of the following do you
> prefer (personally, I'd say the last one)?
> 
> int pre_div = (regs == (struct fsl_esdhc *)MMC_SDHC3_BASE_ADDR ? 2 : 1);
> int pre_div = (regs == (struct fsl_esdhc *)MMC_SDHC3_BASE_ADDR) ? 2 : 1;
> 

I agree for last one - but as I said, it is just a question of taste.

> Note that this patch can be tested with the 2nd MMC on i.MX53 Loco if
> anyone has this board. Wladimir?

Best regards,
Stefano

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


Re: [U-Boot] UEFI on u-boot

2018-01-15 Thread Heinrich Schuchardt



On 01/15/2018 10:32 AM, Udit Kumar wrote:

Hi Alex


-Original Message-
From: Alexander Graf [mailto:ag...@suse.de]
Sent: Monday, January 15, 2018 2:45 PM
To: Udit Kumar 

Hi Udit,

On 15.01.18 10:09, Udit Kumar wrote:

Hi Alex,
Hope you are doing great,

Could you help on UEFI over the u-boot.
1- I couldn't locate EFI_DXE_SERVICES in u-boot, do you have plan to
add those


Right now the model is that all device drivers are implemented by U-Boot
and that only exposes their interfaces to EFI applications. Implementing DXE
in U-Boot would open quite a big can of worms, as it would really only be
useful in compilation with PI which is a terrible interface :).


Ok,
  

2- If I load  a driver (with bootefi) which install few protocols,  is
this ok to do with u-boot


With the command bootefi you can load an executable that adds boottime 
or runtime services.


Unfortunatly there are some missing points:

When loading the image the memory category reserved for the image is not 
chosen in dependence of the image type. This will cause major trouble 
for runtime drivers.


The exit() service does not call the unload function of the 
driver/application.




It depends on how much the driver does, but in general yes. Heinrich is
currently working on making the iPXE iSCSI driver work, so his EFI payload
would expose an EFI block device to yet another payload running after his.


Thanks for this,
Heinrich,  in  this driver, are you accessing underneath hardware register
by UEFI-Driver and managing UEFI protocols
or you are relying on some h/w access exposed by u-boot driver



U-Boot exposes the network interface as EFI simple network protocol.
iPXE provides TCP and iSCSI on top of the SNP.
It creates a handle and install the a block IO protocol on it.
When ConnectController is called the U-Boot EFI block driver creates the 
partitions as children of aforementioned handle and installs the simple 
file protocol on the child handles.


See patch
https://lists.denx.de/pipermail/u-boot/2018-January/316708.html

Regards

Heinrich



  

3- if you say, 2 is ok then I hope these protocols are kept in some
data base, and this new protocol can be opened by an application


Yes, the protocol database is now global and persistent across bootefi
invocations.


Thanks
  

4- if there is some known limitation, like we cannot run DXE_driver
etc


What exactly are you trying to do? With the U-Boot UEFI implementation
we're trying to find a sweet spot between implementing as much as makes
sense, but not the whole UEFI world, as that would just bloat the code
needlessly.


I am trying to add a driver (DXE by definition) which
a) Access the hardware registers. (I said DXE could due to hardware registers)
b) Update memory map as well (AddMemorySpace call)
c) Finally it export a protocol, which could be used by its test application.

For b) I am not able to find function call,
For a), if I say driver is UEFI and accessing hardware register, will this be 
acceptable ?
  


Alex

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


Re: [U-Boot] [PATCH] mmc: fsl_esdhc: Fix i.MX53 eSDHCv3 clock

2018-01-15 Thread Benoît Thébaudeau
Hi Stefano,

On Mon, Jan 15, 2018 at 11:59 AM, Stefano Babic  wrote:
> On 15/01/2018 00:46, Benoît Thébaudeau wrote:
>> + int pre_div = regs == (struct fsl_esdhc *)MMC_SDHC3_BASE_ADDR ? 2 : 1;
>
> It is surely a question of taste - but is it not cleared to surround the
> expression with parenthesis ? (regs ==  )

I can send a v2 for that if you want. Which of the following do you
prefer (personally, I'd say the last one)?

int pre_div = (regs == (struct fsl_esdhc *)MMC_SDHC3_BASE_ADDR ? 2 : 1);
int pre_div = (regs == (struct fsl_esdhc *)MMC_SDHC3_BASE_ADDR) ? 2 : 1;

Note that this patch can be tested with the 2nd MMC on i.MX53 Loco if
anyone has this board. Wladimir?

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


[U-Boot] [PATCH v5 3/4] mips: bmips: add bcm63xx-hsspi driver support for BCM63268

2018-01-15 Thread Álvaro Fernández Rojas
This driver manages the high speed SPI controller present on this SoC.

Signed-off-by: Álvaro Fernández Rojas 
Reviewed-by: Simon Glass 
Reviewed-by: Daniel Schwierzeck 
---
 v5: no changes
 v4: no changes
 v3: no changes
 v2: no changes

 arch/mips/dts/brcm,bcm63268.dtsi | 21 +
 1 file changed, 21 insertions(+)

diff --git a/arch/mips/dts/brcm,bcm63268.dtsi b/arch/mips/dts/brcm,bcm63268.dtsi
index 6e3d9c3820..4d4e36 100644
--- a/arch/mips/dts/brcm,bcm63268.dtsi
+++ b/arch/mips/dts/brcm,bcm63268.dtsi
@@ -15,6 +15,7 @@
 
aliases {
spi0 = 
+   spi1 = 
};
 
cpus {
@@ -44,6 +45,12 @@
#size-cells = <1>;
u-boot,dm-pre-reloc;
 
+   hsspi_pll: hsspi-pll {
+   compatible = "fixed-clock";
+   #clock-cells = <0>;
+   clock-frequency = <4>;
+   };
+
periph_osc: periph-osc {
compatible = "fixed-clock";
#clock-cells = <0>;
@@ -153,6 +160,20 @@
status = "disabled";
};
 
+   hsspi: spi@10001000 {
+   compatible = "brcm,bcm6328-hsspi";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <0x10001000 0x600>;
+   clocks = <_clk BCM63268_CLK_HSSPI>, <_pll>;
+   clock-names = "hsspi", "pll";
+   resets = <_rst BCM63268_RST_SPI>;
+   spi-max-frequency = <5000>;
+   num-cs = <8>;
+
+   status = "disabled";
+   };
+
leds: led-controller@10001900 {
compatible = "brcm,bcm6328-leds";
reg = <0x10001900 0x24>;
-- 
2.11.0

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


[U-Boot] [PATCH v5 4/4] mips: bmips: enable the SPI flash on the Comtrend AR-5387un

2018-01-15 Thread Álvaro Fernández Rojas
It's a Macronix (mx25l12805d) 16 MB SPI flash.

Signed-off-by: Álvaro Fernández Rojas 
Reviewed-by: Simon Glass 
Reviewed-by: Daniel Schwierzeck 
---
 v5: no changes
 v4: Sync with master.
 v3: switch to CONFIG_BCM63XX_HSSPI
 v2: no changes

 arch/mips/dts/comtrend,ar-5387un.dts| 12 
 configs/comtrend_ar5387un_ram_defconfig |  8 
 2 files changed, 20 insertions(+)

diff --git a/arch/mips/dts/comtrend,ar-5387un.dts 
b/arch/mips/dts/comtrend,ar-5387un.dts
index 73f2b49b76..6067881a78 100644
--- a/arch/mips/dts/comtrend,ar-5387un.dts
+++ b/arch/mips/dts/comtrend,ar-5387un.dts
@@ -51,6 +51,18 @@
};
 };
 
+ {
+   status = "okay";
+
+   spi-flash@0 {
+   compatible = "spi-flash";
+   reg = <0>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+   spi-max-frequency = <3334>;
+   };
+};
+
  {
u-boot,dm-pre-reloc;
status = "okay";
diff --git a/configs/comtrend_ar5387un_ram_defconfig 
b/configs/comtrend_ar5387un_ram_defconfig
index b64018ae71..59ec86b253 100644
--- a/configs/comtrend_ar5387un_ram_defconfig
+++ b/configs/comtrend_ar5387un_ram_defconfig
@@ -41,3 +41,11 @@ CONFIG_RESET_BCM6345=y
 # CONFIG_SPL_SERIAL_PRESENT is not set
 CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=y
+CONFIG_BCM63XX_HSSPI=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_MTD=y
+CONFIG_SPI_FLASH_MACRONIX=y
-- 
2.11.0

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


[U-Boot] [PATCH v5 1/4] dm: spi: add BCM63xx HSSPI driver

2018-01-15 Thread Álvaro Fernández Rojas
This driver is a simplified version of linux/drivers/spi/spi-bcm63xx-hsspi.c

Signed-off-by: Álvaro Fernández Rojas 
Reviewed-by: Simon Glass 
Reviewed-by: Daniel Schwierzeck 
---
 v5: Introduce changes suggested by Jagan Teki:
  - Rename SPI_PP_ macros.
  - cs_activate instead of claim_cs.
  - deactivate_cs instead of release_cs.
  - Use wait_for_bit_be32 instead of infinite loop.
 v4: no changes.
 v3: Switch to CONFIG_BCM63XX_HSSPI and rebase on top of SPI v4.
 v2: Introduce changes suggested by Simon Glass:
  - Split bcm63xx_hsspi_xfer() into smaller functions.
  - Check possible clock errors.
  - Check possible reset errors.
  - Switch to devfdt_get_addr_size_index().
  - Use setbits32_be() for clock gate.
 
 drivers/spi/Kconfig |   8 +
 drivers/spi/Makefile|   1 +
 drivers/spi/bcm63xx_hsspi.c | 414 
 3 files changed, 423 insertions(+)
 create mode 100644 drivers/spi/bcm63xx_hsspi.c

diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index ebc71c2e42..28ddcf85a3 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -40,6 +40,14 @@ config ATMEL_SPI
  many AT91 (ARM) chips. This driver can be used to access
  the SPI Flash, such as AT25DF321.
 
+config BCM63XX_HSSPI
+   bool "BCM63XX HSSPI driver"
+   depends on ARCH_BMIPS
+   help
+ Enable the BCM6328 HSSPI driver. This driver can be used to
+ access the SPI NOR flash on platforms embedding this Broadcom
+ SPI core.
+
 config BCM63XX_SPI
bool "BCM6348 SPI driver"
depends on ARCH_BMIPS
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index 5770b3f7cc..4b6000fd9a 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -18,6 +18,7 @@ endif
 obj-$(CONFIG_ALTERA_SPI) += altera_spi.o
 obj-$(CONFIG_ATH79_SPI) += ath79_spi.o
 obj-$(CONFIG_ATMEL_SPI) += atmel_spi.o
+obj-$(CONFIG_BCM63XX_HSSPI) += bcm63xx_hsspi.o
 obj-$(CONFIG_BCM63XX_SPI) += bcm63xx_spi.o
 obj-$(CONFIG_CADENCE_QSPI) += cadence_qspi.o cadence_qspi_apb.o
 obj-$(CONFIG_CF_SPI) += cf_spi.o
diff --git a/drivers/spi/bcm63xx_hsspi.c b/drivers/spi/bcm63xx_hsspi.c
new file mode 100644
index 00..3393166a1e
--- /dev/null
+++ b/drivers/spi/bcm63xx_hsspi.c
@@ -0,0 +1,414 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas 
+ *
+ * Derived from linux/drivers/spi/spi-bcm63xx-hsspi.c:
+ * Copyright (C) 2000-2010 Broadcom Corporation
+ * Copyright (C) 2012-2013 Jonas Gorski 
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define HSSPI_PP   0
+
+#define SPI_MAX_SYNC_CLOCK 3000
+
+/* SPI Control register */
+#define SPI_CTL_REG0x000
+#define SPI_CTL_CS_POL_SHIFT   0
+#define SPI_CTL_CS_POL_MASK(0xff << SPI_CTL_CS_POL_SHIFT)
+#define SPI_CTL_CLK_GATE_SHIFT 16
+#define SPI_CTL_CLK_GATE_MASK  (1 << SPI_CTL_CLK_GATE_SHIFT)
+#define SPI_CTL_CLK_POL_SHIFT  17
+#define SPI_CTL_CLK_POL_MASK   (1 << SPI_CTL_CLK_POL_SHIFT)
+
+/* SPI Interrupts registers */
+#define SPI_IR_STAT_REG0x008
+#define SPI_IR_ST_MASK_REG 0x00c
+#define SPI_IR_MASK_REG0x010
+
+#define SPI_IR_CLEAR_ALL   0xff001f1f
+
+/* SPI Ping-Pong Command registers */
+#define SPI_CMD_REG(0x080 + (0x40 * (HSSPI_PP)) + 0x00)
+#define SPI_CMD_OP_SHIFT   0
+#define SPI_CMD_OP_START   (0x1 << SPI_CMD_OP_SHIFT)
+#define SPI_CMD_PFL_SHIFT  8
+#define SPI_CMD_PFL_MASK   (0x7 << SPI_CMD_PFL_SHIFT)
+#define SPI_CMD_SLAVE_SHIFT12
+#define SPI_CMD_SLAVE_MASK (0x7 << SPI_CMD_SLAVE_SHIFT)
+
+/* SPI Ping-Pong Status registers */
+#define SPI_STAT_REG   (0x080 + (0x40 * (HSSPI_PP)) + 0x04)
+#define SPI_STAT_SRCBUSY_SHIFT 1
+#define SPI_STAT_SRCBUSY_MASK  (1 << SPI_STAT_SRCBUSY_SHIFT)
+
+/* SPI Profile Clock registers */
+#define SPI_PFL_CLK_REG(x) (0x100 + (0x20 * (x)) + 0x00)
+#define SPI_PFL_CLK_FREQ_SHIFT 0
+#define SPI_PFL_CLK_FREQ_MASK  (0x3fff << SPI_PFL_CLK_FREQ_SHIFT)
+#define SPI_PFL_CLK_RSTLOOP_SHIFT  15
+#define SPI_PFL_CLK_RSTLOOP_MASK   (1 << SPI_PFL_CLK_RSTLOOP_SHIFT)
+
+/* SPI Profile Signal registers */
+#define SPI_PFL_SIG_REG(x) (0x100 + (0x20 * (x)) + 0x04)
+#define SPI_PFL_SIG_LATCHRIS_SHIFT 12
+#define SPI_PFL_SIG_LATCHRIS_MASK  (1 << SPI_PFL_SIG_LATCHRIS_SHIFT)
+#define SPI_PFL_SIG_LAUNCHRIS_SHIFT13
+#define SPI_PFL_SIG_LAUNCHRIS_MASK (1 << SPI_PFL_SIG_LAUNCHRIS_SHIFT)
+#define SPI_PFL_SIG_ASYNCIN_SHIFT  16
+#define SPI_PFL_SIG_ASYNCIN_MASK   (1 << SPI_PFL_SIG_ASYNCIN_SHIFT)
+
+/* SPI Profile Mode 

[U-Boot] [PATCH v5 2/4] mips: bmips: add bcm63xx-hsspi driver support for BCM6328

2018-01-15 Thread Álvaro Fernández Rojas
This driver manages the SPI controller present on this SoC.

Signed-off-by: Álvaro Fernández Rojas 
Reviewed-by: Simon Glass 
Reviewed-by: Daniel Schwierzeck 
---
 v5: no changes
 v4: no changes
 v3: no changes
 v2: no changes

 arch/mips/dts/brcm,bcm6328.dtsi | 24 
 1 file changed, 24 insertions(+)

diff --git a/arch/mips/dts/brcm,bcm6328.dtsi b/arch/mips/dts/brcm,bcm6328.dtsi
index a996075743..67d9278be4 100644
--- a/arch/mips/dts/brcm,bcm6328.dtsi
+++ b/arch/mips/dts/brcm,bcm6328.dtsi
@@ -13,6 +13,10 @@
 / {
compatible = "brcm,bcm6328";
 
+   aliases {
+   spi0 = 
+   };
+
cpus {
reg = <0x1000 0x4>;
#address-cells = <1>;
@@ -40,6 +44,12 @@
#size-cells = <1>;
u-boot,dm-pre-reloc;
 
+   hsspi_pll: hsspi-pll {
+   compatible = "fixed-clock";
+   #clock-cells = <0>;
+   clock-frequency = <1>;
+   };
+
periph_osc: periph-osc {
compatible = "fixed-clock";
#clock-cells = <0>;
@@ -123,6 +133,20 @@
status = "disabled";
};
 
+   spi: spi@10001000 {
+   compatible = "brcm,bcm6328-hsspi";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <0x10001000 0x600>;
+   clocks = <_clk BCM6328_CLK_HSSPI>, <_pll>;
+   clock-names = "hsspi", "pll";
+   resets = <_rst BCM6328_RST_SPI>;
+   spi-max-frequency = <3334>;
+   num-cs = <3>;
+
+   status = "disabled";
+   };
+
periph_pwr: power-controller@10001848 {
compatible = "brcm,bcm6328-power-domain";
reg = <0x10001848 0x4>;
-- 
2.11.0

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


[U-Boot] [PATCH v5 0/4] mips: bmips: add HSSPI support

2018-01-15 Thread Álvaro Fernández Rojas
BCM63xx HSSPI controller has the same issue as BCM63xx SPI controller: it
doesn't allow keeping CS active between transfers.
However, this controller allows changing CS polarities, which is used in the
linux upstream driver to manage CS as desired.

v5: Introduce changes suggested by Jagan Teki:
 - Rename SPI_PP_ macros.
 - cs_activate instead of claim_cs.
 - deactivate_cs instead of release_cs.
 - Use wait_for_bit_be32 instead of infinite loop.
v4: Sync with master.
v3: Switch to CONFIG_BCM63XX_HSSPI and rebase on top of SPI v4.
v2: Introduce changes suggested by Simon Glass:
 - Split bcm63xx_hsspi_xfer() into smaller functions.
 - Check possible clock errors.
 - Check possible reset errors.
 - Switch to devfdt_get_addr_size_index().
 - Use setbits32_be() for clock gate.

Álvaro Fernández Rojas (4):
  dm: spi: add BCM63xx HSSPI driver
  mips: bmips: add bcm63xx-hsspi driver support for BCM6328
  mips: bmips: add bcm63xx-hsspi driver support for BCM63268
  mips: bmips: enable the SPI flash on the Comtrend AR-5387un

 arch/mips/dts/brcm,bcm63268.dtsi|  21 ++
 arch/mips/dts/brcm,bcm6328.dtsi |  24 ++
 arch/mips/dts/comtrend,ar-5387un.dts|  12 +
 configs/comtrend_ar5387un_ram_defconfig |   8 +
 drivers/spi/Kconfig |   8 +
 drivers/spi/Makefile|   1 +
 drivers/spi/bcm63xx_hsspi.c | 414 
 7 files changed, 488 insertions(+)
 create mode 100644 drivers/spi/bcm63xx_hsspi.c

-- 
2.11.0

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


Re: [U-Boot] Pull request: u-boot-net.git master

2018-01-15 Thread Joe Hershberger
On Mon, Jan 15, 2018 at 12:22 PM, Tom Rini  wrote:
> On Mon, Jan 15, 2018 at 12:15:24PM -0600, Joe Hershberger wrote:
>> On Mon, Jan 15, 2018 at 12:13 PM, Tom Rini  wrote:
>> > On Mon, Jan 15, 2018 at 12:10:17PM -0600, Joe Hershberger wrote:
>> >> Hi Tom,
>> >>
>> >> On Tue, Jan 9, 2018 at 12:06 PM, Tom Rini  wrote:
>> >> > On Wed, Jan 03, 2018 at 03:32:31PM -0600, Joe Hershberger wrote:
>> >> >
>> >> >> Hi Tom,
>> >> >>
>> >> >> The following changes since commit 
>> >> >> 1314bd1192b4c67d28bdae7eee639588e88090cd:
>> >> >>
>> >> >>   boards: amlogic: khadas-vim: Typo fixup (2018-01-02 07:57:34 -0500)
>> >> >>
>> >> >> are available in the git repository at:
>> >> >>
>> >> >>   git://git.denx.de/u-boot-net.git master
>> >> >>
>> >> >> for you to fetch changes up to 
>> >> >> c925860a49905177e6c355cacf7a25b4c617af6b:
>> >> >>
>> >> >>   phy: atheros: set auto-negotiation for AR8021 (2018-01-03 11:06:31 
>> >> >> -0600)
>> >> >>
>> >> >>
>> >> >> All board pass compile tests on Travis: 
>> >> >> https://travis-ci.org/jhershbe/u-boot/builds/324666118
>> >> >>
>> >> >>
>> >> >
>> >> > NAK.  The following change (via git bisect'ing):
>> >> > commit 003eaf15a043cf6f9c21d757a93610575d9b7ba2
>> >> > Author: Joe Hershberger 
>> >> > Date:   Wed Aug 30 17:42:26 2017 -0500
>> >> >
>> >> > net: Correct size of NFS buffers
>> >> >
>> >> > Reported-by: Coverity (CID: 152888)
>> >> > Signed-off-by: Joe Hershberger 
>> >> > is breaking NFS for me on my am335x_evm:
>> >> > 12:58:46 - Captured stdout call 
>> >> > -
>> >> > 12:58:46 => nfs 8040 /tftpboot/1MiBtest.bin
>> >> > 12:58:46 link up on port 0, speed 1000, full duplex
>> >> > 12:58:46 
>> >> > #
>> >> > 12:58:46 
>> >> > #
>> >> > 12:58:46 
>> >> > #
>> >> > 12:58:46 ##
>> >> > 12:58:46 done
>> >> > 12:58:46 Bytes transferred = 1048576 (10 hex)
>> >> > 12:58:46 => => crc32 8040 $filesize
>> >> > 12:58:46 crc32 for 8040 ... 804f ==> 1edf15ed
>> >> > 12:58:46 =>
>> >> > 12:58:46 === 1 failed, 78 passed, 25 skipped in 32.80 
>> >> > seconds ===
>> >> >
>> >> > I can't point to any SW-only tests that show this as they're passing.  
>> >> > Any ideas?
>> >> > Thanks!
>> >>
>> >> I can't see any obvious reason for the error, so it will need
>> >> debugging. I've sent a new PR with this dropped for now. I'll look
>> >> into fixing it for real when I can get to it.
>> >>
>> >> Are these tests you're running possible to include in travis?
>> >
>> > So, that's part of the problem.  These are the standard tests we do run
>> > in Travis, in QEMU, and they pass.  It's only on real hardware where it
>> > fails.
>>
>> OK, good to know. Any particular arch? or just all that you have tried?
>
> It honestly failed on the first real board I tried it on, so I didn't
> try others.  I suppose since I have a faster local box than I used to, I
> might look at turning my real HW tests in jenkins into a matrix rather
> than a single job.  It failed on am335x_evm which is ARM.

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


Re: [U-Boot] Pull request: u-boot-net.git master

2018-01-15 Thread Tom Rini
On Mon, Jan 15, 2018 at 12:15:24PM -0600, Joe Hershberger wrote:
> On Mon, Jan 15, 2018 at 12:13 PM, Tom Rini  wrote:
> > On Mon, Jan 15, 2018 at 12:10:17PM -0600, Joe Hershberger wrote:
> >> Hi Tom,
> >>
> >> On Tue, Jan 9, 2018 at 12:06 PM, Tom Rini  wrote:
> >> > On Wed, Jan 03, 2018 at 03:32:31PM -0600, Joe Hershberger wrote:
> >> >
> >> >> Hi Tom,
> >> >>
> >> >> The following changes since commit 
> >> >> 1314bd1192b4c67d28bdae7eee639588e88090cd:
> >> >>
> >> >>   boards: amlogic: khadas-vim: Typo fixup (2018-01-02 07:57:34 -0500)
> >> >>
> >> >> are available in the git repository at:
> >> >>
> >> >>   git://git.denx.de/u-boot-net.git master
> >> >>
> >> >> for you to fetch changes up to c925860a49905177e6c355cacf7a25b4c617af6b:
> >> >>
> >> >>   phy: atheros: set auto-negotiation for AR8021 (2018-01-03 11:06:31 
> >> >> -0600)
> >> >>
> >> >>
> >> >> All board pass compile tests on Travis: 
> >> >> https://travis-ci.org/jhershbe/u-boot/builds/324666118
> >> >>
> >> >>
> >> >
> >> > NAK.  The following change (via git bisect'ing):
> >> > commit 003eaf15a043cf6f9c21d757a93610575d9b7ba2
> >> > Author: Joe Hershberger 
> >> > Date:   Wed Aug 30 17:42:26 2017 -0500
> >> >
> >> > net: Correct size of NFS buffers
> >> >
> >> > Reported-by: Coverity (CID: 152888)
> >> > Signed-off-by: Joe Hershberger 
> >> > is breaking NFS for me on my am335x_evm:
> >> > 12:58:46 - Captured stdout call 
> >> > -
> >> > 12:58:46 => nfs 8040 /tftpboot/1MiBtest.bin
> >> > 12:58:46 link up on port 0, speed 1000, full duplex
> >> > 12:58:46 
> >> > #
> >> > 12:58:46 
> >> > #
> >> > 12:58:46 
> >> > #
> >> > 12:58:46 ##
> >> > 12:58:46 done
> >> > 12:58:46 Bytes transferred = 1048576 (10 hex)
> >> > 12:58:46 => => crc32 8040 $filesize
> >> > 12:58:46 crc32 for 8040 ... 804f ==> 1edf15ed
> >> > 12:58:46 =>
> >> > 12:58:46 === 1 failed, 78 passed, 25 skipped in 32.80 
> >> > seconds ===
> >> >
> >> > I can't point to any SW-only tests that show this as they're passing.  
> >> > Any ideas?
> >> > Thanks!
> >>
> >> I can't see any obvious reason for the error, so it will need
> >> debugging. I've sent a new PR with this dropped for now. I'll look
> >> into fixing it for real when I can get to it.
> >>
> >> Are these tests you're running possible to include in travis?
> >
> > So, that's part of the problem.  These are the standard tests we do run
> > in Travis, in QEMU, and they pass.  It's only on real hardware where it
> > fails.
> 
> OK, good to know. Any particular arch? or just all that you have tried?

It honestly failed on the first real board I tried it on, so I didn't
try others.  I suppose since I have a faster local box than I used to, I
might look at turning my real HW tests in jenkins into a matrix rather
than a single job.  It failed on am335x_evm which is ARM.

-- 
Tom


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


Re: [U-Boot] Pull request: u-boot-net.git master

2018-01-15 Thread Joe Hershberger
On Mon, Jan 15, 2018 at 12:13 PM, Tom Rini  wrote:
> On Mon, Jan 15, 2018 at 12:10:17PM -0600, Joe Hershberger wrote:
>> Hi Tom,
>>
>> On Tue, Jan 9, 2018 at 12:06 PM, Tom Rini  wrote:
>> > On Wed, Jan 03, 2018 at 03:32:31PM -0600, Joe Hershberger wrote:
>> >
>> >> Hi Tom,
>> >>
>> >> The following changes since commit 
>> >> 1314bd1192b4c67d28bdae7eee639588e88090cd:
>> >>
>> >>   boards: amlogic: khadas-vim: Typo fixup (2018-01-02 07:57:34 -0500)
>> >>
>> >> are available in the git repository at:
>> >>
>> >>   git://git.denx.de/u-boot-net.git master
>> >>
>> >> for you to fetch changes up to c925860a49905177e6c355cacf7a25b4c617af6b:
>> >>
>> >>   phy: atheros: set auto-negotiation for AR8021 (2018-01-03 11:06:31 
>> >> -0600)
>> >>
>> >>
>> >> All board pass compile tests on Travis: 
>> >> https://travis-ci.org/jhershbe/u-boot/builds/324666118
>> >>
>> >>
>> >
>> > NAK.  The following change (via git bisect'ing):
>> > commit 003eaf15a043cf6f9c21d757a93610575d9b7ba2
>> > Author: Joe Hershberger 
>> > Date:   Wed Aug 30 17:42:26 2017 -0500
>> >
>> > net: Correct size of NFS buffers
>> >
>> > Reported-by: Coverity (CID: 152888)
>> > Signed-off-by: Joe Hershberger 
>> > is breaking NFS for me on my am335x_evm:
>> > 12:58:46 - Captured stdout call 
>> > -
>> > 12:58:46 => nfs 8040 /tftpboot/1MiBtest.bin
>> > 12:58:46 link up on port 0, speed 1000, full duplex
>> > 12:58:46 #
>> > 12:58:46 
>> > #
>> > 12:58:46 
>> > #
>> > 12:58:46 ##
>> > 12:58:46 done
>> > 12:58:46 Bytes transferred = 1048576 (10 hex)
>> > 12:58:46 => => crc32 8040 $filesize
>> > 12:58:46 crc32 for 8040 ... 804f ==> 1edf15ed
>> > 12:58:46 =>
>> > 12:58:46 === 1 failed, 78 passed, 25 skipped in 32.80 seconds 
>> > ===
>> >
>> > I can't point to any SW-only tests that show this as they're passing.  Any 
>> > ideas?
>> > Thanks!
>>
>> I can't see any obvious reason for the error, so it will need
>> debugging. I've sent a new PR with this dropped for now. I'll look
>> into fixing it for real when I can get to it.
>>
>> Are these tests you're running possible to include in travis?
>
> So, that's part of the problem.  These are the standard tests we do run
> in Travis, in QEMU, and they pass.  It's only on real hardware where it
> fails.

OK, good to know. Any particular arch? or just all that you have tried?
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] Pull request: u-boot-net.git master

2018-01-15 Thread Tom Rini
On Mon, Jan 15, 2018 at 12:10:17PM -0600, Joe Hershberger wrote:
> Hi Tom,
> 
> On Tue, Jan 9, 2018 at 12:06 PM, Tom Rini  wrote:
> > On Wed, Jan 03, 2018 at 03:32:31PM -0600, Joe Hershberger wrote:
> >
> >> Hi Tom,
> >>
> >> The following changes since commit 
> >> 1314bd1192b4c67d28bdae7eee639588e88090cd:
> >>
> >>   boards: amlogic: khadas-vim: Typo fixup (2018-01-02 07:57:34 -0500)
> >>
> >> are available in the git repository at:
> >>
> >>   git://git.denx.de/u-boot-net.git master
> >>
> >> for you to fetch changes up to c925860a49905177e6c355cacf7a25b4c617af6b:
> >>
> >>   phy: atheros: set auto-negotiation for AR8021 (2018-01-03 11:06:31 -0600)
> >>
> >>
> >> All board pass compile tests on Travis: 
> >> https://travis-ci.org/jhershbe/u-boot/builds/324666118
> >>
> >>
> >
> > NAK.  The following change (via git bisect'ing):
> > commit 003eaf15a043cf6f9c21d757a93610575d9b7ba2
> > Author: Joe Hershberger 
> > Date:   Wed Aug 30 17:42:26 2017 -0500
> >
> > net: Correct size of NFS buffers
> >
> > Reported-by: Coverity (CID: 152888)
> > Signed-off-by: Joe Hershberger 
> > is breaking NFS for me on my am335x_evm:
> > 12:58:46 - Captured stdout call 
> > -
> > 12:58:46 => nfs 8040 /tftpboot/1MiBtest.bin
> > 12:58:46 link up on port 0, speed 1000, full duplex
> > 12:58:46 #
> > 12:58:46 
> > #
> > 12:58:46 
> > #
> > 12:58:46 ##
> > 12:58:46 done
> > 12:58:46 Bytes transferred = 1048576 (10 hex)
> > 12:58:46 => => crc32 8040 $filesize
> > 12:58:46 crc32 for 8040 ... 804f ==> 1edf15ed
> > 12:58:46 =>
> > 12:58:46 === 1 failed, 78 passed, 25 skipped in 32.80 seconds 
> > ===
> >
> > I can't point to any SW-only tests that show this as they're passing.  Any 
> > ideas?
> > Thanks!
> 
> I can't see any obvious reason for the error, so it will need
> debugging. I've sent a new PR with this dropped for now. I'll look
> into fixing it for real when I can get to it.
> 
> Are these tests you're running possible to include in travis?

So, that's part of the problem.  These are the standard tests we do run
in Travis, in QEMU, and they pass.  It's only on real hardware where it
fails.

-- 
Tom


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


Re: [U-Boot] Pull request: u-boot-net.git master

2018-01-15 Thread Joe Hershberger
Hi Tom,

On Tue, Jan 9, 2018 at 12:06 PM, Tom Rini  wrote:
> On Wed, Jan 03, 2018 at 03:32:31PM -0600, Joe Hershberger wrote:
>
>> Hi Tom,
>>
>> The following changes since commit 1314bd1192b4c67d28bdae7eee639588e88090cd:
>>
>>   boards: amlogic: khadas-vim: Typo fixup (2018-01-02 07:57:34 -0500)
>>
>> are available in the git repository at:
>>
>>   git://git.denx.de/u-boot-net.git master
>>
>> for you to fetch changes up to c925860a49905177e6c355cacf7a25b4c617af6b:
>>
>>   phy: atheros: set auto-negotiation for AR8021 (2018-01-03 11:06:31 -0600)
>>
>>
>> All board pass compile tests on Travis: 
>> https://travis-ci.org/jhershbe/u-boot/builds/324666118
>>
>>
>
> NAK.  The following change (via git bisect'ing):
> commit 003eaf15a043cf6f9c21d757a93610575d9b7ba2
> Author: Joe Hershberger 
> Date:   Wed Aug 30 17:42:26 2017 -0500
>
> net: Correct size of NFS buffers
>
> Reported-by: Coverity (CID: 152888)
> Signed-off-by: Joe Hershberger 
> is breaking NFS for me on my am335x_evm:
> 12:58:46 - Captured stdout call 
> -
> 12:58:46 => nfs 8040 /tftpboot/1MiBtest.bin
> 12:58:46 link up on port 0, speed 1000, full duplex
> 12:58:46 #
> 12:58:46 
> #
> 12:58:46 
> #
> 12:58:46 ##
> 12:58:46 done
> 12:58:46 Bytes transferred = 1048576 (10 hex)
> 12:58:46 => => crc32 8040 $filesize
> 12:58:46 crc32 for 8040 ... 804f ==> 1edf15ed
> 12:58:46 =>
> 12:58:46 === 1 failed, 78 passed, 25 skipped in 32.80 seconds 
> ===
>
> I can't point to any SW-only tests that show this as they're passing.  Any 
> ideas?
> Thanks!

I can't see any obvious reason for the error, so it will need
debugging. I've sent a new PR with this dropped for now. I'll look
into fixing it for real when I can get to it.

Are these tests you're running possible to include in travis?

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


[U-Boot] Pull request: u-boot-net.git master

2018-01-15 Thread Joe Hershberger
Hi Tom,

The following changes since commit 3dde8f20377c3a051dda64497bdf0cdb23e03a2d:

  Merge git://git.denx.de/u-boot-mmc (2018-01-14 22:26:38 -0500)

are available in the git repository at:


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

for you to fetch changes up to 1e2d2597a667e16adfe0a8a9be22e904cee84727:

  phy: atheros: set auto-negotiation for AR8021 (2018-01-15 12:05:27 -0600)


Chris Brandt (3):
  net: sh-eth: fix inl and outl definitions
  net: sh-eth: remove sh_eth_offset_rz table
  net: miiphybb: fix casting error

Florian Fainelli (4):
  net: phy: Add Broadcom BCM53xx switch driver
  net: designware: Pad small packets
  net: phy: b53: Add b53_reg read/write commands
  configs: Update Lamobo_R1 with B53 switch options

Jason Brown (1):
  net: mvneta - Fixed recv() when multiple packets have arrived.

Joe Hershberger (3):
  net: Fix buffer overrun error in netconsole
  net: Remove nfs.h include from bootp.c
  net: dhcp: Allow "MAY_FAIL" to still try each adapter

Lukasz Majewski (1):
  net: phy: marvell: Add functions to read PHY's extended registers

Nobuhiro Iwamatsu (5):
  net: sh-eth: Fix coding style checked by checkpatch.pl
  net: sh-eth: Remove bd_t from sh_eth_config()
  net: sh-eth: Change read/write() param to struct sh_eth_info
  net: sh-eth: Fix misaligned cache operation warning
  net: sh-eth: Add to Kconfig and convert

Patrice Chotard (2):
  dm: core: add missing dev_count_phandle_with_args()
  net: designware: add clock support

Wilson Lee (1):
  net: macb: Add support for Xilinx Zynq SoC

Zhao Qiang (1):
  phy: atheros: set auto-negotiation for AR8021

 configs/Lamobo_R1_defconfig|   3 +
 configs/alt_defconfig  |   3 +-
 configs/ap_sh4a_4a_defconfig   |   3 +-
 configs/armadillo-800eva_defconfig |   3 +-
 configs/ecovec_defconfig   |   3 +-
 configs/espt_defconfig |   3 +-
 configs/gose_defconfig |   3 +-
 configs/koelsch_defconfig  |   3 +-
 configs/lager_defconfig|   3 +-
 configs/porter_defconfig   |   3 +-
 configs/r0p7734_defconfig  |   3 +-
 configs/sh7752evb_defconfig|   3 +-
 configs/sh7753evb_defconfig|   3 +-
 configs/sh7757lcr_defconfig|   3 +-
 configs/sh7763rdp_defconfig|   3 +-
 configs/silk_defconfig |   3 +-
 configs/stout_defconfig|   3 +-
 drivers/core/read.c|   7 +
 drivers/net/Kconfig|  13 +
 drivers/net/designware.c   |  48 +++
 drivers/net/designware.h   |   4 +
 drivers/net/macb.c |  91 -
 drivers/net/macb.h |   1 +
 drivers/net/mvneta.c   |   6 +-
 drivers/net/netconsole.c   |   7 +-
 drivers/net/phy/Kconfig|  17 +
 drivers/net/phy/Makefile   |   1 +
 drivers/net/phy/atheros.c  |   1 +
 drivers/net/phy/b53.c  | 768 +
 drivers/net/phy/marvell.c  |  29 ++
 drivers/net/phy/miiphybb.c |   2 +-
 drivers/net/phy/phy.c  |   3 +
 drivers/net/sh_eth.c   | 155 
 drivers/net/sh_eth.h   |  76 +---
 include/configs/alt.h  |   1 -
 include/configs/ap_sh4a_4a.h   |   1 -
 include/configs/armadillo-800eva.h |   1 -
 include/configs/ecovec.h   |   1 -
 include/configs/espt.h |   1 -
 include/configs/gose.h |   1 -
 include/configs/koelsch.h  |   1 -
 include/configs/lager.h|   1 -
 include/configs/porter.h   |   1 -
 include/configs/r0p7734.h  |   1 -
 include/configs/sh7752evb.h|   1 -
 include/configs/sh7753evb.h|   1 -
 include/configs/sh7757lcr.h|   1 -
 include/configs/sh7763rdp.h|   1 -
 include/configs/silk.h |   1 -
 include/configs/stout.h|   1 -
 include/phy.h  |   1 +
 net/bootp.c|  18 +-
 scripts/config_whitelist.txt   |   1 -
 53 files changed, 1131 insertions(+), 185 deletions(-)
 create mode 100644 drivers/net/phy/b53.c

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


Re: [U-Boot] [PATCH v2 2/2] armv8: ls1088ardb: Add environment variable address location for QSPI-NOR

2018-01-15 Thread York Sun
On 12/14/2017 04:06 AM, Ashish Kumar wrote:
> Signed-off-by: Ashish Kumar 
> ---
>  include/configs/ls1088a_common.h | 6 ++
>  include/configs/ls1088aqds.h | 1 -
>  include/configs/ls1088ardb.h | 2 +-
>  3 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/include/configs/ls1088a_common.h 
> b/include/configs/ls1088a_common.h
> index b99257e..c96d48d 100644
> --- a/include/configs/ls1088a_common.h
> +++ b/include/configs/ls1088a_common.h
> @@ -32,6 +32,12 @@
>  
>  #define CONFIG_SUPPORT_RAW_INITRD
>  
> +#ifdef CONFIG_QSPI_BOOT
> +#define CONFIG_SYS_FSL_QSPI_BASE 0x2000
> +#define CONFIG_ENV_OFFSET0x30/* 3MB */
> +#define CONFIG_ENV_ADDR  (CONFIG_SYS_FSL_QSPI_BASE + \
> + CONFIG_ENV_OFFSET)
> +#endif
>  
>  #define CONFIG_SKIP_LOWLEVEL_INIT
>  
> diff --git a/include/configs/ls1088aqds.h b/include/configs/ls1088aqds.h
> index e97091d..6b94667 100644
> --- a/include/configs/ls1088aqds.h
> +++ b/include/configs/ls1088aqds.h
> @@ -21,7 +21,6 @@ unsigned long get_board_ddr_clk(void);
>  
>  #if defined(CONFIG_QSPI_BOOT)
>  #define CONFIG_ENV_SIZE  0x2000  /* 8KB */
> -#define CONFIG_ENV_OFFSET0x30/* 3MB */
>  #define CONFIG_ENV_SECT_SIZE 0x4
>  #elif defined(CONFIG_SD_BOOT)
>  #define CONFIG_ENV_OFFSET(3 * 1024 * 1024)
> diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h
> index 1da8153..bffaa76 100644
> --- a/include/configs/ls1088ardb.h
> +++ b/include/configs/ls1088ardb.h
> @@ -12,8 +12,8 @@
>  #define CONFIG_DISPLAY_BOARDINFO_LATE
>  
>  #if defined(CONFIG_QSPI_BOOT)
> +#define CONFIG_SYS_FSL_QSPI_BASE 0x2000

Looks like you are redefining this macro. Will remove when I merge it.

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


[U-Boot] [PULL] Please pull u-boot-imx

2018-01-15 Thread Stefano Babic
Hi Tom,

please pull from u-boot-imx, thanks !

The following changes since commit 373b9003410b44a1133060c2e63483b278fb476b:

  Merge git://git.denx.de/u-boot-sunxi (2018-01-11 14:14:19 -0500)

are available in the git repository at:

  git://www.denx.de/git/u-boot-imx.git master

for you to fetch changes up to 9587b0d61133c025d48ebf480aa021fc2fdd53a7:

  arm: imx: hab: Add hab_failsafe console command (2018-01-14 17:26:30
+0100)


Bryan O'Donoghue (25):
  arm: imx: hab: Make authenticate_image return int
  arm: imx: hab: Fix authenticate_image result code
  arm: imx: hab: Optimise flow of authenticate_image on is_enabled fail
  arm: imx: hab: Optimise flow of authenticate_image on hab_entry fail
  arm: imx: hab: Move IVT_SIZE to hab.h
  arm: imx: hab: Move CSF_PAD_SIZE to hab.h
  arm: imx: hab: Fix authenticate_image input parameters
  arm: imx: hab: Add IVT header definitions
  arm: imx: hab: Add IVT header verification
  arm: imx: hab: Verify IVT self matches calculated address
  arm: imx: hab: Only call ROM once headers are verified
  arm: imx: hab: Print CSF based on IVT descriptor
  arm: imx: hab: Print additional IVT elements during debug
  arm: imx: hab: Define rvt_check_target()
  arm: imx: hab: Implement hab_rvt_check_target
  arm: imx: hab: Add a hab_rvt_check_target to image auth
  arm: imx: hab: Print HAB event log only after calling ROM
  arm: imx: hab: Make internal functions and data static
  arm: imx: hab: Prefix authenticate_image with imx_hab
  arm: imx: hab: Rename is_hab_enabled imx_hab_is_enabled
  arm: imx: hab: Make authenticate_image() return zero on open boards
  arm: imx: hab: Make imx_hab_is_enabled global
  arm: imx: hab: Define rvt_failsafe()
  arm: imx: hab: Implement hab_rvt_failsafe
  arm: imx: hab: Add hab_failsafe console command

Christopher Spinrath (2):
  ARM: imx: cm_fx6: export board and soc info to env
  ARM: imx: cm_fx6: env: try to determine dtb to use

Eran Matityahu (2):
  imx7: spl: Use SPL boot device MMC1 for all of the SOCs MMC/SD
boot devices
  imx7: spl: Add support for MMC3, SD3 and NAND boot devices

Fabio Estevam (4):
  mx6: ddr: Do not access MMDC_P1_BASE_ADDR on i.MX6ULL
  mx6memcal: Fix the UART ports for mx6sabresd/auto boards
  mx6memcal: spl: Also take i.MX6ULL into account
  mx6memcal: spl: Disambiguate the error message

Koen Vandeputte (1):
  drivers: pci: imx: fix enumeration logic error

Peng Fan (10):
  misc: mxc_ocotp: check fuse word before programming on i.MX7ULP
  ARM: imx: Introduce dts for i.MX6SX-SDB
  ARM: imx: Enable dts for i.MX6SX-SDB
  board: freescale: common: add pfuze dm code
  imx: mx6sxsabresd: Enable DM driver
  imx: mx6sxsabresd: config wdog pinmux
  imx: mx6sxsabresd: enlarge ENV offset
  pci: imx: request gpio before use
  spi: fsl_qspi: support i.MX6UL/6ULLL/7D
  imx: mx6ull-14x14-evk: enable DM QSPI driver

Stefano Babic (1):
  mx6: Support SKS-Kinkel sksimx6 Board

Tom Rini (4):
  arm: imx: Rework i.MX specific commands to be excluded from SPL
  imx: ventana: Rework CONFIG_CMD_EECONFIG code to not be included
in SPL
  imx: ventana: Rework CONFIG_CMD_GSC code to not be included in SPL
  toradex: imx6: Rework PF0100 fuse programming commands to not be
in SPL

 arch/arm/dts/Makefile   |   1 +
 arch/arm/dts/imx6sx-sdb.dts | 138 +++
 arch/arm/dts/imx6sx-sdb.dtsi| 612

 arch/arm/dts/imx6ull-14x14-evk.dts  |   5 +-
 arch/arm/dts/imx6ull.dtsi   |   9 +-
 arch/arm/include/asm/mach-imx/hab.h |  46 ++-
 arch/arm/mach-imx/Makefile  |   2 +
 arch/arm/mach-imx/hab.c | 461 -
 arch/arm/mach-imx/imx_bootaux.c |  13 +-
 arch/arm/mach-imx/mx5/clock.c   |   4 +-
 arch/arm/mach-imx/mx6/Kconfig   |   6 +
 arch/arm/mach-imx/mx6/ddr.c |   4 +-
 arch/arm/mach-imx/mx7/clock.c   |   2 +
 arch/arm/mach-imx/mx7ulp/clock.c|   2 +
 arch/arm/mach-imx/spl.c |  45 +-
 board/compulab/cm_fx6/cm_fx6.c  |  21 +
 board/freescale/common/Makefile |   1 +
 board/freescale/common/pfuze.c  |  79 
 board/freescale/common/pfuze.h  |   5 +
 board/freescale/mx6memcal/Kconfig   |  12 +-
 board/freescale/mx6memcal/spl.c |   3 +-
 board/freescale/mx6sxsabresd/mx6sxsabresd.c | 382 +++--
 board/gateworks/gw_ventana/eeprom.c |   4 +-
 board/gateworks/gw_ventana/gsc.c|   2 +-
 board/sks-kinkel/sksimx6/Kconfig|  11 +
 board/sks-kinkel/sksimx6/MAINTAINERS|   6 +
 board/sks-kinkel/sksimx6/Makefile   |   3 +
 

Re: [U-Boot] [PATCH] armv8: sec_firmware: Add support for multiple loadables

2018-01-15 Thread Sumit Garg
> -Original Message-
> From: York Sun
> Sent: Monday, January 15, 2018 10:43 PM
> 
> On 01/15/2018 09:09 AM, Sumit Garg wrote:
> >> From: York Sun
> >> Sent: Monday, January 15, 2018 10:16 PM
> >>
> >> On 01/14/2018 08:55 PM, Sumit Garg wrote:
> >>> Enable support for multiple loadable images in SEC firmware FIT image.
> >>>
> >>> Signed-off-by: Sumit Garg 
> >>> ---
> >>>  arch/arm/cpu/armv8/sec_firmware.c | 51
> >>> +++
> >>>  1 file changed, 41 insertions(+), 10 deletions(-)
> >>>
> >>> diff --git a/arch/arm/cpu/armv8/sec_firmware.c
> >>> b/arch/arm/cpu/armv8/sec_firmware.c
> >>> index 927eae4..28de81c 100644
> >>> --- a/arch/arm/cpu/armv8/sec_firmware.c
> >>> +++ b/arch/arm/cpu/armv8/sec_firmware.c
> >>> @@ -116,11 +116,13 @@ static int
> >>> sec_firmware_check_copy_loadable(const
> >> void *sec_firmware_img,
> >>>   u32 *loadable_l, u32 *loadable_h)  {
> >>>   phys_addr_t sec_firmware_loadable_addr = 0;
> >>> - int conf_node_off, ld_node_off;
> >>> + int conf_node_off, ld_node_off, images;
> >>>   char *conf_node_name = NULL;
> >>>   const void *data;
> >>>   size_t size;
> >>>   ulong load;
> >>> + const char *name, *str, *type;
> >>> + int len;
> >>>
> >>>   conf_node_name = SEC_FIRMEWARE_FIT_CNF_NAME;
> >>>
> >>> @@ -130,11 +132,32 @@ static int
> >>> sec_firmware_check_copy_loadable(const
> >> void *sec_firmware_img,
> >>>   return -ENOENT;
> >>>   }
> >>>
> >>> - ld_node_off = fit_conf_get_prop_node(sec_firmware_img,
> >> conf_node_off,
> >>> -  FIT_LOADABLE_PROP);
> >>> - if (ld_node_off >= 0) {
> >>> - printf("SEC Firmware: '%s' present in config\n",
> >>> -FIT_LOADABLE_PROP);
> >>> + /* find the node holding the images information */
> >>> + images = fdt_path_offset(sec_firmware_img, FIT_IMAGES_PATH);
> >>> + if (images < 0) {
> >>> + debug("%s: Cannot find /images node: %d\n", __func__,
> >> images);
> >>
> >> Do you expect this often? If it should happen, change debug to printf.
> >
> > No this isn't expected as fit image should at least have ppa monitor image.
> 
> The idea is to reduce unnecessary messages and make sure the error is raised.
> In this case, if the image is not found, you cannot proceed with secure 
> booting.
> So a visible error is needed.
> 
> York
 
Sure I will put up a printf instead of debug here.

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


Re: [U-Boot] [PATCH v2] arm64: ls1012ardb: Add distro secure boot support

2018-01-15 Thread Sumit Garg
> From: York Sun
> Sent: Monday, January 15, 2018 10:59 PM
> 
> On 01/08/2018 09:59 PM, Sumit Garg wrote:
> > From: Vinitha Pillai-B57223 
> >
> > Enable validation of boot.scr script prior to its execution dependent
> > on "secureboot" flag in environment. Enable fall back option to qspi
> > boot in case of secure boot.
> >
> > Signed-off-by: Sumit Garg 
> > Signed-off-by: Vinitha Pillai 
> > ---
> >
> > Changes in v2:
> > Rebased to top of master
> >
> >  configs/ls1012ardb_qspi_SECURE_BOOT_defconfig | 14 +++---
> >  include/configs/ls1012ardb.h  | 20 ++--
> >  2 files changed, 25 insertions(+), 9 deletions(-)
> >
> > diff --git a/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig
> > b/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig
> > index b6930be..2d5d9ad 100644
> > --- a/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig
> > +++ b/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig
> > @@ -2,7 +2,9 @@ CONFIG_ARM=y
> >  CONFIG_TARGET_LS1012ARDB=y
> >  CONFIG_SECURE_BOOT=y
> >  CONFIG_FSL_LS_PPA=y
> > +CONFIG_QSPI_AHB_INIT=y
> >  CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1012a-rdb"
> > +CONFIG_DISTRO_DEFAULTS=y
> >  # CONFIG_SYS_MALLOC_F is not set
> >  CONFIG_FIT_VERBOSE=y
> >  CONFIG_OF_BOARD_SETUP=y
> > @@ -12,7 +14,7 @@ CONFIG_QSPI_BOOT=y
> >  CONFIG_BOOTDELAY=10
> >  CONFIG_USE_BOOTARGS=y
> >  CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0
> earlycon=uart8250,mmio,0x21c0500 quiet lpj=25"
> > -CONFIG_HUSH_PARSER=y
> > +# CONFIG_DISPLAY_BOARDINFO is not set
> >  CONFIG_CMD_GREPENV=y
> >  CONFIG_CMD_GPT=y
> >  CONFIG_CMD_I2C=y
> > @@ -20,16 +22,13 @@ CONFIG_CMD_MMC=y
> >  CONFIG_CMD_PCI=y
> >  CONFIG_CMD_SF=y
> >  CONFIG_CMD_USB=y
> > -# CONFIG_CMD_SETEXPR is not set
> > -CONFIG_CMD_DHCP=y
> > -CONFIG_CMD_MII=y
> > -CONFIG_CMD_PING=y
> >  CONFIG_CMD_CACHE=y
> > -CONFIG_CMD_EXT2=y
> > -CONFIG_CMD_FAT=y
> >  CONFIG_OF_CONTROL=y
> > +CONFIG_ENV_IS_IN_SPI_FLASH=y
> >  CONFIG_NET_RANDOM_ETHADDR=y
> >  CONFIG_DM=y
> > +# CONFIG_BLK is not set
> > +CONFIG_DM_MMC=y
> >  CONFIG_DM_SPI_FLASH=y
> >  CONFIG_SPI_FLASH=y
> >  CONFIG_NETDEVICES=y
> > @@ -42,6 +41,7 @@ CONFIG_SYS_NS16550=y  CONFIG_DM_SPI=y
> > CONFIG_FSL_DSPI=y  CONFIG_USB=y
> > +CONFIG_DM_USB=y
> >  CONFIG_USB_XHCI_HCD=y
> >  CONFIG_USB_XHCI_DWC3=y
> >  CONFIG_USB_STORAGE=y
> 
> Why do you change other config options in this patch?
> 
> York

This is done to align with non-secure boot deconfig. Actually IP owners update 
only non-secure boot defconfig, so we need to take care of alignment.

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


Re: [U-Boot] [PATCH] LS2088ARDB: Fix NOR fall back option failure

2018-01-15 Thread York Sun
On 01/08/2018 10:03 PM, Vinitha Pillai-B57223 wrote:
> From: Vinitha V Pillai 
> 
> Signed-off-by: Vinitha V Pillai 
> ---
>  include/configs/ls2080ardb.h | 14 +++---
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
> index 6f3301c..8770c6b 100644
> --- a/include/configs/ls2080ardb.h
> +++ b/include/configs/ls2080ardb.h
> @@ -375,7 +375,7 @@ unsigned long get_board_sys_clk(void);
>   "fdt_high=0xa000\0" \
>   "initrd_high=0x\0"  \
>   "fdt_addr=0x64f0\0" \
> - "kernel_addr=0x6500\0"  \
> + "kernel_addr=0x58100\0" \

Why change this?

>   "kernel_start=0x100\0"  \
>   "kernelheader_start=0x80\0" \
>   "scriptaddr=0x8000\0"   \
> @@ -445,8 +445,8 @@ unsigned long get_board_sys_clk(void);
>   "&& esbc_validate 0x2078; " \
>   "env exists mcinitcmd && "  \
>   "fsl_mc lazyapply dpl 0x20d0; " \
> - "run distro_bootcmd;env exists secureboot " \
> - " && esbc_halt;run qspi_bootcmd; "
> + "run distro_bootcmd;run qspi_bootcmd; " \
> + "env exists secureboot && esbc_halt;"
>  #elif defined(CONFIG_SD_BOOT)
>  /* Try to boot an on-SD kernel first, then do normal distro boot */
>  #define CONFIG_BOOTCOMMAND   \
> @@ -456,16 +456,16 @@ unsigned long get_board_sys_clk(void);
>   "env exists mcinitcmd && run mcinitcmd "\
>   "&& mmc read 0x8800 0x6800 0x800 "  \
>   "&& fsl_mc lazyapply dpl 0x8800; "  \
> - "run distro_bootcmd;env exists secureboot " \
> - "&& esbc_halt;run sd_bootcmd;"
> + "run distro_bootcmd;run sd_bootcmd; "   \
> + "env exists secureboot && esbc_halt;"
>  #else
>  /* Try to boot an on-NOR kernel first, then do normal distro boot */
>  #define CONFIG_BOOTCOMMAND   \
>   "env exists mcinitcmd && env exists secureboot "\
>   "&& esbc_validate 0x58078; env exists mcinitcmd "\
>   "&& fsl_mc lazyapply dpl 0x580d0;"  \
> - "run distro_bootcmd; env exists secureboot "\
> - "&& esbc_halt; run nor_bootcmd;"
> + "run distro_bootcmd;run nor_bootcmd; "  \
> + "env exists secureboot && esbc_halt;"
>  #endif
>  
>  /* MAC/PHY configuration */
> 

You changed not only NOR boot, but also QSPI and SD boot. Please update
your subject and write commit message to explain.

York

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


Re: [U-Boot] [PATCH v2] arm64: ls1012ardb: Add distro secure boot support

2018-01-15 Thread York Sun
On 01/08/2018 09:59 PM, Sumit Garg wrote:
> From: Vinitha Pillai-B57223 
> 
> Enable validation of boot.scr script prior to its execution dependent
> on "secureboot" flag in environment. Enable fall back option to
> qspi boot in case of secure boot.
> 
> Signed-off-by: Sumit Garg 
> Signed-off-by: Vinitha Pillai 
> ---
> 
> Changes in v2:
> Rebased to top of master
> 
>  configs/ls1012ardb_qspi_SECURE_BOOT_defconfig | 14 +++---
>  include/configs/ls1012ardb.h  | 20 ++--
>  2 files changed, 25 insertions(+), 9 deletions(-)
> 
> diff --git a/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig 
> b/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig
> index b6930be..2d5d9ad 100644
> --- a/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig
> +++ b/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig
> @@ -2,7 +2,9 @@ CONFIG_ARM=y
>  CONFIG_TARGET_LS1012ARDB=y
>  CONFIG_SECURE_BOOT=y
>  CONFIG_FSL_LS_PPA=y
> +CONFIG_QSPI_AHB_INIT=y
>  CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1012a-rdb"
> +CONFIG_DISTRO_DEFAULTS=y
>  # CONFIG_SYS_MALLOC_F is not set
>  CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
> @@ -12,7 +14,7 @@ CONFIG_QSPI_BOOT=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTARGS=y
>  CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 
> earlycon=uart8250,mmio,0x21c0500 quiet lpj=25"
> -CONFIG_HUSH_PARSER=y
> +# CONFIG_DISPLAY_BOARDINFO is not set
>  CONFIG_CMD_GREPENV=y
>  CONFIG_CMD_GPT=y
>  CONFIG_CMD_I2C=y
> @@ -20,16 +22,13 @@ CONFIG_CMD_MMC=y
>  CONFIG_CMD_PCI=y
>  CONFIG_CMD_SF=y
>  CONFIG_CMD_USB=y
> -# CONFIG_CMD_SETEXPR is not set
> -CONFIG_CMD_DHCP=y
> -CONFIG_CMD_MII=y
> -CONFIG_CMD_PING=y
>  CONFIG_CMD_CACHE=y
> -CONFIG_CMD_EXT2=y
> -CONFIG_CMD_FAT=y
>  CONFIG_OF_CONTROL=y
> +CONFIG_ENV_IS_IN_SPI_FLASH=y
>  CONFIG_NET_RANDOM_ETHADDR=y
>  CONFIG_DM=y
> +# CONFIG_BLK is not set
> +CONFIG_DM_MMC=y
>  CONFIG_DM_SPI_FLASH=y
>  CONFIG_SPI_FLASH=y
>  CONFIG_NETDEVICES=y
> @@ -42,6 +41,7 @@ CONFIG_SYS_NS16550=y
>  CONFIG_DM_SPI=y
>  CONFIG_FSL_DSPI=y
>  CONFIG_USB=y
> +CONFIG_DM_USB=y
>  CONFIG_USB_XHCI_HCD=y
>  CONFIG_USB_XHCI_DWC3=y
>  CONFIG_USB_STORAGE=y

Why do you change other config options in this patch?

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


Re: [U-Boot] [PATCH v2] armv8: Remove dependency of SERDES for LS CHASIS3

2018-01-15 Thread York Sun
On 01/10/2018 01:15 AM, Sriram Dash wrote:
> Remove dependency of SYS_HAS_SERDES for Layerscape Chasis 3.
> 
> Signed-off-by: Sriram Dash 
> ---
> Changes in v2:
>   - Remove ifdef when including fsl_serdes.h
> 
>  arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig 
> b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
> index 6c03dfb..0aa0673 100644
> --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
> +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
> @@ -69,6 +69,8 @@ config ARCH_LS1088A
>   bool
>   select ARMV8_SET_SMPEN
>   select FSL_LSCH3
> + select SYS_FSL_SRDS_1
> + select SYS_HAS_SERDES
>   select SYS_FSL_DDR
>   select SYS_FSL_DDR_LE
>   select SYS_FSL_DDR_VER_50
> @@ -102,6 +104,8 @@ config ARCH_LS2080A
>   select ARM_ERRATA_829520
>   select ARM_ERRATA_833471
>   select FSL_LSCH3
> + select SYS_FSL_SRDS_1
> + select SYS_HAS_SERDES
>   select SYS_FSL_DDR
>   select SYS_FSL_DDR_LE
>   select SYS_FSL_DDR_VER_50
> @@ -144,8 +148,6 @@ config FSL_LSCH2
>  
>  config FSL_LSCH3
>   bool
> - select SYS_FSL_SRDS_1
> - select SYS_HAS_SERDES
>  
>  config FSL_MC_ENET
>   bool "Management Complex network"
> 

This patch is simple but your base seems to be different. Please rebase
and check LSCH2 SoCs.

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


Re: [U-Boot] [PATCH] driver: fsl-mc: Perform fsl-mc fdt fixup for lazyapply dpl

2018-01-15 Thread York Sun
On 01/11/2018 09:19 PM, Yogesh Gaur wrote:
> For for case of lazyapply method, API fdt_fixup_board_enet() gets invoked
> before DPL being deployed.
> This leads to an issue that fsl-mc fdt fixup status marked as fail and
> dprc driver didn't get registered in linux boot.
> 
> Fixes this issue by calling fdt_fixup_board_enet() for case when
> DPL is deployed successfully in lazyapply method.
> 
> Signed-off-by: Yogesh Gaur 
> ---
>  drivers/net/fsl-mc/mc.c | 6 +-
>  include/fdt_support.h   | 3 +++
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
> index f36fe06..ab2cce1 100644
> --- a/drivers/net/fsl-mc/mc.c
> +++ b/drivers/net/fsl-mc/mc.c
> @@ -1415,7 +1415,11 @@ int fsl_mc_ldpaa_exit(bd_t *bd)
>   bool mc_boot_status = false;
>  
>   if (bd && mc_lazy_dpl_addr && !fsl_mc_ldpaa_exit(NULL)) {
> - mc_apply_dpl(mc_lazy_dpl_addr);
> + err = mc_apply_dpl(mc_lazy_dpl_addr);
> +#ifdef CONFIG_FSL_MC_ENET

Is this really needed? We have this in Makefile
drivers/net/Makefile:72:obj-$(CONFIG_FSL_MC_ENET) += fsl-mc/

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


Re: [U-Boot] [PATCH] armv8: sec_firmware: Add support for multiple loadables

2018-01-15 Thread York Sun
On 01/15/2018 09:09 AM, Sumit Garg wrote:
>> From: York Sun
>> Sent: Monday, January 15, 2018 10:16 PM
>>
>> On 01/14/2018 08:55 PM, Sumit Garg wrote:
>>> Enable support for multiple loadable images in SEC firmware FIT image.
>>>
>>> Signed-off-by: Sumit Garg 
>>> ---
>>>  arch/arm/cpu/armv8/sec_firmware.c | 51
>>> +++
>>>  1 file changed, 41 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/arch/arm/cpu/armv8/sec_firmware.c
>>> b/arch/arm/cpu/armv8/sec_firmware.c
>>> index 927eae4..28de81c 100644
>>> --- a/arch/arm/cpu/armv8/sec_firmware.c
>>> +++ b/arch/arm/cpu/armv8/sec_firmware.c
>>> @@ -116,11 +116,13 @@ static int sec_firmware_check_copy_loadable(const
>> void *sec_firmware_img,
>>> u32 *loadable_l, u32 *loadable_h)  {
>>> phys_addr_t sec_firmware_loadable_addr = 0;
>>> -   int conf_node_off, ld_node_off;
>>> +   int conf_node_off, ld_node_off, images;
>>> char *conf_node_name = NULL;
>>> const void *data;
>>> size_t size;
>>> ulong load;
>>> +   const char *name, *str, *type;
>>> +   int len;
>>>
>>> conf_node_name = SEC_FIRMEWARE_FIT_CNF_NAME;
>>>
>>> @@ -130,11 +132,32 @@ static int sec_firmware_check_copy_loadable(const
>> void *sec_firmware_img,
>>> return -ENOENT;
>>> }
>>>
>>> -   ld_node_off = fit_conf_get_prop_node(sec_firmware_img,
>> conf_node_off,
>>> -FIT_LOADABLE_PROP);
>>> -   if (ld_node_off >= 0) {
>>> -   printf("SEC Firmware: '%s' present in config\n",
>>> -  FIT_LOADABLE_PROP);
>>> +   /* find the node holding the images information */
>>> +   images = fdt_path_offset(sec_firmware_img, FIT_IMAGES_PATH);
>>> +   if (images < 0) {
>>> +   debug("%s: Cannot find /images node: %d\n", __func__,
>> images);
>>
>> Do you expect this often? If it should happen, change debug to printf.
> 
> No this isn't expected as fit image should at least have ppa monitor image.

The idea is to reduce unnecessary messages and make sure the error is
raised. In this case, if the image is not found, you cannot proceed with
secure booting. So a visible error is needed.

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


Re: [U-Boot] [PATCH] armv8: sec_firmware: Add support for multiple loadables

2018-01-15 Thread Sumit Garg
> From: York Sun
> Sent: Monday, January 15, 2018 10:16 PM
> 
> On 01/14/2018 08:55 PM, Sumit Garg wrote:
> > Enable support for multiple loadable images in SEC firmware FIT image.
> >
> > Signed-off-by: Sumit Garg 
> > ---
> >  arch/arm/cpu/armv8/sec_firmware.c | 51
> > +++
> >  1 file changed, 41 insertions(+), 10 deletions(-)
> >
> > diff --git a/arch/arm/cpu/armv8/sec_firmware.c
> > b/arch/arm/cpu/armv8/sec_firmware.c
> > index 927eae4..28de81c 100644
> > --- a/arch/arm/cpu/armv8/sec_firmware.c
> > +++ b/arch/arm/cpu/armv8/sec_firmware.c
> > @@ -116,11 +116,13 @@ static int sec_firmware_check_copy_loadable(const
> void *sec_firmware_img,
> > u32 *loadable_l, u32 *loadable_h)  {
> > phys_addr_t sec_firmware_loadable_addr = 0;
> > -   int conf_node_off, ld_node_off;
> > +   int conf_node_off, ld_node_off, images;
> > char *conf_node_name = NULL;
> > const void *data;
> > size_t size;
> > ulong load;
> > +   const char *name, *str, *type;
> > +   int len;
> >
> > conf_node_name = SEC_FIRMEWARE_FIT_CNF_NAME;
> >
> > @@ -130,11 +132,32 @@ static int sec_firmware_check_copy_loadable(const
> void *sec_firmware_img,
> > return -ENOENT;
> > }
> >
> > -   ld_node_off = fit_conf_get_prop_node(sec_firmware_img,
> conf_node_off,
> > -FIT_LOADABLE_PROP);
> > -   if (ld_node_off >= 0) {
> > -   printf("SEC Firmware: '%s' present in config\n",
> > -  FIT_LOADABLE_PROP);
> > +   /* find the node holding the images information */
> > +   images = fdt_path_offset(sec_firmware_img, FIT_IMAGES_PATH);
> > +   if (images < 0) {
> > +   debug("%s: Cannot find /images node: %d\n", __func__,
> images);
> 
> Do you expect this often? If it should happen, change debug to printf.

No this isn't expected as fit image should at least have ppa monitor image.

> 
> > +   return -1;
> > +   }
> > +
> > +   type = FIT_LOADABLE_PROP;
> > +
> > +   name = fdt_getprop(sec_firmware_img, conf_node_off, type, );
> > +   if (!name) {
> > +   /* Loadables not present */
> > +   return 0;
> > +   }
> > +
> > +   printf("SEC Firmware: '%s' present in config\n", type);
> 
> How about replace printf() with debug()?

Actually I wanted to differentiate from u-boot logs whether there were any 
"loadables" in ppa fit image or not.

> 
> > +
> > +   for (str = name; str && ((str - name) < len);
> > +str = strchr(str, '\0') + 1) {
> > +   printf("%s: '%s'\n", type, str);
> > +   ld_node_off = fdt_subnode_offset(sec_firmware_img,
> images, str);
> > +   if (ld_node_off < 0) {
> > +   printf("cannot find image node '%s': %d\n", str,
> > +  ld_node_off);
> > +   return -EINVAL;
> > +   }
> >
> > /* Verify secure firmware image */
> > if (!(fit_image_verify(sec_firmware_img, ld_node_off))) { @@
> > -164,11 +187,19 @@ static int sec_firmware_check_copy_loadable(const void
> *sec_firmware_img,
> > memcpy((void *)sec_firmware_loadable_addr, data, size);
> > flush_dcache_range(sec_firmware_loadable_addr,
> >sec_firmware_loadable_addr + size);
> > -   }
> >
> > -   /* Populate address ptrs for loadable image with loadbale addr */
> > -   out_le32(loadable_l, (sec_firmware_loadable_addr & WORD_MASK));
> > -   out_le32(loadable_h, (sec_firmware_loadable_addr >>
> WORD_SHIFT));
> > +   /* Populate loadable address only for Trusted OS */
> > +   if (!strcmp(str, "trustedOS@1")) {
> > +   /*
> > +* Populate address ptrs for loadable image with
> > +* loadbale addr
> > +*/
> > +   out_le32(loadable_l, (sec_firmware_loadable_addr &
> > + WORD_MASK));
> > +   out_le32(loadable_h, (sec_firmware_loadable_addr >>
> > + WORD_SHIFT));
> > +   }
> > +   }
> >
> > return 0;
> >  }
> >
> 
> It is unclear that you are looking for "trustedOS@1" to set the address.

Actually this patch is meant to load "fuse provisioning script" used by PPA to 
provision fuses on our SoC's in PPA DDR space (2MB). And this allocation of PPA 
DDR space for this script will be fixed and hardcoded in PPA.

But in case of trusted OS with own DDR space (64MB), we have to communicate 
load address of trusted OS to PPA to initialize it.

> Please add some document to describe the FIT image you are expecting.

Sure I will add a document to describe the FIT image.

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


Re: [U-Boot] [PATCH] TCP and wget implementation v5.1

2018-01-15 Thread Duncan Hare


 
Hi Duncan,

On Wed, Jan 10, 2018 at 8:18 PM, Duncan Hare  wrote:
> Date: Wed, 10 Jan 2018 17:54:07 -0800
> Subject: [PATCH] git_msg_1
>
> TCP and wget implementation.

Sounds like this should be the title of the series cover letter. I
thought we agreed that this should be sent as a series. That means
using patman to send all 3 matches to the list as once.

Next step is to get sendmail setup and resend as a series using patman.

> And I do wish  I could get git send-mail configureg
> with yahoo.

https://help.yahoo.com/kb/SLN4724.html

>
> Signed-off-by: Duncan Hare 
>

Ok, our definition of series differed. I was not thinking concurrent.

Will send next week.
Duncan


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


Re: [U-Boot] [PATCH] armv8: sec_firmware: Add support for multiple loadables

2018-01-15 Thread York Sun
On 01/14/2018 08:55 PM, Sumit Garg wrote:
> Enable support for multiple loadable images in SEC firmware FIT image.
> 
> Signed-off-by: Sumit Garg 
> ---
>  arch/arm/cpu/armv8/sec_firmware.c | 51 
> +++
>  1 file changed, 41 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv8/sec_firmware.c 
> b/arch/arm/cpu/armv8/sec_firmware.c
> index 927eae4..28de81c 100644
> --- a/arch/arm/cpu/armv8/sec_firmware.c
> +++ b/arch/arm/cpu/armv8/sec_firmware.c
> @@ -116,11 +116,13 @@ static int sec_firmware_check_copy_loadable(const void 
> *sec_firmware_img,
>   u32 *loadable_l, u32 *loadable_h)
>  {
>   phys_addr_t sec_firmware_loadable_addr = 0;
> - int conf_node_off, ld_node_off;
> + int conf_node_off, ld_node_off, images;
>   char *conf_node_name = NULL;
>   const void *data;
>   size_t size;
>   ulong load;
> + const char *name, *str, *type;
> + int len;
>  
>   conf_node_name = SEC_FIRMEWARE_FIT_CNF_NAME;
>  
> @@ -130,11 +132,32 @@ static int sec_firmware_check_copy_loadable(const void 
> *sec_firmware_img,
>   return -ENOENT;
>   }
>  
> - ld_node_off = fit_conf_get_prop_node(sec_firmware_img, conf_node_off,
> -  FIT_LOADABLE_PROP);
> - if (ld_node_off >= 0) {
> - printf("SEC Firmware: '%s' present in config\n",
> -FIT_LOADABLE_PROP);
> + /* find the node holding the images information */
> + images = fdt_path_offset(sec_firmware_img, FIT_IMAGES_PATH);
> + if (images < 0) {
> + debug("%s: Cannot find /images node: %d\n", __func__, images);

Do you expect this often? If it should happen, change debug to printf.

> + return -1;
> + }
> +
> + type = FIT_LOADABLE_PROP;
> +
> + name = fdt_getprop(sec_firmware_img, conf_node_off, type, );
> + if (!name) {
> + /* Loadables not present */
> + return 0;
> + }
> +
> + printf("SEC Firmware: '%s' present in config\n", type);

How about replace printf() with debug()?

> +
> + for (str = name; str && ((str - name) < len);
> +  str = strchr(str, '\0') + 1) {
> + printf("%s: '%s'\n", type, str);
> + ld_node_off = fdt_subnode_offset(sec_firmware_img, images, str);
> + if (ld_node_off < 0) {
> + printf("cannot find image node '%s': %d\n", str,
> +ld_node_off);
> + return -EINVAL;
> + }
>  
>   /* Verify secure firmware image */
>   if (!(fit_image_verify(sec_firmware_img, ld_node_off))) {
> @@ -164,11 +187,19 @@ static int sec_firmware_check_copy_loadable(const void 
> *sec_firmware_img,
>   memcpy((void *)sec_firmware_loadable_addr, data, size);
>   flush_dcache_range(sec_firmware_loadable_addr,
>  sec_firmware_loadable_addr + size);
> - }
>  
> - /* Populate address ptrs for loadable image with loadbale addr */
> - out_le32(loadable_l, (sec_firmware_loadable_addr & WORD_MASK));
> - out_le32(loadable_h, (sec_firmware_loadable_addr >> WORD_SHIFT));
> + /* Populate loadable address only for Trusted OS */
> + if (!strcmp(str, "trustedOS@1")) {
> + /*
> +  * Populate address ptrs for loadable image with
> +  * loadbale addr
> +  */
> + out_le32(loadable_l, (sec_firmware_loadable_addr &
> +   WORD_MASK));
> + out_le32(loadable_h, (sec_firmware_loadable_addr >>
> +   WORD_SHIFT));
> + }
> + }
>  
>   return 0;
>  }
> 

It is unclear that you are looking for "trustedOS@1" to set the address.
Please add some document to describe the FIT image you are expecting.

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


Re: [U-Boot] FW: u-boot v2016 vs v2013

2018-01-15 Thread Stefano Babic
Hi Mehmet,

On 15/01/2018 17:34, Fabio Estevam wrote:
> On Mon, Jan 15, 2018 at 11:24 AM, Mehmet Ali İPİN
>  wrote:
>> Dear Estevam,
>>
>> Thank you very much for your answer.
>> I downloaded u-boot 2018.01. Its make file required gcc 6.0 or later. Then I 
>> downloaded gcc 7.2.
>> Building it.
>>
>> Do you know is there a yocto version which is stable with u-boot 2018?
> 
> Not sure about which version of U-Boot Yocto supports. You can build
> U-Boot manually and give it a try.

Last official U-Boot version in Yocto (rocko) is 2017.09. Anyway, the
best way to do is as recommended by Fabio (build manually and test).

Best regards,
Stefano Babic



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


Re: [U-Boot] [U-Boot, v6, 2/2] common: Generic firmware loader for file system

2018-01-15 Thread Tom Rini
On Wed, Dec 27, 2017 at 01:04:38PM +0800, tien.fong.c...@intel.com wrote:

> From: Tien Fong Chee 
> 
> This is file system generic loader which can be used to load
> the file image from the storage into target such as memory.
> The consumer driver would then use this loader to program whatever,
> ie. the FPGA device.
> 
> Signed-off-by: Tien Fong Chee 

Please add Lothar's Reviewed-by for v7.  There's a number of minor
checkpatch.pl issues that checkpatch.pl can in turn fixup itself, please
correct them.

[snip]
> diff --git a/common/Makefile b/common/Makefile
> index cec506f..2934221 100644
> --- a/common/Makefile
> +++ b/common/Makefile
> @@ -130,3 +130,4 @@ obj-$(CONFIG_CMD_DFU) += dfu.o
>  obj-y += command.o
>  obj-y += s_record.o
>  obj-y += xyzModem.o
> +obj-y += fs_loader.o

This needs a new Kconfig option and not to be enabled globally, only
when needed.

> diff --git a/common/fs_loader.c b/common/fs_loader.c
> new file mode 100644
> index 000..56d29b6
> --- /dev/null
> +++ b/common/fs_loader.c
> @@ -0,0 +1,309 @@
> +/*
> + * Copyright (C) 2017 Intel Corporation 
> + *
> + * SPDX-License-Identifier:GPL-2.0
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 

This wants  which is not globally available, so you need to
come up with something here.  At least making this Kconfig-enabled will
be a start and perhaps OK for now.

[snip]
> + if (ret) {
> + printf("Error: %d Failed to read %s from flash %lld != %d.\n",
> +   ret, fw_priv->name, actread, firmware_p->size);

The last %d needs to be %zu since it's a size_t, for portability.

Thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v6, 1/2] spl: Remove static declaration on spl_mmc_find_device function

2018-01-15 Thread Tom Rini
On Wed, Dec 27, 2017 at 01:04:37PM +0800, tien.fong.c...@intel.com wrote:

> From: Tien Fong Chee 
> 
> This patch removes the static declation on spl_mmc_find_device_function
> so this function is accessible by the caller from other file. This patch
> is required for later patch.
> 
> Signed-off-by: Tien Fong Chee 

Reviewed-by: Tom Rini 

-- 
Tom


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


Re: [U-Boot] FW: u-boot v2016 vs v2013

2018-01-15 Thread Fabio Estevam
On Mon, Jan 15, 2018 at 11:24 AM, Mehmet Ali İPİN
 wrote:
> Dear Estevam,
>
> Thank you very much for your answer.
> I downloaded u-boot 2018.01. Its make file required gcc 6.0 or later. Then I 
> downloaded gcc 7.2.
> Building it.
>
> Do you know is there a yocto version which is stable with u-boot 2018?

Not sure about which version of U-Boot Yocto supports. You can build
U-Boot manually and give it a try.

Does the problem happen with U-Boot 2018.01?
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] nand: arasan: Select CONFIG_SYS_NAND_SELF_INIT

2018-01-15 Thread Ezequiel Garcia
The Arasan NFC driver requires the self-init mode,
so it should select it.

Instead of having the config header define the macro,
it's cleaner to select the option at the Kconfig level.

Signed-off-by: Ezequiel Garcia 
---
 drivers/mtd/nand/Kconfig| 1 +
 include/configs/xilinx_zynqmp.h | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 78a39abf7542..97ec6cf5f9c3 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -123,6 +123,7 @@ endif
 
 config NAND_ARASAN
bool "Configure Arasan Nand"
+   select SYS_NAND_SELF_INIT
imply CMD_NAND
help
  This enables Nand driver support for Arasan nand flash
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index 9997fd095982..d883897c6cc2 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -76,7 +76,6 @@
 
 #ifdef CONFIG_NAND_ARASAN
 # define CONFIG_SYS_MAX_NAND_DEVICE1
-# define CONFIG_SYS_NAND_SELF_INIT
 # define CONFIG_SYS_NAND_ONFI_DETECTION
 # define CONFIG_MTD_DEVICE
 #endif
-- 
2.15.1

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


[U-Boot] [PATCH 2/2] zynq: Support CPU info display

2018-01-15 Thread Ezequiel Garcia
This commit adds CPU and silicon version information
consuming the SLCR IDCODE and DEVCFG MCTRL registers,
respectively.

Signed-off-by: Ariel D'Alessandro 
Signed-off-by: Ezequiel Garcia 
---
 arch/arm/mach-zynq/Makefile   |  1 +
 arch/arm/mach-zynq/cpu_info.c | 49 +++
 2 files changed, 50 insertions(+)
 create mode 100644 arch/arm/mach-zynq/cpu_info.c

diff --git a/arch/arm/mach-zynq/Makefile b/arch/arm/mach-zynq/Makefile
index e3f0117da563..31f1e0d5a8ad 100644
--- a/arch/arm/mach-zynq/Makefile
+++ b/arch/arm/mach-zynq/Makefile
@@ -14,5 +14,6 @@ obj-y += ddrc.o
 obj-y  += slcr.o
 obj-y  += clk.o
 obj-y  += lowlevel_init.o
+obj-$(CONFIG_DISPLAY_CPUINFO) += cpu_info.o
 AFLAGS_lowlevel_init.o := -mfpu=neon
 obj-$(CONFIG_SPL_BUILD)+= spl.o ps7_spl_init.o
diff --git a/arch/arm/mach-zynq/cpu_info.c b/arch/arm/mach-zynq/cpu_info.c
new file mode 100644
index ..730b73da
--- /dev/null
+++ b/arch/arm/mach-zynq/cpu_info.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2018 VanguardiaSur - www.vanguardiasur.com.ar
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static const struct {
+   u8 idcode;
+   const char *cpuinfo;
+} zynq_cpu_info[] = {
+   { .idcode = XILINX_ZYNQ_7007S,  .cpuinfo = "7007S" },
+   { .idcode = XILINX_ZYNQ_7010,   .cpuinfo = "7010" },
+   { .idcode = XILINX_ZYNQ_7012S,  .cpuinfo = "7012S" },
+   { .idcode = XILINX_ZYNQ_7014S,  .cpuinfo = "7014S" },
+   { .idcode = XILINX_ZYNQ_7015,   .cpuinfo = "7015" },
+   { .idcode = XILINX_ZYNQ_7020,   .cpuinfo = "7020" },
+   { .idcode = XILINX_ZYNQ_7030,   .cpuinfo = "7030" },
+   { .idcode = XILINX_ZYNQ_7035,   .cpuinfo = "7035" },
+   { .idcode = XILINX_ZYNQ_7045,   .cpuinfo = "7045" },
+   { .idcode = XILINX_ZYNQ_7100,   .cpuinfo = "7100"},
+   { /* Sentinel */ },
+};
+
+int print_cpuinfo(void)
+{
+   u32 idcode, version;
+   u8 i;
+
+   idcode = zynq_slcr_get_idcode();
+
+   for (i = 0; zynq_cpu_info[i].idcode; i++) {
+   if (zynq_cpu_info[i].idcode == idcode) {
+   printf("CPU:   Zynq %s\n", zynq_cpu_info[i].cpuinfo);
+   break;
+   }
+   }
+
+   version = zynq_get_silicon_version() << 1;
+   if (version > (PCW_SILICON_VERSION_3 << 1))
+   version += 1;
+   printf("Silicon: v%d.%d\n", version >> 1, version & 1);
+   return 0;
+}
-- 
2.15.1

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


[U-Boot] [PATCH 1/2] zynq: board: Remove checkboard()

2018-01-15 Thread Ezequiel Garcia
Currently we are showing silicon version as board info,
which should be part of the CPU info display.

This commit removes the current checkboard implementation,
and lets the generic show_board_info() show the DT 'model'
property.

CPU and silicon information will be added in a follow-up patch.

Signed-off-by: Ezequiel Garcia 
---
 board/xilinx/zynq/board.c | 16 
 1 file changed, 16 deletions(-)

diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index e59038106aa6..5785ad369fa0 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -109,22 +109,6 @@ int board_late_init(void)
return 0;
 }
 
-#ifdef CONFIG_DISPLAY_BOARDINFO
-int checkboard(void)
-{
-   u32 version = zynq_get_silicon_version();
-
-   version <<= 1;
-   if (version > (PCW_SILICON_VERSION_3 << 1))
-   version += 1;
-
-   puts("Board: Xilinx Zynq\n");
-   printf("Silicon: v%d.%d\n", version >> 1, version & 1);
-
-   return 0;
-}
-#endif
-
 int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
 {
 #if defined(CONFIG_ZYNQ_GEM_EEPROM_ADDR) && \
-- 
2.15.1

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


Re: [U-Boot] On writing .ext4 image to MMC

2018-01-15 Thread Vincent Prince
Hi,

I think you can also create an ext4 image with extra space in it. You can
use bmap tool if size is a concern.

Regards,
Vincent

2018-01-12 19:22 GMT+01:00 Adam Lee :

> I was hoping to get this done in the bootloader otherwise I have to change
> the rootfs ;)
>
> On Fri, Jan 12, 2018 at 1:18 PM Michael Nazzareno Trimarchi <
> mich...@amarulasolutions.com> wrote:
>
> > Hi
> >
> > On 12 Jan. 2018 7:15 pm, "Adam Lee"  wrote:
> >
> > Hi Michael, I used gparted to fix the issue. I am just wondering if I can
> > do all this in U-Boot.
> > If there is no good solution, I will put one-time script in my rootfs to
> > do this task.
> >
> >
> > Sorry most of the system on first boot create a first instance of
> > something like ssd for keys. I think that just use resize FS should do
> the
> > trick. Why is should be done in bootloader?
> >
> > Michael
> >
> >
> > Adam
> >
> > On Fri, Jan 12, 2018 at 10:18 AM Michael Nazzareno Trimarchi <
> > mich...@amarulasolutions.com> wrote:
> >
> >> Hi
> >>
> >>
> >> resize2fs from linux?
> >>
> >> Michael
> >>
> >> On Fri, Jan 12, 2018 at 4:15 PM, Adam Lee 
> wrote:
> >> > Hello everyone,
> >> >
> >> > I am able to download a .ext4 image over tftp and write it to my SD
> >> card.
> >> > The system boots fine.
> >> > One last thing I have to figure out is to expand this .ext4 file
> system
> >> > that I just populated.
> >> > If the image is 600MB, the partition size itself is 600MB, leaving no
> >> room.
> >> >
> >> > Is there anything I can do to remedy this in U-Boot?
> >> >
> >> > Adam
> >> > ___
> >> > U-Boot mailing list
> >> > U-Boot@lists.denx.de
> >> > https://lists.denx.de/listinfo/u-boot
> >>
> >>
> >>
> >> --
> >> | Michael Nazzareno Trimarchi Amarula Solutions BV |
> >> | COO  -  Founder  Cruquiuskade 47
> >>  |
> >> | +31(0)851119172 <+31%2085%20111%209172>
> >>  Amsterdam 1018 AM NL |
> >> |  [`as] http://www.amarulasolutions.com
>  |
> >>
> >
> >
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,09/12] riscv: tools: Prelink u-boot

2018-01-15 Thread Tom Rini
On Tue, Dec 26, 2017 at 01:55:56PM +0800, Andes wrote:

> From: Rick Chen 
> 
> Add prelink-riscv to arrange .rela.dyn and .rela.got
> in compile time. So that u-boot can be directly
> executed without fixup.
> 
> Signed-off-by: Chih-Mao Chen 
> Signed-off-by: Rick Chen 
> Signed-off-by: Rick Chen 
> Signed-off-by: Greentime Hu 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 07/12] riscv: configs: Add nx25-ae250.h to support RISC-V

2018-01-15 Thread Tom Rini
On Tue, Dec 26, 2017 at 01:55:54PM +0800, Andes wrote:

> From: Rick Chen 
> 
> Add nx25-ae250 board configuartion options for RISC-V
> 
> Signed-off-by: Rick Chen 
> Signed-off-by: Rick Chen 
> Signed-off-by: Greentime Hu 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [GIT PULL] Please pull u-boot-mmc master

2018-01-15 Thread Tom Rini
On Mon, Jan 15, 2018 at 11:35:05AM +0900, Jaehoon Chung wrote:

> Dear Tom,
> 
> Could you pull these patches to u-boot/master?
> Main topic is the support for HS200/UHS mode. 
> If there are any problem, let me know. After applying to u-boot/master, will 
> apply the other patches.
> 
> The following changes since commit f3dd87e0b98999a78e500e8c6d2b063ebadf535a:
> 
>   Prepare v2018.01 (2018-01-08 20:25:29 -0500)
> 
> are available in the Git repository at:
> 
>   git://git.denx.de/u-boot-mmc.git master
> 
> for you to fetch changes up to db359efd5907edbeaea2e3eb3504729f60208cd8:
> 
>   mmc: fsl_esdhc: Fix eMMC 1.8v setting issue (2018-01-13 00:08:44 +0900)
> 

Applied to u-boot/master, thanks!

But please note the following issues from checkpatch that need to be
looked into and possibly followed up on:
CHECK: Macro argument reuse 'mwt' - possible side-effects?
#180: FILE: drivers/mmc/mmc.c:1245:
+#define for_each_sd_mode_by_pref(caps, mwt) \
+   for (mwt = sd_modes_by_pref;\
+mwt < sd_modes_by_pref + ARRAY_SIZE(sd_modes_by_pref);\
+mwt++) \
+   if (caps & MMC_CAP(mwt->mode))

total: 0 errors, 0 warnings, 1 checks, 265 lines checked
CHECK: Macro argument reuse 'mwt' - possible side-effects?
#159: FILE: drivers/mmc/mmc.c:1382:
+#define for_each_mmc_mode_by_pref(caps, mwt) \
+   for (mwt = mmc_modes_by_pref;\
+   mwt < mmc_modes_by_pref + ARRAY_SIZE(mmc_modes_by_pref);\
+   mwt++) \
+   if (caps & MMC_CAP(mwt->mode))

CHECK: Macro argument reuse 'ecbv' - possible side-effects?
#177: FILE: drivers/mmc/mmc.c:1400:
+#define for_each_supported_width(caps, ddr, ecbv) \
+   for (ecbv = ext_csd_bus_width;\
+   ecbv < ext_csd_bus_width + ARRAY_SIZE(ext_csd_bus_width);\
+   ecbv++) \
+   if ((ddr == ecbv->is_ddr) && (caps & ecbv->cap))

CHECK: Alignment should match open parenthesis
#253: FILE: drivers/mmc/mmc.c:1437:
+   err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL,
+   EXT_CSD_BUS_WIDTH,

WARNING: 'occured' may be misspelled - perhaps 'occurred'?
#292: FILE: drivers/mmc/mmc.c:1469:
+   /* if an error occured, revert to a safer bus mode */

total: 0 errors, 1 warnings, 3 checks, 320 lines checked
WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per 
line)
#7: 
function ignore this. Modify mmc_set_ios() and the callers of mmc_set_ios() to

total: 0 errors, 1 warnings, 0 checks, 46 lines checked
WARNING: ENOSYS means 'invalid syscall nr' and nothing else
#30: FILE: drivers/mmc/mmc-uclass.c:100:
+   return -ENOSYS;

total: 0 errors, 1 warnings, 0 checks, 60 lines checked
WARNING: 'capabilites' may be misspelled - perhaps 'capabilities'?
#6: 
Add UHS modes to the list of supported modes, get the UHS capabilites of

total: 0 errors, 5 warnings, 0 checks, 381 lines checked
WARNING: line over 80 characters
#59: FILE: drivers/mmc/mmc.c:2217:
+   debug("Unable to do a full power cycle. Disabling the UHS modes 
for safety\n");

total: 0 errors, 1 warnings, 0 checks, 50 lines checked
WARNING: 'optionnal' may be misspelled - perhaps 'optional'?
#13: 
To make it clear that those are optionnal workarounds, a new Kconfig

total: 0 errors, 1 warnings, 0 checks, 102 lines checked
WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per 
line)
#6: 
The SDcard initialization procedure does a few more things than it did earlier:

total: 0 errors, 1 warnings, 0 checks, 13 lines checked
WARNING: please write a paragraph that describes the config symbol fully
#50: FILE: common/spl/Kconfig:419:
+config SPL_MMC_WRITE

WARNING: please write a paragraph that describes the config symbol fully
#69: FILE: drivers/mmc/Kconfig:13:
+config MMC_WRITE

total: 0 errors, 2 warnings, 0 checks, 82 lines checked
CHECK: Unbalanced braces around else statement
#85: FILE: drivers/mmc/mmc.c:2089:
+   else {

total: 0 errors, 0 warnings, 1 checks, 116 lines checked
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#35: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 403 lines checked
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#27: 
new file mode 100644

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 06/12] riscv: board: Add nx25-ae250 to support RISC-V

2018-01-15 Thread Tom Rini
On Tue, Dec 26, 2017 at 01:55:53PM +0800, Andes wrote:

> From: Rick Chen 
> 
> Add nx25-ae250 board to do platform initializations.
> 
> Signed-off-by: Rick Chen 
> Signed-off-by: Rick Chen 
> Signed-off-by: Greentime Hu 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 12/12] riscv: doc: Add relative doc to describe RISC-V

2018-01-15 Thread Tom Rini
On Tue, Dec 26, 2017 at 01:55:59PM +0800, Andes wrote:

> From: Rick Chen 
> 
> Add documents to describe NX25 and AE250.
> Also update other documents for RISC-V.
> 
> Signed-off-by: Rick Chen 
> Signed-off-by: Rick Chen 
> Signed-off-by: Greentime Hu 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 05/12] riscv: Add Kconfig to support RISC-V

2018-01-15 Thread Tom Rini
On Tue, Dec 26, 2017 at 01:55:52PM +0800, Andes wrote:

> From: Rick Chen 
> 
> Add Kconfig and makefile for RISC-V
> Also modify MAINTAINERS for it.
> 
> Signed-off-by: Rick Chen 
> Signed-off-by: Rick Chen 
> Signed-off-by: Greentime Hu 
> Cc: Padmarao Begari 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v2,10/12] riscv: Support standalone

2018-01-15 Thread Tom Rini
On Tue, Dec 26, 2017 at 01:55:57PM +0800, Andes wrote:

> From: Rick Chen 
> 
> Run hello_world successfully.
> 
> U-Boot 2018.01-rc2-00033-gb265b91-dirty (Dec 22 2017 - 13:54:21 +0800)
> 
> DRAM:  1 GiB
> MMC:   mmc@f0e0: 0
> SF: Detected mx25u1635e with page size 256 Bytes, erase size 4 KiB, total 2 
> MiB
> In:serial@f030
> Out:   serial@f030
> Err:   serial@f030
> Net:
> Warning: mac@e010 (eth0) using random MAC address - 0a:47:9b:f8:b4:f2
> eth0: mac@e010
> RISC-V # mmc rescan
> RISC-V # fatls mmc 0:1
> 318907   u-boot-ae250-64.bin
> 1252   hello_world_ae250_32.bin
> 328787   u-boot-ae250-32.bin
> 
> 3 file(s), 0 dir(s)
> 
> RISC-V # fatload mmc 0:1 0x60 hello_world_ae250_32.bin
> reading hello_world_ae250_32.bin
> 1252 bytes read in 23 ms (52.7 KiB/s)
> RISC-V # go 0x60
> Example expects ABI version 9
> Actual U-Boot ABI version 9
> Hello World
> argc = 1
> argv[0] = "0x60"
> argv[1] = "$B@"
> Hit any key to exit ...
> 
> RISC-V #
> 
> Signed-off-by: Rick Chen 
> Signed-off-by: Rick Chen 
> Signed-off-by: Greentime Hu 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH 0/9] Add new OPTEE bootm support to u-boot

2018-01-15 Thread Bryan O'Donoghue



On 15/01/18 12:03, Peng Fan wrote:

Providing the bootm way gives developer a choice for those that does not
support SPL.  We have been using bootm to boot optee for long time.

Thanks,
Peng


Philipp,

My understanding is that bootm is the preferred armv7 method..

In principle we should be able to support both the SPL and bootm methods.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] Pull request, u-boot-tegra/master

2018-01-15 Thread Tom Rini
On Fri, Jan 12, 2018 at 10:37:06AM -0700, Tom Warren wrote:

> Tom,
> 
> Please pull u-boot-tegra/master into U-Boot/master. Thanks!
> 
> All Tegra builds are OK, and Stephen's automated test system reports that
> all tests pass.
> 
> The following changes since commit 373b9003410b44a1133060c2e63483b278fb476b:
> 
>   Merge git://git.denx.de/u-boot-sunxi (2018-01-11 14:14:19 -0500)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-tegra.git master
> 
> for you to fetch changes up to 5fed97af20da955625cc06563a725b49cebb99eb:
> 
>   Makefile: ensure DTB doesn't overflow into initial stack (2018-01-12
> 10:12:32 -0700)
> 

Applied to u-boot/master, thanks!

But please note the following checkpatch.pl issues that should be looked
into and possibly addressed:

CHECK: Macro argument reuse 'data' - possible side-effects?
#93: FILE: arch/arm/cpu/armv8/linux-kernel-image-header-vars.h:36:
+#define DATA_LE32(data)\
+   data) & 0x00ff) << 24) |\
+(((data) & 0xff00) << 8)  |\
+(((data) & 0x00ff) >> 8)  |\
+(((data) & 0xff00) >> 24))

CHECK: Macro argument reuse 'data' - possible side-effects?
#102: FILE: arch/arm/cpu/armv8/linux-kernel-image-header-vars.h:45:
+#define DEFINE_IMAGE_LE64(sym, data)   \
+   sym##_lo32 = DATA_LE32((data) & 0x);\
+   sym##_hi32 = DATA_LE32((data) >> 32)

CHECK: Macro argument reuse 'a' - possible side-effects?
#106: FILE: arch/arm/cpu/armv8/linux-kernel-image-header-vars.h:49:
+#define __MAX(a, b)(((a) > (b)) ? (a) : (b))

CHECK: Macro argument reuse 'b' - possible side-effects?
#106: FILE: arch/arm/cpu/armv8/linux-kernel-image-header-vars.h:49:
+#define __MAX(a, b)(((a) > (b)) ? (a) : (b))

WARNING: macros should not use a trailing semicolon
#138: FILE: arch/arm/cpu/armv8/linux-kernel-image-header-vars.h:81:
+#define HEAD_SYMBOLS   \
+   DEFINE_IMAGE_LE64(_kernel_size_le, __MEM_USAGE);\
+   DEFINE_IMAGE_LE64(_kernel_offset_le, TEXT_OFFSET);  \
+   DEFINE_IMAGE_LE64(_kernel_flags_le, __HEAD_FLAGS);

ERROR: spaces required around that ':' (ctx:VxE)
#213: FILE: arch/arm/include/asm/boot0-linux-kernel-header.h:36:
+_start:
   ^

WARNING: line over 80 characters
#217: FILE: arch/arm/include/asm/boot0-linux-kernel-header.h:40:
+   b   reset   /* branch to kernel start, 
magic */

WARNING: line over 80 characters
#219: FILE: arch/arm/include/asm/boot0-linux-kernel-header.h:42:
+   le64sym _kernel_offset_le   /* Image load offset from start 
of RAM, little-endian */

WARNING: line over 80 characters
#220: FILE: arch/arm/include/asm/boot0-linux-kernel-header.h:43:
+   le64sym _kernel_size_le /* Effective size of kernel 
image, little-endian */

WARNING: line over 80 characters
#221: FILE: arch/arm/include/asm/boot0-linux-kernel-header.h:44:
+   le64sym _kernel_flags_le/* Informative flags, 
little-endian */

total: 1 errors, 6 warnings, 4 checks, 176 lines checked
ERROR: space required after that close brace '}'
#44: FILE: arch/arm/mach-tegra/tegra186/nvtboot_mem.c:32:
+} ram_banks[CONFIG_NR_DRAM_BANKS] = {{1}};

total: 1 errors, 0 warnings, 0 checks, 48 lines checked
WARNING: externs should be avoided in .c files
#58: FILE: arch/arm/mach-tegra/tegra186/nvtboot_mem.c:32:
+extern struct mm_region tegra_mem_map[];

total: 0 errors, 1 warnings, 0 checks, 138 lines checked
WARNING: externs should be avoided in .c files
#53: FILE: arch/arm/mach-tegra/tegra186/nvtboot_board.c:29:
+extern struct mm_region tegra_mem_map[];

total: 0 errors, 1 warnings, 0 checks, 286 lines checked

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 11/12] riscv: Modify generic codes to support RISC-V

2018-01-15 Thread Tom Rini
On Tue, Dec 26, 2017 at 01:55:58PM +0800, Andes wrote:

> From: Rick Chen 
> 
> Support common commands bdinfo and image format,
> also modify common generic flow for RISC-V.
> 
> Signed-off-by: Rick Chen 
> Signed-off-by: Rick Chen 
> Signed-off-by: Greentime Hu 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] travis.yml: Support RISC-V

2018-01-15 Thread Tom Rini
On Fri, Jan 12, 2018 at 02:57:09PM +0800, Andes wrote:

> From: Rick Chen 
> 
> Enable travis-ci support with a link having built.
> 
> Signed-off-by: Chih-Mao Chen 
> Signed-off-by: Rick Chen 
> Signed-off-by: Rick Chen 
> Signed-off-by: Greentime Hu 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 03/12] riscv: nx25: dts: Add AE250 dts to support RISC-V

2018-01-15 Thread Tom Rini
On Tue, Dec 26, 2017 at 01:55:50PM +0800, Andes wrote:

> From: Rick Chen 
> 
> AE250 is the Soc using NX25 cpu core base on RISC-V arch.
> Details please see the doc/README.ae250.
> 
> Signed-off-by: Rick Chen 
> Signed-off-by: Rick Chen 
> Signed-off-by: Greentime Hu 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 08/12] riscv: defconfig: Add nx25-ae250 defconfig to support RISC-V

2018-01-15 Thread Tom Rini
On Tue, Dec 26, 2017 at 01:55:55PM +0800, Andes wrote:

> From: Rick Chen 
> 
> Add nx25-ae250 default configuration for RISC-V
> 
> Signed-off-by: Rick Chen 
> Signed-off-by: Rick Chen 
> Signed-off-by: Greentime Hu 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 04/12] riscv: nx25: include: Add header files to support RISC-V

2018-01-15 Thread Tom Rini
On Tue, Dec 26, 2017 at 01:55:51PM +0800, Andes wrote:

> From: Rick Chen 
> 
> Add header files for RISC-V.
> Cache, ptregs, data type and other definitions are included.
> 
> Signed-off-by: Rick Chen 
> Signed-off-by: Rick Chen 
> Signed-off-by: Greentime Hu 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 02/12] riscv: nx25: lib: Add relative lib funcs to support RISC-V

2018-01-15 Thread Tom Rini
On Tue, Dec 26, 2017 at 01:55:49PM +0800, Andes wrote:

> From: Rick Chen 
> 
> Add makefile, interrupts.c and boot.c,... functions
> to support RISC-V arch.
> 
> Signed-off-by: Rick Chen 
> Signed-off-by: Rick Chen 
> Signed-off-by: Greentime Hu 
> Cc: Padmarao Begari 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 01/12] riscv: cpu: Add nx25 to support RISC-V

2018-01-15 Thread Tom Rini
On Tue, Dec 26, 2017 at 01:55:48PM +0800, Andes wrote:

> From: Rick Chen 
> 
> Add Andes nx25 cpu core (called AndesStar V5) to support RISC-V arch
> 
> Verifications:
> 1. startup and relocation ok.
> 2. boot from rom or ram both ok.
> 2. timer driver ok.
> 3. uart driver ok
> 4. mmc driver ok
> 5. spi driver ok.
> 6. 32/64 bit both ok.
> 
> Detail verification message please see doc/README.ae250.
> 
> Signed-off-by: Rick Chen 
> Signed-off-by: Rick Chen 
> Signed-off-by: Greentime Hu 
> Cc: Padmarao Begari 

Applied to u-boot/master.

But that said, the whole of arch/riscv/ and board/AndesTech/nx25-ae250/
introduces some checkpatch.pl issues, please investigate and fix
appropriate ones, thanks!

-- 
Tom


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


[U-Boot] [PATCH] checkpatch: Ignore 'short' Kconfig help entries

2018-01-15 Thread Tom Rini
A 2 line help entry for a new Kconfig entry is, at this time, sufficient
in some cases, so lets drop that warning for now.

Signed-off-by: Tom Rini 
---
 .checkpatch.conf | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.checkpatch.conf b/.checkpatch.conf
index d1d32fac9db5..95f19635d35a 100644
--- a/.checkpatch.conf
+++ b/.checkpatch.conf
@@ -25,3 +25,6 @@
 # Ignore "WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet
 # addresses are __aligned(2)".
 --ignore PREFER_ETHER_ADDR_COPY
+
+# A bit shorter of a description is OK with us.
+--min-conf-desc-length=2
-- 
2.7.4

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


Re: [U-Boot] [PATCH v2 0/3] cadence-quadspi: Fix issues with non 32bit aligned accesses

2018-01-15 Thread Jason Rush
On 1/15/2018 6:01 AM, Simon Goldschmidt wrote:
>
> Pepperl+Fuchs GmbH, Mannheim
> Geschaeftsfuehrer/Managing Directors: Dr.-Ing. Gunther Kegel (Vors./CEO), 
> Werner Guthier, Mehmet Hatiboglu
> Vorsitzender des Aufsichtsrats/Chairman of the supervisory board: Claus 
> Michael
> Registergericht/Register Court: AG Mannheim HRB 4713
> On 15.01.2018 12:45, Marek Vasut wrote:
>> On 01/15/2018 12:36 PM, Vignesh R wrote:
>>> Marek,
>>>
>>> On 09-Jan-18 6:49 PM, Vignesh R wrote:
 This series reverts use of bounce_buf.c for non-DMA related alignment
 restriction and replaces it with local bounce buffer to handle problems
 with non 32 bit aligned writes on TI platforms.
 Based on top of Jason's series:
 https://patchwork.ozlabs.org/cover/856431/

 Tested on K2G EVM.

>>> Could you ack this series, if you are okay with the changes?
>>>
>>> Jagan,
>>> Could you pick this up(along with the above dependent patches) for
>>> 2018.03 once Marek's Ack is in place?
>>>
>> Acked-by: Marek Vasut 
>>
>> although you should get ack from Jason and Simon instead, those matter.
>>
>
> Acked-by: Simon Goldschmidt 
>
> If that "Simon" above was me :-) I thought ack was sent by maintainers and TB 
> by me, sorry.
>
> Simon
>
> Wichtiger Hinweis:
> Diese E-Mail einschliesslich ihrer Anhaenge enthaelt vertrauliche und 
> rechtlich geschuetzte Informationen, die nur fuer den Adressaten bestimmt 
> sind. Sollten Sie nicht der bezeichnete Adressat sein, so teilen Sie dies 
> bitte dem Absender umgehend mit und loeschen Sie diese Nachricht und ihre 
> Anhaenge. Die unbefugte Weitergabe, das Anfertigen von Kopien und jede 
> Veraenderung der E-Mail ist untersagt. Der Absender haftet nicht fuer Inhalte 
> von veraenderten E-Mails.
>
>
> Important Information:
> This e-mail message including its attachments contains confidential and 
> legally protected information solely intended for the addressee. If you are 
> not the intended addressee of this message, please contact the addresser 
> immediately and delete this message including its attachments. The 
> unauthorized dissemination, copying and change of this e-mail are strictly 
> forbidden. The addresser shall not be liable for the content of such changed 
> e-mails.

Looks good to me.  Thanks Vignesh.

Reviewed-by: Jason Rush 
Acked-by: Jason Rush 

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


Re: [U-Boot] [PATCH 0/9] Add new OPTEE bootm support to u-boot

2018-01-15 Thread Dr. Philipp Tomsich

> On 15 Jan 2018, at 13:03, Peng Fan  wrote:
> 
> On Mon, Jan 15, 2018 at 11:29:41AM +0100, Dr. Philipp Tomsich wrote:
>> 
>>> On 15 Jan 2018, at 11:24, Dr. Philipp Tomsich 
>>>  wrote:
>>> 
 
 On 15 Jan 2018, at 05:39, Kever Yang  wrote:
 
 Hi Bryan,
 
 On 01/12/2018 10:52 PM, Bryan O'Donoghue wrote:
> This series adds a new OPTEE bootable image type to u-boot, which is
> directly bootable with the bootm command.
> 
> There is already a TEE image type but, in this case the TEE firmware is
> loaded into RAM, jumped into and then back out of.
 
 This is how OP-TEE upstream designed flow, isn't it?
> This image type is a
> directly bootable image as described here :
> http://mrvan.github.io/optee-imx6ul
 
 Still not clear about the detail flow you are using :( I don't understand 
 why
 we need to support OP-TEE in bootm.
 Do you make U-Boot working in secure word?
>>> 
>>> I would also prefer if we could leave the secure world prior to executing 
>>> the
>>> full U-Boot??? it reduces the attack surface and will be similar to what we 
>>> do
>>> on ARMv8 with ATF.
>> 
>> I forgot to mention that Falcon-mode w/ OPTEE will only be possible if the
>> OPTEE is loaded from SPL.
> 
> Falcon-mode is a good feature, but not everyone use Falcon-mode.
> 
>> 
>> As I would like to avoid having two different ways to load an OPTEE within
>> U-Boot, this seems to also bias the ???default boot sequence??? towards 
>> inserting
>> OPTEE between SPL and the OS-stage (whether this is IH_OS_U_BOOT,
>> IH_OS_LINUX or something else).
> 
> 
> Providing the bootm way gives developer a choice for those that does not
> support SPL.  We have been using bootm to boot optee for long time.

Interesting to hear. Could you provide some additional feedback on how you
boot these boards today (e.g. how is U-Boot loaded, if there is no SPL; is
U-Boot running in secure mode, as we seem to have inferred from the earlier
conversation)?

> 
> Thanks,
> Peng
> 
>> 
>> Regards,
>> Philipp.
>> 
>>> 
> 
> Instead of reusing the Linux bootable image type instead a new image type
> is defined, which allows us to perform additional image verification, 
> prior
> to handing off control via bootm.
> 
> OPTEE images get linked to a specific address at compile time and must be
> loaded to this address too. This series extends out mkimage with a new
> image type that allows the OPTEE binary link location to be validated
> against CONFIG_OPTEE_TZDRAM_BASE and CONFIG_OPTEE_TZDRAM_SIZE respectively
> prior to proceeding through the bootm phase.
> 
> Once applied you can generate a bootable OPTEE image like this
> 
> mkimage -A arm -T optee -C none -d ./out/arm-plat-imx/core/tee.bin 
> uTee.optee
> 
> That image can then be booted directly by bootm. bootm will verify the
> header contents of the OPTEE binary against the DRAM area carved out in
> u-boot. If the defined DRAM area does not match the link address specified
> we refuse to boot.
> 
> Kever - I'd like to suggest that your OPTEE SPL image takes a different
> image type IH_TYPE_OPTEE_SPL ? to indicate the different behavior your
> image type has versus a directly bootable bootm image.
 
 Well, I think we can decide after everything is clear.
 
 Thanks,
 -Kever
> 
> Bryan O'Donoghue (9):
> optee: Add lib entries for sharing OPTEE code across ports
> optee: Add CONFIG_OPTEE_TZDRAM_SIZE
> optee: Make OPTEE_TZDRAM_BASE a mandatory define
> optee: Add optee_image_get_entry_point()
> optee: Add optee_image_get_load_addr()
> tools: mkimage: add optee image type
> optee: Add optee_verify_bootm_image()
> optee: Improve error printout
> bootm: optee: Add mechanism to validate an OPTEE image before boot
> 
> common/bootm.c| 11 +++-
> common/image.c|  1 +
> include/image.h   |  1 +
> include/tee/optee.h   | 41 ++
> lib/Kconfig   |  1 +
> lib/Makefile  |  1 +
> lib/optee/Kconfig | 16 
> lib/optee/Makefile|  7 ++
> lib/optee/optee.c | 69 
> +++
> tools/default_image.c | 25 ++-
> 10 files changed, 166 insertions(+), 7 deletions(-)
> create mode 100644 lib/optee/Kconfig
> create mode 100644 lib/optee/Makefile
> create mode 100644 lib/optee/optee.c
>> 
>> ___
>> 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

Re: [U-Boot] FW: u-boot v2016 vs v2013

2018-01-15 Thread Mehmet Ali İPİN
Dear Estevam,

Thank you very much for your answer.
I downloaded u-boot 2018.01. Its make file required gcc 6.0 or later. Then I 
downloaded gcc 7.2.
Building it.

Do you know is there a yocto version which is stable with u-boot 2018?

Thanks and best regards.



-Original Message-
From: Fabio Estevam [mailto:feste...@gmail.com] 
Sent: Friday, January 12, 2018 2:59 PM
To: Mehmet Ali İPİN 
Cc: u-boot@lists.denx.de
Subject: Re: [U-Boot] FW: u-boot v2016 vs v2013

On Fri, Jan 12, 2018 at 4:00 AM, Mehmet Ali İPİN  
wrote:
>
>
> From: Mehmet Ali İPİN
> Sent: Friday, January 12, 2018 8:39 AM
> To: 'u-b...@lists.dex.de' 
> Subject: u-boot v2016 vs v2013
>
> Dear Sir/Madam,
>
> Hello,
>
> We have an i.mx6dl board which was referenced to sabreauto kit, except 
> we use KSZ9021 as phy chip instead of AR8031. We installed the krogoth 
> and jethro versions of yocto; as result u-booth 2016 and 2013 versions 
> were installed accordingly. When downloaded the code
> 2013 u-boot version controlled the phy chip, even we did not touch the 
> ethernet-phy related files.
>
> But for u-boot 2016, even we modified the config and source files according 
> to KSZ9021, even MDO and MDCLK pins are not activated.
>
> I would be very grateful, if anybody knows a solution about this problem 
> and/or give me a direction.

Please try 2018.01 instead.

Another suggestion is to do a similar changes in your board file like this:
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=dac09fc10b71045ac261a9b8a05d34029ebec2ae;hp=0f7c6cdc8143d6cf0577a84bf27bdaadd6229ff4

Regards,

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


Re: [U-Boot] [RESEND PATCH v2 2/4] clk: clk_fixed_rate: Fix style violation

2018-01-15 Thread Tom Rini
On Mon, Jan 15, 2018 at 11:44:46AM +0100, Mario Six wrote:
> On Mon, Jan 15, 2018 at 11:19 AM, Dr. Philipp Tomsich
>  wrote:
> > Tom,
> >
> >> On 15 Jan 2018, at 11:06, Mario Six  wrote:
> >>
> >> Fix a mis-indented function call in clk_fixed_rate.c
> >
> > A general question: do we want to have such gardening commits
> > create an additional indirection in our history for people using
> > git-blame frequently (e.g. I usually use git-blame to find the last
> > commit that touched a line and then read the log message to find
> > out why something was changed… now I’d have to restart this
> > search whenever I hit a pure formatting change)?

It does make archaeology harder at times, true.

> > My gut feeling would be that we should try to change lines only
> > when there is an actual change to the code happening.
> >
> 
> From https://www.denx.de/wiki/U-Boot/Patches:
> 
> "Non-functional changes, i.e. whitespace and reformatting changes, should be
> done in separate patches marked as cosmetic. This separation of functional and
> cosmetic changes greatly facilitates the review process."
> 
> (granted, I didn't explicitly mark the patches as cosmetic)
> 
> I read that as a general permission to post style-fix patches. If there's a
> different consensus, I'd like the page modified accordingly.

But this is also true (and yes, so long as the commit is otherwise clear
that it's coding style, etc, fixes, it's not also marked as cosmetic)
that we do in fact want these clean-ups.  The biggest problem I see is
that checkpatch.pl isn't as easily integrated into our workflow as other
CI tools.  So new problems get in.

Now, it's not as hard as it might have been ages ago, and I can drop
checkpatch.pl -q --git origin/master.. into my build scripts and get
something not too bad to review to try and catch pretty bad formatting
problems at least.

-- 
Tom


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


  1   2   >