Re: [U-Boot] [PATCH v3 6/7] armv8: ls1046a: add icid setup for qman portals

2018-07-09 Thread Bharat Bhushan


> -Original Message-
> From: Laurentiu Tudor
> Sent: Monday, July 9, 2018 7:23 PM
> To: Bharat Bhushan ; York Sun
> ; Prabhakar Kushwaha
> ; u-boot@lists.denx.de
> Subject: Re: [PATCH v3 6/7] armv8: ls1046a: add icid setup for qman portals
> 
> Hi Bharat,
> 
> On 09.07.2018 15:21, Bharat Bhushan wrote:
> >
> >
> >> -Original Message-
> >> From: Laurentiu Tudor [mailto:laurentiu.tu...@nxp.com]
> >> Sent: Wednesday, July 4, 2018 7:44 PM
> >> To: York Sun ; Prabhakar Kushwaha
> >> ; u-boot@lists.denx.de
> >> Cc: Bharat Bhushan ; Laurentiu Tudor
> >> 
> >> Subject: [PATCH v3 6/7] armv8: ls1046a: add icid setup for qman
> >> portals
> >>
> >> Add support for ICID setting of qman portals and the required device
> >> tree fixups.
> >> Also fix an endiness issue in portal setup code.
> >>
> >> Signed-off-by: Laurentiu Tudor 
> >> ---
> >>   .../arm/cpu/armv8/fsl-layerscape/ls1046_ids.c | 16 +++
> >>   .../asm/arch-fsl-layerscape/fsl_portals.h | 23 ++
> >>   drivers/misc/fsl_portals.c| 43 +++
> >>   3 files changed, 74 insertions(+), 8 deletions(-)
> >>   create mode 100644
> >> arch/arm/include/asm/arch-fsl-layerscape/fsl_portals.h
> >>
> >> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ls1046_ids.c
> >> b/arch/arm/cpu/armv8/fsl-layerscape/ls1046_ids.c
> >> index 1c528ab751..80e1ceadc0 100644
> >> --- a/arch/arm/cpu/armv8/fsl-layerscape/ls1046_ids.c
> >> +++ b/arch/arm/cpu/armv8/fsl-layerscape/ls1046_ids.c
> >> @@ -6,6 +6,22 @@
> >>   #include 
> >>   #include 
> >>   #include 
> >> +#include 
> >> +
> >> +#ifdef CONFIG_SYS_DPAA_QBMAN
> >> +struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = {
> >> +  SET_QP_INFO(FSL_DPAA1_STREAM_ID_END, 0),
> >> +  SET_QP_INFO(FSL_DPAA1_STREAM_ID_END, 0),
> >> +  SET_QP_INFO(FSL_DPAA1_STREAM_ID_END, 0),
> >> +  SET_QP_INFO(FSL_DPAA1_STREAM_ID_END, 0),
> >> +  SET_QP_INFO(FSL_DPAA1_STREAM_ID_END, 0),
> >> +  SET_QP_INFO(FSL_DPAA1_STREAM_ID_END, 0),
> >> +  SET_QP_INFO(FSL_DPAA1_STREAM_ID_END, 0),
> >> +  SET_QP_INFO(FSL_DPAA1_STREAM_ID_END, 0),
> >> +  SET_QP_INFO(FSL_DPAA1_STREAM_ID_END, 0),
> >> +  SET_QP_INFO(FSL_DPAA1_STREAM_ID_END, 0),
> >
> > FSL_DPAA1_STREAM_ID_END is "Stream-ID" while SET_QP_INFO is
> defined as
> >
> >   #define SET_QP_INFO(_icid, dest) \
> > { .dicid = _icid, .ficid = _icid, .icid = _icid, .sdest = dest }
> >
> > It expects "icid"
> >
> > Can we use consistent names, either "streamed" or "icid" at both places.
> 
> The problem is that the streamid defines where defined some time ago (see
> file ./arch/arm/include/asm/arch-fsl-layerscape/stream_id_lsch2.h).
> 
> > In fact this structure is used to finally program the h/w, so we should use
> same name as in h/w to avoid any confusion.
> 
> The RefMan uses the term "icid" so i'd stick with it.
> 
> In order to make this consistent I think i should rename the existing
> *_STREAM_ID_* defines to *_ICID_* but also the header that contains them
> from stream_id_lsch2.h to something like icid_lsch2.h. This implies that also
> the PCI related defines would be renamed. Is that ok?
> Let me know what you think.

Other way is 
 - use stream-id in common code (header files etc)
 - above is used to update the device-tree and device tree should use stream-id 
and not icid
 - pass stream-id to platform/device init code
 - finally when programming to h/w convert them to ICID, STREAMUID_TO_ICID(), 
which is one-o-one.
   In this ICID is limited to h/w definition/programming while remaining common 
framework use streamed.

   Does that look ok?

Thanks
-Bharat
  
> 
> ---
> Best Regards, Laurentiu
> 
> >
> > Thanks
> > -Bharat
> >
> >> +};
> >> +#endif
> >>
> >>   struct icid_id_table icid_tbl[] = {
> >>   #ifdef CONFIG_SYS_DPAA_QBMAN
> >> diff --git a/arch/arm/include/asm/arch-fsl-layerscape/fsl_portals.h
> >> b/arch/arm/include/asm/arch-fsl-layerscape/fsl_portals.h
> >> new file mode 100644
> >> index 00..bd8d3fb49a
> >> --- /dev/null
> >> +++ b/arch/arm/include/asm/arch-fsl-layerscape/fsl_portals.h
> >> @@ -0,0 +1,23 @@
> >> +/* SPDX-License-Identifier: GPL-2.0+ */
> >> +/*
> >> + * Copyright 2018 NXP
> >> + */
> >> +
> >> +#ifndef _FSL_PORTALS_H_
> >> +#define _FSL_PORTALS_H_
> >> +
> >> +struct qportal_info {
> >> +  u16 dicid;  /* DQRR ICID */
> >> +  u16 ficid;  /* frame data ICID */
> >> +  u16 icid;
> >> +  u8  sdest;
> >> +};
> >> +
> >> +#define SET_QP_INFO(_icid, dest) \
> >> +  { .dicid = _icid, .ficid = _icid, .icid = _icid, .sdest = dest }
> >> +
> >> +extern struct qportal_info qp_info[]; void fdt_portal(void *blob,
> >> +const char *compat, const char *container,
> >> +  u64 addr, u32 size);
> >> +
> >> +#endif
> >> diff --git a/drivers/misc/fsl_portals.c b/drivers/misc/fsl_portals.c
> >> index 22faf16751..a524510707 100644
> >> --- a/drivers/misc/fsl_portals.c
> >> +++ b/drivers/misc/fsl_portals.c
> >> @@ -13,6 +13,9 @@
> >>   #ifdef CONFIG_PPC
> >>   #include 
> >>   #include 
> >> +#else
> 

Re: [U-Boot] [PATCH v3 5/7] armv8: ls1046a: initial icid setup support

2018-07-09 Thread Bharat Bhushan


> -Original Message-
> From: Laurentiu Tudor
> Sent: Monday, July 9, 2018 6:42 PM
> To: Bharat Bhushan ; York Sun
> ; Prabhakar Kushwaha
> ; u-boot@lists.denx.de
> Subject: Re: [PATCH v3 5/7] armv8: ls1046a: initial icid setup support
> 
> Hi Bharat,
> 
> On 09.07.2018 15:13, Bharat Bhushan wrote:
> >
> >
> >> -Original Message-
> >> From: Laurentiu Tudor [mailto:laurentiu.tu...@nxp.com]
> >> Sent: Wednesday, July 4, 2018 7:44 PM
> >> To: York Sun ; Prabhakar Kushwaha
> >> ; u-boot@lists.denx.de
> >> Cc: Bharat Bhushan ; Laurentiu Tudor
> >> 
> >> Subject: [PATCH v3 5/7] armv8: ls1046a: initial icid setup support
> >>
> >> Add infrastructure for ICID setup and device tree fixup on ARM platforms.
> >> This include basic ICID setup for several devices.
> >>
> >> Signed-off-by: Laurentiu Tudor 
> >> ---
> >>   arch/arm/cpu/armv8/fsl-layerscape/Makefile|   1 +
> >>   arch/arm/cpu/armv8/fsl-layerscape/icid.c  | 111
> ++
> >>   .../arm/cpu/armv8/fsl-layerscape/ls1046_ids.c |  29 +
> >>   arch/arm/cpu/armv8/fsl-layerscape/soc.c   |   3 +
> >>   .../asm/arch-fsl-layerscape/fsl_icid.h|  80 +
> >>   board/freescale/ls1046aqds/ls1046aqds.c   |   2 +
> >>   board/freescale/ls1046ardb/ls1046ardb.c   |   3 +
> >>   7 files changed, 229 insertions(+)
> >>   create mode 100644 arch/arm/cpu/armv8/fsl-layerscape/icid.c
> >>   create mode 100644 arch/arm/cpu/armv8/fsl-layerscape/ls1046_ids.c
> >>   create mode 100644
> >> arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h
> >>
> >> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Makefile
> >> b/arch/arm/cpu/armv8/fsl-layerscape/Makefile
> >> index 1e9e4680fe..5d6f68aad6 100644
> >> --- a/arch/arm/cpu/armv8/fsl-layerscape/Makefile
> >> +++ b/arch/arm/cpu/armv8/fsl-layerscape/Makefile
> >> @@ -37,6 +37,7 @@ endif
> >>
> >>   ifneq ($(CONFIG_ARCH_LS1046A),)
> >>   obj-$(CONFIG_SYS_HAS_SERDES) += ls1046a_serdes.o
> >> +obj-y += icid.o ls1046_ids.o
> >>   endif
> >>
> >>   ifneq ($(CONFIG_ARCH_LS1088A),)
> >> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/icid.c
> >> b/arch/arm/cpu/armv8/fsl-layerscape/icid.c
> >> new file mode 100644
> >> index 00..8694bd6fa1
> >> --- /dev/null
> >> +++ b/arch/arm/cpu/armv8/fsl-layerscape/icid.c
> >> @@ -0,0 +1,111 @@
> >> +// SPDX-License-Identifier: GPL-2.0+
> >> +/*
> >> + * Copyright 2018 NXP
> >> + */
> >> +
> >> +#include 
> >> +#include 
> >> +#include 
> >> +
> >> +#include 
> >> +#include 
> >> +#include 
> >> +
> >> +static void set_icid(struct icid_id_table *tbl, int size) {
> >> +  int i;
> >> +
> >> +  for (i = 0; i < size; i++)
> >> +  out_be32((u32 *)(tbl[i].reg_addr), tbl[i].reg); }
> >> +
> >> +void set_icids(void)
> >> +{
> >> +  /* setup general icid offsets */
> >> +  set_icid(icid_tbl, icid_tbl_sz);
> >> +}
> >> +
> >> +int fdt_set_iommu_prop(void *blob, int off, int smmu_ph, u32 *ids,
> >> +int
> >> +num_ids) {
> >> +  int i, ret;
> >> +  u32 prop[8];
> >> +
> >> +  for (i = 0; i < num_ids; i++) {
> >> +  prop[i * 2] = cpu_to_fdt32(smmu_ph);
> >> +  prop[i * 2 + 1] = cpu_to_fdt32(ids[i]);
> >> +  }
> >> +  ret = fdt_setprop(blob, off, "iommus",
> >> +prop, sizeof(u32) * num_ids * 2);
> >> +  if (ret > 0) {
> >> +  printf("WARNING unable to set iommus: %s\n",
> >> fdt_strerror(off));
> >> +  return off;
> >> +  }
> >> +  ret = fdt_setprop_empty(blob, off, "dma-coherent");
> >
> > This forces "dma-coherent" for all SOCs, although there is no current
> known SOCs which does not support non-coherent but maybe safe not to
> set from common code.
> 
> I see your point and will drop this.
> Now, regarding a replacement solution, I don't have any other idea than
> updating the device trees directly. Thoughts?

dma-coherent will be default in device tree and u-boot code should check if 
dma-coherent already set.
Have another function exposed from generic code which set "dma-coherent" and 
platforms code will call that function if it is coherent. 

> 
> >> +  if (ret > 0) {
> >> +  printf("WARNING unable to set dma-coherent: %s\n",
> >> + fdt_strerror(off));
> >> +  return off;
> >> +  }
> >> +
> >> +  return 0;
> >> +}
> >> +
> >> +int fdt_fixup_icid_tbl(void *blob, int smmu_ph,
> >> + struct icid_id_table *tbl, int size) {
> >> +  int i, err, off;
> >> +
> >> +  for (i = 0; i < size; i++) {
> >> +  if (!tbl[i].compat)
> >> +  continue;
> >> +
> >> +  off = fdt_node_offset_by_compat_reg(blob,
> >> +  tbl[i].compat,
> >> +  tbl[i].compat_addr);
> >> +  if (off > 0) {
> >> +  err = fdt_set_iommu_prop(blob, off, smmu_ph,
> >> +   [i].id, 1);
> >> +  if (err)
> >> +  return err;
> >> +  } else {
> >> + 

Re: [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree

2018-07-09 Thread Siva Durga Prasad Paladugu
Hi,


> -Original Message-
> From: Siva Durga Prasad Paladugu
> Sent: Tuesday, July 10, 2018 9:32 AM
> To: Grygorii Strashko ; u-boot@lists.denx.de
> Cc: joe.hershber...@ni.com; Michal Simek 
> Subject: RE: [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree
> 
> Hi,
> 
> > -Original Message-
> > From: Grygorii Strashko [mailto:grygorii.stras...@ti.com]
> > Sent: Monday, July 09, 2018 10:51 PM
> > To: Siva Durga Prasad Paladugu ; u-
> > b...@lists.denx.de
> > Cc: joe.hershber...@ni.com; Michal Simek 
> > Subject: Re: [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support
> > livetree
> >
> >
> >
> > On 07/06/2018 05:10 AM, Siva Durga Prasad Paladugu wrote:
> > > This patch adds support for livetree by using dev_.. calls instead
> > > of fdtdec_..
> > >
> > > Signed-off-by: Siva Durga Prasad Paladugu
> > > 
> > > ---
> > >   drivers/net/phy/ti.c | 16 +++-
> > >   1 file changed, 7 insertions(+), 9 deletions(-)
> > >
> > > diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c index
> > > 8f3ed8a..945d9e9 100644
> > > --- a/drivers/net/phy/ti.c
> > > +++ b/drivers/net/phy/ti.c
> > > @@ -173,24 +173,22 @@ static int dp83867_of_init(struct phy_device
> > *phydev)
> > >   {
> > >   struct dp83867_private *dp83867 = phydev->priv;
> > >   struct udevice *dev = phydev->dev;
> > > - int node = dev_of_offset(dev);
> > >   const void *fdt = gd->fdt_blob;
> > >
> > > - if (fdtdec_get_bool(fdt, node, "ti,max-output-impedance"))
> > > + if (dev_read_bool(dev, "ti,max-output-impedance"))
> > >   dp83867->io_impedance =
> > DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX;
> > > - else if (fdtdec_get_bool(fdt, node, "ti,min-output-impedance"))
> > > + else if (dev_read_bool(dev, "ti,min-output-impedance"))
> > >   dp83867->io_impedance =
> > DP83867_IO_MUX_CFG_IO_IMPEDANCE_MIN;
> > >   else
> > >   dp83867->io_impedance = -EINVAL;
> > >
> > > - dp83867->rx_id_delay = fdtdec_get_uint(gd->fdt_blob,
> > dev_of_offset(dev),
> > > -  "ti,rx-internal-delay", -1);
> > > + dp83867->rx_id_delay = dev_read_u32_default(dev, "ti,rx-internal-
> > delay",
> > > + -1);
> > >
> > > - dp83867->tx_id_delay = fdtdec_get_uint(gd->fdt_blob,
> > dev_of_offset(dev),
> > > -  "ti,tx-internal-delay", -1);
> > > + dp83867->tx_id_delay = dev_read_u32_default(dev, "ti,tx-internal-
> > delay",
> > > + -1);
> > >
> > > - dp83867->fifo_depth = fdtdec_get_uint(gd->fdt_blob,
> > dev_of_offset(dev),
> > > -  "ti,fifo-depth", -1);
> > > + dp83867->fifo_depth = dev_read_u32_default(dev, "ti,fifo-depth",
> > > +-1);
> > >
> > >   return 0;
> > >   }
> > >
> >
> > NACK. Pls, check
> > https://patchwork.ozlabs.org/cover/936370/
> > and
> > https://patchwork.ozlabs.org/cover/936380/
> >
> > any comments, tested-by are very welcome.
> 
> Do you mean to say that this patch has to be rebased and tested on the top
> of your patch.

Oops, I missed your second thread(936380) and replied. 
Please ignore my last mail. 
I will review, test with your series and let you know if any.

Thanks,
Siva

> 
> Thanks,
> Siva
> 
> >
> > --
> > regards,
> > -grygorii
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree

2018-07-09 Thread Siva Durga Prasad Paladugu
Hi,

> -Original Message-
> From: Grygorii Strashko [mailto:grygorii.stras...@ti.com]
> Sent: Monday, July 09, 2018 10:51 PM
> To: Siva Durga Prasad Paladugu ; u-
> b...@lists.denx.de
> Cc: joe.hershber...@ni.com; Michal Simek 
> Subject: Re: [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree
> 
> 
> 
> On 07/06/2018 05:10 AM, Siva Durga Prasad Paladugu wrote:
> > This patch adds support for livetree by using dev_.. calls instead of
> > fdtdec_..
> >
> > Signed-off-by: Siva Durga Prasad Paladugu
> > 
> > ---
> >   drivers/net/phy/ti.c | 16 +++-
> >   1 file changed, 7 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c index
> > 8f3ed8a..945d9e9 100644
> > --- a/drivers/net/phy/ti.c
> > +++ b/drivers/net/phy/ti.c
> > @@ -173,24 +173,22 @@ static int dp83867_of_init(struct phy_device
> *phydev)
> >   {
> > struct dp83867_private *dp83867 = phydev->priv;
> > struct udevice *dev = phydev->dev;
> > -   int node = dev_of_offset(dev);
> > const void *fdt = gd->fdt_blob;
> >
> > -   if (fdtdec_get_bool(fdt, node, "ti,max-output-impedance"))
> > +   if (dev_read_bool(dev, "ti,max-output-impedance"))
> > dp83867->io_impedance =
> DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX;
> > -   else if (fdtdec_get_bool(fdt, node, "ti,min-output-impedance"))
> > +   else if (dev_read_bool(dev, "ti,min-output-impedance"))
> > dp83867->io_impedance =
> DP83867_IO_MUX_CFG_IO_IMPEDANCE_MIN;
> > else
> > dp83867->io_impedance = -EINVAL;
> >
> > -   dp83867->rx_id_delay = fdtdec_get_uint(gd->fdt_blob,
> dev_of_offset(dev),
> > -"ti,rx-internal-delay", -1);
> > +   dp83867->rx_id_delay = dev_read_u32_default(dev, "ti,rx-internal-
> delay",
> > +   -1);
> >
> > -   dp83867->tx_id_delay = fdtdec_get_uint(gd->fdt_blob,
> dev_of_offset(dev),
> > -"ti,tx-internal-delay", -1);
> > +   dp83867->tx_id_delay = dev_read_u32_default(dev, "ti,tx-internal-
> delay",
> > +   -1);
> >
> > -   dp83867->fifo_depth = fdtdec_get_uint(gd->fdt_blob,
> dev_of_offset(dev),
> > -"ti,fifo-depth", -1);
> > +   dp83867->fifo_depth = dev_read_u32_default(dev, "ti,fifo-depth",
> > +-1);
> >
> > return 0;
> >   }
> >
> 
> NACK. Pls, check
> https://patchwork.ozlabs.org/cover/936370/
> and
> https://patchwork.ozlabs.org/cover/936380/
> 
> any comments, tested-by are very welcome.

Do you mean to say that this patch has to be rebased and tested on the top of 
your patch.

Thanks,
Siva

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


[U-Boot] [PATCH 3/3] arm64: ls1043aqds: enable DM support for sata

2018-07-09 Thread peng . ma
From: Peng Ma 

Enable related configs to support sata DM feature.

Signed-off-by: Peng Ma 
---
depend on:
patchwork.ozlabs.org/patch/941093/

 configs/ls1043aqds_defconfig |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/configs/ls1043aqds_defconfig b/configs/ls1043aqds_defconfig
index ec938aa..9e0c036 100644
--- a/configs/ls1043aqds_defconfig
+++ b/configs/ls1043aqds_defconfig
@@ -47,3 +47,8 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_STORAGE=y
 CONFIG_BLK=y
 CONFIG_DM_MMC=y
+CONFIG_DM_SCSI=y
+CONFIG_SATA_CEVA=y
+CONFIG_SCSI_AHCI=y
+CONFIG_SCSI=y
+CONFIG_AHCI=y
-- 
1.7.1

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


[U-Boot] U-Boot 2018.07 Still Broken for Allwinner H3 SoCs

2018-07-09 Thread Chen-Yu Tsai
This is on a Libre Computer ALL-H3-CC H3 variant. Still running a
bisect, but v2018.07-rc1 is a working version. From the EHCI error
messages, I'm thinking it might be related to the USB changes lately.
Not sure if any other SoCs (ex. A64) are broken or not at the moment.

See log:

U-Boot SPL 2018.07 (Jul 10 2018 - 10:21:03 +0800)
DRAM: 1024 MiB
Trying to boot from MMC1


U-Boot 2018.07 (Jul 10 2018 - 10:21:03 +0800) Allwinner Technology

CPU:   Allwinner H3 (SUN8I 1680)
Model: Libre Computer Board ALL-H3-CC H3
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0
Loading Environment from FAT... Unable to use mmc 0:1... Failed (-5)
In:serial
Out:   serial
Err:   serial
Net:   phy interface0
eth0: ethernet@1c3
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
USB4:   USB EHCI 1.00
USB5:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
scanning bus 4 for devices... 1 USB Device(s) found
   scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
385 bytes read in 8 ms (46.9 KiB/s)
## Executing script at 4310
6343768 bytes read in 295 ms (20.5 MiB/s)
18710 bytes read in 10 ms (1.8 MiB/s)
## Flattened Device Tree blob at 4300
   Booting using the fdt blob at 0x4300
EHCI failed to shut down host controller.
EHCI failed to shut down host controller.
EHCI failed to shut down host controller.
   Loading Device Tree to 49ff8000, end 49fff915 ... OK

Starting kernel ...

data abort
pc : [<7dfadc6c>]  lr : [<7df82ed7>]
reloc pc : [<4a02bc6c>]lr : [<4a000ed7>]
sp : 79f5ce90  ip : 79f62b8a fp : 0003
r10: 7dfc3d14  r9 : 79f61ed8 r8 : 0400
r7 :   r6 : 4200 r5 : 49ff8000  r4 : 
r3 : 49ff8000  r2 : 49ff8000 r1 :   r0 : 
Flags: nZCv  IRQs off  FIQs off  Mode UK6_32
Code: e12fff1e e52de008 fa01 e3a0 (e49df008)
Resetting CPU ...

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


Re: [U-Boot] [RFC] Make U-Boot log great again

2018-07-09 Thread Bin Meng
Hello,

On Fri, Mar 23, 2018 at 1:44 PM, Bin Meng  wrote:
> Hi,
>
> On Sat, Feb 17, 2018 at 3:49 AM, Robert Nelson  
> wrote:
>> On Fri, Feb 16, 2018 at 1:01 PM, Sam Protsenko
>>  wrote:
>>> Hi guys,
>>>
>>> TL;DR This is a suggestion about fixing U-Boot log, which has got
>>> worse recently.
>>>
>>> Right now U-Boot and SPL logs are cluttered with bogus warnings like
>>> these (on X15 board, but I'm pretty sure it should appear on many
>>> others):
>>>
>>> Loading Environment from FAT...
>>> *** Warning - bad CRC, using default environment
>>> Failed (-5)
>>
>
> Do we plan to fix this "Failed (-5)" message? It's very confusing.
> Like previous U-Boot just printing "*** Warning - bad CRC, using
> default environment" is enough I think.
>

The v2018.07 release still has this "Failed (-5)" message on boot.
When do we plan to fix this?

>> This one seems to cause the most confusion with end users.  They like
>> to think it's a real bug, when in reality, "saveenv" and friends was
>> just never run from within u-boot or a separate environment partition
>> wasn't pre-programmed.
>>
>> It's one of those bugs, users asked 10 years ago when the Beagle first
>> launched, yet users still ask from time to time..
>>
>>>
>>> Those are the consequences of next commit:
>>>
>>> fb69464eae1e ("env: Allow to build multiple environments in Kconfig")
>>>
>>> Because of this commit, I can see following changes in my .config file:
>>>
>>> +CONFIG_ENV_IS_IN_FAT=y
>>> +CONFIG_ENV_FAT_INTERFACE="mmc"
>>> +CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
>>> +CONFIG_ENV_FAT_FILE="uboot.env"
>>>
>>> which led U-Boot to try and load the environment from different
>>> sources. I agree that it's good thing to do and can be useful, but the
>>> problem is that the code for loading the environment wasn't changed to
>>> handle errors properly.
>>>
>>> How I suggest to handle that case:
>>>
>>>  1. If we have two sources for the environment (e.g. FAT partition on
>>> SD card and some raw partition on eMMC), we shouldn't print error
>>> messages if we were unable to load the environment from one source
>>>  2. We should probably print some human-readable information that we
>>> didn't find the environment there, let's skip and look for next source
>>> (but don't print those warnings/failed messages)
>>>  3. And only print the error message in case when U-Boot environment
>>> wasn't found at all (on all possible sources).
>>>
>>> I don't have enough time to fix this by my own right now. But let's
>>> discuss how to approach this issue in a best way possible. And if
>>> someone wants to step forward and do that -- would be really nice. If
>>> no -- I can look into that later. But let's collect some opinions
>>> here, first.
>>
>> I've also found, when you are dealing with multiple sources, it's nice
>> to print "where" you came from.
>>
>> Otherwise, I've been known to make things way to verbose, but it's
>> easier to debug years later, when your adding a new family, or
>> overhauling when/how "overlays" are handled...
>>

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


Re: [U-Boot] ls1021atwr: Convert to use driver model TSEC driver

2018-07-09 Thread Bin Meng
Hi Claudiu,

On Mon, Jun 11, 2018 at 10:28 PM, York Sun  wrote:
> On 06/10/2018 10:37 PM, Bin Meng wrote:
>> On Tue, Jun 5, 2018 at 9:28 AM, Bin Meng  wrote:
>>> Hi Alison, Prabhakar,
>>>
>>> On Fri, Jun 1, 2018 at 12:06 PM, York Sun  wrote:
 On May 31, 2018, at 20:58, Bin Meng  wrote:
>
> Hi,
>
>> On Wed, May 30, 2018 at 11:06 AM, York Sun  wrote:
>> Alison and Prabhakar,
>>
>> Please take a look at the mentioned patch.
>>
>
> Would you please take the patch and update all LS1021A boards? thanks!


 Bin,

 I expect LS1021A board maintainers to chime in.
>>>
>>> Would you please comment on this? Thanks!
>>
>> Ping ...
>>
>
> Bin,
>
> Our TSEC driver owner Claudiu Manoil (CC'ed) plans to work on the driver
> a while later.

Do you have ETA of the DM ETH conversion for LS1021ATWR board?

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


Re: [U-Boot] [PATCH 3/8] phy: sun4i-usb: Call phy_passby even for PHY#0

2018-07-09 Thread Chen-Yu Tsai
On Tue, Jul 10, 2018 at 3:17 AM, Jagan Teki  wrote:
> phy_passby is not calling for phy id 0 in legacy code,
> which has no information on why it restricted.
> Since Linux phy driver doesn't restrict like this,
> so call it directly with out any condition

See

https://github.com/wens/u-boot-sunxi/commit/b1d3cb2973e75097bbee1835efdc07afb8a7ef2f

for a better commit message. This is an older version. I tried
rebasing on the latest version, but apparently there are merge
conflicts between master and sunxi/next. Even worse, it fails
to boot properly.

Please try to understand why the code is what it is. The reason we
started out with not calling it for PHY 0 is because in the past
USB0 did not have EHCI/OHCI host pairs, which in turn means there's
no "pmu" (whatever that is) register associated with that PHY.

In time, the check for the pointer to that register was moved into
sun4i_usb_phy_passby() itself, which directly returns if that pointer
is not set. And the PHY driver only sets that pointer if a "pmuX"
resource for X PHY is provided.

ChenYu

> Signed-off-by: Jagan Teki 
> ---
>  drivers/phy/allwinner/phy-sun4i-usb.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c 
> b/drivers/phy/allwinner/phy-sun4i-usb.c
> index 2b3cf48025..01f585a283 100644
> --- a/drivers/phy/allwinner/phy-sun4i-usb.c
> +++ b/drivers/phy/allwinner/phy-sun4i-usb.c
> @@ -300,8 +300,7 @@ static int sun4i_usb_phy_init(struct phy *phy)
> data->cfg->disc_thresh, 
> PHY_DISCON_TH_LEN);
> }
>
> -   if (usb_phy->id != 0)
> -   sun4i_usb_phy_passby(phy, true);
> +   sun4i_usb_phy_passby(phy, true);
>
> sun4i_usb_phy0_reroute(data, true);
>
> --
> 2.17.1
>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 2/2] ARM: DTS: Resync Logic PD SOM-LV 37xx devkit with Linux 4.18-RC4

2018-07-09 Thread Adam Ford
There have been some significant changes to the DM37 SOM-LV device
tree.  This patch re-syncs it with Linux.

Signed-off-by: Adam Ford 

diff --git a/arch/arm/dts/logicpd-som-lv-37xx-devkit.dts 
b/arch/arm/dts/logicpd-som-lv-37xx-devkit.dts
index 1702b9e3db..2428373952 100644
--- a/arch/arm/dts/logicpd-som-lv-37xx-devkit.dts
+++ b/arch/arm/dts/logicpd-som-lv-37xx-devkit.dts
@@ -8,262 +8,10 @@
 
 #include "omap36xx.dtsi"
 #include "logicpd-som-lv.dtsi"
+#include "logicpd-som-lv-baseboard.dtsi"
 #include "omap-gpmc-smsc9221.dtsi"
 
 / {
model = "LogicPD Zoom DM3730 SOM-LV Development Kit";
compatible = "logicpd,dm3730-som-lv-devkit", "ti,omap3630", "ti,omap3";
-
-   chosen {
-   stdout-path = 
-   };
-
-   gpio_keys {
-   compatible = "gpio-keys";
-   pinctrl-names = "default";
-   pinctrl-0 = <_key_pins>;
-
-   sysboot2 {
-   label = "gpio3";
-   gpios = < 15 GPIO_ACTIVE_LOW>;/* gpio_111 / 
uP_GPIO_3 */
-   linux,code = ;
-   wakeup-source;
-   };
-   };
-
-   sound {
-   compatible = "ti,omap-twl4030";
-   ti,model = "omap3logic";
-   ti,mcbsp = <>;
-   };
-
-   leds {
-   compatible = "gpio-leds";
-   pinctrl-names = "default";
-   pinctrl-0 = <_pins _pins_wkup>;
-
-   led1 {
-   label = "led1";
-   gpios = < 5 GPIO_ACTIVE_LOW>; /* gpio133 */
-   linux,default-trigger = "cpu0";
-   };
-
-   led2 {
-   label = "led2";
-   gpios = < 11 GPIO_ACTIVE_LOW>;/* gpio11 */
-   linux,default-trigger = "none";
-   };
-   };
-};
-
- {
-   regulator-min-microvolt = <300>;
-   regulator-max-microvolt = <300>;
-};
-
- {
-   regulator-min-microvolt = <180>;
-   regulator-max-microvolt = <180>;
-};
-
- {
-   status = "okay";
-};
-
- {
-   ti,bb-uvolt = <320>;
-   ti,bb-uamp = <150>;
-};
-
- {
-   ranges = <1 0 0x0800 0x100>;/* CS1: 16MB for LAN9221 */
-
-   ethernet@gpmc {
-   pinctrl-names = "default";
-   pinctrl-0 = <_pins>;
-   interrupt-parent = <>;
-   interrupts = <24 IRQ_TYPE_LEVEL_LOW>;   /* gpio_152 */
-   reg = <1 0 0xff>;
-   };
-};
-
- {
-   regulator-always-on;
-};
-
- {
-   status = "ok";
-   vdds_dsi-supply = <>;
-   vdda_video-supply = <_reg>;
-   pinctrl-names = "default";
-   pinctrl-0 = <_dpi_pins1>;
-   port {
-   dpi_out: endpoint {
-   remote-endpoint = <_in>;
-   data-lines = <16>;
-   };
-   };
-};
-
-/ {
-   aliases {
-   display0 = 
-   };
-
-   video_reg: video_reg {
-   compatible = "regulator-fixed";
-   regulator-name = "fixed-supply";
-   regulator-min-microvolt = <330>;
-   regulator-max-microvolt = <330>;
-   };
-
-   lcd0: display@0 {
-   compatible = "panel-dpi";
-   label = "28";
-   status = "okay";
-   /* default-on; */
-   pinctrl-names = "default";
-   pinctrl-0 = <_enable_pin>;
-   enable-gpios = < 27 GPIO_ACTIVE_HIGH>;/* gpio155, lcd 
INI */
-   port {
-   lcd_in: endpoint {
-   remote-endpoint = <_out>;
-   };
-   };
-
-   panel-timing {
-   clock-frequency = <900>;
-   hactive = <480>;
-   vactive = <272>;
-   hfront-porch = <3>;
-   hback-porch = <2>;
-   hsync-len = <42>;
-   vback-porch = <3>;
-   vfront-porch = <2>;
-   vsync-len = <11>;
-   hsync-active = <1>;
-   vsync-active = <1>;
-   de-active = <1>;
-   pixelclk-active = <0>;
-   };
-   };
-
-   bl: backlight {
-   compatible = "pwm-backlight";
-   pinctrl-names = "default";
-   pinctrl-0 = <_pins>;
-   pwms = <_pwm 0 500>;
-   brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
-   default-brightness-level = <7>;
-   enable-gpios = < 8 GPIO_ACTIVE_HIGH>; /* gpio_8 */
-   };
-};
-
- {
-   interrupts-extended = < 83 _pmx_core 0x11a>;
-   pinctrl-names = "default";
-   pinctrl-0 = <_pins>;
-   vmmc-supply = <>;
-   bus-width = <4>;
-   cap-power-off-card;
-};
-
- {
-   

[U-Boot] [PATCH 1/2] ARM: DTS: Resync LogicPD-Torpedo-37xx-devkit with Linux 4.18-RC4

2018-07-09 Thread Adam Ford
There have been some refactoring of the DTS files for the Logic PD
DM37 Torpedo.  This patch re-sync's the DTS files with Linux

Signed-off-by: Adam Ford 

diff --git a/arch/arm/dts/logicpd-torpedo-37xx-devkit.dts 
b/arch/arm/dts/logicpd-torpedo-37xx-devkit.dts
index 43e9364083..234afd6d60 100644
--- a/arch/arm/dts/logicpd-torpedo-37xx-devkit.dts
+++ b/arch/arm/dts/logicpd-torpedo-37xx-devkit.dts
@@ -9,396 +9,69 @@
 #include "omap36xx.dtsi"
 #include "logicpd-torpedo-som.dtsi"
 #include "omap-gpmc-smsc9221.dtsi"
+#include "logicpd-torpedo-baseboard.dtsi"
 
 / {
model = "LogicPD Zoom DM3730 Torpedo + Wireless Development Kit";
compatible = "logicpd,dm3730-torpedo-devkit", "ti,omap3630", "ti,omap3";
 
-   gpio_keys {
-   compatible = "gpio-keys";
-   pinctrl-names = "default";
-   pinctrl-0 = <_key_pins _key_pins_wkup>;
-
-   sysboot2 {
-   label = "sysboot2";
-   gpios = < 2 GPIO_ACTIVE_LOW>; /* gpio2 */
-   linux,code = ;
-   wakeup-source;
-   };
-
-   sysboot5 {
-   label = "sysboot5";
-   gpios = < 7 GPIO_ACTIVE_LOW>; /* gpio7 */
-   linux,code = ;
-   wakeup-source;
-   };
-
-   gpio1 {
-   label = "gpio1";
-   gpios = < 21 GPIO_ACTIVE_LOW>;/* gpio181 */
-   linux,code = ;
-   wakeup-source;
-   };
-
-   gpio2 {
-   label = "gpio2";
-   gpios = < 18 GPIO_ACTIVE_LOW>;/* gpio178 */
-   linux,code = ;
-   wakeup-source;
-   };
-   };
-
-   sound {
-   compatible = "ti,omap-twl4030";
-   ti,model = "omap3logic";
-   ti,mcbsp = <>;
-   };
-
-   leds {
-   compatible = "gpio-leds";
-   pinctrl-names = "default";
-   pinctrl-0 = <_pins>;
-
-   led1 {
-   label = "led1";
-   gpios = < 20 GPIO_ACTIVE_HIGH>;   /* gpio180 */
-   linux,default-trigger = "cpu0";
-   };
-
-   led2 {
-   label = "led2";
-   gpios = < 19 GPIO_ACTIVE_HIGH>;   /* gpio179 */
-   linux,default-trigger = "none";
-   };
-   };
-
-   pwm10: dmtimer-pwm {
-   compatible = "ti,omap-dmtimer-pwm";
-   pinctrl-names = "default";
-   pinctrl-0 = <_pins>;
-   ti,timers = <>;
-   #pwm-cells = <3>;
-   };
-
-};
-
- {
-   regulator-min-microvolt = <300>;
-   regulator-max-microvolt = <300>;
-};
-
- {
-   regulator-min-microvolt = <180>;
-   regulator-max-microvolt = <180>;
-};
-
- {
-   status = "okay";
-};
-
- {
-   ti,bb-uvolt = <320>;
-   ti,bb-uamp = <150>;
-};
-
- {
-   ranges = <0 0 0x3000 0x100  /* CS0: 16MB for NAND */
- 1 0 0x2c00 0x100>;/* CS1: 16MB for LAN9221 */
-
-   ethernet@gpmc {
-   pinctrl-names = "default";
-   pinctrl-0 = <_pins>;
-   interrupt-parent = <>;
-   interrupts = <1 IRQ_TYPE_LEVEL_LOW>;/* gpio129 */
-   reg = <1 0 0xff>;
-   };
-};
-
- {
-   regulator-always-on;
-};
-
- {
-   status = "ok";
-   vdds_dsi-supply = <>;
-   vdda_video-supply = <_reg>;
-   pinctrl-names = "default";
-   pinctrl-0 = <_dpi_pins1>;
-   port {
-   dpi_out: endpoint {
-   remote-endpoint = <_in>;
-   data-lines = <16>;
-   };
-   };
-};
-
-/ {
-   aliases {
-   display0 = 
-   };
-
-   video_reg: video_reg {
-   pinctrl-names = "default";
-   pinctrl-0 = <_pwr_pins>;
+   wl12xx_vmmc: wl12xx_vmmc {
compatible = "regulator-fixed";
-   regulator-name = "fixed-supply";
-   regulator-min-microvolt = <330>;
-   regulator-max-microvolt = <330>;
-   gpio = < 27 GPIO_ACTIVE_HIGH>;/* gpio155, lcd INI */
-   };
-
-   lcd0: display {
-   compatible = "panel-dpi";
-   label = "15";
-   status = "okay";
-   /* default-on; */
-   pinctrl-names = "default";
-
-   port {
-   lcd_in: endpoint {
-   remote-endpoint = <_out>;
-   };
-   };
-
-   panel-timing {
-   clock-frequency = <900>;
-   hactive = <480>;
-   vactive = <272>;
-

[U-Boot] [PATCH] ARM: dts: Resync OMAP3 and omap36xx with Linux 4.18-RC4

2018-07-09 Thread Adam Ford
There have been several minor changes to the OMAP3.dtsi, so this
patch re-syncs it with Linux.  An addition include/dt-binding was
also brought with it.

Signed-off-by: Adam Ford 

diff --git a/arch/arm/dts/omap3.dtsi b/arch/arm/dts/omap3.dtsi
index 56c94729bb..4043ecb380 100644
--- a/arch/arm/dts/omap3.dtsi
+++ b/arch/arm/dts/omap3.dtsi
@@ -215,6 +215,7 @@
#dma-cells = <1>;
dma-channels = <32>;
dma-requests = <96>;
+   ti,hwmods = "dma";
};
 
gpio1: gpio@4831 {
@@ -287,7 +288,6 @@
uart1: serial@4806a000 {
compatible = "ti,omap3-uart";
reg = <0x4806a000 0x2000>;
-   reg-shift = <2>;
interrupts-extended = < 72>;
dmas = < 49  50>;
dma-names = "tx", "rx";
@@ -298,7 +298,6 @@
uart2: serial@4806c000 {
compatible = "ti,omap3-uart";
reg = <0x4806c000 0x400>;
-   reg-shift = <2>;
interrupts-extended = < 73>;
dmas = < 51  52>;
dma-names = "tx", "rx";
@@ -309,7 +308,6 @@
uart3: serial@4902 {
compatible = "ti,omap3-uart";
reg = <0x4902 0x400>;
-   reg-shift = <2>;
interrupts-extended = < 74>;
dmas = < 53  54>;
dma-names = "tx", "rx";
@@ -559,6 +557,7 @@
dma-names = "tx", "rx";
clocks = <_fck>;
clock-names = "fck";
+   #sound-dai-cells = <0>;
status = "disabled";
};
 
@@ -589,20 +588,6 @@
dma-names = "rx";
};
 
-   smartreflex_core: smartreflex@480cb000 {
-   compatible = "ti,omap3-smartreflex-core";
-   ti,hwmods = "smartreflex_core";
-   reg = <0x480cb000 0x400>;
-   interrupts = <19>;
-   };
-
-   smartreflex_mpu_iva: smartreflex@480c9000 {
-   compatible = "ti,omap3-smartreflex-iva";
-   ti,hwmods = "smartreflex_mpu_iva";
-   reg = <0x480c9000 0x400>;
-   interrupts = <18>;
-   };
-
timer1: timer@48318000 {
compatible = "ti,omap3430-timer";
reg = <0x48318000 0x400>;
@@ -717,6 +702,7 @@
compatible = "ti,ohci-omap3";
reg = <0x48064400 0x400>;
interrupts = <76>;
+   remote-wakeup-connected;
};
 
usbhsehci: ehci@48064800 {
diff --git a/arch/arm/dts/omap36xx.dtsi b/arch/arm/dts/omap36xx.dtsi
index a0f2d9e805..6fb23ada1f 100644
--- a/arch/arm/dts/omap36xx.dtsi
+++ b/arch/arm/dts/omap36xx.dtsi
@@ -8,6 +8,7 @@
  * kind, whether express or implied.
  */
 
+#include 
 #include 
 
 #include "omap3.dtsi"
@@ -34,7 +35,6 @@
uart4: serial@49042000 {
compatible = "ti,omap3-uart";
reg = <0x49042000 0x400>;
-   reg-shift = <2>;
interrupts = <80>;
dmas = < 81  82>;
dma-names = "tx", "rx";
@@ -94,6 +94,51 @@
compatible = "ti,omap36xx-bandgap";
#thermal-sensor-cells = <0>;
};
+
+   target-module@480cb000 {
+   compatible = "ti,sysc-omap3630-sr", "ti,sysc";
+   ti,hwmods = "smartreflex_core";
+   reg = <0x480cb038 0x4>;
+   reg-names = "sysc";
+   ti,sysc-mask = ;
+   ti,sysc-sidle = ,
+   ,
+   ;
+   clocks = <_fck>;
+   clock-names = "fck";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges = <0 0x480cb000 0x001000>;
+
+   smartreflex_core: smartreflex@0 {
+   compatible = "ti,omap3-smartreflex-core";
+   reg = <0 0x400>;
+   interrupts = <19>;
+   };
+   };
+
+   target-module@480c9000 {
+   compatible = "ti,sysc-omap3630-sr", "ti,sysc";
+   ti,hwmods = "smartreflex_mpu_iva";
+   reg = <0x480c9038 0x4>;
+ 

[U-Boot] [PATCH] ARM: DTS: Resync am3517-evm.dts with Linux 4.18-rc4

2018-07-09 Thread Adam Ford
Several changes have been made to the AM3517-evm and the underlying
am3517.dtsi file.  This patch re-sync's the DTS and DTSI files with
Linux.

Signed-off-by: Adam Ford 

diff --git a/arch/arm/dts/am3517-evm.dts b/arch/arm/dts/am3517-evm.dts
index 0e4a125f78..98aadb0f81 100644
--- a/arch/arm/dts/am3517-evm.dts
+++ b/arch/arm/dts/am3517-evm.dts
@@ -8,11 +8,17 @@
 /dts-v1/;
 
 #include "am3517.dtsi"
+#include "am3517-som.dtsi"
+#include 
 
 / {
model = "TI AM3517 EVM (AM3517/05 TMDSEVM3517)";
compatible = "ti,am3517-evm", "ti,am3517", "ti,omap3";
 
+   aliases {
+   display0 = 
+   };
+
memory@8000 {
device_type = "memory";
reg = <0x8000 0x1000>; /* 256 MB */
@@ -24,6 +30,144 @@
 regulator-min-microvolt = <330>;
 regulator-max-microvolt = <330>;
 };
+
+   gpio-keys {
+   compatible = "gpio-keys-polled";
+   poll-interval = <100>;
+
+   user_pb {
+   label = "User Push Button";
+   linux,code = ;
+   gpios = < 5 GPIO_ACTIVE_LOW>;
+   };
+
+   user_sw_1 {
+   label = "User Switch 1";
+   linux,code = ;
+   gpios = < 8 GPIO_ACTIVE_LOW>;
+   };
+
+   user_sw_2 {
+   label = "User Switch 2";
+   linux,code = ;
+   gpios = < 9 GPIO_ACTIVE_LOW>;
+   };
+
+   user_sw_3 {
+   label = "User Switch 3";
+   linux,code = ;
+   gpios = < 10 GPIO_ACTIVE_LOW>;
+   };
+
+   user_sw_4 {
+   label = "User Switch 4";
+   linux,code = ;
+   gpios = < 11 GPIO_ACTIVE_LOW>;
+   };
+
+   user_sw_5 {
+   label = "User Switch 5";
+   linux,code = ;
+   gpios = < 12 GPIO_ACTIVE_LOW>;
+   };
+
+   user_sw_6 {
+   label = "User Switch 6";
+   linux,code = ;
+   gpios = < 13 GPIO_ACTIVE_LOW>;
+   };
+
+   user_sw_7 {
+   label = "User Switch 7";
+   linux,code = ;
+   gpios = < 14 GPIO_ACTIVE_LOW>;
+   };
+
+   user_sw_8 {
+   label = "User Switch 8";
+   linux,code = ;
+   gpios = < 15 GPIO_ACTIVE_LOW>;
+   };
+   };
+
+   gpio-leds {
+   compatible = "gpio-leds";
+
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins>;
+
+   user_led_1 {
+   label = "am3517evm:green:user_led_1";
+   gpios = < 7 GPIO_ACTIVE_LOW>;
+   default-state = "on";
+   };
+
+   user_led_2 {
+   label = "am3517evm:green:user_led_2";
+   gpios = < 6 GPIO_ACTIVE_LOW>;
+   default-state = "on";
+   };
+
+   user_led_3 {
+   label = "am3517evm:green:user_led_3";
+   gpios = < 11 GPIO_ACTIVE_HIGH>;
+   linux,default-trigger = "mmc0"; /* SD/MMC card activity 
*/
+   };
+
+   user_led_4 {
+   label = "am3517evm:green:user_led_4";
+   gpios = < 31 GPIO_ACTIVE_HIGH>;
+   linux,default-trigger = "heartbeat";
+   };
+   };
+
+   lcd0: display@0 {
+   compatible = "panel-dpi";
+   label = "15";
+   status = "okay";
+   pinctrl-names = "default";
+   enable-gpios = < 16 GPIO_ACTIVE_HIGH>;/* gpio176, lcd 
INI */
+
+   port {
+   lcd_in: endpoint {
+   remote-endpoint = <_out>;
+   };
+   };
+
+   panel-timing {
+   clock-frequency = <900>;
+   hactive = <480>;
+   vactive = <272>;
+   hfront-porch = <3>;
+   hback-porch = <2>;
+   hsync-len = <42>;
+   vback-porch = <3>;
+   vfront-porch = <4>;
+   vsync-len = <11>;
+   hsync-active = <0>;
+   vsync-active = <0>;
+   de-active = <1>;
+   pixelclk-active = <1>;
+   };
+   };
+
+   bl: backlight {
+   compatible = "pwm-backlight";
+   pinctrl-names = "default";
+   

Re: [U-Boot] [PATCH v4 1/2] dm: mdio: add a uclass for MDIO

2018-07-09 Thread Joe Hershberger
On Thu, Jul 5, 2018 at 2:34 AM,   wrote:
> From: Ken Ma 
>
> Add a uclass which provides access to MDIO busses and includes
> operations required by MDIO.
> The implementation is based on the existing mii/phy/mdio data
> structures and APIs.
> This patch also adds device tree binding for MDIO bus.
>
> Signed-off-by: Ken Ma 
> Reviewed-by: s...@chromium.org, joe.hershber...@ni.com
> ---
>
> Changes in v4:
> - Minor updates for comments and Maintainer.
>
> Changes in v3:
> - Move mdio uclass implementation to driver/net folder;
> - Replace flat-tree functions with livetree functions and update codes
>   and comments to be consistent with driver-model codes style;
> - Put struct mii_dev to uclass platdata to avoid the mdio alloc and
>   let driver model framework to alloc the memroy automatically,
>   meanwhile the mii bus link initialization is added.
>
> Changes in v2:
> - Fix error printing:
> - Change some debug to pr_err;
> - mii bus has no parent member and it is not a udevice, so dev_err
>   is changed to pr_err for mii bus error printings.
>
>  MAINTAINERS   |   1 +
>  doc/device-tree-bindings/net/mdio-bus.txt |  54 ++
>  drivers/Kconfig   |   2 +
>  drivers/net/Makefile  |   1 +
>  drivers/net/mdio/Kconfig  |  18 +
>  drivers/net/mdio/Makefile |   6 ++
>  drivers/net/mdio/mdio-uclass.c| 112 
> ++
>  include/dm/uclass-id.h|   1 +
>  include/net/mdio.h|  62 +
>  9 files changed, 257 insertions(+)
>  create mode 100644 doc/device-tree-bindings/net/mdio-bus.txt
>  create mode 100644 drivers/net/mdio/Kconfig
>  create mode 100644 drivers/net/mdio/Makefile
>  create mode 100644 drivers/net/mdio/mdio-uclass.c
>  create mode 100644 include/net/mdio.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 642c448..07f7c66 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -432,6 +432,7 @@ M:  Joe Hershberger 
>  S: Maintained
>  T: git git://git.denx.de/u-boot-net.git
>  F: drivers/net/
> +F: drivers/net/mdio/
>  F: net/
>
>  NIOS
> diff --git a/doc/device-tree-bindings/net/mdio-bus.txt 
> b/doc/device-tree-bindings/net/mdio-bus.txt
> new file mode 100644
> index 000..68d8b25
> --- /dev/null
> +++ b/doc/device-tree-bindings/net/mdio-bus.txt
> @@ -0,0 +1,54 @@
> +MDIO (Management Data Input/Output) busses
> +
> +MDIO busses can be described with a node for the MDIO master device
> +and a set of child nodes for each phy on the bus.
> +
> +The MDIO node requires the following properties:
> +- #address-cells  - number of cells required to define phy address on
> +the MDIO bus.
> +- #size-cells - should be zero.
> +- compatible  - name of MDIO bus controller following generic names
> +recommended practice.
> +- reg- address and length of the MDIO register.
> +
> +Optional property:
> +- mdio-name   - MDIO bus name
> +
> +The child nodes of the MDIO driver are the individual PHY devices
> +connected to this MDIO bus. They must have a "reg" property given the
> +PHY address on the MDIO bus.
> +- reg - (required) phy address in MDIO bus.
> +
> +Example for cp110 MDIO node at the SoC level:
> +   cp0_mdio: mdio@12a200 {
> +   #address-cells = <1>;
> +   #size-cells = <0>;
> +   compatible = "marvell,orion-mdio";
> +   reg = <0x12a200 0x10>;
> +   mdio-name = "cp0-mdio";
> +   };
> +
> +   cp0_xmdio: mdio@12a600 {
> +   #address-cells = <1>;
> +   #size-cells = <0>;
> +   compatible = "marvell,xmdio";
> +   reg = <0x12a600 0x200>;
> +   mdio-name = "cp0-xmdio";
> +   };
> +
> +And at the board level, example for armada-8040-mcbin board:
> +   _mdio {
> +   ge_phy: ethernet-phy@0 {
> +   reg = <0>;
> +   };
> +   };
> +
> +   _xmdio {
> +   phy0: ethernet-phy@0 {
> +   reg = <0>;
> +   };
> +
> +   phy8: ethernet-phy@8 {
> +   reg = <8>;
> +   };
> +   };
> diff --git a/drivers/Kconfig b/drivers/Kconfig
> index 9e21b28..0e0982c 100644
> --- a/drivers/Kconfig
> +++ b/drivers/Kconfig
> @@ -54,6 +54,8 @@ source "drivers/mtd/Kconfig"
>
>  source "drivers/net/Kconfig"
>
> +source "drivers/net/mdio/Kconfig"

Please put 'source "drivers/net/mdio/Kconfig"' in drivers/net/Kconfig.

>  source "drivers/nvme/Kconfig"
>
>  source "drivers/pci/Kconfig"
> diff --git a/drivers/net/Makefile b/drivers/net/Makefile
> index 584bfdf..1cda03f 100644
> --- a/drivers/net/Makefile
> +++ b/drivers/net/Makefile
> @@ -70,3 +70,4 @@ obj-$(CONFIG_VSC9953) += vsc9953.o
>  obj-$(CONFIG_PIC32_ETH) += pic32_mdio.o pic32_eth.o
>  obj-$(CONFIG_DWC_ETH_QOS) += 

Re: [U-Boot] [EXT] Re: [PATCH v3 1/2] dm: mdio: add a uclass for MDIO

2018-07-09 Thread Joe Hershberger
On Thu, Jul 5, 2018 at 2:18 AM, Ken Ma  wrote:
> Hi Joe
>
> Please see my comments inline, thanks a lot for your kind and careful review!
>
> Yours,
> Ken
>
> -Original Message-
> From: Joe Hershberger [mailto:joe.hershber...@ni.com]
> Sent: 2018年6月20日 4:59
> To: Ken Ma ; Simon Glass 
> Cc: U-Boot Mailing List ; Andy Shevchenko 
> ; Eugeniy Paltsev 
> ; Michal Simek ; 
> Alexander Graf ; Joe Hershberger ; 
> Heinrich Schuchardt ; Stefan Roese ; Chris 
> Packham 
> Subject: [EXT] Re: [U-Boot] [PATCH v3 1/2] dm: mdio: add a uclass for MDIO
>
> External Email
>
> --
> On Tue, Jun 12, 2018 at 11:33 PM,   wrote:
>> From: Ken Ma 
>>
>> Add a uclass which provides access to MDIO busses and includes
>> operations required by MDIO.
>> The implementation is based on the existing mii/phy/mdio data
>> structures and APIs.
>> This patch also adds evice tree binding for MDIO bus.
>>
>> Signed-off-by: Ken Ma 
>> Reviewed-by: s...@chromium.org, joe.hershber...@ni.com
>> ---
>>
>> Changes in v3:
>> - Move mdio uclass implementation to driver/net folder;
>> - Replace flat-tree functions with livetree functions and update codes
>>   and comments to be consistent with driver-model codes style;
>> - Put struct mii_dev to uclass platdata to avoid the mdio alloc and
>>   let driver model framework to alloc the memroy automatically,
>>   meanwhile the mii bus link initialization is added,
>>
>> Changes in v2: None
>>
>>  MAINTAINERS   |   1 +
>>  doc/device-tree-bindings/net/mdio-bus.txt |  54 ++
>>  drivers/Kconfig   |   2 +
>>  drivers/net/Makefile  |   1 +
>>  drivers/net/mdio/Kconfig  |  18 +
>>  drivers/net/mdio/Makefile |   6 ++
>>  drivers/net/mdio/mdio-uclass.c| 112 
>> ++
>>  include/dm/uclass-id.h|   1 +
>>  include/net/mdio.h|  62 +
>>  9 files changed, 257 insertions(+)
>>  create mode 100644 doc/device-tree-bindings/net/mdio-bus.txt
>>  create mode 100644 drivers/net/mdio/Kconfig  create mode 100644
>> drivers/net/mdio/Makefile  create mode 100644
>> drivers/net/mdio/mdio-uclass.c  create mode 100644 include/net/mdio.h
>>
>> diff --git a/MAINTAINERS b/MAINTAINERS index 642c448..9e1fc83 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -335,6 +335,7 @@ M:  Simon Glass 
>
> I think it makes sense for me to maintain this, unless Simon really wants it. 
> He's not even Cc'ed, so maybe he doesn't know you are assigning it to him? 
> Adding him.
> [Ken] Thank you for your remind, at first I do not put mdio under driver/net 
> and I could not find a person to mainline it, so I add Simon as maintainer. I 
> will update the maintainer to you. Thanks a lot!
>
>>  S: Maintained
>>  T: git git://git.denx.de/u-boot-dm.git
>>  F: drivers/core/
>> +F: drivers/net/mdio/
>>  F: include/dm/
>>  F: test/dm/
>>
>> diff --git a/doc/device-tree-bindings/net/mdio-bus.txt
>> b/doc/device-tree-bindings/net/mdio-bus.txt
>> new file mode 100644
>> index 000..68d8b25
>> --- /dev/null
>> +++ b/doc/device-tree-bindings/net/mdio-bus.txt
>
> Is it reasonable to use Documentation/devicetree/bindings/net/mdio.txt
> from Linux?
> [Ken] Linux struct mii_bus implements reset_delay_us and reset_gpiod as 
> optional properties while u-boot struct mii_bus has no such fields at all.
> Once uboot struct mii_bus contains reset_delay_us and reset_gpiod, we can add 
> the related part in mdio_uclass.c and mdio_bus.txt.

While we don' support those optional properties, I still think the
bindings need to be shared. Optional need not be supported, so you not
supporting it is no problem. It can still be defined how it should
look if it was supported.

> BTW, I add optional property of mdio name to the txt.

That's fine. I think it's something that would be reasonable to add in
Linux as well.

> And u-boot mdio is based on uclass and actually it's a bus, so I follow 
> spi_bus.txt(in uboot) naming and name it to mdio_bus.txt.

It's still fundamentally a bus in both cases and we are trying to keep
them as shared as possible. I don't see anything compelling so far why
they need to diverge from the outset.  Also, as Michal commented, it
should be in a separate patch before the support is added.

>> @@ -0,0 +1,54 @@
>> +MDIO (Management Data Input/Output) busses
>> +
>> +MDIO busses can be described with a node for the MDIO master device
>> +and a set of child nodes for each phy on the bus.
>> +
>> +The MDIO node requires the following properties:
>> +- #address-cells  - number of cells required to define phy address on
>> +the MDIO bus.
>> +- #size-cells - should be zero.
>> +- compatible  - name of MDIO bus controller following generic names
>> +recommended practice.
>> +- reg- address 

Re: [U-Boot] [PATCH v4 2/2] mdio: add marvell MDIO driver

2018-07-09 Thread Joe Hershberger
On Thu, Jul 5, 2018 at 2:34 AM,   wrote:
> From: Ken Ma 
>
> This patch adds a separate driver for the MDIO interface of the
> Marvell Ethernet controllers based on driver model. There are two
> reasons to have a separate driver rather than including it inside
> the MAC driver itself:
>   *) The MDIO interface is shared by all Ethernet ports, so a driver
>  must guarantee non-concurrent accesses to this MDIO interface. The
>  most logical way is to have a separate driver that handles this
>  single MDIO interface, used by all Ethernet ports.
>   *) The MDIO interface is the same between the existing mv643xx_eth
>  driver and the new mvneta/mvpp2 driver. Even though it is for now
>  only used by the mvneta/mvpp2 driver, it will in the future be
>  used by the mv643xx_eth driver as well.
>
> This driver supports SMI IEEE for 802.3 Clause 22 and XSMI for IEEE
> 802.3 Clause 45.
>
> This patch also adds device tree binding for marvell MDIO driver.
>
> Signed-off-by: Ken Ma 
> Reviewed-by: Chris Packham 

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


Re: [U-Boot] [PATCH 5/5] arm: dts: socfpga: stratix10: update pdma

2018-07-09 Thread Marek Vasut
On 07/09/2018 08:03 PM, Dinh Nguyen wrote:
> 
> 
> On 05/31/2018 03:08 AM, tien.fong.c...@intel.com wrote:
>> From: Tien Fong Chee 
>>
>> Update pdma properties for Stratix 10
>>
>> Signed-off-by: Tien Fong Chee 
>> ---
>>  arch/arm/dts/socfpga_stratix10.dtsi | 20 
>>  1 file changed, 20 insertions(+)
>>
>> diff --git a/arch/arm/dts/socfpga_stratix10.dtsi 
>> b/arch/arm/dts/socfpga_stratix10.dtsi
>> index ccd3f32..311ba09 100644
>> --- a/arch/arm/dts/socfpga_stratix10.dtsi
>> +++ b/arch/arm/dts/socfpga_stratix10.dtsi
>> @@ -82,6 +82,26 @@
>>  ranges = <0 0 0 0x>;
>>  u-boot,dm-pre-reloc;
>>  
>> +amba {
>> +u-boot,dm-pre-reloc;
>> +compatible = "arm,amba-bus";
>> +#address-cells = <1>;
>> +#size-cells = <1>;
>> +ranges;
>> +
>> +pdma: pdma@ffda {
>> +u-boot,dm-pre-reloc;
>> +compatible = "arm,pl330", "arm,dma330";
> 
> I think you got "arm,dma330" binding wrong. I don't see any binding with
> that name.

I think the whole idea of using pl330 to scrub ECC DRAM is wrong. It
adds massive amount of code while a CPU can do the same and faster, cfr
arria10.

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


Re: [U-Boot] [PATCH v2 12/29] dtoc: Update tests to write failures to /tmp

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> When a test fails due to an output mismatch (e.g. due to a new property
> being adding to a test file) it is currently hard to update the test to
> the new output. In particular the tabs in the file are written as \t in
> the Python tests.
>
> To make this easier, write both the expected and actual results to /tmp
> to allow use of meld, and copying into the test.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/dtoc/test_dtoc.py | 56 ++---
>  1 file changed, 42 insertions(+), 14 deletions(-)

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


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

2018-07-09 Thread Simon Glass
On 9 July 2018 at 13:53, Simon Glass  wrote:
> Hi Tom.
>
> Here are some test-coverage and DM core enhancements. Also it adds a
> way to access the binman definition from U-Boot.

https://travis-ci.org/sglass68/u-boot/builds/401827625
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/2] ARM64: meson: Add 'usb2_phy0' in P212 DT file

2018-07-09 Thread Loic Devulder
Hi Neil,

Sure, I did not see you'd done the change on Linux DTS :)

On 07/09/2018 08:14 PM, Neil Armstrong wrote:
> Hi Loic,
> 
> On 09/07/2018 17:34, Loic Devulder wrote:
>> Enable power supply for USB Amlogic Meson GXL P212 based boards.
>>
>> Signed-off-by: Loic Devulder 
> 
> We like to keep the u-boot and linux DTS synced, this changed was backported 
> on Linux v4.17.5,
> can you instead precise you backported the last fix from the 4.17 stable 
> branch ?
> 
> Thanks,
> Neil
> 
>> ---
>>  arch/arm/dts/meson-gxl-s905x-p212.dtsi | 8 
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/arch/arm/dts/meson-gxl-s905x-p212.dtsi 
>> b/arch/arm/dts/meson-gxl-s905x-p212.dtsi
>> index 0cfd701809..4e61ec8f5b 100644
>> --- a/arch/arm/dts/meson-gxl-s905x-p212.dtsi
>> +++ b/arch/arm/dts/meson-gxl-s905x-p212.dtsi
>> @@ -189,3 +189,11 @@
>>   {
>>  status = "okay";
>>  };
>> +
>> +_phy0 {
>> +/*
>> + * even though the schematics don't show it:
>> + * HDMI_5V is also used as supply for the USB VBUS.
>> + */
>> +phy-supply = <_5v>;
>> +};
>>
> 

-- 
Loic Devulder - Senior QA Engineer
Container & Storage Solutions Quality Assurance team (qa-css)
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB,
21284 (AG Nuernberg)
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 04/29] binman: Correct operation of ObtainContents()

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> This method is supposed to return the contents of an entry. However at
> present there is no check that it actually does. Also some implementations
> do not return 'True' to indicate success, as required.
>
> Add a check for things working as expected, and correct the
> implementations.
>
> This requires some additional test cases to cover things which were missed
> originally. Add these at the same time.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/binman/bsection.py  |  4 ++
>  tools/binman/etype/_testing.py|  5 ++
>  tools/binman/etype/section.py |  2 +-
>  tools/binman/etype/u_boot_spl_bss_pad.py  |  1 +
>  tools/binman/etype/u_boot_ucode.py|  9 ++-
>  tools/binman/ftest.py | 57 +++
>  tools/binman/test/57_unknown_contents.dts | 14 +
>  .../test/58_x86_ucode_spl_needs_retry.dts | 36 
>  8 files changed, 114 insertions(+), 14 deletions(-)
>  create mode 100644 tools/binman/test/57_unknown_contents.dts
>  create mode 100644 tools/binman/test/58_x86_ucode_spl_needs_retry.dts

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


Re: [U-Boot] [PATCH v2 23/29] test: Enable cover-coverage tests for dtoc and fdt

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> Now that we have 100% code coverage we can enable these tests in the test
> script also.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2:
> - Add new patch to enable cover-coverage tests for dtoc and fdt
>
>  test/run | 4 
>  1 file changed, 4 insertions(+)

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


Re: [U-Boot] [PATCH v2 24/29] dtoc: Avoid unwanted output during tests

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> At present some warnings are printed to indicate failures which are a
> known part of running the tests. Suppress these.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/dtoc/fdt_util.py  |  4 ++--
>  tools/dtoc/test_dtoc.py | 13 +
>  2 files changed, 11 insertions(+), 6 deletions(-)

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


Re: [U-Boot] [PATCH v2 07/29] libfdt: Bring in proposed pylibfdt changes

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> This provides various patches sent to the devicetree-compiler mailing list
> to enhance the Python bindings. A final version of this patch may be
> created once upstreaming is complete, but if it takes too long, this can
> act as a placeholder.
>
> New pylibfdt features:
> - Support for most remaining, relevant libfdt functions
> - Support for sequential-write functions
>
> Changes are applied to existing U-Boot tools as needed.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  scripts/dtc/libfdt/libfdt.h   |   3 +
>  scripts/dtc/pylibfdt/libfdt.i_shipped | 705 +++---
>  tools/dtoc/dtoc.py|  20 +-
>  tools/dtoc/fdt.py |   3 +-
>  tools/dtoc/test_dtoc.py   |   3 +-
>  5 files changed, 663 insertions(+), 71 deletions(-)


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


Re: [U-Boot] [PATCH v2 16/29] dtoc: Keep track of property offsets

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> At present the Fdt class does not keep track of property offsets if they
> change due to removal of properties. Update the code to handle this, and
> add a test.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/dtoc/fdt.py  | 20 +
>  tools/dtoc/test_fdt.py | 65 +-
>  2 files changed, 78 insertions(+), 7 deletions(-)
>

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


Re: [U-Boot] [PATCH v2 20/29] dtoc: Add a test for code coverage

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> Add a -T option to run a code-coverage test on dtoc. At present this is
> about 96%. Future work will increase it to 100%.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2:
> - Update coverage to only include dtb_platdata.py
>
>  tools/dtoc/dtoc.py | 15 +++
>  1 file changed, 15 insertions(+)

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


Re: [U-Boot] [PATCH v2 22/29] dtoc: Increase code coverage to 100%

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> Add more tests to increase dtoc code coverage to 100%.
>
> Correct a whitespace error in some test .dts files at the same time.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/dtoc/dtoc_test_add_prop.dts|  24 
>  tools/dtoc/dtoc_test_addr32_64.dts   |   2 +-
>  tools/dtoc/dtoc_test_addr64_32.dts   |   2 +-
>  tools/dtoc/dtoc_test_bad_reg.dts |  17 +++
>  tools/dtoc/dtoc_test_bad_reg2.dts|  17 +++
>  tools/dtoc/dtoc_test_phandle_bad.dts |  16 +++
>  tools/dtoc/dtoc_test_phandle_bad2.dts|  22 
>  tools/dtoc/dtoc_test_phandle_reorder.dts |  23 
>  tools/dtoc/dtoc_test_phandle_single.dts  |  23 
>  tools/dtoc/test_dtoc.py  | 142 +++
>  10 files changed, 286 insertions(+), 2 deletions(-)
>  create mode 100644 tools/dtoc/dtoc_test_add_prop.dts
>  create mode 100644 tools/dtoc/dtoc_test_bad_reg.dts
>  create mode 100644 tools/dtoc/dtoc_test_bad_reg2.dts
>  create mode 100644 tools/dtoc/dtoc_test_phandle_bad.dts
>  create mode 100644 tools/dtoc/dtoc_test_phandle_bad2.dts
>  create mode 100644 tools/dtoc/dtoc_test_phandle_reorder.dts
>  create mode 100644 tools/dtoc/dtoc_test_phandle_single.dts

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


Re: [U-Boot] [PATCH v2 29/29] binman: Support updating the device tree with calc'd info

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> It is useful to write the position and size of each entry back to the
> device tree so that U-Boot can access this at runtime. Add a feature to
> support this, along with associated tests.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2:
> - Update tests to main 100% code coverage
>
>  tools/binman/README |  6 +-
>  tools/binman/control.py |  2 +
>  tools/binman/etype/_testing.py  | 10 
>  tools/binman/ftest.py   | 77 +
>  tools/binman/test/60_fdt_update.dts | 31 ++
>  tools/binman/test/61_fdt_update_bad.dts | 32 ++
>  6 files changed, 144 insertions(+), 14 deletions(-)
>  create mode 100644 tools/binman/test/60_fdt_update.dts
>  create mode 100644 tools/binman/test/61_fdt_update_bad.dts

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


Re: [U-Boot] [PATCH v2 26/29] binman: Complete documentation of stages

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> At present one of the stages is badly numbered and not described. Fix
> this.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/binman/README | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
>

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


Re: [U-Boot] [PATCH v2 17/29] dtoc: Fix Fdt.GetNode() to handle a missing node

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> At present the algortihm is not correct since it will return the root node
> if the requested node is not found and there are no slashes in the
> requested node name. Fix this and add a test.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/dtoc/fdt.py  | 5 -
>  tools/dtoc/test_fdt.py | 3 +++
>  2 files changed, 7 insertions(+), 1 deletion(-)

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


Re: [U-Boot] [PATCH v2 05/29] binman: Tidy up execution of tests

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> Move all the test execution into the same mechanism so that we can request
> a particular test (from any suite) by passing it as an argument to
> 'binman -t'.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/binman/binman.py | 8 +++-
>  1 file changed, 3 insertions(+), 5 deletions(-)

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


Re: [U-Boot] [PATCH v2 18/29] dtoc: Fix properties with a single zero-arg phandle

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> At present a property with a single phandle looks like an integer value
> to dtoc. Correct this by adjusting it in the phandle-processing code.
>
> Add a test for this.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2:
> - Update to cope with GetPhandle() being removed
>
>  tools/dtoc/dtb_platdata.py   | 12 
>  tools/dtoc/dtoc_test_phandle.dts |  6 ++
>  tools/dtoc/test_dtoc.py  | 10 ++
>  tools/dtoc/test_fdt.py   |  4 +++-
>  4 files changed, 27 insertions(+), 5 deletions(-)

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


Re: [U-Boot] [PATCH v2 19/29] dtoc: Fix some minor errors

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> Fix some comments and a printf string which is incorrect.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/dtoc/dtb_platdata.py | 3 ++-
>  tools/dtoc/dtoc.py | 4 ++--
>  tools/dtoc/fdt.py  | 2 +-
>  3 files changed, 5 insertions(+), 4 deletions(-)

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


Re: [U-Boot] [PATCH v2 14/29] dtoc: Drop use of a local dtb buffer

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> At present the Fdt class has its own copy of the device tree. This is
> confusing an unnecessary now that pylibfdt has its own. Drop it and
> provide access functions to the buffer.
>
> This allows us to move the rest of the implementation to use pylibfdt
> methods instead of directly calling libfdt stubs.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/dtoc/fdt.py  | 16 
>  tools/dtoc/test_fdt.py |  4 ++--
>  2 files changed, 10 insertions(+), 10 deletions(-)

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


Re: [U-Boot] [PATCH v2 02/29] binman: Make the operation of Entry__testing explicit

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> This fake entry is used for testing. At present it only has one behaviour
> which is to return an invalid set of entry positions, to cause an error.
>
> The fake entry will need to be used for other things too. Allow the test
> .dts file to specify the behaviour of the fake entry, so we can control
> its behaviour easily.
>
> While we are here, drop the ReadContents() method, since this only applies
> to subclasses of Entry_blob, which Entry__testing is not.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/binman/etype/_testing.py| 14 ++
>  tools/binman/test/41_unknown_pos_size.dts |  1 +
>  2 files changed, 11 insertions(+), 4 deletions(-)

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


Re: [U-Boot] [PATCH v2 25/29] dtoc: Add functions to add integer properties

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> Add a few simple functions to add a placeholder integer property, and
> set its value.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/dtoc/fdt.py  | 27 +++
>  tools/dtoc/test_fdt.py | 20 
>  2 files changed, 47 insertions(+)

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


Re: [U-Boot] [PATCH v2 13/29] dtoc: Make use of the new pylibfdt methods

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> Now that pylibfdt supports a fuller API we don't need to directly call
> the libfdt stubs. Update the code to use the Fdt methods instead.
>
> Some other cases remain which will be tidied up in a later commit, since
> they need larger changes.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/dtoc/fdt.py | 26 ++
>  1 file changed, 14 insertions(+), 12 deletions(-)

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


Re: [U-Boot] [PATCH v2 06/29] binman: Tidy up setting of entry contents

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> At present the contents of an entry are set in subclasses simply by
> assigning to the data and content_size properties. Add some methods to do
> this, so that we have more control. In particular, add a method to set the
> contents without changing its size, so we can validate that case.
>
> Add a test case for trying to change the size when this is not allowed.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/binman/entry.py   | 28 +
>  tools/binman/etype/_testing.py  |  8 ++
>  tools/binman/etype/blob.py  |  3 +--
>  tools/binman/etype/u_boot_spl_bss_pad.py|  3 +--
>  tools/binman/etype/u_boot_with_ucode_ptr.py |  4 +--
>  tools/binman/ftest.py   |  8 ++
>  tools/binman/test/59_change_size.dts| 14 +++
>  7 files changed, 62 insertions(+), 6 deletions(-)
>  create mode 100644 tools/binman/test/59_change_size.dts

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


Re: [U-Boot] [PATCH v2 09/29] libfdt: Add get_property() and del_node()

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> Add support for these functions in the Python binding. This patch stands
> in for a pending upstream change.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  scripts/dtc/pylibfdt/libfdt.i_shipped | 32 +++
>  1 file changed, 32 insertions(+)

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


Re: [U-Boot] [PATCH v2 08/29] libfdt: Fix the Python pack() function

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> This currently fails to reduce the device-tree bytearray size. Fix this.
>
> This stands in for a pending upstream change.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  scripts/dtc/pylibfdt/libfdt.i_shipped | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)

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


Re: [U-Boot] [PATCH v2 28/29] binman: Add a SetCalculatedProperties() method

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> Once binman has packed the image, the position and size of each entry is
> known. It is then possible for binman to update the device tree with these
> positions. Since placeholder values have been added, this does not affect
> the size of the device tree and therefore the packing does not need to be
> performed again.
>
> Add a new SetCalculatedProperties method to handle this.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/binman/README   | 29 -
>  tools/binman/bsection.py  |  8 
>  tools/binman/cmdline.py   |  2 ++
>  tools/binman/control.py   |  4 
>  tools/binman/entry.py | 11 +++
>  tools/binman/etype/section.py |  8 
>  tools/binman/image.py | 14 ++
>  7 files changed, 67 insertions(+), 9 deletions(-)

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


Re: [U-Boot] [PATCH v2 11/29] dtoc: Add some tests for the fdt module

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> At present this module is tested via the dtoc tests. This is a bit painful
> since the tests are at a higher level and so failures are more difficult
> to diagnose.
>
> Add some tests that exercise the fdt module directly.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/dtoc/fdt.py  |  12 +-
>  tools/dtoc/test_fdt|   1 +
>  tools/dtoc/test_fdt.py | 246 +
>  3 files changed, 257 insertions(+), 2 deletions(-)
>  create mode 12 tools/dtoc/test_fdt
>  create mode 100755 tools/dtoc/test_fdt.py

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


Re: [U-Boot] [PATCH v2 15/29] dtoc: Update fdt tests to increase code coverage

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> At present only some of the fdt functionality is tested. Add more tests to
> cover the rest of it. Also turn on test coverage, which is now 100% with
> a small exclusion for a Python 3 feature.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2:
> - Expand tests to increase code coverage to 100%
>
>  tools/dtoc/dtoc_test_simple.dts |   1 +
>  tools/dtoc/fdt.py   |  12 ---
>  tools/dtoc/fdt_util.py  |  25 +++---
>  tools/dtoc/test_dtoc.py |   2 +
>  tools/dtoc/test_fdt.py  | 134 +++-
>  5 files changed, 150 insertions(+), 24 deletions(-)

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


Re: [U-Boot] [PATCH v2 10/29] binman: Move coverage logic into a new test_util file

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> At present only binman has the logic for determining Python test coverage
> but this is useful for other tools also. Move it out into a separate file
> so it can be used by other tools.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2:
> - Allow specifying modules which must be tested
> - Test that this works whether coverage shows a .py extension or not
>
>  tools/binman/binman.py| 29 +++---
>  tools/patman/test_util.py | 64 +++
>  2 files changed, 68 insertions(+), 25 deletions(-)
>  create mode 100644 tools/patman/test_util.py

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


Re: [U-Boot] [PATCH v2 01/29] binman: Switch to 'python-coverage'

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> From: Tom Rini 
>
> The most portable way to get access to coverage is to invoke it as
> 'python-coverage'.
>
> Cc: Simon Glass 
> Signed-off-by: Tom Rini 
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2:
> - Correct logic for detecting python modules (changed with python-coverage)
> - Show the full output when some modules are not tested
> - Update text in test/run script also
>
>  test/run   | 3 +--
>  tools/binman/README| 3 +--
>  tools/binman/binman.py | 9 +
>  3 files changed, 7 insertions(+), 8 deletions(-)

Applied to u-boot-dm

Tom, I hope this works for you, would be good to enable this testing!

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


Re: [U-Boot] [PATCH 09/11] dm: core: Update of_read_fmap_entry() for livetree

2018-07-09 Thread Simon Glass
On 11 June 2018 at 13:07, Simon Glass  wrote:
> Update this function to take an ofnode so that it can work with livetree.
>
> Signed-off-by: Simon Glass 
> ---
>
>  drivers/core/of_extra.c | 8 
>  drivers/misc/cros_ec.c  | 4 ++--
>  include/dm/of_extra.h   | 6 ++
>  3 files changed, 8 insertions(+), 10 deletions(-)

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


Re: [U-Boot] [PATCH 08/11] dm: spi: Update sandbox SPI emulation driver to use ofnode

2018-07-09 Thread Simon Glass
On 11 June 2018 at 13:07, Simon Glass  wrote:
> Update the parameters sandbox_sf_bind_emul to support livetree.
>
> Signed-off-by: Simon Glass 
> ---
>
>  drivers/mtd/spi/sandbox.c | 9 +
>  include/spi_flash.h   | 2 +-
>  test/dm/spi.c | 8 
>  3 files changed, 10 insertions(+), 9 deletions(-)

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


Re: [U-Boot] [PATCH 05/11] dm: core: Add a way to find an ofnode by compatible string

2018-07-09 Thread Simon Glass
On 11 June 2018 at 13:07, Simon Glass  wrote:
> Add an ofnode_by_compatible() to allow iterating through ofnodes with a
> given compatible string.
>
> Signed-off-by: Simon Glass 
> ---
>
>  drivers/core/ofnode.c | 12 
>  include/dm/ofnode.h   | 11 +++
>  2 files changed, 23 insertions(+)

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


Re: [U-Boot] [PATCH 11/11] dm: core: Add logging of some common errors

2018-07-09 Thread Simon Glass
On 11 June 2018 at 13:07, Simon Glass  wrote:
> Add additional logging so that common errors when finding a device by
> ofnode are easier to debug.
>
> Signed-off-by: Simon Glass 
> ---
>
>  drivers/core/uclass.c | 14 --
>  1 file changed, 12 insertions(+), 2 deletions(-)

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


Re: [U-Boot] [PATCH v2 27/29] binman: Add a ProcessFdt() method

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> Some entry types modify the device tree, e.g. to remove microcode or add a
> property. So far this just modifies their local copy and does not affect
> a 'shared' device tree.
>
> Rather than doing this modification in the ObtainContents() method, and a
> new ProcessFdt() method which is specifically designed to modify this
> shared device tree.
>
> Move the existing device-tree code over to use this method, reducing
> ObtainContents() to the goal of just obtaining the contents without any
> processing, even for device tree.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/binman/README | 23 +
>  tools/binman/bsection.py| 15 ++
>  tools/binman/control.py | 52 -
>  tools/binman/entry.py   |  3 ++
>  tools/binman/etype/section.py   |  3 ++
>  tools/binman/etype/u_boot_dtb_with_ucode.py | 47 ++-
>  tools/binman/etype/u_boot_ucode.py  |  2 +-
>  tools/binman/etype/u_boot_with_ucode_ptr.py |  7 ++-
>  tools/binman/image.py   |  3 ++
>  9 files changed, 118 insertions(+), 37 deletions(-)

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


Re: [U-Boot] [PATCH v2 21/29] binman: Move capture_sys_output() to test_util

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> This function is useful in various tests. Move it into the common test
> utility module.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/binman/elf_test.py   | 22 ++
>  tools/binman/image_test.py |  2 +-
>  tools/patman/test_util.py  | 21 +
>  3 files changed, 24 insertions(+), 21 deletions(-)

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


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

2018-07-09 Thread Simon Glass
Hi Tom.

Here are some test-coverage and DM core enhancements. Also it adds a
way to access the binman definition from U-Boot.


The following changes since commit 8c5d4fd0ec222701598a27b26ab7265d4cee45a3:

  Prepare v2018.07 (2018-07-09 10:24:14 -0400)

are available in the Git repository at:

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

for you to fetch changes up to 16b8d6b76992690c65c58dc8b0591496cc5e46ef:

  binman: Support updating the device tree with calc'd info
(2018-07-09 09:11:00 -0600)


Michael Pratt (1):
  fdt: Add device tree memory bindings

Simon Glass (38):
  dm: core: Add ofnode function to read a 64-bit int
  dm: core: Fix a few ofnode function comments
  dm: core: Add comments to ofnode_read_resource() functoins
  dm: core: Add a way to find an ofnode by compatible string
  log: Add a way to log a return value with a message
  dm: core: Add a way to bind a device by ofnode
  dm: spi: Update sandbox SPI emulation driver to use ofnode
  dm: core: Update of_read_fmap_entry() for livetree
  dm: core: Add a function to decode a memory region
  dm: core: Add logging of some common errors
  binman: Make the operation of Entry__testing explicit
  binman: Tidy up variables in _RunMicrocodeTest()
  binman: Correct operation of ObtainContents()
  binman: Tidy up execution of tests
  binman: Tidy up setting of entry contents
  libfdt: Bring in proposed pylibfdt changes
  libfdt: Fix the Python pack() function
  libfdt: Add get_property() and del_node()
  binman: Move coverage logic into a new test_util file
  dtoc: Add some tests for the fdt module
  dtoc: Update tests to write failures to /tmp
  dtoc: Make use of the new pylibfdt methods
  dtoc: Drop use of a local dtb buffer
  dtoc: Update fdt tests to increase code coverage
  dtoc: Keep track of property offsets
  dtoc: Fix Fdt.GetNode() to handle a missing node
  dtoc: Fix properties with a single zero-arg phandle
  dtoc: Fix some minor errors
  dtoc: Add a test for code coverage
  binman: Move capture_sys_output() to test_util
  dtoc: Increase code coverage to 100%
  test: Enable cover-coverage tests for dtoc and fdt
  dtoc: Avoid unwanted output during tests
  dtoc: Add functions to add integer properties
  binman: Complete documentation of stages
  binman: Add a ProcessFdt() method
  binman: Add a SetCalculatedProperties() method
  binman: Support updating the device tree with calc'd info

Tom Rini (1):
  binman: Switch to 'python-coverage'

 doc/device-tree-bindings/memory/memory.txt |  67 +++
 drivers/core/device.c  |   8 +
 drivers/core/of_access.c   |  20 +++
 drivers/core/of_extra.c|  89 -
 drivers/core/ofnode.c  |  44 +
 drivers/core/uclass.c  |  14 +-
 drivers/misc/cros_ec.c |   4 +-
 drivers/mtd/spi/sandbox.c  |   9 +-
 include/asm-generic/global_data.h  |   1 +
 include/dm/device-internal.h   |   4 +
 include/dm/of_access.h |  16 ++
 include/dm/of_extra.h  |  51 +-
 include/dm/ofnode.h|  48 -
 include/fdt_support.h  |  10 ++
 include/fdtdec.h   |  38 +++-
 include/log.h  |   8 +
 include/spi_flash.h|   2 +-
 lib/fdtdec.c   | 109 +++
 scripts/dtc/libfdt/libfdt.h|   3 +
 scripts/dtc/pylibfdt/libfdt.i_shipped  | 725
--
 test/dm/spi.c  |   8 +-
 test/run   |   7 +-
 tools/binman/README|  45 +++--
 tools/binman/binman.py |  40 +
 tools/binman/bsection.py   |  27 +++
 tools/binman/cmdline.py|   2 +
 tools/binman/control.py|  58 +-
 tools/binman/elf_test.py   |  22 +--
 tools/binman/entry.py  |  42 +
 tools/binman/etype/_testing.py |  37 +++-
 tools/binman/etype/blob.py |   3 +-
 tools/binman/etype/section.py  |  13 +-
 tools/binman/etype/u_boot_dtb_with_ucode.py|  46 ++---
 tools/binman/etype/u_boot_spl_bss_pad.py   |   4 +-
 tools/binman/etype/u_boot_ucode.py |   9 +-
 tools/binman/etype/u_boot_with_ucode_ptr.py|  11 +-
 

Re: [U-Boot] [PATCH v2 03/29] binman: Tidy up variables in _RunMicrocodeTest()

2018-07-09 Thread Simon Glass
On 6 July 2018 at 10:27, Simon Glass  wrote:
> At present we call the three entries first, second and third. Rename them
> to reflect their contents instead, for clarity.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2: None
>
>  tools/binman/ftest.py | 25 ++---
>  1 file changed, 18 insertions(+), 7 deletions(-)

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


Re: [U-Boot] [PATCH 10/11] dm: core: Add a function to decode a memory region

2018-07-09 Thread Simon Glass
On 11 June 2018 at 13:07, Simon Glass  wrote:
> Add a way to decode a memory region, including the memory type (sram or
> sdram) and its start address and size.
>
> Signed-off-by: Simon Glass 
> ---
>
>  drivers/core/of_extra.c | 81 +
>  include/dm/of_extra.h   | 45 +++
>  2 files changed, 126 insertions(+)
>

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


Re: [U-Boot] [PATCH 04/11] dm: core: Add comments to ofnode_read_resource() functoins

2018-07-09 Thread Simon Glass
On 11 June 2018 at 13:07, Simon Glass  wrote:
> These functions are missing comments. Add some.
>
> Signed-off-by: Simon Glass 
> ---
>
>  include/dm/ofnode.h | 23 +++
>  1 file changed, 23 insertions(+)

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


Re: [U-Boot] [PATCH 03/11] dm: core: Fix a few ofnode function comments

2018-07-09 Thread Simon Glass
On 11 June 2018 at 13:07, Simon Glass  wrote:
> Tidy up three return-value errors.
>
> Signed-off-by: Simon Glass 
> ---
>
>  include/dm/ofnode.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

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


Re: [U-Boot] [PATCH 07/11] dm: core: Add a way to bind a device by ofnode

2018-07-09 Thread Simon Glass
On 11 June 2018 at 13:07, Simon Glass  wrote:
> Add a new device_bind_ofnode() function which can bind a device given its
> ofnode. This allows binding devices more easily with livetree nodes.
>
> Signed-off-by: Simon Glass 
> ---
>
>  drivers/core/device.c| 8 
>  include/dm/device-internal.h | 4 
>  2 files changed, 12 insertions(+)

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


Re: [U-Boot] [PATCH 06/11] log: Add a way to log a return value with a message

2018-07-09 Thread Simon Glass
On 11 June 2018 at 13:07, Simon Glass  wrote:
> It is sometimes useful to show a message when logging an error return
> value, perhaps to add a few details about the problem. Add a function to
> support this.
>
> Signed-off-by: Simon Glass 
> ---
>
>  include/log.h | 8 
>  1 file changed, 8 insertions(+)

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


Re: [U-Boot] [PATCH 02/11] dm: core: Add ofnode function to read a 64-bit int

2018-07-09 Thread Simon Glass
On 11 June 2018 at 13:07, Simon Glass  wrote:
> We have a 32-bit version of this function. Add a 64-bit version as well so
> we can easily read 64-bit ints from the device tree.
>
> Signed-off-by: Simon Glass 
> ---
>
>  drivers/core/of_access.c | 19 +++
>  drivers/core/ofnode.c| 32 
>  include/dm/of_access.h   | 16 
>  include/dm/ofnode.h  | 10 ++
>  4 files changed, 77 insertions(+)
>

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


Re: [U-Boot] [PATCH 01/11] fdt: Add device tree memory bindings

2018-07-09 Thread Simon Glass
On 11 June 2018 at 13:07, Simon Glass  wrote:
>
> From: Michael Pratt 
>
> Support a default memory bank, specified in reg, as well as
> board-specific memory banks in subtree board-id nodes.
>
> This allows memory information to be provided in the device tree,
> rather than hard-coded in, which will make it simpler to handle
> similar devices with different memory banks, as the board-id values
> or masks can be used to match devices.
>
> Signed-off-by: Michael Pratt 
> Signed-off-by: Simon Glass 
> Reviewed-by: Vadim Bendebury 
> ---
>
>  doc/device-tree-bindings/memory/memory.txt |  67 +
>  include/asm-generic/global_data.h  |   1 +
>  include/fdt_support.h  |  10 ++
>  include/fdtdec.h   |  38 ++-
>  lib/fdtdec.c   | 109 +
>  5 files changed, 224 insertions(+), 1 deletion(-)
>  create mode 100644 doc/device-tree-bindings/memory/memory.txt

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


Re: [U-Boot] [PATCH 2/2] sandbox: Don't disable ctrlc() on sandbox if in raw mode

2018-07-09 Thread Joe Hershberger
On Sun, Jul 8, 2018 at 9:39 PM, Simon Glass  wrote:
> Hi Joe,
>
> On 2 July 2018 at 18:06, Joe Hershberger  wrote:
>> In raw mode, handle ctrl-c as normal. This allows normal ctrl-c behavior
>> such as aborting a command that is timing out without completely
>> terminating the sandbox executable.
>>
>> In [1], Simon disabled this.  His reason for it was that it interferes
>> with piping test scripts. Piping should be done in cooked mode, so this
>> change should still not interfere.
>>
>> [1] commit 8969ea3e9f2db04a6b3675 ("sandbox: Disable Ctrl-C")
>>
>> Signed-off-by: Joe Hershberger 
>>
>> ---
>>
>>  common/console.c | 2 --
>>  drivers/serial/sandbox.c | 3 +++
>>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> It is designed so that ctrl-C exits in raw mode. That is the normal
> behaviour for an application and I don't think sandbox should be any
> different.
>
> How about using cooked mode instead?

That seems backward. Only in raw mode (STATE_TERM_RAW) is the console
not interfering with keyboard inputs and changing behaviors based on
interpreting control codes. In raw mode, U-Boot sandbox can handle
things the way it does in real hardware.

To be clear, this is not the default case (STATE_TERM_RAW_WITH_SIGS)
where ctrl-C exits. In fully raw mode (STATE_TERM_RAW), ctrl-C does
absolutely nothing without this patch.

Also, if cooked mode were used, it would once again break the test
script piping that your previous commit talked about. I'm not sure
exactly what that applies to (would it affect Travis such that I can
validate interference?) so I'm not sure I've tested that use-case
effectively.

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


[U-Boot] [PATCH RFC 6/8] dm: usb: Add UCLASS_USB_DEV_GENERIC shutdown

2018-07-09 Thread Jagan Teki
Some OTG controllers which operates on Peripheral
mode are registered as UCLASS_USB_DEV_GENERIC.

So add support to shutdown them as well. shutdown
happened during 'usb reset' and U-Boot handoff code
for Linux boot.

controller restarting in 'usb reset' like probing
again is still missing for this type of UCLASS.

Cc: Simon Glass 
Signed-off-by: Jagan Teki 
---
Note:
I tried of traversing for multiple UCLASS in removal
code in usb_stop, but couldn't come with proper solutions.
I don't think any other area of code need a requirement like
this, or may be I'm missing. any help would appreciate. 

 drivers/usb/host/usb-uclass.c | 43 +++
 1 file changed, 43 insertions(+)

diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index 611ea97a72..99cf3d2b49 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -158,6 +158,45 @@ int usb_get_max_xfer_size(struct usb_device *udev, size_t 
*size)
return ops->get_max_xfer_size(bus, size);
 }
 
+int __usb_stop(void)
+{
+   struct udevice *bus;
+   struct udevice *rh;
+   struct uclass *uc;
+   struct usb_uclass_priv *uc_priv;
+   int err = 0, ret;
+
+   /* De-activate any devices that have been activated */
+   ret = uclass_get(UCLASS_USB_DEV_GENERIC, );
+   if (ret)
+   return ret;
+
+   uc_priv = uc->priv;
+
+   uclass_foreach_dev(bus, uc) {
+   ret = device_remove(bus, DM_REMOVE_NORMAL);
+   if (ret && !err)
+   err = ret;
+
+   /* Locate root hub device */
+   device_find_first_child(bus, );
+   if (rh) {
+   /*
+* All USB devices are children of root hub.
+* Unbinding root hub will unbind all of its children.
+*/
+   ret = device_unbind(rh);
+   if (ret && !err)
+   err = ret;
+   }
+   }
+
+   uc_priv->companion_device_count = 0;
+   usb_started = 0;
+
+   return err;
+}
+
 int usb_stop(void)
 {
struct udevice *bus;
@@ -166,6 +205,10 @@ int usb_stop(void)
struct usb_uclass_priv *uc_priv;
int err = 0, ret;
 
+   ret = __usb_stop();
+   if (ret)
+   return ret;
+
/* De-activate any devices that have been activated */
ret = uclass_get(UCLASS_USB, );
if (ret)
-- 
2.17.1

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


[U-Boot] [PATCH 8/8] usb: musb-new: core: Call musb_platform_exit from musb_stop

2018-07-09 Thread Jagan Teki
musb_stop is shutdown code for musb where it call platform and
generic disable. So add platform exit, for proper graceful shutdown.

Signed-off-by: Jagan Teki 
---
 drivers/usb/musb-new/musb_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/musb-new/musb_core.c b/drivers/usb/musb-new/musb_core.c
index 8fec6f38ad..afea9fbcef 100644
--- a/drivers/usb/musb-new/musb_core.c
+++ b/drivers/usb/musb-new/musb_core.c
@@ -1007,6 +1007,7 @@ void musb_stop(struct musb *musb)
 *  - ...
 */
musb_platform_try_idle(musb, 0);
+   musb_platform_exit(musb);
 }
 
 #ifndef __UBOOT__
-- 
2.17.1

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


[U-Boot] [PATCH 3/8] phy: sun4i-usb: Call phy_passby even for PHY#0

2018-07-09 Thread Jagan Teki
phy_passby is not calling for phy id 0 in legacy code,
which has no information on why it restricted.
Since Linux phy driver doesn't restrict like this,
so call it directly with out any condition

Signed-off-by: Jagan Teki 
---
 drivers/phy/allwinner/phy-sun4i-usb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c 
b/drivers/phy/allwinner/phy-sun4i-usb.c
index 2b3cf48025..01f585a283 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -300,8 +300,7 @@ static int sun4i_usb_phy_init(struct phy *phy)
data->cfg->disc_thresh, PHY_DISCON_TH_LEN);
}
 
-   if (usb_phy->id != 0)
-   sun4i_usb_phy_passby(phy, true);
+   sun4i_usb_phy_passby(phy, true);
 
sun4i_usb_phy0_reroute(data, true);
 
-- 
2.17.1

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


[U-Boot] [PATCH 5/8] phy: sun4i-usb: Update PHY#3 rst_mask only for H3_H5

2018-07-09 Thread Jagan Teki
Only H3 and H5 have 4 PHYS so restrict rst_mask only for them.

Signed-off-by: Jagan Teki 
---
 drivers/phy/allwinner/phy-sun4i-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c 
b/drivers/phy/allwinner/phy-sun4i-usb.c
index 3096f12c1c..81fcd1f910 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -117,7 +117,7 @@ struct sun4i_usb_phy_info {
.gpio_vbus = CONFIG_USB3_VBUS_PIN,
.gpio_vbus_det = NULL,
.gpio_id_det = NULL,
-#ifdef CONFIG_MACH_SUN6I
+#ifdef CONFIG_MACH_SUNXI_H3_H5
.rst_mask = (CCM_USB_CTRL_PHY3_RST | CCM_USB_CTRL_PHY3_CLK),
 #endif
},
-- 
2.17.1

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


[U-Boot] [PATCH 7/8] usb: musb-new: sunxi: Add proper musb exit support

2018-07-09 Thread Jagan Teki
musb have platform ops to do proper graceful exit,
so add the exit call and move musb platform exit code
instead of keeping it in driver remove.
This make proper shutdown of musb where .remove will
call disable, exit serially via musb_stop.

Signed-off-by: Jagan Teki 
---
 drivers/usb/musb-new/sunxi.c | 48 +---
 1 file changed, 28 insertions(+), 20 deletions(-)

diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index aa2880eeb9..9f71b84fd1 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -326,6 +326,33 @@ static int sunxi_musb_init(struct musb *musb)
return 0;
 }
 
+static int sunxi_musb_exit(struct musb *musb)
+{
+   struct sunxi_glue *glue = to_sunxi_glue(musb->controller);
+   int ret = 0;
+
+   if (generic_phy_valid(>phy)) {
+   ret = generic_phy_exit(>phy);
+   if (ret) {
+   dev_err(dev, "failed to power off usb phy\n");
+   return ret;
+   }
+   }
+
+#ifdef CONFIG_SUNXI_GEN_SUN6I
+   clrbits_le32(>ccm->ahb_reset0_cfg, BIT(AHB_GATE_OFFSET_USB0));
+   if (glue->cfg->rst_bit)
+   clrbits_le32(>ccm->ahb_reset0_cfg,
+BIT(glue->cfg->rst_bit));
+#endif
+   clrbits_le32(>ccm->ahb_gate0, BIT(AHB_GATE_OFFSET_USB0));
+   if (glue->cfg->clkgate_bit)
+   clrbits_le32(>ccm->ahb_gate0,
+BIT(glue->cfg->clkgate_bit));
+
+   return 0;
+}
+
 static void sunxi_musb_pre_root_reset_end(struct musb *musb)
 {
struct sunxi_glue *glue = to_sunxi_glue(musb->controller);
@@ -342,6 +369,7 @@ static void sunxi_musb_post_root_reset_end(struct musb 
*musb)
 
 static const struct musb_platform_ops sunxi_musb_ops = {
.init   = sunxi_musb_init,
+   .exit   = sunxi_musb_exit,
.enable = sunxi_musb_enable,
.disable= sunxi_musb_disable,
.pre_root_reset_end = sunxi_musb_pre_root_reset_end,
@@ -456,29 +484,9 @@ static int musb_usb_remove(struct udevice *dev)
 {
struct sunxi_glue *glue = dev_get_priv(dev);
struct musb_host_data *host = >mdata;
-   int ret;
-
-   if (generic_phy_valid(>phy)) {
-   ret = generic_phy_exit(>phy);
-   if (ret) {
-   pr_err("failed to exit %s USB PHY\n", dev->name);
-   return ret;
-   }
-   }
 
musb_stop(host->host);
 
-#ifdef CONFIG_SUNXI_GEN_SUN6I
-   clrbits_le32(>ccm->ahb_reset0_cfg, BIT(AHB_GATE_OFFSET_USB0));
-   if (glue->cfg->rst_bit)
-   clrbits_le32(>ccm->ahb_reset0_cfg,
-BIT(glue->cfg->rst_bit));
-#endif
-   clrbits_le32(>ccm->ahb_gate0, BIT(AHB_GATE_OFFSET_USB0));
-   if (glue->cfg->clkgate_bit)
-   clrbits_le32(>ccm->ahb_gate0,
-BIT(glue->cfg->clkgate_bit));
-
free(host->host);
host->host = NULL;
 
-- 
2.17.1

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


[U-Boot] [PATCH 2/8] usb: musb-new: sunxi: Allocate struct phy in private

2018-07-09 Thread Jagan Teki
Allocate struct phy in private structure instead of allocating
locally and assign it to a pointer. This eventually fix miss
alignment phy which is used in another functions.

Signed-off-by: Jagan Teki 
---
 drivers/usb/musb-new/sunxi.c | 24 +++-
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index b846afb094..aa2880eeb9 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -87,7 +87,7 @@ struct sunxi_glue {
struct sunxi_ccm_reg *ccm;
struct sunxi_musb_config *cfg;
struct device dev;
-   struct phy *phy;
+   struct phy phy;
 };
 #define to_sunxi_glue(d)   container_of(d, struct sunxi_glue, dev)
 
@@ -235,19 +235,19 @@ static int sunxi_musb_enable(struct musb *musb)
musb_writeb(musb->mregs, USBC_REG_o_VEND0, 0);
 
if (is_host_enabled(musb)) {
-   ret = sun4i_usb_phy_vbus_detect(glue->phy);
+   ret = sun4i_usb_phy_vbus_detect(>phy);
if (ret == 1) {
printf("A charger is plugged into the OTG: ");
return -ENODEV;
}
 
-   ret = sun4i_usb_phy_id_detect(glue->phy);
+   ret = sun4i_usb_phy_id_detect(>phy);
if (ret == 1) {
printf("No host cable detected: ");
return -ENODEV;
}
 
-   ret = generic_phy_power_on(glue->phy);
+   ret = generic_phy_power_on(>phy);
if (ret) {
pr_err("failed to power on USB PHY\n");
return ret;
@@ -271,7 +271,7 @@ static void sunxi_musb_disable(struct musb *musb)
return;
 
if (is_host_enabled(musb)) {
-   ret = generic_phy_power_off(glue->phy);
+   ret = generic_phy_power_off(>phy);
if (ret) {
pr_err("failed to power off USB PHY\n");
return;
@@ -291,7 +291,7 @@ static int sunxi_musb_init(struct musb *musb)
 
pr_debug("%s():\n", __func__);
 
-   ret = generic_phy_init(glue->phy);
+   ret = generic_phy_init(>phy);
if (ret) {
pr_err("failed to init USB PHY\n");
return ret;
@@ -330,14 +330,14 @@ static void sunxi_musb_pre_root_reset_end(struct musb 
*musb)
 {
struct sunxi_glue *glue = to_sunxi_glue(musb->controller);
 
-   sun4i_usb_phy_set_squelch_detect(glue->phy, false);
+   sun4i_usb_phy_set_squelch_detect(>phy, false);
 }
 
 static void sunxi_musb_post_root_reset_end(struct musb *musb)
 {
struct sunxi_glue *glue = to_sunxi_glue(musb->controller);
 
-   sun4i_usb_phy_set_squelch_detect(glue->phy, true);
+   sun4i_usb_phy_set_squelch_detect(>phy, true);
 }
 
 static const struct musb_platform_ops sunxi_musb_ops = {
@@ -405,7 +405,6 @@ static int musb_usb_probe(struct udevice *dev)
struct usb_bus_priv *priv = dev_get_uclass_priv(dev);
struct musb_hdrc_platform_data pdata;
void *base = dev_read_addr_ptr(dev);
-   struct phy phy;
int ret;
 
if (!base)
@@ -419,13 +418,12 @@ static int musb_usb_probe(struct udevice *dev)
if (IS_ERR(glue->ccm))
return PTR_ERR(glue->ccm);
 
-   ret = generic_phy_get_by_name(dev, "usb", );
+   ret = generic_phy_get_by_name(dev, "usb", >phy);
if (ret) {
pr_err("failed to get usb PHY\n");
return ret;
}
 
-   glue->phy = 
priv->desc_before_addr = true;
 
memset(, 0, sizeof(pdata));
@@ -460,8 +458,8 @@ static int musb_usb_remove(struct udevice *dev)
struct musb_host_data *host = >mdata;
int ret;
 
-   if (generic_phy_valid(glue->phy)) {
-   ret = generic_phy_exit(glue->phy);
+   if (generic_phy_valid(>phy)) {
+   ret = generic_phy_exit(>phy);
if (ret) {
pr_err("failed to exit %s USB PHY\n", dev->name);
return ret;
-- 
2.17.1

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


[U-Boot] [PATCH 4/8] phy: sun4i-usb: Remove usb_clk_cfg set in probe

2018-07-09 Thread Jagan Teki
usb_clk_cfg is setting CTRL_PHYGATE bit value in probe
which is BIT 0 for sun4i, 6i and 8 for a83t but all
these were handling in phy ops init exit calls.

Signed-off-by: Jagan Teki 
---
 drivers/phy/allwinner/phy-sun4i-usb.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c 
b/drivers/phy/allwinner/phy-sun4i-usb.c
index 01f585a283..3096f12c1c 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -462,8 +462,6 @@ static int sun4i_usb_phy_probe(struct udevice *dev)
phy->rst_mask = info->rst_mask;
};
 
-   setbits_le32(>ccm->usb_clk_cfg, CCM_USB_CTRL_PHYGATE);
-
debug("Allwinner Sun4I USB PHY driver loaded\n");
return 0;
 }
-- 
2.17.1

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


[U-Boot] [PATCH 1/8] usb: musb-new: Fix improper musb host pointer

2018-07-09 Thread Jagan Teki
When MUSB is operating in peripheral mode, probe registering
musb core using musb_register which intern return int value
for validation. so there is no scope to preserve struct musb
pointer but the same can be used in .remove musb_stop.
So fix this by return musb_register with struct musb pointer.

Signed-off-by: Jagan Teki 
---
 board/compulab/cm_t3517/cm_t3517.c |  4 ++--
 drivers/usb/musb-new/musb_uboot.c  | 10 +-
 drivers/usb/musb-new/pic32.c   |  6 --
 drivers/usb/musb-new/sunxi.c   |  8 +---
 include/linux/usb/musb.h   |  4 ++--
 5 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/board/compulab/cm_t3517/cm_t3517.c 
b/board/compulab/cm_t3517/cm_t3517.c
index 09cb27def0..668bb7631a 100644
--- a/board/compulab/cm_t3517/cm_t3517.c
+++ b/board/compulab/cm_t3517/cm_t3517.c
@@ -74,8 +74,8 @@ static void cm_t3517_musb_init(void)
CONF2_REFFREQ_13MHZ | CONF2_SESENDEN |
CONF2_VBDTCTEN | CONF2_DATPOL);
 
-   if (musb_register(_t3517_musb_pdata, _t3517_musb_board_data,
- (void *)AM35XX_IPSS_USBOTGSS_BASE))
+   if (!musb_register(_t3517_musb_pdata, _t3517_musb_board_data,
+  (void *)AM35XX_IPSS_USBOTGSS_BASE))
printf("Failed initializing AM35x MUSB!\n");
 }
 #else
diff --git a/drivers/usb/musb-new/musb_uboot.c 
b/drivers/usb/musb-new/musb_uboot.c
index 2b04fbd046..3cd89793c9 100644
--- a/drivers/usb/musb-new/musb_uboot.c
+++ b/drivers/usb/musb-new/musb_uboot.c
@@ -419,8 +419,8 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver 
*driver)
 }
 #endif /* CONFIG_USB_MUSB_GADGET */
 
-int musb_register(struct musb_hdrc_platform_data *plat, void *bdata,
-   void *ctl_regs)
+struct musb *musb_register(struct musb_hdrc_platform_data *plat, void *bdata,
+  void *ctl_regs)
 {
struct musb **musbp;
 
@@ -436,14 +436,14 @@ int musb_register(struct musb_hdrc_platform_data *plat, 
void *bdata,
break;
 #endif
default:
-   return -EINVAL;
+   return NULL;
}
 
*musbp = musb_init_controller(plat, (struct device *)bdata, ctl_regs);
if (!*musbp) {
printf("Failed to init the controller\n");
-   return -EIO;
+   return NULL;
}
 
-   return 0;
+   return *musbp;
 }
diff --git a/drivers/usb/musb-new/pic32.c b/drivers/usb/musb-new/pic32.c
index f04719d7af..3a19900e21 100644
--- a/drivers/usb/musb-new/pic32.c
+++ b/drivers/usb/musb-new/pic32.c
@@ -251,9 +251,11 @@ static int musb_usb_probe(struct udevice *dev)
ret = musb_lowlevel_init(mdata);
 #else
pic32_musb_plat.mode = MUSB_PERIPHERAL;
-   ret = musb_register(_musb_plat, >dev, mregs);
+   mdata->host = musb_register(_musb_plat, >dev, mregs);
+   if (!mdata->host)
+   return -EIO;
 #endif
-   if (ret == 0)
+   if ((ret == 0) && mdata->host)
printf("PIC32 MUSB OTG\n");
 
return ret;
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index 08de9c69c7..b846afb094 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -444,9 +444,11 @@ static int musb_usb_probe(struct udevice *dev)
printf("Allwinner mUSB OTG (Host)\n");
 #else
pdata.mode = MUSB_PERIPHERAL;
-   ret = musb_register(, >dev, base);
-   if (!ret)
-   printf("Allwinner mUSB OTG (Peripheral)\n");
+   host->host = musb_register(, >dev, base);
+   if (!host->host)
+   return -EIO;
+
+   printf("Allwinner mUSB OTG (Peripheral)\n");
 #endif
 
return ret;
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
index 9104414cf0..a31ce67a81 100644
--- a/include/linux/usb/musb.h
+++ b/include/linux/usb/musb.h
@@ -150,7 +150,7 @@ extern int tusb6010_platform_retime(unsigned is_refclk);
 /*
  * U-Boot specfic stuff
  */
-int musb_register(struct musb_hdrc_platform_data *plat, void *bdata,
-   void *ctl_regs);
+struct musb *musb_register(struct musb_hdrc_platform_data *plat, void *bdata,
+  void *ctl_regs);
 
 #endif /* __LINUX_USB_MUSB_H */
-- 
2.17.1

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


[U-Boot] [PATCH 0/8] musb: sunxi: Few fixes/improvements

2018-07-09 Thread Jagan Teki
All these changes mostly related to musb/sunxi.c and 
msub core files with few fixes on sunxi front and
some code improvements on musb while handling shutdown code.

One patch mark it as 'RFC' about "including UCLASS_USB_DEV_GENERIC
into shutdown caller" so expecting some inputs on the same.

patch 1, fix improper musb host pointer

patch 2, musb-new/sunxi allocate phy in private

patch 3, use phy_passby even for PHY#0

patch 4, don't set usb_clk_cfg in PHY probe 

patch 5, update PHY#4 rst_mask for H3_H5

patch 6, shutdown UCLASS_USB_DEV_GENERIC

patch 7, musb-new/sunxi add proper exit

patch 8, call musb_platform_exit from musb_stop

Jagan Teki (8):
  usb: musb-new: Fix improper musb host pointer
  usb: musb-new: sunxi: Allocate struct phy in private
  phy: sun4i-usb: Call phy_passby even for PHY#0
  phy: sun4i-usb: Remove usb_clk_cfg set in probe
  phy: sun4i-usb: Update PHY#3 rst_mask only for H3_H5
  dm: usb: Add UCLASS_USB_DEV_GENERIC shutdown
  usb: musb-new: sunxi: Add proper musb exit support
  usb: musb-new: core: Call musb_platform_exit from musb_stop

 board/compulab/cm_t3517/cm_t3517.c|  4 +-
 drivers/phy/allwinner/phy-sun4i-usb.c |  7 +--
 drivers/usb/host/usb-uclass.c | 43 +++
 drivers/usb/musb-new/musb_core.c  |  1 +
 drivers/usb/musb-new/musb_uboot.c | 10 ++--
 drivers/usb/musb-new/pic32.c  |  6 ++-
 drivers/usb/musb-new/sunxi.c  | 76 +++
 include/linux/usb/musb.h  |  4 +-
 8 files changed, 101 insertions(+), 50 deletions(-)

-- 
2.17.1

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


[U-Boot] [PATCH 1/2] mips: dbau1x00: Remove this board

2018-07-09 Thread Tom Rini
This platform has been marked as orphan since June of 2016 and should
have been removed some time ago.  Do so now.

Cc: Daniel Schwierzeck 
Signed-off-by: Tom Rini 
---
 arch/mips/Kconfig   |  11 -
 arch/mips/mach-au1x00/au1x00_eth.c  |   5 -
 arch/mips/mach-au1x00/include/mach/au1x00.h |  31 --
 board/dbau1x00/Kconfig  |  46 ---
 board/dbau1x00/MAINTAINERS  |  10 -
 board/dbau1x00/Makefile |   7 -
 board/dbau1x00/README   |  63 ---
 board/dbau1x00/dbau1x00.c   | 118 --
 board/dbau1x00/lowlevel_init.S  | 589 
 configs/dbau1000_defconfig  |  21 -
 configs/dbau1100_defconfig  |  21 -
 configs/dbau1500_defconfig  |  21 -
 configs/dbau1550_defconfig  |  16 -
 configs/dbau1550_el_defconfig   |  17 -
 include/configs/dbau1x00.h  | 172 
 15 files changed, 1148 deletions(-)
 delete mode 100644 board/dbau1x00/Kconfig
 delete mode 100644 board/dbau1x00/MAINTAINERS
 delete mode 100644 board/dbau1x00/Makefile
 delete mode 100644 board/dbau1x00/README
 delete mode 100644 board/dbau1x00/dbau1x00.c
 delete mode 100644 board/dbau1x00/lowlevel_init.S
 delete mode 100644 configs/dbau1000_defconfig
 delete mode 100644 configs/dbau1100_defconfig
 delete mode 100644 configs/dbau1500_defconfig
 delete mode 100644 configs/dbau1550_defconfig
 delete mode 100644 configs/dbau1550_el_defconfig
 delete mode 100644 include/configs/dbau1x00.h

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index d07b92d1b442..d58fcdbd742c 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -51,16 +51,6 @@ config TARGET_VCT
select SYS_MIPS_CACHE_INIT_RAM_LOAD
select ROM_EXCEPTION_VECTORS
 
-config TARGET_DBAU1X00
-   bool "Support dbau1x00"
-   select SUPPORTS_BIG_ENDIAN
-   select SUPPORTS_LITTLE_ENDIAN
-   select SUPPORTS_CPU_MIPS32_R1
-   select SUPPORTS_CPU_MIPS32_R2
-   select SYS_MIPS_CACHE_INIT_RAM_LOAD
-   select ROM_EXCEPTION_VECTORS
-   select MIPS_TUNE_4KC
-
 config TARGET_PB1X00
bool "Support pb1x00"
select SUPPORTS_LITTLE_ENDIAN
@@ -125,7 +115,6 @@ config TARGET_XILFPGA
 
 endchoice
 
-source "board/dbau1x00/Kconfig"
 source "board/imgtec/boston/Kconfig"
 source "board/imgtec/malta/Kconfig"
 source "board/imgtec/xilfpga/Kconfig"
diff --git a/arch/mips/mach-au1x00/au1x00_eth.c 
b/arch/mips/mach-au1x00/au1x00_eth.c
index 84a1f59ba072..ef9be891ec1f 100644
--- a/arch/mips/mach-au1x00/au1x00_eth.c
+++ b/arch/mips/mach-au1x00/au1x00_eth.c
@@ -27,15 +27,10 @@
 #define ETH0_BASE AU1500_ETH0_BASE
 #define MAC0_ENABLE AU1500_MAC0_ENABLE
 #else
-#ifdef CONFIG_SOC_AU1550
-#define ETH0_BASE AU1550_ETH0_BASE
-#define MAC0_ENABLE AU1550_MAC0_ENABLE
-#else
 #error "No valid cpu set"
 #endif
 #endif
 #endif
-#endif
 
 #include 
 #include 
diff --git a/arch/mips/mach-au1x00/include/mach/au1x00.h 
b/arch/mips/mach-au1x00/include/mach/au1x00.h
index e24248997864..1fabcba65d29 100644
--- a/arch/mips/mach-au1x00/include/mach/au1x00.h
+++ b/arch/mips/mach-au1x00/include/mach/au1x00.h
@@ -118,27 +118,6 @@ static __inline__ int au_ffs(int x)
 #define CP0_DEBUG  $23
 
 /* SDRAM Controller */
-#ifdef CONFIG_SOC_AU1550
-
-#define MEM_SDMODE00xB4000800
-#define MEM_SDMODE10xB4000808
-#define MEM_SDMODE20xB4000810
-
-#define MEM_SDADDR00xB4000820
-#define MEM_SDADDR10xB4000828
-#define MEM_SDADDR20xB4000830
-
-#define MEM_SDCONFIGA  0xB4000840
-#define MEM_SDCONFIGB  0xB4000848
-#define MEM_SDPRECMD   0xB40008c0
-#define MEM_SDAUTOREF  0xB40008c8
-
-#define MEM_SDWRMD00xB4000880
-#define MEM_SDWRMD10xB4000888
-#define MEM_SDWRMD20xB4000890
-
-#else /* CONFIG_SOC_AU1550 */
-
 #define MEM_SDMODE00xB400
 #define MEM_SDMODE10xB404
 #define MEM_SDMODE20xB408
@@ -155,8 +134,6 @@ static __inline__ int au_ffs(int x)
 #define MEM_SDWRMD10xB428
 #define MEM_SDWRMD20xB42C
 
-#endif /* CONFIG_SOC_AU1550 */
-
 #define MEM_SDSLEEP0xB430
 #define MEM_SDSMCKE0xB434
 
@@ -483,8 +460,6 @@ static __inline__ int au_ffs(int x)
 #define AU1500_ETH0_BASE 0xB150
 #define AU1500_ETH1_BASE 0xB151
 #define AU1100_ETH0_BASE 0xB050
-#define AU1550_ETH0_BASE 0xB050
-#define AU1550_ETH1_BASE 0xB051
 
 /* 4 byte offsets from AU1000_ETH_BASE */
 #define MAC_CONTROL 0x0
@@ -534,8 +509,6 @@ static __inline__ int au_ffs(int x)
 #define AU1500_MAC0_ENABLE   0xB152
 #define AU1500_MAC1_ENABLE   0xB1520004
 #define AU1100_MAC0_ENABLE   

Re: [U-Boot] [PATCH v3 2/2] net: mvgbe: convert to DM

2018-07-09 Thread Michael Walle

Am 2018-07-09 11:34, schrieb Chris Packham:

Add driver model support to the mvgbe driver. As a temporary measure
both DM and non-DM uses are supported. Once all the users have been
converted the non-DM support can be dropped.

Signed-off-by: Chris Packham 


Works for me now, after adding the phy-mode property to my dts ;) Will 
post a patch for lsxl later.


Tested-by: Michael Walle 



---

Changes in v3:
- select PHYLIB (thanks Michael)
- parse phy info from subnode

Changes in v2:
- create __mvgbe_phy_init and mvgbe_alloc_buffers helper functions
- move device tree reads to mvgbe_ofdata_to_platdata

 drivers/net/Kconfig |   1 +
 drivers/net/mvgbe.c | 306 +---
 drivers/net/mvgbe.h |  16 +++
 3 files changed, 275 insertions(+), 48 deletions(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index e88f056d8448..7256d4167666 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -181,6 +181,7 @@ config FTMAC100
 config MVGBE
bool "Marvell Orion5x/Kirkwood network interface support"
depends on KIRKWOOD || ORION5X
+   select PHYLIB if DM_ETH
help
  This driver supports the network interface units in the
  Marvell Orion5x and Kirkwood SoCs
diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index 96ca35512f01..d9d76a8ce0cc 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -12,6 +12,7 @@
  */

 #include 
+#include 
 #include 
 #include 
 #include 
@@ -127,8 +128,12 @@ static int __mvgbe_mdio_read(struct mvgbe_device
*dmvgbe, int phy_adr,
 static int smi_reg_read(struct mii_dev *bus, int phy_adr, int devad,
int reg_ofs)
 {
+#ifdef CONFIG_DM_ETH
+   struct mvgbe_device *dmvgbe = bus->priv;
+#else
struct eth_device *dev = eth_get_dev_by_name(bus->name);
struct mvgbe_device *dmvgbe = to_mvgbe(dev);
+#endif

return __mvgbe_mdio_read(dmvgbe, phy_adr, devad, reg_ofs);
 }
@@ -180,8 +185,12 @@ static int __mvgbe_mdio_write(struct mvgbe_device
*dmvgbe, int phy_adr,
 static int smi_reg_write(struct mii_dev *bus, int phy_adr, int devad,
 int reg_ofs, u16 data)
 {
+#ifdef CONFIG_DM_ETH
+   struct mvgbe_device *dmvgbe = bus->priv;
+#else
struct eth_device *dev = eth_get_dev_by_name(bus->name);
struct mvgbe_device *dmvgbe = to_mvgbe(dev);
+#endif

return __mvgbe_mdio_write(dmvgbe, phy_adr, devad, reg_ofs, data);
 }
@@ -415,11 +424,12 @@ static void mvgbe_init_rx_desc_ring(struct
mvgbe_device *dmvgbe)
dmvgbe->p_rxdesc_curr = dmvgbe->p_rxdesc;
 }

-static int __mvgbe_init(struct mvgbe_device *dmvgbe)
+static int __mvgbe_init(struct mvgbe_device *dmvgbe, u8 *enetaddr)
 {
struct mvgbe_registers *regs = dmvgbe->regs;
 #if (defined(CONFIG_MII) || defined(CONFIG_CMD_MII)) &&  \
!defined(CONFIG_PHYLIB) &&   \
+   !defined(CONFIG_DM_ETH) &&   \
defined(CONFIG_SYS_FAULT_ECHO_LINK_DOWN)
int i;
 #endif
@@ -436,7 +446,7 @@ static int __mvgbe_init(struct mvgbe_device 
*dmvgbe)


set_dram_access(regs);
port_init_mac_tables(regs);
-   port_uc_addr_set(dmvgbe, dmvgbe->dev.enetaddr);
+   port_uc_addr_set(dmvgbe, enetaddr);

/* Assign port configuration and command. */
MVGBE_REG_WR(regs->pxc, PRT_CFG_VAL);
@@ -473,6 +483,7 @@ static int __mvgbe_init(struct mvgbe_device 
*dmvgbe)


 #if (defined(CONFIG_MII) || defined(CONFIG_CMD_MII)) && \
!defined(CONFIG_PHYLIB) && \
+   !defined(CONFIG_DM_ETH) && \
defined(CONFIG_SYS_FAULT_ECHO_LINK_DOWN)
/* Wait up to 5s for the link status */
for (i = 0; i < 5; i++) {
@@ -492,12 +503,14 @@ static int __mvgbe_init(struct mvgbe_device 
*dmvgbe)

return 0;
 }

+#ifndef CONFIG_DM_ETH
 static int mvgbe_init(struct eth_device *dev)
 {
struct mvgbe_device *dmvgbe = to_mvgbe(dev);

-   return __mvgbe_init(dmvgbe);
+   return __mvgbe_init(dmvgbe, dmvgbe->dev.enetaddr);
 }
+#endif

 static void __mvgbe_halt(struct mvgbe_device *dmvgbe)
 {
@@ -524,6 +537,7 @@ static void __mvgbe_halt(struct mvgbe_device 
*dmvgbe)

MVGBE_REG_WR(regs->peim, 0);
 }

+#ifndef CONFIG_DM_ETH
 static int mvgbe_halt(struct eth_device *dev)
 {
struct mvgbe_device *dmvgbe = to_mvgbe(dev);
@@ -532,7 +546,18 @@ static int mvgbe_halt(struct eth_device *dev)

return 0;
 }
+#endif

+#ifdef CONFIG_DM_ETH
+static int mvgbe_write_hwaddr(struct udevice *dev)
+{
+   struct eth_pdata *pdata = dev_get_platdata(dev);
+
+   port_uc_addr_set(dev_get_priv(dev), pdata->enetaddr);
+
+   return 0;
+}
+#else
 static int mvgbe_write_hwaddr(struct eth_device *dev)
 {
struct mvgbe_device *dmvgbe = to_mvgbe(dev);
@@ -541,6 +566,7 @@ static int mvgbe_write_hwaddr(struct eth_device 
*dev)

port_uc_addr_set(dmvgbe, dmvgbe->dev.enetaddr);
return 0;
 }
+#endif

 static int __mvgbe_send(struct mvgbe_device *dmvgbe, 

Re: [U-Boot] [PATCH] spi: kirkwood: add orion-spi compatible string

2018-07-09 Thread Michael Walle

Am 2018-05-08 00:54, schrieb Chris Packham:

This matches the compatible string used by the Linux kernel. This will
allow u-boot to use the same device tree files.


This patch is still missing to make SPI on kirkwoods work. Is there 
anything missing which prevents it from being applied?


-michael



Signed-off-by: Chris Packham 
---
This applies on top of Jagan's series
http://patchwork.ozlabs.org/project/uboot/list/?series=33927

 drivers/spi/kirkwood_spi.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/drivers/spi/kirkwood_spi.c b/drivers/spi/kirkwood_spi.c
index 036fc36b8329..6a5ab8a1cba4 100644
--- a/drivers/spi/kirkwood_spi.c
+++ b/drivers/spi/kirkwood_spi.c
@@ -226,6 +226,10 @@ static int mvebu_spi_ofdata_to_platdata(struct
udevice *bus)
return 0;
 }

+static const struct mvebu_spi_dev orion_spi_dev_data = {
+   .is_errata_50mhz_ac = false,
+};
+
 static const struct mvebu_spi_dev armada_xp_spi_dev_data = {
.is_errata_50mhz_ac = false,
 };
@@ -239,6 +243,10 @@ static const struct mvebu_spi_dev
armada_380_spi_dev_data = {
 };

 static const struct udevice_id mvebu_spi_ids[] = {
+   {
+   .compatible = "marvell,orion-spi",
+   .data = (ulong)_spi_dev_data
+   },
{
.compatible = "marvell,armada-375-spi",
.data = (ulong)_375_spi_dev_data

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


[U-Boot] [RFC 5/8] clk: Add generic_clk_valid

2018-07-09 Thread Jagan Teki
Add clock validate function for validating
specific clock to do further clock operations.

Signed-off-by: Jagan Teki 
---
 include/clk-uclass.h | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/include/clk-uclass.h b/include/clk-uclass.h
index e76d98e2f6..452eed008e 100644
--- a/include/clk-uclass.h
+++ b/include/clk-uclass.h
@@ -100,4 +100,14 @@ struct clk_ops {
int (*disable)(struct clk *clk);
 };
 
+/**
+ * generic_clk_valid() - check if clk port is valid
+ *
+ * @clk:   the clk port to check
+ * @return TRUE if valid, or FALSE
+ */
+static inline bool generic_clk_valid(struct clk *clk)
+{
+   return clk->dev != NULL;
+}
 #endif
-- 
2.17.1

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


[U-Boot] [RFC 6/8] net: fec_mxc: Add clock support via CLK

2018-07-09 Thread Jagan Teki
Now enet clock support available for imx6qdl and imx6ul,
via CLK framework, so add enable, set_rate support in
drivers.

Signed-off-by: Jagan Teki 
---
 drivers/net/fec_mxc.c | 58 +++
 drivers/net/fec_mxc.h |  6 +
 2 files changed, 64 insertions(+)

diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 694a0b2f7e..7998c8b8b2 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1245,6 +1246,41 @@ static int fec_phy_init(struct fec_priv *priv, struct 
udevice *dev)
return 0;
 }
 
+#if CONFIG_IS_ENABLED(CLK)
+static int fec_clk_enable(struct fec_priv *priv)
+{
+   int ret;
+
+   ret = clk_enable(>clk_ahb);
+   if (ret) {
+   printf("failed to enable ahb clk\n");
+   return ret;
+   }
+
+   if (generic_clk_valid(>clk_ptp)) {
+   ret = clk_set_rate(>clk_ptp, ENET_50MHZ);
+   if (ret) {
+   printf("failed to set 50MHz rate to ptp clk\n");
+   goto failed_clk_ahb;
+   }
+   }
+
+   if (generic_clk_valid(>clk_enet_out)) {
+   ret = clk_set_rate(>clk_enet_out, ENET_50MHZ);
+   if (ret) {
+   printf("failed to set 50MHz rate to enet_out clk\n");
+   goto failed_clk_ahb;
+   }
+   }
+
+   return 0;
+
+failed_clk_ahb:
+   clk_disable(>clk_ahb);
+   return ret;
+}
+#endif
+
 static int fecmxc_probe(struct udevice *dev)
 {
struct eth_pdata *pdata = dev_get_platdata(dev);
@@ -1253,6 +1289,12 @@ static int fecmxc_probe(struct udevice *dev)
uint32_t start;
int ret;
 
+#if CONFIG_IS_ENABLED(CLK)
+   ret = fec_clk_enable(priv);
+   if (ret)
+   return ret;
+#endif
+
ret = fec_alloc_descs(priv);
if (ret)
return ret;
@@ -1331,6 +1373,22 @@ static int fecmxc_ofdata_to_platdata(struct udevice *dev)
return -EINVAL;
}
 
+#if CONFIG_IS_ENABLED(CLK)
+   int ret;
+
+   ret = clk_get_by_name(dev, "ahb", >clk_ahb);
+   if (ret)
+   ret = PTR_ERR(>clk_ahb);
+
+   ret = clk_get_by_name(dev, "ptp", >clk_ptp);
+   if (ret)
+   dev_dbg(dev, "Warning: failed to get ptp clk\n");
+
+   ret = clk_get_by_name(dev, "enet_out", >clk_enet_out);
+   if (ret)
+   dev_dbg(dev, "Warning: failed to get enet_out clk\n");
+#endif
+
/* TODO
 * Need to get the reset-gpio and related properties from DT
 * and implemet the enet reset code on .probe call
diff --git a/drivers/net/fec_mxc.h b/drivers/net/fec_mxc.h
index 3b935afe2c..78899e7603 100644
--- a/drivers/net/fec_mxc.h
+++ b/drivers/net/fec_mxc.h
@@ -253,6 +253,12 @@ struct fec_priv {
 
 #ifdef CONFIG_DM_ETH
u32 interface;
+
+#if CONFIG_IS_ENABLED(CLK)
+   struct clk clk_ahb;
+   struct clk clk_ptp;
+   struct clk clk_enet_out;
+#endif
 #endif
 };
 
-- 
2.17.1

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


[U-Boot] [RFC 4/8] clk: imx: imx6ul: Implement ENET clocks

2018-07-09 Thread Jagan Teki
Add support for ENET clock on i.MX6UL platform.

Signed-off-by: Jagan Teki 
---
 drivers/clk/imx/Kconfig  |  7 +++
 drivers/clk/imx/Makefile |  1 +
 drivers/clk/imx/clk_imx6ul.c | 95 
 3 files changed, 103 insertions(+)
 create mode 100644 drivers/clk/imx/clk_imx6ul.c

diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig
index f8de5554c8..cfb9cfe2eb 100644
--- a/drivers/clk/imx/Kconfig
+++ b/drivers/clk/imx/Kconfig
@@ -15,4 +15,11 @@ config CLK_IMX6Q
  This enables common clock driver support for platforms based
  on i.MX6 QDL SoC.
 
+config CLK_IMX6UL
+   bool "Clock driver for i.MX6UL"
+   default MX6UL
+   help
+ This enables common clock driver support for platforms based
+ on i.MX6 UL SoC.
+
 endif # CLK_IMX
diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile
index 8ae3a50eba..67d6f9a19f 100644
--- a/drivers/clk/imx/Makefile
+++ b/drivers/clk/imx/Makefile
@@ -5,3 +5,4 @@
 #
 
 obj-$(CONFIG_CLK_IMX6Q) += clk_imx6q.o
+obj-$(CONFIG_CLK_IMX6UL) += clk_imx6ul.o
diff --git a/drivers/clk/imx/clk_imx6ul.c b/drivers/clk/imx/clk_imx6ul.c
new file mode 100644
index 00..9cf00154e3
--- /dev/null
+++ b/drivers/clk/imx/clk_imx6ul.c
@@ -0,0 +1,95 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2018 Amarula Solutions B.V.
+ * Author: Jagan Teki 
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+struct imx6ul_clk_priv {
+   void *base;
+};
+
+static ulong imx6ul_clk_get_rate(struct clk *clk)
+{
+   debug("%s(#%ld)\n", __func__, clk->id);
+
+   debug("  unhandled\n");
+   return -EINVAL;
+}
+
+static ulong imx6ul_clk_set_rate(struct clk *clk, ulong rate)
+{
+   debug("%s(#%ld)\n", __func__, clk->id);
+
+   switch (clk->id) {
+   case IMX6UL_CLK_ENET_PTP:
+   /* ref clock handling done via IMX6UL_CLK_ENET_REF */
+   clk = NULL;
+   return 0;
+   case IMX6UL_CLK_ENET_REF:
+   return enable_fec_anatop_clock(0, rate);
+   case IMX6UL_CLK_ENET2_REF_125M:
+   return enable_fec_anatop_clock(1, rate);
+   default:
+   printf("  unhandled\n");
+   return -ENODEV;
+   }
+}
+
+static int imx6ul_clk_enable(struct clk *clk)
+{
+   struct imx6ul_clk_priv *priv = dev_get_priv(clk->dev);
+
+   debug("%s(#%ld)\n", __func__, clk->id);
+
+   switch (clk->id) {
+   case IMX6UL_CLK_ENET_AHB:
+   setbits_le32(priv->base + 0x74, GENMASK(5, 4));
+   return 0;
+   default:
+   printf("  unhandled\n");
+   return -ENODEV;
+   }
+}
+
+static struct clk_ops imx6ul_clk_ops = {
+   .get_rate = imx6ul_clk_get_rate,
+   .set_rate = imx6ul_clk_set_rate,
+   .enable = imx6ul_clk_enable,
+};
+
+static int imx6ul_clk_probe(struct udevice *dev)
+{
+   return 0;
+}
+
+static int imx6ul_clk_ofdata_to_platdata(struct udevice *dev)
+{
+   struct imx6ul_clk_priv *priv = dev_get_priv(dev);
+
+   priv->base = dev_read_addr_ptr(dev);
+
+   return 0;
+}
+
+static const struct udevice_id imx6ul_clk_ids[] = {
+   { .compatible = "fsl,imx6ul-ccm" },
+   { }
+};
+
+U_BOOT_DRIVER(fsl_imx6ul_ccm) = {
+   .name   = "fsl_imx6ul_ccm",
+   .id = UCLASS_CLK,
+   .of_match   = imx6ul_clk_ids,
+   .priv_auto_alloc_size   = sizeof(struct imx6ul_clk_priv),
+   .ofdata_to_platdata = imx6ul_clk_ofdata_to_platdata,
+   .ops= _clk_ops,
+   .probe  = imx6ul_clk_probe,
+};
-- 
2.17.1

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


[U-Boot] [RFC 8/8] configs: icorem6_rqs: Enable CLK_IMX

2018-07-09 Thread Jagan Teki
CLK support for imx6qdl is available, so enable
CLK_IMX for Engicam i.CoreM6 QDL RQS boards.

Signed-off-by: Jagan Teki 
---
 configs/imx6qdl_icore_rqs_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/imx6qdl_icore_rqs_defconfig 
b/configs/imx6qdl_icore_rqs_defconfig
index 6fa494a6f9..6036719a31 100644
--- a/configs/imx6qdl_icore_rqs_defconfig
+++ b/configs/imx6qdl_icore_rqs_defconfig
@@ -46,3 +46,4 @@ CONFIG_FEC_MXC=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_MXC_UART=y
+CONFIG_CLK_IMX=y
-- 
2.17.1

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


[U-Boot] [RFC 3/8] clk: imx: imx6q: Implement ENET clocks

2018-07-09 Thread Jagan Teki
Add support for ENET clock on i.MX6QDL platform.

Signed-off-by: Jagan Teki 
---
 drivers/clk/imx/clk_imx6q.c | 23 ++-
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/imx/clk_imx6q.c b/drivers/clk/imx/clk_imx6q.c
index 3019218411..f0cb7ece1f 100644
--- a/drivers/clk/imx/clk_imx6q.c
+++ b/drivers/clk/imx/clk_imx6q.c
@@ -26,18 +26,31 @@ static ulong imx6q_clk_get_rate(struct clk *clk)
 
 static ulong imx6q_clk_set_rate(struct clk *clk, ulong rate)
 {
-   debug("%s(#%ld, rate: %lu)\n", __func__, clk->id, rate);
+   debug("%s(#%ld)\n", __func__, clk->id);
 
-   debug("  unhandled\n");
-   return -EINVAL;
+   switch (clk->id) {
+   case IMX6QDL_CLK_ENET_REF:
+   return enable_fec_anatop_clock(0, rate);
+   default:
+   printf("  unhandled\n");
+   return -ENODEV;
+   }
 }
 
 static int imx6q_clk_enable(struct clk *clk)
 {
+   struct imx6q_clk_priv *priv = dev_get_priv(clk->dev);
+
debug("%s(#%ld)\n", __func__, clk->id);
 
-   debug("  unhandled\n");
-   return -EINVAL;
+   switch (clk->id) {
+   case IMX6QDL_CLK_ENET:
+   setbits_le32(priv->base + 0x6c, GENMASK(11, 10));
+   return 0;
+   default:
+   printf("  unhandled\n");
+   return -ENODEV;
+   }
 }
 
 static struct clk_ops imx6q_clk_ops = {
-- 
2.17.1

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


[U-Boot] [RFC 2/8] clk: Add DM CLK driver template for i.MX6QDL

2018-07-09 Thread Jagan Teki
Add DM CLK driver for iMX6QDL platform.
- basic template for clk_imx6qdl.c
- Kconfig support

Signed-off-by: Jagan Teki 
---
 arch/arm/mach-imx/mx6/Kconfig |  1 +
 drivers/clk/Kconfig   |  1 +
 drivers/clk/Makefile  |  1 +
 drivers/clk/imx/Kconfig   | 18 +
 drivers/clk/imx/Makefile  |  7 
 drivers/clk/imx/clk_imx6q.c   | 76 +++
 drivers/video/ipu_common.c|  8 
 7 files changed, 112 insertions(+)
 create mode 100644 drivers/clk/imx/Kconfig
 create mode 100644 drivers/clk/imx/Makefile
 create mode 100644 drivers/clk/imx/clk_imx6q.c

diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
index 521fad74b5..4410f53b55 100644
--- a/arch/arm/mach-imx/mx6/Kconfig
+++ b/arch/arm/mach-imx/mx6/Kconfig
@@ -257,6 +257,7 @@ config TARGET_MX6Q_ENGICAM
select MX6QDL
select OF_CONTROL
select SPL_OF_LIBFDT
+   select CLK_IMX
select DM
select DM_ETH
select DM_GPIO
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 3e66dd97c1..7404f96dab 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -85,6 +85,7 @@ config CLK_STM32MP1
 
 source "drivers/clk/at91/Kconfig"
 source "drivers/clk/exynos/Kconfig"
+source "drivers/clk/imx/Kconfig"
 source "drivers/clk/mvebu/Kconfig"
 source "drivers/clk/renesas/Kconfig"
 source "drivers/clk/tegra/Kconfig"
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index 426c67db9b..e73a386c5b 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -17,6 +17,7 @@ obj-$(CONFIG_CLK_BCM6345) += clk_bcm6345.o
 obj-$(CONFIG_CLK_BOSTON) += clk_boston.o
 obj-$(CONFIG_CLK_EXYNOS) += exynos/
 obj-$(CONFIG_CLK_HSDK) += clk-hsdk-cgu.o
+obj-$(CONFIG_CLK_IMX) += imx/
 obj-$(CONFIG_CLK_RENESAS) += renesas/
 obj-$(CONFIG_CLK_STM32F) += clk_stm32f.o
 obj-$(CONFIG_CLK_STM32MP1) += clk_stm32mp1.o
diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig
new file mode 100644
index 00..f8de5554c8
--- /dev/null
+++ b/drivers/clk/imx/Kconfig
@@ -0,0 +1,18 @@
+config CLK_IMX
+   bool "Clock support for i.MX SoCs"
+   depends on ARCH_MX6
+   select CLK
+   help
+ This enables support for common clock driver API on i.MX
+ SoCs.
+
+if CLK_IMX
+
+config CLK_IMX6Q
+   bool "Clock driver for i.MX6QDL"
+   default MX6QDL
+   help
+ This enables common clock driver support for platforms based
+ on i.MX6 QDL SoC.
+
+endif # CLK_IMX
diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile
new file mode 100644
index 00..8ae3a50eba
--- /dev/null
+++ b/drivers/clk/imx/Makefile
@@ -0,0 +1,7 @@
+#
+# Copyright (c) 2018 Arm Ltd.
+#
+# SPDX-License-Identifier:  GPL-2.0+
+#
+
+obj-$(CONFIG_CLK_IMX6Q) += clk_imx6q.o
diff --git a/drivers/clk/imx/clk_imx6q.c b/drivers/clk/imx/clk_imx6q.c
new file mode 100644
index 00..3019218411
--- /dev/null
+++ b/drivers/clk/imx/clk_imx6q.c
@@ -0,0 +1,76 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2018 Amarula Solutions B.V.
+ * Author: Jagan Teki 
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+struct imx6q_clk_priv {
+   void *base;
+};
+
+static ulong imx6q_clk_get_rate(struct clk *clk)
+{
+   debug("%s(#%ld)\n", __func__, clk->id);
+
+   debug("  unhandled\n");
+   return -EINVAL;
+}
+
+static ulong imx6q_clk_set_rate(struct clk *clk, ulong rate)
+{
+   debug("%s(#%ld, rate: %lu)\n", __func__, clk->id, rate);
+
+   debug("  unhandled\n");
+   return -EINVAL;
+}
+
+static int imx6q_clk_enable(struct clk *clk)
+{
+   debug("%s(#%ld)\n", __func__, clk->id);
+
+   debug("  unhandled\n");
+   return -EINVAL;
+}
+
+static struct clk_ops imx6q_clk_ops = {
+   .get_rate = imx6q_clk_get_rate,
+   .set_rate = imx6q_clk_set_rate,
+   .enable = imx6q_clk_enable,
+};
+
+static int imx6q_clk_probe(struct udevice *dev)
+{
+   return 0;
+}
+
+static int imx6q_clk_ofdata_to_platdata(struct udevice *dev)
+{
+   struct imx6q_clk_priv *priv = dev_get_priv(dev);
+
+   priv->base = dev_read_addr_ptr(dev);
+
+   return 0;
+}
+
+static const struct udevice_id imx6q_clk_ids[] = {
+   { .compatible = "fsl,imx6q-ccm" },
+   { }
+};
+
+U_BOOT_DRIVER(fsl_imx6q_ccm) = {
+   .name   = "fsl_imx6q_ccm",
+   .id = UCLASS_CLK,
+   .of_match   = imx6q_clk_ids,
+   .priv_auto_alloc_size   = sizeof(struct imx6q_clk_priv),
+   .ofdata_to_platdata = imx6q_clk_ofdata_to_platdata,
+   .ops= _clk_ops,
+   .probe  = imx6q_clk_probe,
+};
diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c
index cbe1984e4f..9725f76477 100644
--- a/drivers/video/ipu_common.c
+++ b/drivers/video/ipu_common.c
@@ -86,6 +86,7 @@ struct ipu_ch_param {
 #define IPUV3_CLK_MX6Q 26400
 #define IPUV3_CLK_MX6DL19800
 
+#ifndef CONFIG_CLK
 

[U-Boot] [RFC 7/8] imx6ul: engicam: Enable CLK_IMX

2018-07-09 Thread Jagan Teki
CLK support for imx6ul is available, so enable
CLK_IMX for Engicam i.MX6UL boards.

Signed-off-by: Jagan Teki 
---
 arch/arm/mach-imx/mx6/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
index 4410f53b55..4ea43db34c 100644
--- a/arch/arm/mach-imx/mx6/Kconfig
+++ b/arch/arm/mach-imx/mx6/Kconfig
@@ -338,6 +338,7 @@ config TARGET_MX6UL_ENGICAM
select BOARD_LATE_INIT
select MX6UL
select OF_CONTROL
+   select CLK_IMX
select DM
select DM_ETH
select DM_GPIO
-- 
2.17.1

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


[U-Boot] [RFC 1/8] clk: Kconfig: Ascending order to sub directiory kconfigs

2018-07-09 Thread Jagan Teki
sourcing of sub directiory kconfig files are not in
proper order, so keep them in ascending order.

Signed-off-by: Jagan Teki 
---
 drivers/clk/Kconfig | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index edb4ca58ea..3e66dd97c1 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -83,12 +83,12 @@ config CLK_STM32MP1
  Enable the STM32 clock (RCC) driver. Enable support for
  manipulating STM32MP1's on-SoC clocks.
 
-source "drivers/clk/tegra/Kconfig"
-source "drivers/clk/uniphier/Kconfig"
-source "drivers/clk/exynos/Kconfig"
 source "drivers/clk/at91/Kconfig"
-source "drivers/clk/renesas/Kconfig"
+source "drivers/clk/exynos/Kconfig"
 source "drivers/clk/mvebu/Kconfig"
+source "drivers/clk/renesas/Kconfig"
+source "drivers/clk/tegra/Kconfig"
+source "drivers/clk/uniphier/Kconfig"
 
 config ICS8N3QV01
bool "Enable ICS8N3QV01 VCXO driver"
-- 
2.17.1

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


[U-Boot] [RFC 0/8] i.MX: Add initial CLK support

2018-07-09 Thread Jagan Teki
One of the blocking area where fec_mxc is unlikely
to move dm can be CLK support, this series trying
to add support for it and concentrated on ENET clocking
for i.MX6QDL and i.MX6UL.

I've verified this on i.MX6QDL, but the reason for
sending this is an 'RFC' is there are some quite few
issues with existing fec_mxc driver regarding mdio handling.
The dm vs non-dm code in fec_mxc looks very uncomfortable
to read and add new support, so I would like create one
separate dm driver to make dm related changes if all agree?

know issues:
- CLK driver still using enable_fec_anatop_clock function
  to set the clock, but if we handling this in CLK we need
  anatop via OF_LIVE. will try this next version
- fec_mxc is passing input ref clock, ENET_50MHZ. don't
  know how to make this dynamic, or this based on MII or 
  any other feature, need help.
- ipu_common has legacy clk support, since may boards are using
  ipu_common better to handle this via CLK so-that move to CLK
  become easy and meaningful.  

patch 1, clk/kconfig ordering

patch 2, sample i.MX6QDL DM CLK template

patch 3, 4 Implement ENET clocks for i.MX6QDL and i.MX6UL

patch 5, add generic_clk_valid function

patch 6, add CLK support in fec_mxc.c

patch 7,8 enable CLK support on engicam boards

Jagan Teki (8):
  clk: Kconfig: Ascending order to sub directiory kconfigs
  clk: Add DM CLK driver template for i.MX6QDL
  clk: imx: imx6q: Implement ENET clocks
  clk: imx: imx6ul: Implement ENET clocks
  clk: Add generic_clk_valid
  net: fec_mxc: Add clock support via CLK
  imx6ul: engicam: Enable CLK_IMX
  configs: icorem6_rqs: Enable CLK_IMX

 arch/arm/mach-imx/mx6/Kconfig   |  2 +
 configs/imx6qdl_icore_rqs_defconfig |  1 +
 drivers/clk/Kconfig |  9 +--
 drivers/clk/Makefile|  1 +
 drivers/clk/imx/Kconfig | 25 
 drivers/clk/imx/Makefile|  8 +++
 drivers/clk/imx/clk_imx6q.c | 89 +++
 drivers/clk/imx/clk_imx6ul.c| 95 +
 drivers/net/fec_mxc.c   | 58 ++
 drivers/net/fec_mxc.h   |  6 ++
 drivers/video/ipu_common.c  |  8 +++
 include/clk-uclass.h| 10 +++
 12 files changed, 308 insertions(+), 4 deletions(-)
 create mode 100644 drivers/clk/imx/Kconfig
 create mode 100644 drivers/clk/imx/Makefile
 create mode 100644 drivers/clk/imx/clk_imx6q.c
 create mode 100644 drivers/clk/imx/clk_imx6ul.c

-- 
2.17.1

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


Re: [U-Boot] [PATCH v2 2/2] configs: Update Meson GX configs

2018-07-09 Thread Neil Armstrong
On 09/07/2018 17:34, Loic Devulder wrote:
> Enable ADC support on the Khadas VIM board.
> 
> Signed-off-by: Loic Devulder 
> ---
>  configs/khadas-vim_defconfig | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/configs/khadas-vim_defconfig b/configs/khadas-vim_defconfig
> index 1eb13df4b4..fd1ec8157b 100644
> --- a/configs/khadas-vim_defconfig
> +++ b/configs/khadas-vim_defconfig
> @@ -13,12 +13,15 @@ CONFIG_OF_BOARD_SETUP=y
>  # CONFIG_DISPLAY_BOARDINFO is not set
>  # CONFIG_CMD_BDI is not set
>  # CONFIG_CMD_IMI is not set
> +CONFIG_CMD_ADC=y
>  CONFIG_CMD_GPIO=y
>  # CONFIG_CMD_LOADS is not set
>  CONFIG_CMD_MMC=y
>  CONFIG_CMD_USB=y
>  # CONFIG_CMD_SETEXPR is not set
>  CONFIG_CMD_REGULATOR=y
> +CONFIG_ADC=y
> +CONFIG_SARADC_MESON=y
>  CONFIG_OF_CONTROL=y
>  CONFIG_NET_RANDOM_ETHADDR=y
>  CONFIG_DM_GPIO=y
> 

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


Re: [U-Boot] [PATCH v2 1/2] ARM64: meson: Add 'usb2_phy0' in P212 DT file

2018-07-09 Thread Neil Armstrong
Hi Loic,

On 09/07/2018 17:34, Loic Devulder wrote:
> Enable power supply for USB Amlogic Meson GXL P212 based boards.
> 
> Signed-off-by: Loic Devulder 

We like to keep the u-boot and linux DTS synced, this changed was backported on 
Linux v4.17.5,
can you instead precise you backported the last fix from the 4.17 stable branch 
?

Thanks,
Neil

> ---
>  arch/arm/dts/meson-gxl-s905x-p212.dtsi | 8 
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm/dts/meson-gxl-s905x-p212.dtsi 
> b/arch/arm/dts/meson-gxl-s905x-p212.dtsi
> index 0cfd701809..4e61ec8f5b 100644
> --- a/arch/arm/dts/meson-gxl-s905x-p212.dtsi
> +++ b/arch/arm/dts/meson-gxl-s905x-p212.dtsi
> @@ -189,3 +189,11 @@
>   {
>   status = "okay";
>  };
> +
> +_phy0 {
> +/*
> + * even though the schematics don't show it:
> + * HDMI_5V is also used as supply for the USB VBUS.
> + */
> +phy-supply = <_5v>;
> +};
> 

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


Re: [U-Boot] [PATCH 5/5] arm: dts: socfpga: stratix10: update pdma

2018-07-09 Thread Dinh Nguyen


On 05/31/2018 03:08 AM, tien.fong.c...@intel.com wrote:
> From: Tien Fong Chee 
> 
> Update pdma properties for Stratix 10
> 
> Signed-off-by: Tien Fong Chee 
> ---
>  arch/arm/dts/socfpga_stratix10.dtsi | 20 
>  1 file changed, 20 insertions(+)
> 
> diff --git a/arch/arm/dts/socfpga_stratix10.dtsi 
> b/arch/arm/dts/socfpga_stratix10.dtsi
> index ccd3f32..311ba09 100644
> --- a/arch/arm/dts/socfpga_stratix10.dtsi
> +++ b/arch/arm/dts/socfpga_stratix10.dtsi
> @@ -82,6 +82,26 @@
>   ranges = <0 0 0 0x>;
>   u-boot,dm-pre-reloc;
>  
> + amba {
> + u-boot,dm-pre-reloc;
> + compatible = "arm,amba-bus";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + pdma: pdma@ffda {
> + u-boot,dm-pre-reloc;
> + compatible = "arm,pl330", "arm,dma330";

I think you got "arm,dma330" binding wrong. I don't see any binding with
that name.

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


Re: [U-Boot] [PATCH] tegra: p2771: Add CONFIG_EFI_LOADER_BOUNCE_BUFFER

2018-07-09 Thread Peter Robinson
On Mon, Jul 9, 2018 at 6:41 PM, Stephen Warren  wrote:
> On 07/06/2018 04:12 AM, Peter Robinson wrote:
>>
>> The Jetson TX2 needs EFI loader bounce buffer enabled otherwise grub
>> doesn't see
>> the storage when it loads.
>
>
> I suspect the need for this option is imposed by the SoC HW not the board
> design? If so, shouldn't the SoC Kconfig symbol select this EFI bounce
> buffer Kconfig symbol?

Possibly but all the other devices using this option are setting it in
their configs AFAICT so that's why I went this route, I suspect also
the Jetson X1 might need it too but I've not had time to test that
yet.

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


Re: [U-Boot] [PATCH] ARM: dts: socfpga: Adjust NAND register layout on Arria10

2018-07-09 Thread Dinh Nguyen


On 05/29/2018 11:36 AM, Marek Vasut wrote:
> Adjust the NAND register size on Arria10 to reflect reality.
> 
> Signed-off-by: Marek Vasut 
> Cc: Chin Liang See 
> Cc: Dinh Nguyen 
> ---
>  arch/arm/dts/socfpga_arria10.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/dts/socfpga_arria10.dtsi 
> b/arch/arm/dts/socfpga_arria10.dtsi
> index b51febda9c..2f935a21e9 100644
> --- a/arch/arm/dts/socfpga_arria10.dtsi
> +++ b/arch/arm/dts/socfpga_arria10.dtsi
> @@ -637,8 +637,8 @@
>   #address-cells = <1>;
>   #size-cells = <1>;
>   compatible = "denali,denali-nand-dt", 
> "altr,socfpga-denali-nand";
> - reg = <0xffb9 0x72000>,
> -   <0xffb8 0x1>;
> + reg = <0xffb9 0x20>,
> +   <0xffb8 0x1000>;
>   reg-names = "nand_data", "denali_reg";
>   interrupts = <0 99 4>;
>   dma-mask = <0x>;
> 

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


Re: [U-Boot] [PATCH] tegra: p2771: Add CONFIG_EFI_LOADER_BOUNCE_BUFFER

2018-07-09 Thread Stephen Warren

On 07/06/2018 04:12 AM, Peter Robinson wrote:

The Jetson TX2 needs EFI loader bounce buffer enabled otherwise grub doesn't see
the storage when it loads.


I suspect the need for this option is imposed by the SoC HW not the 
board design? If so, shouldn't the SoC Kconfig symbol select this EFI 
bounce buffer Kconfig symbol?

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


Re: [U-Boot] [PATCH 2/3] net: phy: xilinx_phy: Add suuport for livetree

2018-07-09 Thread Grygorii Strashko



On 07/06/2018 05:10 AM, Siva Durga Prasad Paladugu wrote:

This patch adds support for livetree by using dev_..
calls instead of fdtdec_.. .

Signed-off-by: Siva Durga Prasad Paladugu 
---
  drivers/net/phy/xilinx_phy.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/xilinx_phy.c b/drivers/net/phy/xilinx_phy.c
index 004cfcf..2e2a5cd 100644
--- a/drivers/net/phy/xilinx_phy.c
+++ b/drivers/net/phy/xilinx_phy.c
@@ -103,8 +103,8 @@ static int xilinxphy_of_init(struct phy_device *phydev)
u32 phytype;
  
  	debug("%s\n", __func__);

-   phytype = fdtdec_get_int(gd->fdt_blob, dev_of_offset(phydev->dev),
-"xlnx,phy-type", -1);
+   phytype = dev_read_u32_default(phydev->dev,
+  "xlnx,phy-type", -1);
if (phytype == XAE_PHY_TYPE_1000BASE_X)
phydev->flags |= XAE_PHY_TYPE_1000BASE_X;
  



The same. NACK. Pls, check
https://patchwork.ozlabs.org/cover/936370/
and
https://patchwork.ozlabs.org/cover/936380/

any comments, tested-by are very welcome.


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


Re: [U-Boot] [PATCH 1/3] net: phy: ti: Modify to support livetree

2018-07-09 Thread Grygorii Strashko



On 07/06/2018 05:10 AM, Siva Durga Prasad Paladugu wrote:

This patch adds support for livetree by using
dev_.. calls instead of fdtdec_..

Signed-off-by: Siva Durga Prasad Paladugu 
---
  drivers/net/phy/ti.c | 16 +++-
  1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c
index 8f3ed8a..945d9e9 100644
--- a/drivers/net/phy/ti.c
+++ b/drivers/net/phy/ti.c
@@ -173,24 +173,22 @@ static int dp83867_of_init(struct phy_device *phydev)
  {
struct dp83867_private *dp83867 = phydev->priv;
struct udevice *dev = phydev->dev;
-   int node = dev_of_offset(dev);
const void *fdt = gd->fdt_blob;
  
-	if (fdtdec_get_bool(fdt, node, "ti,max-output-impedance"))

+   if (dev_read_bool(dev, "ti,max-output-impedance"))
dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX;
-   else if (fdtdec_get_bool(fdt, node, "ti,min-output-impedance"))
+   else if (dev_read_bool(dev, "ti,min-output-impedance"))
dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MIN;
else
dp83867->io_impedance = -EINVAL;
  
-	dp83867->rx_id_delay = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),

-"ti,rx-internal-delay", -1);
+   dp83867->rx_id_delay = dev_read_u32_default(dev, "ti,rx-internal-delay",
+   -1);
  
-	dp83867->tx_id_delay = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),

-"ti,tx-internal-delay", -1);
+   dp83867->tx_id_delay = dev_read_u32_default(dev, "ti,tx-internal-delay",
+   -1);
  
-	dp83867->fifo_depth = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),

-"ti,fifo-depth", -1);
+   dp83867->fifo_depth = dev_read_u32_default(dev, "ti,fifo-depth", -1);
  
  	return 0;

  }



NACK. Pls, check
https://patchwork.ozlabs.org/cover/936370/
and
https://patchwork.ozlabs.org/cover/936380/

any comments, tested-by are very welcome.

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


Re: [U-Boot] [PATCH v6 1/6] env: add the same prefix to error messages to make it detectable by tests

2018-07-09 Thread Quentin Schulz
Hi all,

This series was tested with Travis:

https://travis-ci.org/QSchulz/u-boot/builds/401644733

I can't explain why 45, 46 and 49 are failing but they have the
following error message:
The command "sudo apt-get install libisl15 -y" failed and exited with
100 during .

It's unrelated to this patch series (happened multiple times without my
patch series) as far as I can tell.

Quentin

On Mon, Jul 09, 2018 at 07:16:25PM +0200, Quentin Schulz wrote:
> The error message should start with `## Error: ` so that it's easily
> detectable by tests without needing to have a complex regexp for
> matching all possible error message patterns.
> 
> Let's add the `## Error: ` prefix to the error messages since it's the
> one already in use.
> 
> Suggested-by: Stephen Warren 
> Signed-off-by: Quentin Schulz 
> Reviewed-by: Simon Glass 
> Reviewed-by: Stephen Warren 
> Tested-by: Stephen Warren 
> ---
> 
> added in v5
> 
>  cmd/nvedit.c | 12 
>  env/common.c |  3 ++-
>  2 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/cmd/nvedit.c b/cmd/nvedit.c
> index ddc888a..70d7068 100644
> --- a/cmd/nvedit.c
> +++ b/cmd/nvedit.c
> @@ -959,7 +959,8 @@ NXTARG:   ;
>   H_MATCH_KEY | H_MATCH_IDENT,
>   , size, argc, argv);
>   if (len < 0) {
> - pr_err("Cannot export environment: errno = %d\n", 
> errno);
> + pr_err("## Error: Cannot export environment: errno = 
> %d\n",
> +errno);
>   return 1;
>   }
>   sprintf(buf, "%zX", (size_t)len);
> @@ -979,7 +980,8 @@ NXTARG:   ;
>   H_MATCH_KEY | H_MATCH_IDENT,
>   , ENV_SIZE, argc, argv);
>   if (len < 0) {
> - pr_err("Cannot export environment: errno = %d\n", errno);
> + pr_err("## Error: Cannot export environment: errno = %d\n",
> +errno);
>   return 1;
>   }
>  
> @@ -994,7 +996,8 @@ NXTARG:   ;
>   return 0;
>  
>  sep_err:
> - printf("## %s: only one of \"-b\", \"-c\" or \"-t\" allowed\n", cmd);
> + printf("## Error: %s: only one of \"-b\", \"-c\" or \"-t\" allowed\n",
> +cmd);
>   return 1;
>  }
>  #endif
> @@ -1114,7 +1117,8 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag,
>  
>   if (himport_r(_htab, ptr, size, sep, del ? 0 : H_NOCLEAR,
>   crlf_is_lf, 0, NULL) == 0) {
> - pr_err("Environment import failed: errno = %d\n", errno);
> + pr_err("## Error: Environment import failed: errno = %d\n",
> +errno);
>   return 1;
>   }
>   gd->flags |= GD_FLG_ENV_READY;
> diff --git a/env/common.c b/env/common.c
> index dc8a14f..7bd2790 100644
> --- a/env/common.c
> +++ b/env/common.c
> @@ -83,7 +83,8 @@ void set_default_env(const char *s)
>   if (himport_r(_htab, (char *)default_environment,
>   sizeof(default_environment), '\0', flags, 0,
>   0, NULL) == 0)
> - pr_err("Environment import failed: errno = %d\n", errno);
> + pr_err("## Error: Environment import failed: errno = %d\n",
> +errno);
>  
>   gd->flags |= GD_FLG_ENV_READY;
>   gd->flags |= GD_FLG_ENV_DEFAULT;
> 
> base-commit: 22d58e60ffb5484d912f26b9c3533eff1d3d3de9
> -- 
> git-series 0.9.1


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


[U-Boot] [PATCH v6 5/6] cmd: nvedit: env import can now import only variables passed as parameters

2018-07-09 Thread Quentin Schulz
While the `env export` can take as parameters variables to be exported,
`env import` does not have such a mechanism of variable selection.

Let's add the ability to add parameters at the end of the command for
variables to be imported.

Every env variable from the env to be imported passed by parameter to
this command will override the value of the variable in the current env.

If a variable exists in the current env but not in the imported env, if
this variable is passed as a parameter to env import, the variable will
be unset ONLY if the -d option is passed to env import, otherwise the
current value of the variable is kept.

If a variable exists in the imported env, the variable in the current
env will be set to the value of the one from the imported env.

All the remaining variables are left untouched.

As the size parameter of env import is positional but optional, let's
add the possibility to use the sentinel '-' for when we don't want to
give the size parameter (when the env is '\0' terminated) but we pass a
list of variables at the end of the command.

env import addr
env import addr -
env import addr size
env import addr - foo1 foo2
env import addr size foo1 foo2

are all valid.

env import -c addr
env import -c addr -
env import -c addr - foo1 foo2

are all invalid because they don't pass the size parameter required for
checking, while the following are valid.

env import addr size
env import addr size foo1 foo2

Nothing's changed for the other parameters or the overall behaviour.

One of its use case could be to load a secure environment from the
signed U-Boot binary and load only a handful of variables from an
other, unsecure, environment without completely losing control of
U-Boot.

Signed-off-by: Quentin Schulz 
Tested-by: Alex Kiernan 
Tested-by: Stephen Warren 
---

v6:
  - fix commit log and add comment on -d option to reflect changes introduced by
  patch 4,

v4:
  - add tested-by by Alex,

v3:
  - migrate to env import addr size var... instead of env import -w addr
  size so that the list of variables to load is more explicit and the
  behaviour of env import is closer to the one of env export,

v2:
  - use strdup instead of malloc + strcpy,
  - NULL-check the result of strdup,
  - add common exit path for freeing memory in one unique place,
  - store token pointer from strtok within the char** array instead of
  strdup-ing token within elements of array,

 cmd/nvedit.c | 26 +++---
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index 70d7068..5de9d38 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -1004,8 +1004,11 @@ sep_err:
 
 #ifdef CONFIG_CMD_IMPORTENV
 /*
- * env import [-d] [-t [-r] | -b | -c] addr [size]
- * -d: delete existing environment before importing;
+ * env import [-d] [-t [-r] | -b | -c] addr [size] [var ...]
+ * -d: delete existing environment before importing if no var is
+ * passed; if vars are passed, if one var is in the current
+ * environment but not in the environment at addr, delete var from
+ * current environment;
  * otherwise overwrite / append to existing definitions
  * -t: assume text format; either "size" must be given or the
  * text data must be '\0' terminated
@@ -1018,6 +1021,11 @@ sep_err:
  * addr:   memory address to read from
  * size:   length of input data; if missing, proper '\0'
  * termination is mandatory
+ * if var is set and size should be missing (i.e. '\0'
+ * termination), set size to '-'
+ * var...  List of the names of the only variables that get imported from
+ * the environment at address 'addr'. Without arguments, the whole
+ * environment gets imported.
  */
 static int do_env_import(cmd_tbl_t *cmdtp, int flag,
 int argc, char * const argv[])
@@ -1029,6 +1037,7 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag,
int fmt = 0;
int del = 0;
int crlf_is_lf = 0;
+   int wl = 0;
size_t  size;
 
cmd = *argv;
@@ -1077,9 +1086,9 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag,
addr = simple_strtoul(argv[0], NULL, 16);
ptr = map_sysmem(addr, 0);
 
-   if (argc == 2) {
+   if (argc >= 2 && strcmp(argv[1], "-")) {
size = simple_strtoul(argv[1], NULL, 16);
-   } else if (argc == 1 && chk) {
+   } else if (chk) {
puts("## Error: external checksum format must pass size\n");
return CMD_RET_FAILURE;
} else {
@@ -1101,6 +1110,9 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag,
printf("## Info: input data size = %zu = 0x%zX\n", size, size);
}
 
+   if (argc > 2)
+   wl = 1;
+
if (chk) {
uint32_t crc;
env_t *ep = (env_t *)ptr;
@@ -1115,8 +1127,8 @@ static int 

[U-Boot] [PATCH v6 3/6] test/py: remove hacks for non-zero RAM base address in tests

2018-07-09 Thread Quentin Schulz
Some functions have different behaviour when the given address is 0
(assumed to be NULL by the function).

find_ram_base() does not return 0 anymore so it's safe to remove those
offsets.

Suggested-by: Stephen Warren 
Signed-off-by: Quentin Schulz 
Reviewed-by: Stephen Warren 
Tested-by: Stephen Warren 
---

added in v5

 test/py/tests/test_efi_loader.py | 2 +-
 test/py/tests/test_net.py| 4 ++--
 test/py/tests/test_tpm2.py   | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/py/tests/test_efi_loader.py b/test/py/tests/test_efi_loader.py
index 35bd419..a66c6e6 100644
--- a/test/py/tests/test_efi_loader.py
+++ b/test/py/tests/test_efi_loader.py
@@ -118,7 +118,7 @@ def fetch_tftp_file(u_boot_console, env_conf):
 
 addr = f.get('addr', None)
 if not addr:
-addr = u_boot_utils.find_ram_base(u_boot_console) + (1024 * 1024 * 4)
+addr = u_boot_utils.find_ram_base(u_boot_console)
 
 fn = f['fn']
 output = u_boot_console.run_command('tftpboot %x %s' % (addr, fn))
diff --git a/test/py/tests/test_net.py b/test/py/tests/test_net.py
index f2e432b..2821ce6 100644
--- a/test/py/tests/test_net.py
+++ b/test/py/tests/test_net.py
@@ -146,7 +146,7 @@ def test_net_tftpboot(u_boot_console):
 
 addr = f.get('addr', None)
 if not addr:
-addr = u_boot_utils.find_ram_base(u_boot_console) + (1024 * 1024 * 4)
+addr = u_boot_utils.find_ram_base(u_boot_console)
 
 fn = f['fn']
 output = u_boot_console.run_command('tftpboot %x %s' % (addr, fn))
@@ -186,7 +186,7 @@ def test_net_nfs(u_boot_console):
 
 addr = f.get('addr', None)
 if not addr:
-addr = u_boot_utils.find_ram_base(u_boot_console) + (1024 * 1024 * 4)
+addr = u_boot_utils.find_ram_base(u_boot_console)
 
 fn = f['fn']
 output = u_boot_console.run_command('nfs %x %s' % (addr, fn))
diff --git a/test/py/tests/test_tpm2.py b/test/py/tests/test_tpm2.py
index 01ffb31..ef7b86a 100644
--- a/test/py/tests/test_tpm2.py
+++ b/test/py/tests/test_tpm2.py
@@ -183,7 +183,7 @@ def test_tpm2_pcr_read(u_boot_console):
 """
 
 force_init(u_boot_console)
-ram = u_boot_utils.find_ram_base(u_boot_console) + 1024
+ram = u_boot_utils.find_ram_base(u_boot_console)
 
 read_pcr = u_boot_console.run_command('tpm pcr_read 0 0x%x' % ram)
 output = u_boot_console.run_command('echo $?')
@@ -210,7 +210,7 @@ def test_tpm2_pcr_extend(u_boot_console):
 """
 
 force_init(u_boot_console)
-ram = u_boot_utils.find_ram_base(u_boot_console) + 1024
+ram = u_boot_utils.find_ram_base(u_boot_console)
 
 u_boot_console.run_command('tpm pcr_extend 0 0x%x' % ram)
 output = u_boot_console.run_command('echo $?')
-- 
git-series 0.9.1
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v6 6/6] test/py: add test for whitelist of variables while importing environment

2018-07-09 Thread Quentin Schulz
This tests that the importing of an environment with a specified
whitelist works as intended.

If there are variables passed as parameter to the env import command,
those only should be imported in the current environment.

For each variable passed as parameter, if
 - foo is bar in current env and bar2 in exported env, after importing
 exported env, foo shall be bar2,
 - foo does not exist in current env and foo is bar2 in exported env,
 after importing exported env, foo shall be bar2,
 - foo is bar in current env and does not exist in exported env (but is
 passed as parameter), after importing exported env, foo shall be empty
 ONLY if the -d option is passed to env import, otherwise foo shall be
 bar,

Any variable not passed as parameter should be left untouched.

Two other tests are made to test that size cannot be '-' if the checksum
protection is enabled.

Signed-off-by: Quentin Schulz 
Reviewed-by: Simon Glass 
Reviewed-by: Stephen Warren 
Tested-by: Stephen Warren 
---

v6:
  - fix commit log to reflect changes introduced by patch 4,
  - fix existing test to reflect changes introduced by patch 4,
  - add test to test env import with the -d option,
  - undo what's done in the test at the end of it so we have a clean
  environment,

v5:
  - add reviewed-by by Stephen,

v4:
  - add reviewed-by by Simon,
  - fix double quotes instead of simple ones for strings,
  - fix missing space after # starting a comment,

v3:
  - update whitelist test to reflect changes made in patch 1,
  - add two tests for no size parameter passed but checksum protection is
  enabled because I added the possibility to have a sentinel in place of
  size parameter,
  - I intentionally didn't put the Reviewed and Acked-by of Simon and
  Stephen since the code changed since v2,

added in v2

 test/py/tests/test_env.py | 97 -
 1 file changed, 97 insertions(+)

diff --git a/test/py/tests/test_env.py b/test/py/tests/test_env.py
index bfb5fc0..9bdaef9 100644
--- a/test/py/tests/test_env.py
+++ b/test/py/tests/test_env.py
@@ -5,6 +5,7 @@
 # Test operation of shell commands relating to environment variables.
 
 import pytest
+import u_boot_utils
 
 # FIXME: This might be useful for other tests;
 # perhaps refactor it into ConsoleBase or some other state object?
@@ -239,3 +240,99 @@ def test_env_expansion_spaces(state_test_env):
 unset_var(state_test_env, var_space)
 if var_test:
 unset_var(state_test_env, var_test)
+
+@pytest.mark.buildconfigspec('cmd_importenv')
+def test_env_import_checksum_no_size(state_test_env):
+"""Test that omitted ('-') size parameter with checksum validation fails 
the
+   env import function.
+"""
+c = state_test_env.u_boot_console
+ram_base = u_boot_utils.find_ram_base(state_test_env.u_boot_console)
+addr = '%08x' % ram_base
+
+with c.disable_check('error_notification'):
+response = c.run_command('env import -c %s -' % addr)
+assert(response == '## Error: external checksum format must pass size')
+
+@pytest.mark.buildconfigspec('cmd_importenv')
+def test_env_import_whitelist_checksum_no_size(state_test_env):
+"""Test that omitted ('-') size parameter with checksum validation fails 
the
+   env import function when variables are passed as parameters.
+"""
+c = state_test_env.u_boot_console
+ram_base = u_boot_utils.find_ram_base(state_test_env.u_boot_console)
+addr = '%08x' % ram_base
+
+with c.disable_check('error_notification'):
+response = c.run_command('env import -c %s - foo1 foo2 foo4' % addr)
+assert(response == '## Error: external checksum format must pass size')
+
+@pytest.mark.buildconfigspec('cmd_exportenv')
+@pytest.mark.buildconfigspec('cmd_importenv')
+def test_env_import_whitelist(state_test_env):
+"""Test importing only a handful of env variables from an environment."""
+c = state_test_env.u_boot_console
+ram_base = u_boot_utils.find_ram_base(state_test_env.u_boot_console)
+addr = '%08x' % ram_base
+
+set_var(state_test_env, 'foo1', 'bar1')
+set_var(state_test_env, 'foo2', 'bar2')
+set_var(state_test_env, 'foo3', 'bar3')
+
+c.run_command('env export %s' % addr)
+
+unset_var(state_test_env, 'foo1')
+set_var(state_test_env, 'foo2', 'test2')
+set_var(state_test_env, 'foo4', 'bar4')
+
+# no foo1 in current env, foo2 overridden, foo3 should be of the value
+# before exporting and foo4 should be of the value before importing.
+c.run_command('env import %s - foo1 foo2 foo4' % addr)
+
+validate_set(state_test_env, 'foo1', 'bar1')
+validate_set(state_test_env, 'foo2', 'bar2')
+validate_set(state_test_env, 'foo3', 'bar3')
+validate_set(state_test_env, 'foo4', 'bar4')
+
+# Cleanup test environment
+unset_var(state_test_env, 'foo1')
+unset_var(state_test_env, 'foo2')
+unset_var(state_test_env, 'foo3')
+unset_var(state_test_env, 'foo4')
+

[U-Boot] [PATCH v6 4/6] hashtable: do not recreate whole hash table if vars are passed to himport_r

2018-07-09 Thread Quentin Schulz
When vars are passed to the himport_r function with H_NOCLEAR flag,
those vars will be overridden in the current environment and if one of
those vars is not in the imported environment, it'll be deleted in the
current environment whatever the flag passed to himport_r.

The H_NOCLEAR flag is used to clear the whole environment whether vars
are passed to the function or not.

This leads to incoherent behaviour. If one passes vars to himport_r
with the H_NOCLEAR flag, if a var in vars is not in the imported env,
that var will be removed from the current env.

If one passes vars to himport_r without the H_NOCLEAR flag, the whole
environment will be removed and vars will be imported from the
environment in RAM.

It makes more sense to keep the variable that is in the current
environment but not in the imported environment if the H_NOCLEAR flag is
set and remove only that variable if the H_NOCLEAR flag is not set.

Let's clear the whole environment only if H_NOCLEAR and vars are not
passed to himport_r.

Let's remove variables that are in the current environment but not in
the imported env only if the H_NOCLEAR flag is not passed.

Suggested-by: Wolfgang Denk 
Signed-off-by: Quentin Schulz 
---

added in v6

 lib/hashtable.c | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/lib/hashtable.c b/lib/hashtable.c
index 52aab6d..ffaa5b6 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -749,8 +749,11 @@ static int drop_var_from_set(const char *name, int nvars, 
char * vars[])
  *
  * The "flag" argument can be used to control the behaviour: when the
  * H_NOCLEAR bit is set, then an existing hash table will kept, i. e.
- * new data will be added to an existing hash table; otherwise, old
- * data will be discarded and a new hash table will be created.
+ * new data will be added to an existing hash table; otherwise, if no
+ * vars are passed, old data will be discarded and a new hash table
+ * will be created. If vars are passed, passed vars that are not in
+ * the linear list of "name=value" pairs will be removed from the
+ * current hash table.
  *
  * The separator character for the "name=value" pairs can be selected,
  * so we both support importing from externally stored environment
@@ -801,7 +804,7 @@ int himport_r(struct hsearch_data *htab,
if (nvars)
memcpy(localvars, vars, sizeof(vars[0]) * nvars);
 
-   if ((flag & H_NOCLEAR) == 0) {
+   if ((flag & H_NOCLEAR) == 0 && !nvars) {
/* Destroy old hash table if one exists */
debug("Destroy Hash Table: %p table = %p\n", htab,
   htab->table);
@@ -933,6 +936,9 @@ int himport_r(struct hsearch_data *htab,
debug("INSERT: free(data = %p)\n", data);
free(data);
 
+   if (flag & H_NOCLEAR)
+   goto end;
+
/* process variables which were not considered */
for (i = 0; i < nvars; i++) {
if (localvars[i] == NULL)
@@ -951,6 +957,7 @@ int himport_r(struct hsearch_data *htab,
printf("WARNING: '%s' not in imported env, deleting 
it!\n", localvars[i]);
}
 
+end:
debug("INSERT: done\n");
return 1;   /* everything OK */
 }
-- 
git-series 0.9.1
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v6 2/6] test/py: return a RAM address different from 0 as it can be interpreted as NULL

2018-07-09 Thread Quentin Schulz
Some functions test that the given address is not NULL (0) and fail or
have a different behaviour if that's the case (e.g. hexport_r).

Let's make the RAM base address to be not zero by setting it to 2MiB if
that's the case.

2MiB is chosen because it represents the size of an ARM LPAE/v8 section.

Suggested-by: Stephen Warren 
Signed-off-by: Quentin Schulz 
Reviewed-by: Simon Glass 
Reviewed-by: Stephen Warren 
Tested-by: Stephen Warren 
---

added in v5

 test/py/u_boot_utils.py | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/test/py/u_boot_utils.py b/test/py/u_boot_utils.py
index bb31e57..07520ac 100644
--- a/test/py/u_boot_utils.py
+++ b/test/py/u_boot_utils.py
@@ -236,6 +236,12 @@ def find_ram_base(u_boot_console):
 ram_base = -1
 raise Exception('Failed to find RAM bank start in `bdinfo`')
 
+# We don't want ram_base to be zero as some functions test if the given
+# address is NULL (0). Let's add 2MiB then (size of an ARM LPAE/v8 
section).
+
+if ram_base == 0:
+ram_base += 1024 * 1024 * 2
+
 return ram_base
 
 class PersistentFileHelperCtxMgr(object):
-- 
git-series 0.9.1
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v6 1/6] env: add the same prefix to error messages to make it detectable by tests

2018-07-09 Thread Quentin Schulz
The error message should start with `## Error: ` so that it's easily
detectable by tests without needing to have a complex regexp for
matching all possible error message patterns.

Let's add the `## Error: ` prefix to the error messages since it's the
one already in use.

Suggested-by: Stephen Warren 
Signed-off-by: Quentin Schulz 
Reviewed-by: Simon Glass 
Reviewed-by: Stephen Warren 
Tested-by: Stephen Warren 
---

added in v5

 cmd/nvedit.c | 12 
 env/common.c |  3 ++-
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index ddc888a..70d7068 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -959,7 +959,8 @@ NXTARG: ;
H_MATCH_KEY | H_MATCH_IDENT,
, size, argc, argv);
if (len < 0) {
-   pr_err("Cannot export environment: errno = %d\n", 
errno);
+   pr_err("## Error: Cannot export environment: errno = 
%d\n",
+  errno);
return 1;
}
sprintf(buf, "%zX", (size_t)len);
@@ -979,7 +980,8 @@ NXTARG: ;
H_MATCH_KEY | H_MATCH_IDENT,
, ENV_SIZE, argc, argv);
if (len < 0) {
-   pr_err("Cannot export environment: errno = %d\n", errno);
+   pr_err("## Error: Cannot export environment: errno = %d\n",
+  errno);
return 1;
}
 
@@ -994,7 +996,8 @@ NXTARG: ;
return 0;
 
 sep_err:
-   printf("## %s: only one of \"-b\", \"-c\" or \"-t\" allowed\n", cmd);
+   printf("## Error: %s: only one of \"-b\", \"-c\" or \"-t\" allowed\n",
+  cmd);
return 1;
 }
 #endif
@@ -1114,7 +1117,8 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag,
 
if (himport_r(_htab, ptr, size, sep, del ? 0 : H_NOCLEAR,
crlf_is_lf, 0, NULL) == 0) {
-   pr_err("Environment import failed: errno = %d\n", errno);
+   pr_err("## Error: Environment import failed: errno = %d\n",
+  errno);
return 1;
}
gd->flags |= GD_FLG_ENV_READY;
diff --git a/env/common.c b/env/common.c
index dc8a14f..7bd2790 100644
--- a/env/common.c
+++ b/env/common.c
@@ -83,7 +83,8 @@ void set_default_env(const char *s)
if (himport_r(_htab, (char *)default_environment,
sizeof(default_environment), '\0', flags, 0,
0, NULL) == 0)
-   pr_err("Environment import failed: errno = %d\n", errno);
+   pr_err("## Error: Environment import failed: errno = %d\n",
+  errno);
 
gd->flags |= GD_FLG_ENV_READY;
gd->flags |= GD_FLG_ENV_DEFAULT;

base-commit: 22d58e60ffb5484d912f26b9c3533eff1d3d3de9
-- 
git-series 0.9.1
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 7/7] cmd: Add bind/unbind commands to bind a device to a driver from the command line

2018-07-09 Thread Joe Hershberger
On Mon, Jul 9, 2018 at 9:43 AM, Tom Rini  wrote:
> On Mon, Jul 09, 2018 at 08:19:44AM +0200, Michal Simek wrote:
>> On 30.6.2018 06:19, Simon Glass wrote:
>> > On 27 June 2018 at 07:13, Michal Simek  wrote:
>> >> On 22.6.2018 14:25, Jean-Jacques Hiblot wrote:
>> >>> In some cases it can be useful to be able to bind a device to a driver 
>> >>> from
>> >>> the command line.
>> >>> The obvious example is for versatile devices such as USB gadget.
>> >>> Another use case is when the devices are not yet ready at startup and
>> >>> require some setup before the drivers are bound (ex: FPGA which bitsream 
>> >>> is
>> >>> fetched from a mass storage or ethernet)
>> >>>
>> >>> usage example:
>> >>>
>> >>> bind usb_dev_generic 0 usb_ether
>> >>> unbind usb_dev_generic 0 usb_ether
>> >>> or
>> >>> unbind eth 1
>> >>>
>> >>> bind /ocp/omap_dwc3@4838/usb@4839 usb_ether
>> >>> unbind /ocp/omap_dwc3@4838/usb@4839
>> >>>
>> >>> Signed-off-by: Jean-Jacques Hiblot 
>> >>>
>> >>> ---
>> >>>
>> >>> Changes in v3:
>> >>> - factorize code based on comments from ML
>> >>> - remove the devices before unbinding them
>> >>> - use device_find_global_by_ofnode() to get a device by its node.
>> >>> - Added tests
>> >>>
>> >>> Changes in v2:
>> >>> - Make the bind/unbind command generic, not specific to usb device.
>> >>> - Update the API to be able to bind/unbind based on DTS node path
>> >>> - Add a Kconfig option to select the bind/unbind commands
>> >>>
>> >>>  arch/sandbox/dts/test.dts  |  11 ++
>> >>>  cmd/Kconfig|   9 ++
>> >>>  cmd/Makefile   |   1 +
>> >>>  cmd/bind.c | 255 
>> >>> +
>> >>>  configs/sandbox_defconfig  |   1 +
>> >>>  test/py/tests/test_bind.py | 178 +++
>> >>>  6 files changed, 455 insertions(+)
>> >>>  create mode 100644 cmd/bind.c
>> >>>  create mode 100644 test/py/tests/test_bind.py
>> >
>> > Reviewed-by: Simon Glass 
>> >
>> > Nice work
>> >
>> > [...]
>> >
>> >>
>> >> I have tested bind/unbind with dwc3 on zynqmp for ethernet gadget and it
>> >> is working fine for me.
>> >> I have also tried to use bind/unbind for gpio zynqmp driver and it is
>> >> also working fine.
>> >>
>> >> It means
>> >> Tested-by: Michal Simek 
>> >>
>> >> I would prefer if these commands are called as dm bind and dm unbind
>> >> instead of simply bind/unbind which should also fit to dm command
>> >> description "dm - Driver model low level access".
>> >
>> > Yes i can see the point. But after thinking about it, maybe it is best
>> > as it is? After all driver model is fundamental to U-Boot and it's not
>> > clear what else we might bind/unbind.
>> >
>> > I'd like to get other opinions here, too.
>>
>> Tom/Marek: Any opinion?
>
> I think dm bind/unbind makes sense, yes.  "bind" and "unbind" are pretty
> generic terms and making it clear it's part of working "inside" of DM to
> hook/unhook things by making it a sub-command of dm sounds good.
> Thanks!

I agree with Simon here. I think bind and unbind won't have any
plausible other meaning in U-Boot and DM is core to U-Boot
functionality in the new world. I think it would be OK to have "dm
bind" alias to "bind" if that's a point of confusion, but having it
top-level seems good to me.

-Joe

> --
> Tom
>
> ___
> 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] [PATCH v2 1/1] net: Store waiting packet in a different buffer when making ARP requests

2018-07-09 Thread Joe Hershberger
On Wed, Jul 4, 2018 at 9:13 PM, Tran Tien Dat
 wrote:
> U-Boot has 1 common buffer to send Ethernet frames, pointed to by
> net_tx_packet.  When sending to an IP address without knowing the MAC
> address, U-Boot makes an ARP request (using the arp_tx_packet buffer) to
> find out the MAC address of the IP addressr. When a matching ARP reply is
> received, U-Boot continues sending the frame stored in the net_tx_packet
> buffer.
>
> However, in the mean time, if U-Boot needs to send out any network packets
> (e.g. replying ping packets or ARP requests for its own IP address etc.),
> it will use the net_tx_packet buffer to prepare the new packet. Thus this
> buffer is no longer the original packet meant to be transmitted after the
> ARP reply. The original packet will be lost.
>
> U-Boot has another buffer, pointed to by arp_tx_packet which is used to
> prepare ARP requests. ARP requests use this buffer instead of the normal
> net_tx_packet in order to avoid modifying the waiting packet to be sent.
> However, this approach does not prevent other parts of the codes from
> modifying the waiting packet to be sent, as explained above. This patch
> repurposes the arp_tx_packet buffer to be used to store the waiting packet
> to be sent, and use the normal net_tx_packet buffer to send ARP request
> instead.
>
> Signed-off-by: Tran Tien Dat 

Seems good, thanks!

Acked-by: Joe Hershberger 

> ---
>
> Changes in v2:
> - Provide more detailed description
>
>  net/arp.c | 18 ++
>  net/arp.h |  1 +
>  net/net.c |  3 +++
>  3 files changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/net/arp.c b/net/arp.c
> index b8a71684cd..f5e2c0b0cf 100644
> --- a/net/arp.c
> +++ b/net/arp.c
> @@ -35,8 +35,8 @@ int   arp_wait_tx_packet_size;
>  ulong  arp_wait_timer_start;
>  intarp_wait_try;
>
> -static uchar   *arp_tx_packet; /* THE ARP transmit packet */
> -static uchar   arp_tx_packet_buf[PKTSIZE_ALIGN + PKTALIGN];
> +uchar   *arp_wait_tx_packet;   /* THE waiting transmit packet after ARP */
> +static uchar   arp_wait_tx_packet_buf[PKTSIZE_ALIGN + PKTALIGN];
>
>  void arp_init(void)
>  {
> @@ -45,8 +45,8 @@ void arp_init(void)
> net_arp_wait_packet_ip.s_addr = 0;
> net_arp_wait_reply_ip.s_addr = 0;
> arp_wait_tx_packet_size = 0;
> -   arp_tx_packet = _tx_packet_buf[0] + (PKTALIGN - 1);
> -   arp_tx_packet -= (ulong)arp_tx_packet % PKTALIGN;
> +   arp_wait_tx_packet = _wait_tx_packet_buf[0] + (PKTALIGN - 1);
> +   arp_wait_tx_packet -= (ulong)arp_wait_tx_packet % PKTALIGN;
>  }
>
>  void arp_raw_request(struct in_addr source_ip, const uchar *target_ethaddr,
> @@ -58,7 +58,7 @@ void arp_raw_request(struct in_addr source_ip, const uchar 
> *target_ethaddr,
>
> debug_cond(DEBUG_DEV_PKT, "ARP broadcast %d\n", arp_wait_try);
>
> -   pkt = arp_tx_packet;
> +   pkt = net_tx_packet;
>
> eth_hdr_size = net_set_ether(pkt, net_bcast_ethaddr, PROT_ARP);
> pkt += eth_hdr_size;
> @@ -76,7 +76,7 @@ void arp_raw_request(struct in_addr source_ip, const uchar 
> *target_ethaddr,
> memcpy(>ar_tha, target_ethaddr, ARP_HLEN); /* target ET addr */
> net_write_ip(>ar_tpa, target_ip);  /* target IP addr */
>
> -   net_send_packet(arp_tx_packet, eth_hdr_size + ARP_HDR_SIZE);
> +   net_send_packet(net_tx_packet, eth_hdr_size + ARP_HDR_SIZE);
>  }
>
>  void arp_request(void)
> @@ -217,9 +217,11 @@ void arp_receive(struct ethernet_hdr *et, struct 
> ip_udp_hdr *ip, int len)
>
> /* set the mac address in the waiting packet's header
>and transmit it */
> -   memcpy(((struct ethernet_hdr 
> *)net_tx_packet)->et_dest,
> +   memcpy(((struct ethernet_hdr *)arp_wait_tx_packet)
> +   ->et_dest,
>>ar_sha, ARP_HLEN);
> -   net_send_packet(net_tx_packet, 
> arp_wait_tx_packet_size);
> +   net_send_packet(arp_wait_tx_packet,
> +   arp_wait_tx_packet_size);
>
> /* no arp request pending now */
> net_arp_wait_packet_ip.s_addr = 0;
> diff --git a/net/arp.h b/net/arp.h
> index afb86958f3..65d73927a7 100644
> --- a/net/arp.h
> +++ b/net/arp.h
> @@ -20,6 +20,7 @@ extern uchar *arp_wait_packet_ethaddr;
>  extern int arp_wait_tx_packet_size;
>  extern ulong arp_wait_timer_start;
>  extern int arp_wait_try;
> +extern uchar *arp_wait_tx_packet;
>
>  void arp_init(void);
>  void arp_request(void);
> diff --git a/net/net.c b/net/net.c
> index f35695b4fc..6325ad3e1a 100644
> --- a/net/net.c
> +++ b/net/net.c
> @@ -836,6 +836,9 @@ int net_send_udp_packet(uchar *ether, struct in_addr 
> dest, int dport, int sport,
>
> /* size of the waiting packet */
> arp_wait_tx_packet_size = pkt_hdr_size + payload_len;
> +   /* 

Re: [U-Boot] [PATCH 1/1] avb2.0: add get_size_of_partition()

2018-07-09 Thread Igor Opaniuk
Hi Eugeniu,

Thanks for reporting this issue,
LIBAVB should depend on CONFIG_FASTBOOT, as fastboot buffer is re-used
(which initially
is used in the fastboot protocol for downloads) for
mmc read/write AvbOps (and buffer size is configured by setting
CONFIG_FASTBOOT_BUF_ADDR
and CONFIG_FASTBOOT_BUF_SIZE)

The problem is that both CONFIG_FASTBOOT_BUF_ADDR and CONFIG_FASTBOOT_BUF_SIZE
are defined for most platforms, and this is how I missed this issue.

Will fix today and re-test,
Thanks

On 9 July 2018 at 18:33, Eugeniu Rosca  wrote:
> On Mon, Jul 09, 2018 at 03:15:54PM +0300, Igor Opaniuk wrote:
>> Implement get_size_of_partition() operation,
>> which is required by the latest upstream libavb [1].
>>
>> [1] https://android.googlesource.com/platform/external/avb/+/master/README.md
>>
>> Signed-off-by: Igor Opaniuk 
>> ---
>>  common/avb_verify.c | 33 -
>>  1 file changed, 32 insertions(+), 1 deletion(-)
>
>
> Hi Igor,
>
> Is there a way to play with and smoke-test libavb on sandbox?
> FWIW currently, independently on this patch, menuconfig interface allows me
> to select CONFIG_LIBAVB, but then U-Boot compilation fails as below:
>
> $ make defconfig
> $ make menuconfig => select LIBAVB=y
> $ make
>
> ---8<---
> In file included from common/avb_verify.c:7:0:
> include/avb_verify.h: In function ‘get_sector_buf_size’:
> include/avb_verify.h:70:17: error: ‘CONFIG_FASTBOOT_BUF_SIZE’ undeclared 
> (first use in this function); did you mean ‘CONFIG_PRE_CON_BUF_SZ’?
>   return (size_t)CONFIG_FASTBOOT_BUF_SIZE;
>  ^~~~
>  CONFIG_PRE_CON_BUF_SZ
> include/avb_verify.h:70:17: note: each undeclared identifier is reported only 
> once for each function it appears in
> include/avb_verify.h: In function ‘get_sector_buf’:
> include/avb_verify.h:75:17: error: ‘CONFIG_FASTBOOT_BUF_ADDR’ undeclared 
> (first use in this function); did you mean ‘CONFIG_PRE_CON_BUF_ADDR’?
>   return (void *)CONFIG_FASTBOOT_BUF_ADDR;
>  ^~~~
>  CONFIG_PRE_CON_BUF_ADDR
>   CC  env/attr.o
> ---8<---
>
> If there were an easy way to smoke-test libavb on sandbox, I think
> people like me would be more motivated to provide their Tested-by
> in addition to their review (just my feeling).
>
> Best regards,
> Eugeniu.



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


  1   2   >