Re: [U-Boot] [PATCH] sunxi: move CONFIG_SATAPWR to Kconfig option

2016-12-08 Thread Maxime Ripard
On Mon, Dec 05, 2016 at 09:43:45PM +0100, Jelle van der Waa wrote:
> On 11/29/16 at 05:25pm, Tom Rini wrote:
> > On Tue, Nov 29, 2016 at 10:17:42PM +0100, Maxime Ripard wrote:
> > > Hi Tom,
> > > 
> > > On Tue, Nov 29, 2016 at 04:11:38PM -0500, Tom Rini wrote:
> > > > On Tue, Nov 29, 2016 at 09:39:32PM +0100, Maxime Ripard wrote:
> > > > > On Mon, Nov 28, 2016 at 02:20:10PM +0100, Hans de Goede wrote:
> > > > > > HI,
> > > > > > 
> > > > > > On 28-11-16 13:42, Maxime Ripard wrote:
> > > > > > > Hi Hans,
> > > > > > > 
> > > > > > > On Fri, Nov 25, 2016 at 09:12:30AM +0100, Hans de Goede wrote:
> > > > > > > > Hi,
> > > > > > > > 
> > > > > > > > On 24-11-16 22:22, Maxime Ripard wrote:
> > > > > > > > > On Wed, Nov 23, 2016 at 07:28:16PM +0100, Jelle van der Waa 
> > > > > > > > > wrote:
> > > > > > > > > > Introduce a new CONFIG_SATAPWR Kconfig option to replace the
> > > > > > > > > > option in CONFIG_SYS_EXTRA_OPTIONS.
> > > > > > > > > > 
> > > > > > > > > > Signed-off-by: Jelle van der Waa 
> > > > > > > > > > ---
> > > > > > > > > >  board/sunxi/Kconfig|  7 +++
> > > > > > > > > >  board/sunxi/board.c| 11 ++-
> > > > > > > > > >  configs/A10-OLinuXino-Lime_defconfig   |  3 ++-
> > > > > > > > > >  configs/A20-OLinuXino-Lime2_defconfig  |  3 ++-
> > > > > > > > > >  configs/A20-OLinuXino-Lime_defconfig   |  3 ++-
> > > > > > > > > >  configs/A20-OLinuXino_MICRO_defconfig  |  3 ++-
> > > > > > > > > >  configs/A20-Olimex-SOM-EVB_defconfig   |  3 ++-
> > > > > > > > > >  configs/Cubieboard2_defconfig  |  3 ++-
> > > > > > > > > >  configs/Cubieboard_defconfig   |  3 ++-
> > > > > > > > > >  configs/Cubietruck_defconfig   |  3 ++-
> > > > > > > > > >  configs/Itead_Ibox_A20_defconfig   |  3 ++-
> > > > > > > > > >  configs/Lamobo_R1_defconfig|  3 ++-
> > > > > > > > > >  configs/Linksprite_pcDuino3_Nano_defconfig |  3 ++-
> > > > > > > > > >  configs/Linksprite_pcDuino3_defconfig  |  3 ++-
> > > > > > > > > >  configs/Sinovoip_BPI_M3_defconfig  |  2 +-
> > > > > > > > > >  configs/orangepi_plus_defconfig|  3 ++-
> > > > > > > > > >  16 files changed, 40 insertions(+), 19 deletions(-)
> > > > > > > > > > 
> > > > > > > > > > diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
> > > > > > > > > > index ae2fba1..fe2f7b4 100644
> > > > > > > > > > --- a/board/sunxi/Kconfig
> > > > > > > > > > +++ b/board/sunxi/Kconfig
> > > > > > > > > > @@ -667,6 +667,13 @@ config GMAC_TX_DELAY
> > > > > > > > > > ---help---
> > > > > > > > > > Set the GMAC Transmit Clock Delay Chain value.
> > > > > > > > > > 
> > > > > > > > > > +config SATAPWR
> > > > > > > > > > +   string "power pin for SATA"
> > > > > > > > > > +   default ""
> > > > > > > > > > +   ---help---
> > > > > > > > > > +   Set the power pin for SATA. This takes a string in the 
> > > > > > > > > > format
> > > > > > > > > > +   understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of 
> > > > > > > > > > port H.
> > > > > > > > > > +
> > > > > > > > > 
> > > > > > > > > This looks like a rather generic option. Can't this be in
> > > > > > > > > drivers/block instead?
> > > > > > > > 
> > > > > > > > The proper solution would be to get the info from devicetree,
> > > > > > > > which requires regulator support, which we don't have yet
> > > > > > > > for sunxi. In the mean time getting rid of the need for
> > > > > > > > CONFIG_SYS_EXTRA_OPTIONS is a worthwhile goal in itself
> > > > > > > > IMHO.
> > > > > > > 
> > > > > > > Yes, but a GPIO to enable the SATA 5V rail seems like a rather 
> > > > > > > common
> > > > > > > thing, and definitely not Allwinner specific.
> > > > > > > 
> > > > > > > Moving that option to drivers/block would make more sense I guess.
> > > > > > 
> > > > > > Hmm, but in the end this should be removed, as everything should'
> > > > > > be using devicetree, so I'm not convinced it is a good idea
> > > > > > to introduce a generic option for this.
> > > > > > 
> > > > > > Anyways either way is fine with me.
> > > > > 
> > > > > I don't know, in the end, not all platforms will be converted to
> > > > > device tree, so it still might be something worth adding.
> > > > 
> > > > We also don't want to get hung up on fixing sub-optional solutions while
> > > > also converting to Kconfig.  We can move the option now and see about
> > > > re-naming or getting the information elsewhere afterwards.  Thanks!
> > > 
> > > I'm not sure I got what you wanted. Do you want it to be merged in
> > > drivers/block as a generic option, or in board/sunxi as a
> > > platform-specific one?
> > 
> > I'm fine with either place.  Today it's used just on sunxi as a config
> > option with that name, so board/sunxi/Kconfig and make a note to
> > investigate how all of the other platforms that have this issue handle
> > it.  For example, my gut (based on some other imx6 stuff 

Re: [U-Boot] [PATCH 12/14] fdt: eth_fixup: Add hook for board to override MAC

2016-12-08 Thread Olliver Schinagl
Hey simon

On December 8, 2016 11:21:32 PM CET, Simon Glass  wrote:
>Hi Oliver,
>
>On 7 December 2016 at 02:26, Olliver Schinagl 
>wrote:
>>
>>
>> On December 7, 2016 4:47:23 AM CET, Simon Glass 
>wrote:
>>>Hi Oliver,
>>>
>>>On 5 December 2016 at 03:28, Olliver Schinagl 
>>>wrote:
 Hey Simon,



 On 05-12-16 07:24, Simon Glass wrote:
>
> Hi Oliver,
>
> On 2 December 2016 at 03:16, Olliver Schinagl 
>>>wrote:
>>
>> Hey Joe,
>>
>>
>>
>> On 30-11-16 21:40, Joe Hershberger wrote:
>>>
>>> On Fri, Nov 25, 2016 at 9:30 AM, Olliver Schinagl
>>>
>>> wrote:

 This patch adds a method for the board to set the MAC address
>if
>>>the
 environment is not yet set. The environment based MAC addresses
>>>are not
 touched, but if the fdt has an alias set, it is parsed and put
>>>into the
 environment.

 E.g. The environment contains ethaddr and eth1addr, and the fdt
 contains
 an ethernet1 nothing happens. If the fdt contains ethernet2
>>>however, it
 is parsed and inserted into the environment as eth2addr.

 Signed-off-by: Olliver Schinagl 
 ---
common/fdt_support.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)

 diff --git a/common/fdt_support.c b/common/fdt_support.c
 index c34a13c..f127392 100644
 --- a/common/fdt_support.c
 +++ b/common/fdt_support.c
 @@ -465,6 +465,11 @@ int fdt_fixup_memory(void *blob, u64
>start,
>>>u64
 size)
   return fdt_fixup_memory_banks(blob, , ,
>1);
}

 +__weak int board_get_enetaddr(const int i, unsigned char
>>>*mac_addr)
>>>
>>> Ugh. This collides with a function in board/v38b/ethaddr.c and
>in
>>> board/intercontrol/digsy_mtc/digsy_mtc.c
>>>
>>> Also, it's so generic, and only gets called by the fdt fixup
>>>stuff...
>>> This function should probably be named in such a way that its
>>> association with fdt is clear.
>>
>> I did not notice that, sorry! But naming suggestions are welcome
>:)
>>
>> Right now, I use it in two unrelated spots however.
>>
>> from the fdt as seen above and in a subclass driver (which will
>>>come up
>> for
>> review) as suggested by Simon.
>>
>> There I do:
>>
>> +static int sunxi_gmac_eth_read_rom_hwaddr(struct udevice *dev)
>> +{
>> +   struct eth_pdata *pdata = dev_get_platdata(dev);
>> +
>> +   return board_get_enetaddr(dev->seq, pdata->enetaddr);
>> +}
>> +
>>   const struct eth_ops sunxi_gmac_eth_ops = {
>>  .start  = designware_eth_start,
>>  .send   = designware_eth_send,
>> @@ -102,6 +110,7 @@ const struct eth_ops sunxi_gmac_eth_ops = {
>>  .free_pkt   = designware_eth_free_pkt,
>>  .stop   = designware_eth_stop,
>>  .write_hwaddr   = designware_eth_write_hwaddr,
>> +   .read_rom_hwaddr= sunxi_gmac_eth_read_rom_hwaddr,
>>   };
>>
>> which is completly unrelated to the fdt.
>>
>> So naming suggestion or overal suggestion how to handle this nice
>>>and
>> generically?
>>
>> Based from the name however I would think that all
>>>board_get_enetaddr's
>> work
>> the same however so should have been interchangeable? Or was that
>>>silly
>> thinking?
>
> Would it be possible to use a name without 'board' in it? I think
>>>this
> / hope is actually sunxi-specific code, not board-specific?

 You are actually correct, we take the serial number of the SoC
>(sunxi
 specific) and generate a serial/MAC from it. So nothing to do with
>>>the
 board. So I can just name it sunxi_gen_enetaddr(). Would that be
>then
>>>(much)
 better?

 The reason why I went to 'board' with my mind, is because a) the
>>>original
 mac gen code and b) the location was in board/sunxi/board.c. I
>think
>>>it is
 thus also sensible to move it out of board/sunxi/board.c as indeed,
>>>it has
 nothing to do with board(s).
>>>
>>>That sounds good to me - and you should be able to call it directly
>>>from the driver and avoid any weak functions, right?
>> The subclass driver can, the fdt fixup however still needs a weak
>fdt_get_enetaddr()? (Which in our case calls then sunxi_get_enetaddr()
>i think.)
>
>OK - I feel that the fdt fixups need a bit of thought. At the moment
>it is all pretty ad-hoc.

Yeah i think i agree, but i guess thats a separate cleanup step generally, no?

>
>Regards,
>Simon

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

[U-Boot] [PATCH] mmc: sdhci-cadence: add Cadence SD4HC support

2016-12-08 Thread Masahiro Yamada
Add a driver for the Cadence SD4HC SD/SDIO/eMMC Controller.

Signed-off-by: Masahiro Yamada 
---

 - This is a counterpart of the Linux driver,
   which has been merged in the MMC subsystem:
   (commit ff6af28fa in linux-next)
   The DT binding for this driver should be referred
   in the kernel tree.

 - This will be applied cleanly after my SDHCI Kconfig moves:
   http://patchwork.ozlabs.org/patch/703578/
   Until then, please review.


 drivers/mmc/Kconfig |  13 +
 drivers/mmc/Makefile|   1 +
 drivers/mmc/sdhci-cadence.c | 125 
 3 files changed, 139 insertions(+)
 create mode 100644 drivers/mmc/sdhci-cadence.c

diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index 12df3cf..9ca2f98 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -159,6 +159,19 @@ config MMC_SDHCI_BCM2835
 
  If unsure, say N.
 
+config MMC_SDHCI_CADENCE
+   bool "SDHCI support for the Cadence SD/SDIO/eMMC controller"
+   depends on MMC_SDHCI
+   depends on DM_MMC_OPS
+   depends on BLK
+   depends on OF_CONTROL
+   help
+ This selects the Cadence SD/SDIO/eMMC driver.
+
+ If you have a controller with this interface, say Y or M here.
+
+ If unsure, say N.
+
 config MMC_SDHCI_KONA
bool "SDHCI support on Broadcom KONA platform"
depends on MMC_SDHCI
diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
index 2b136ea..a543188 100644
--- a/drivers/mmc/Makefile
+++ b/drivers/mmc/Makefile
@@ -64,6 +64,7 @@ obj-$(CONFIG_MSM_SDHCI) += msm_sdhci.o
 # SDHCI
 obj-$(CONFIG_MMC_SDHCI)+= sdhci.o
 obj-$(CONFIG_MMC_SDHCI_BCM2835)+= bcm2835_sdhci.o
+obj-$(CONFIG_MMC_SDHCI_CADENCE)+= sdhci-cadence.o
 obj-$(CONFIG_MMC_SDHCI_KONA)   += kona_sdhci.o
 obj-$(CONFIG_MMC_SDHCI_MV) += mv_sdhci.o
 obj-$(CONFIG_MMC_SDHCI_S5P)+= s5p_sdhci.o
diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c
new file mode 100644
index 000..1a59a5d
--- /dev/null
+++ b/drivers/mmc/sdhci-cadence.c
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2016 Socionext Inc.
+ *   Author: Masahiro Yamada 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/* HRS - Host Register Set (specific to Cadence) */
+#define SDHCI_CDNS_HRS04   0x10/* PHY access port */
+#define   SDHCI_CDNS_HRS04_ACK BIT(26)
+#define   SDHCI_CDNS_HRS04_RD  BIT(25)
+#define   SDHCI_CDNS_HRS04_WR  BIT(24)
+#define   SDHCI_CDNS_HRS04_RDATA_SHIFT 12
+#define   SDHCI_CDNS_HRS04_WDATA_SHIFT 8
+#define   SDHCI_CDNS_HRS04_ADDR_SHIFT  0
+
+/* SRS - Slot Register Set (SDHCI-compatible) */
+#define SDHCI_CDNS_SRS_BASE0x200
+
+/* PHY */
+#define SDHCI_CDNS_PHY_DLY_SD_HS   0x00
+#define SDHCI_CDNS_PHY_DLY_SD_DEFAULT  0x01
+#define SDHCI_CDNS_PHY_DLY_UHS_SDR12   0x02
+#define SDHCI_CDNS_PHY_DLY_UHS_SDR25   0x03
+#define SDHCI_CDNS_PHY_DLY_UHS_SDR50   0x04
+#define SDHCI_CDNS_PHY_DLY_UHS_DDR50   0x05
+#define SDHCI_CDNS_PHY_DLY_EMMC_LEGACY 0x06
+#define SDHCI_CDNS_PHY_DLY_EMMC_SDR0x07
+#define SDHCI_CDNS_PHY_DLY_EMMC_DDR0x08
+
+struct sdhci_cdns_plat {
+   struct mmc_config cfg;
+   struct mmc mmc;
+   void __iomem *hrs_addr;
+};
+
+static void sdhci_cdns_write_phy_reg(struct sdhci_cdns_plat *plat,
+u8 addr, u8 data)
+{
+   void __iomem *reg = plat->hrs_addr + SDHCI_CDNS_HRS04;
+   u32 tmp;
+
+   tmp = (data << SDHCI_CDNS_HRS04_WDATA_SHIFT) |
+ (addr << SDHCI_CDNS_HRS04_ADDR_SHIFT);
+   writel(tmp, reg);
+
+   tmp |= SDHCI_CDNS_HRS04_WR;
+   writel(tmp, reg);
+
+   tmp &= ~SDHCI_CDNS_HRS04_WR;
+   writel(tmp, reg);
+}
+
+static void sdhci_cdns_phy_init(struct sdhci_cdns_plat *plat)
+{
+   sdhci_cdns_write_phy_reg(plat, SDHCI_CDNS_PHY_DLY_SD_HS, 4);
+   sdhci_cdns_write_phy_reg(plat, SDHCI_CDNS_PHY_DLY_SD_DEFAULT, 4);
+   sdhci_cdns_write_phy_reg(plat, SDHCI_CDNS_PHY_DLY_EMMC_LEGACY, 9);
+   sdhci_cdns_write_phy_reg(plat, SDHCI_CDNS_PHY_DLY_EMMC_SDR, 2);
+   sdhci_cdns_write_phy_reg(plat, SDHCI_CDNS_PHY_DLY_EMMC_DDR, 3);
+}
+
+static int sdhci_cdns_bind(struct udevice *dev)
+{
+   struct sdhci_cdns_plat *plat = dev_get_platdata(dev);
+
+   return sdhci_bind(dev, >mmc, >cfg);
+}
+
+static int sdhci_cdns_probe(struct udevice *dev)
+{
+   struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
+   struct sdhci_cdns_plat *plat = dev_get_platdata(dev);
+   struct sdhci_host *host = dev_get_priv(dev);
+   fdt_addr_t base;
+   int ret;
+
+   base = dev_get_addr(dev);
+   if (base == FDT_ADDR_T_NONE)
+   return -EINVAL;
+
+   plat->hrs_addr = devm_ioremap(dev, base, SZ_1K);
+ 

[U-Boot] [PATCH 1/2] common: miiphyutil: Add helper function for mdio bus name

2016-12-08 Thread Michal Simek
The most of ethernet drivers are using this mdio registration sequence.
strcpy(priv->bus->name, "emac");
mdio_register(priv->bus);
Where driver can be used only with one MDIO bus because only unique
name should be used.

Other drivers are using unique device name for MDIO registration to
support multiple instances.
snprintf(priv->bus->name, sizeof(bus->name), "%s", name);

With DM dev->seq is used more even in logs
(like random MAC address generation:
printf("\nWarning: %s (eth%d) using random MAC address - %pM\n",
   dev->name, dev->seq, pdata->enetaddr);
)
where eth%d prefix is used.

Simplify driver code to register mdio device with dev->seq number
to simplify mdio registration and reduce code duplication across
all drivers. With DM_SEQ_ALIAS enabled dev->seq reflects alias setting.

Signed-off-by: Michal Simek 
---

For example:

Board: Xilinx Zynq
Net:   ZYNQ GEM: e000b000, phyaddr 7, interface rgmii-id

Warning: ethernet@e000b000 (eth0) using random MAC address -
7a:fc:90:53:6a:41
eth0: ethernet@e000b000ZYNQ GEM: e000c000, phyaddr , interface
rgmii-id

Warning: ethernet@e000c000 (eth3) using random MAC address -
1a:ff:d7:1a:a1:b2
, eth3: ethernet@e000c000
** Bad device size - mmc 0 **
Checking if uenvcmd is set ...
Hit any key to stop autoboot:  0
Zynq> mdio list
eth0:
17 - Marvell 88ES <--> ethernet@e000b000
eth3:
17 - Marvell 88ES <--> ethernet@e000c000
Zynq>

---
 common/miiphyutil.c | 12 
 include/miiphy.h|  1 +
 2 files changed, 13 insertions(+)

diff --git a/common/miiphyutil.c b/common/miiphyutil.c
index aca18db52a00..8eb0f761bb01 100644
--- a/common/miiphyutil.c
+++ b/common/miiphyutil.c
@@ -107,6 +107,18 @@ int mdio_register(struct mii_dev *bus)
return 0;
 }
 
+int mdio_register_seq(struct mii_dev *bus, int seq)
+{
+   int ret;
+
+   /* Setup a unique name for each mdio bus */
+   ret = snprintf(bus->name, MDIO_NAME_LEN, "eth%d", seq);
+   if (ret < 0)
+   return ret;
+
+   return mdio_register(bus);
+}
+
 int mdio_unregister(struct mii_dev *bus)
 {
if (!bus)
diff --git a/include/miiphy.h b/include/miiphy.h
index 83141b4a6ae1..df371425441d 100644
--- a/include/miiphy.h
+++ b/include/miiphy.h
@@ -48,6 +48,7 @@ void miiphy_listdev(void);
 struct mii_dev *mdio_alloc(void);
 void mdio_free(struct mii_dev *bus);
 int mdio_register(struct mii_dev *bus);
+int mdio_register_seq(struct mii_dev *bus, int seq);
 int mdio_unregister(struct mii_dev *bus);
 void mdio_list_devices(void);
 
-- 
1.9.1

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


[U-Boot] [PATCH 2/2] net: xilinx: Use mdio_register_seq() to support multiple instances

2016-12-08 Thread Michal Simek
axi_emac, emaclite and gem have the same issue with registering
multiple instances with mdio busses. mdio bus name has to be uniq but
drivers are setting up only one name for all.
Use mdio_register_seq() and pass dev->seq number to allow multiple
mdio instances registration.

Reported-by: Phani Kiran Kara 
Signed-off-by: Michal Simek 
---

 drivers/net/xilinx_axi_emac.c | 3 +--
 drivers/net/xilinx_emaclite.c | 3 +--
 drivers/net/zynq_gem.c| 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index 5de06ef01e8d..51c74266637c 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -648,9 +648,8 @@ static int axi_emac_probe(struct udevice *dev)
priv->bus->read = axiemac_miiphy_read;
priv->bus->write = axiemac_miiphy_write;
priv->bus->priv = priv;
-   strcpy(priv->bus->name, "axi_emac");
 
-   ret = mdio_register(priv->bus);
+   ret = mdio_register_seq(priv->bus, dev->seq);
if (ret)
return ret;
 
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 78ff44c5619f..ea93cf906ed7 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -566,9 +566,8 @@ static int emaclite_probe(struct udevice *dev)
emaclite->bus->read = emaclite_miiphy_read;
emaclite->bus->write = emaclite_miiphy_write;
emaclite->bus->priv = emaclite;
-   strcpy(emaclite->bus->name, "emaclite");
 
-   ret = mdio_register(emaclite->bus);
+   ret = mdio_register_seq(emaclite->bus, dev->seq);
if (ret)
return ret;
 
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 526eac658ac5..d2e5e7c7cd14 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -647,9 +647,8 @@ static int zynq_gem_probe(struct udevice *dev)
priv->bus->read = zynq_gem_miiphy_read;
priv->bus->write = zynq_gem_miiphy_write;
priv->bus->priv = priv;
-   strcpy(priv->bus->name, "gem");
 
-   ret = mdio_register(priv->bus);
+   ret = mdio_register_seq(priv->bus, dev->seq);
if (ret)
return ret;
 
-- 
1.9.1

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


Re: [U-Boot] [GIT PULL] Xilinx and SCSI changes

2016-12-08 Thread Michal Simek
Hi Tom,

On 8.12.2016 17:04, Tom Rini wrote:
> On Fri, Dec 02, 2016 at 02:55:00PM +0100, Michal Simek wrote:
> 
>> Hi Tom,
>>
>> here are some patches I have collected for Xilinx devices, one miiphy
>> patch and SCSI changes I have made.
>>
>> Simon: I have sent v4 of DM_SCSI + ceva sata driver moved to DM which
>> should go through your tree because you have applied
>> "dm: blk: Fix get_desc to return block device descriptor"
>> which is required. They are based on this branch.
>>
>> Tom: I have tested also travis with zynq qemu but it looks like a
>> problem with qemu timing for zynq model. The rest of python tests look
>> good. https://travis-ci.org/michalsimek-test/u-boot/jobs/180384185
>> Also for running this I had to use CONFIG_OF_EMBED=y to handle dtb.
>> Anyway I will talk to Qemu guys what I can do with it and when this
>> timing issue was solved and which mainline qemu version this requires.
>> Is there arm64 qemu available too?
>>
>> Thanks,
>> Michal
>>
>>
>>  The following changes since commit
>> 9ae0e14350758e6447c90615ff4df530549a45e2:
>>
>>Merge git://www.denx.de/git/u-boot-marvell (2016-12-01 09:24:02 -0500)
>>
>>  are available in the git repository at:
>>
>>
>>git://www.denx.de/git/u-boot-microblaze.git master
>>
>>  for you to fetch changes up to 861fe6503e205622202a61d3ca86cd4ccb80bf03:
>>
>>cmd: scsi: Make private functions static (2016-12-02 14:37:32 +0100)
> 
> This blows up microblaze-generic, please fix, thanks!

What exactly is the problem?

[u-boot]$ ./tools/buildman/buildman microblaze-generic -b uboot -C -o
/tmp/2 -c 8 -sSedB
boards.cfg is up to date. Nothing to do.
Summary of 8 commits for 1 boards (1 thread, 8 jobs per thread)
01: scsi: Take lun from device block description
02: scsi: Move pccb buffer initalization directly to scsi_detect_dev
03: scsi: Simplify scsi_read/scsi_write()
04: scsi: Remove completely unused functions
05: scsi: Make private functions static
06: scsi: Change scsi_scan() to be able to return value
07: scsi: Separate SCSI private block description initialization
08: cmd: scsi: Make private functions static
(no errors to report)
[u-boot]$ git log --oneline -n 1
861fe6503e20 cmd: scsi: Make private functions static
[u-boot]$

Microblaze is not enabling anything related to SCSI. I have one design
from past
with sata but it was custom project which is not supported in mainline.

Thanks,
Michal

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


[U-Boot] [PATCH][v3] armv8: fsl-layerscape: Add support of GPIO structure

2016-12-08 Thread Prabhakar Kushwaha
Layerscape Gen2 SoC supports GPIO registers to control GPIO
signals. Adding support of GPIO structure to access GPIO
registers.

Signed-off-by: Pratiyush Srivastava 
Signed-off-by: Prabhakar Kushwaha 
---
Changes for v2: Incorporated York's comments
- Removed CONFIG_SYS_GPIO1_ADDR as bool
- Renamed CONFIG_SYS_GPIO1_ADDR

Changes for v3: 
- Corrected the GPIO address
- updated patch description

This structure is required while supporting ethernent in LS1012AFRDM.


 arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h 
b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
index d684a07..33f3e2e 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
@@ -52,6 +52,11 @@
 #define QSPI0_BASE_ADDR(CONFIG_SYS_IMMR + 
0x0055)
 #define DSPI1_BASE_ADDR(CONFIG_SYS_IMMR + 
0x0110)
 
+#define GPIO1_BASE_ADDR(CONFIG_SYS_IMMR + 
0x130)
+#define GPIO2_BASE_ADDR(CONFIG_SYS_IMMR + 
0x131)
+#define GPIO3_BASE_ADDR(CONFIG_SYS_IMMR + 
0x132)
+#define GPIO4_BASE_ADDR(CONFIG_SYS_IMMR + 
0x133)
+
 #define LPUART_BASE(CONFIG_SYS_IMMR + 0x0195)
 
 #define AHCI_BASE_ADDR (CONFIG_SYS_IMMR + 0x0220)
@@ -588,6 +593,16 @@ struct ccsr_cci400 {
u8 res_e004[0x1 - 0xe004];
 };
 
+struct ccsr_gpio {
+   u32 gpdir;
+   u32 gpodr;
+   u32 gpdat;
+   u32 gpier;
+   u32 gpimr;
+   u32 gpicr;
+   u32 gpibe;
+};
+
 /* MMU 500 */
 #define SMMU_SCR0  (SMMU_BASE + 0x0)
 #define SMMU_SCR1  (SMMU_BASE + 0x4)
-- 
2.7.4


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


[U-Boot] [PATCH v2] miniarm-rk3288: set isp/vop qos priority level

2016-12-08 Thread Nickey Yang
isp-camera image will be broken when enter dual screen display mode.
We set isp qos high to solve this problem.

Signed-off-by: Nickey Yang 
---
 arch/arm/include/asm/arch-rockchip/qos_rk3288.h | 21 +
 board/rockchip/miniarm_rk3288/miniarm-rk3288.c  | 21 +
 2 files changed, 42 insertions(+)
 create mode 100644 arch/arm/include/asm/arch-rockchip/qos_rk3288.h

diff --git a/arch/arm/include/asm/arch-rockchip/qos_rk3288.h 
b/arch/arm/include/asm/arch-rockchip/qos_rk3288.h
new file mode 100644
index 000..d3d6c3e
--- /dev/null
+++ b/arch/arm/include/asm/arch-rockchip/qos_rk3288.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2016 Rockchip Inc.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+#ifndef _ASM_ARCH_QOS_RK3288_H
+#define _ASM_ARCH_QOS_RK3288_H
+
+/* cpu axi qos priority */
+#define CPU_AXI_QOS_PRIORITY_LEVEL(h, l) \
+   h) & 3) << 2) | ((l) & 3))
+
+#define CPU_AXI_QOS_PRIORITY0x08
+
+#define VIO0_VOP_QOS0xffad0400
+#define VIO1_VOP_QOS0xffad
+#define VIO1_ISP_R_QOS  0xffad0900
+#define VIO1_ISP_W0_QOS 0xffad0100
+#define VIO1_ISP_W1_QOS 0xffad0180
+
+#endif
diff --git a/board/rockchip/miniarm_rk3288/miniarm-rk3288.c 
b/board/rockchip/miniarm_rk3288/miniarm-rk3288.c
index 79541a3..ba0f3a3 100644
--- a/board/rockchip/miniarm_rk3288/miniarm-rk3288.c
+++ b/board/rockchip/miniarm_rk3288/miniarm-rk3288.c
@@ -5,3 +5,24 @@
  */
 
 #include 
+#include 
+#include 
+
+int rk_board_late_init(void)
+{
+   /* set isp qos to higher priority */
+   writel(CPU_AXI_QOS_PRIORITY_LEVEL(2, 2),
+  VIO1_ISP_R_QOS + CPU_AXI_QOS_PRIORITY);
+   writel(CPU_AXI_QOS_PRIORITY_LEVEL(2, 2),
+  VIO1_ISP_W0_QOS + CPU_AXI_QOS_PRIORITY);
+   writel(CPU_AXI_QOS_PRIORITY_LEVEL(2, 2),
+  VIO1_ISP_W1_QOS + CPU_AXI_QOS_PRIORITY);
+
+   /* set vop qos to higher priority */
+   writel(CPU_AXI_QOS_PRIORITY_LEVEL(2, 2),
+  VIO0_VOP_QOS + CPU_AXI_QOS_PRIORITY);
+   writel(CPU_AXI_QOS_PRIORITY_LEVEL(2, 2),
+  VIO1_VOP_QOS + CPU_AXI_QOS_PRIORITY);
+
+   return 0;
+}
-- 
1.9.1


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


Re: [U-Boot] [PATCH v2 0/6] mmc: move some config options to Kconfig

2016-12-08 Thread Masahiro Yamada
Hi Jaehoon,


2016-12-09 8:34 GMT+09:00 Jaehoon Chung :
> On 12/07/2016 10:10 PM, Masahiro Yamada wrote:
>> I wrote a new SDHCI driver for my new SoCs, but before posting it,
>> I just want to make a clean base for my driver entry.
>>
>> Of course, I could enable some needed options in my header file
>> (for options in the "white-list"), but I just thought it is a good
>> habit to contribute to Kconfig moves in the area I am working on now.
>>
>> Some people are actively working on such moves, so this kind of work
>> is really conflict-prone.
>>
>> I described how to generate each commit in its git-log
>> in case this series becomes out of date.
>>
>> I created this series based on v2017.01-rc1, but if some other pull
>> requests go in first, I hope Tom will easily reproduce it by following
>> each instruction in the log.
>>
>>
>> Changes in v2:
>>   - Regenerate based on v2017.01-rc1
>>   - Fix doubled "help"
>>   - Add "default ARM || PPC ||SANDBOX"
>>
>> Masahiro Yamada (6):
>>   Sync defconfig files by savedefconfig
>>   mmc: complete unfinished move of CONFIG_MMC
>>   mmc: make MMC driver entries dependent on MMC
>>   mmc: move CONFIG_SDHCI to Kconfig, renaming to CONFIG_MMC_SDHCI
>>   mmc: move some SDHCI related options to Kconfig
>>   mmc: move MMC_SDHCI_IO_ACCESSORS to Kconfig
>
> This patch set is delegated to Tom, so i leaves..Thanks!
>
> Best Regards,
> Jaehoon Chung


Right.  I delegated it to Tom because this series
is touching configs/*_defconfig and include/configs/*.h globally.

Tom is taking pull requests from subsystem maintainers all the time.
I hope Tom can arrange this series in case he found conflicts.

Still, your review is very appreciated.  Thanks!

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


[U-Boot] [PATCH] calimain: Update maintainers and their email addresses

2016-12-08 Thread Christian Riesch
Signed-off-by: Christian Riesch 
Cc: Manfred Rudigier 
Cc: Christoph Rüdisser 
---
 board/omicron/calimain/MAINTAINERS | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/omicron/calimain/MAINTAINERS 
b/board/omicron/calimain/MAINTAINERS
index f6e37a2..ad788a6 100644
--- a/board/omicron/calimain/MAINTAINERS
+++ b/board/omicron/calimain/MAINTAINERS
@@ -1,6 +1,6 @@
 CALIMAIN BOARD
-M: Manfred Rudigier 
-M: Christian Riesch 
+M: Manfred Rudigier 
+M: Christoph Rüdisser 
 S: Maintained
 F: board/omicron/calimain/
 F: include/configs/calimain.h
-- 
2.7.4

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


Re: [U-Boot] [PATCH v2 0/6] mmc: move some config options to Kconfig

2016-12-08 Thread Jaehoon Chung
On 12/07/2016 10:10 PM, Masahiro Yamada wrote:
> I wrote a new SDHCI driver for my new SoCs, but before posting it,
> I just want to make a clean base for my driver entry.
> 
> Of course, I could enable some needed options in my header file
> (for options in the "white-list"), but I just thought it is a good
> habit to contribute to Kconfig moves in the area I am working on now.
> 
> Some people are actively working on such moves, so this kind of work
> is really conflict-prone.
> 
> I described how to generate each commit in its git-log
> in case this series becomes out of date.
> 
> I created this series based on v2017.01-rc1, but if some other pull
> requests go in first, I hope Tom will easily reproduce it by following
> each instruction in the log.
> 
> 
> Changes in v2:
>   - Regenerate based on v2017.01-rc1
>   - Fix doubled "help"
>   - Add "default ARM || PPC ||SANDBOX"
> 
> Masahiro Yamada (6):
>   Sync defconfig files by savedefconfig
>   mmc: complete unfinished move of CONFIG_MMC
>   mmc: make MMC driver entries dependent on MMC
>   mmc: move CONFIG_SDHCI to Kconfig, renaming to CONFIG_MMC_SDHCI
>   mmc: move some SDHCI related options to Kconfig
>   mmc: move MMC_SDHCI_IO_ACCESSORS to Kconfig

This patch set is delegated to Tom, so i leaves..Thanks!

Best Regards,
Jaehoon Chung

> 
>  arch/arm/mach-mvebu/cpu.c  |   2 +-
>  board/broadcom/bcm23550_w1d/bcm23550_w1d.c |   2 +-
>  board/broadcom/bcm28155_ap/bcm28155_ap.c   |   2 +-
>  board/samsung/common/board.c   |   2 +-
>  configs/A10-OLinuXino-Lime_defconfig   |   2 +-
>  configs/A20-OLinuXino-Lime2_defconfig  |   2 +-
>  configs/A20-OLinuXino-Lime_defconfig   |   2 +-
>  configs/A20-OLinuXino_MICRO_defconfig  |   2 +-
>  configs/A20-Olimex-SOM-EVB_defconfig   |   2 +-
>  configs/B4420QDS_NAND_defconfig|   1 +
>  configs/B4420QDS_SPIFLASH_defconfig|   1 +
>  configs/B4420QDS_defconfig |   1 +
>  configs/B4860QDS_NAND_defconfig|   1 +
>  configs/B4860QDS_SECURE_BOOT_defconfig |   3 +-
>  configs/B4860QDS_SPIFLASH_defconfig|   1 +
>  configs/B4860QDS_SRIO_PCIE_BOOT_defconfig  |   1 +
>  configs/B4860QDS_defconfig |   1 +
>  configs/BSC9131RDB_NAND_SYSCLK100_defconfig|   1 +
>  configs/BSC9131RDB_NAND_defconfig  |   1 +
>  configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig|   1 +
>  configs/BSC9131RDB_SPIFLASH_defconfig  |   1 +
>  configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig |   2 +-
>  configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig |   2 +-
>  configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig  |   2 +-
>  configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig  |   2 +-
>  .../BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig   |   2 +-
>  .../BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig   |   2 +-
>  .../BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig |   2 +-
>  .../BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig |   2 +-
>  configs/Bananapi_defconfig |   2 +-
>  configs/Bananapro_defconfig|   2 +-
>  configs/C29XPCIE_NAND_defconfig|   1 +
>  configs/C29XPCIE_NOR_SECBOOT_defconfig |   3 +-
>  configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig|   3 +-
>  configs/C29XPCIE_SPIFLASH_defconfig|   1 +
>  configs/C29XPCIE_defconfig |   1 +
>  configs/CPCI2DP_defconfig  |   1 +
>  configs/CPCI4052_defconfig |   1 +
>  configs/Chuwi_V7_CW0825_defconfig  |   1 -
>  configs/Cubieboard2_defconfig  |   2 +-
>  configs/Cubieboard_defconfig   |   2 +-
>  configs/Cubietruck_defconfig   |   2 +-
>  configs/Itead_Ibox_A20_defconfig   |   2 +-
>  configs/Lamobo_R1_defconfig|   2 +-
>  configs/Linksprite_pcDuino3_Nano_defconfig |   2 +-
>  configs/Linksprite_pcDuino3_defconfig  |   2 +-
>  configs/MIP405T_defconfig  |   1 +
>  configs/MIP405_defconfig   |   1 +
>  configs/MPC8313ERDB_33_defconfig   |   1 +
>  configs/MPC8313ERDB_66_defconfig   |   1 +
>  configs/MPC8313ERDB_NAND_33_defconfig  |   1 +
>  configs/MPC8313ERDB_NAND_66_defconfig  |   1 +
>  configs/MPC8315ERDB_defconfig  |   1 +
>  configs/MPC8323ERDB_defconfig  |   1 +
>  configs/MPC832XEMDS_ATM_defconfig  |   1 +
>  configs/MPC832XEMDS_HOST_33_defconfig  |   1 +
>  configs/MPC832XEMDS_HOST_66_defconfig  |   1 +
>  configs/MPC832XEMDS_SLAVE_defconfig|   1 +
>  configs/MPC832XEMDS_defconfig  |  

Re: [U-Boot] [PATCH v2 6/6] mmc: move MMC_SDHCI_IO_ACCESSORS to Kconfig

2016-12-08 Thread Jaehoon Chung
On 12/07/2016 10:10 PM, Masahiro Yamada wrote:
> This is a user-unconfigurable option that is selected by the
> drivers that need to overwrite SDHCI IO memory accessors.
> (BCM2835 SDHCI seems the only driver that needs to do so.)
> 
> Signed-off-by: Masahiro Yamada 
> Reviewed-by: Tom Rini 

Reviewed-by: Jaehoon Chung 

Best Regards,
Jaehoon Chung


> ---
> 
> Changes in v2: None
> 
>  drivers/mmc/Kconfig   | 8 
>  include/configs/rpi.h | 1 -
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
> index 521c741..12df3cf 100644
> --- a/drivers/mmc/Kconfig
> +++ b/drivers/mmc/Kconfig
> @@ -132,6 +132,13 @@ config MMC_SDHCI
>  
> If unsure, say N.
>  
> +config MMC_SDHCI_IO_ACCESSORS
> + bool
> + depends on MMC_SDHCI
> + help
> +   This is silent Kconfig symbol that is selected by the drivers that
> +   need to overwrite SDHCI IO memory accessors.
> +
>  config MMC_SDHCI_SDMA
>   bool "Support SDHCI SDMA"
>   depends on MMC_SDHCI
> @@ -143,6 +150,7 @@ config MMC_SDHCI_BCM2835
>   tristate "SDHCI support for the BCM2835 SD/MMC Controller"
>   depends on ARCH_BCM283X
>   depends on MMC_SDHCI
> + select MMC_SDHCI_IO_ACCESSORS
>   help
> This selects the BCM2835 SD/MMC controller.
>  
> diff --git a/include/configs/rpi.h b/include/configs/rpi.h
> index 8005ac1..45d8824 100644
> --- a/include/configs/rpi.h
> +++ b/include/configs/rpi.h
> @@ -83,7 +83,6 @@
>  
>  /* SD/MMC configuration */
>  #define CONFIG_GENERIC_MMC
> -#define CONFIG_MMC_SDHCI_IO_ACCESSORS
>  
>  #ifdef CONFIG_CMD_USB
>  #define CONFIG_USB_DWC2
> 

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


Re: [U-Boot] [PATCH v2 3/6] mmc: make MMC driver entries dependent on MMC

2016-12-08 Thread Jaehoon Chung
On 12/09/2016 08:30 AM, Jaehoon Chung wrote:
> On 12/07/2016 10:10 PM, Masahiro Yamada wrote:
>> Currently, CONFIG_MMC is not related to any other options by
>> "depends on" or "select".  One of big advantages of using Kconfig
>> is automatic dependency tracking, but the current state is lacking
>> it.  As the first step, make the existing MMC driver entries depend
>> on MMC.
>>
>> This commit was created by the following steps:
>>
>> [1] Run the following script:
>>
>> 8<
>> rm -f tmp.txt
>>
>> for d in $(find . -path './configs/*_defconfig')
>> do
>> if grep -q -e 'CONFIG_MSM_SDHCI=y' $d ||
>>grep -q -e 'CONFIG_ATMEL_SDHCI=y' $d ||
>>grep -q -e 'CONFIG_ROCKCHIP_DWMMC=y' $d ||
>>grep -q -e 'CONFIG_SH_SDHI=y' $d ||
>>grep -q -e 'CONFIG_PIC32_SDHCI=y' $d ||
>>grep -q -e 'CONFIG_ZYNQ_SDHCI=y' $d ||
>>grep -q -e 'CONFIG_ROCKCHIP_SDHCI=y' $d ||
>>grep -q -e 'CONFIG_MMC_UNIPHIER=y' $d ||
>>grep -q -e 'CONFIG_SANDBOX_MMC=y' $d
>> then
>> echo CONFIG_MMC=y >> $d
>> echo ${d#./configs/} >> tmp.txt
>> fi
>> done
>>
>> tools/moveconfig.py -y -s -d tmp.txt
>> rm tmp.txt
>> 8<
>>
>> [2] surround MMC driver entries with "if MMC" and "endif"
>>
>> Signed-off-by: Masahiro Yamada 
>> Reviewed-by: Tom Rini 
> 
> 
> Reviewd-by: Jaehoon Chung 

s/Reviewd/Reviewed..

Reviewed-by: Jaehoon Chung 

Best Regards,
Jaehoon Chung


> 
> Best Regards,
> Jaehoon Chung
> 
> 
>> ---
>>
>> Changes in v2: None
>>
>>  configs/sama5d2_xplained_mmc_defconfig  | 1 -
>>  configs/sama5d2_xplained_spiflash_defconfig | 1 -
>>  configs/uniphier_ld20_defconfig | 1 -
>>  configs/uniphier_ld4_sld8_defconfig | 1 -
>>  configs/uniphier_pro4_defconfig | 1 -
>>  configs/uniphier_pxs2_ld6b_defconfig| 1 -
>>  configs/uniphier_sld3_defconfig | 1 -
>>  drivers/mmc/Kconfig | 4 
>>  8 files changed, 4 insertions(+), 7 deletions(-)
>>
>> diff --git a/configs/sama5d2_xplained_mmc_defconfig 
>> b/configs/sama5d2_xplained_mmc_defconfig
>> index 525e08b..931defc 100644
>> --- a/configs/sama5d2_xplained_mmc_defconfig
>> +++ b/configs/sama5d2_xplained_mmc_defconfig
>> @@ -8,7 +8,6 @@ CONFIG_SPL_FAT_SUPPORT=y
>>  CONFIG_SPL_LIBDISK_SUPPORT=y
>>  CONFIG_SPL_MMC_SUPPORT=y
>>  CONFIG_SPL_SERIAL_SUPPORT=y
>> -# CONFIG_MMC is not set
>>  CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"
>>  CONFIG_FIT=y
>>  CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_MMC"
>> diff --git a/configs/sama5d2_xplained_spiflash_defconfig 
>> b/configs/sama5d2_xplained_spiflash_defconfig
>> index 939fc8e..a04f9ea 100644
>> --- a/configs/sama5d2_xplained_spiflash_defconfig
>> +++ b/configs/sama5d2_xplained_spiflash_defconfig
>> @@ -7,7 +7,6 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y
>>  CONFIG_SPL_SERIAL_SUPPORT=y
>>  CONFIG_SPL_SPI_FLASH_SUPPORT=y
>>  CONFIG_SPL_SPI_SUPPORT=y
>> -# CONFIG_MMC is not set
>>  CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"
>>  CONFIG_FIT=y
>>  CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_SERIALFLASH"
>> diff --git a/configs/uniphier_ld20_defconfig 
>> b/configs/uniphier_ld20_defconfig
>> index 26a1bf8..3e802d3 100644
>> --- a/configs/uniphier_ld20_defconfig
>> +++ b/configs/uniphier_ld20_defconfig
>> @@ -4,7 +4,6 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
>>  CONFIG_SPL_SERIAL_SUPPORT=y
>>  CONFIG_ARCH_UNIPHIER_LD20=y
>>  CONFIG_MICRO_SUPPORT_CARD=y
>> -# CONFIG_MMC is not set
>>  CONFIG_SYS_TEXT_BASE=0x8400
>>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-ld20-ref"
>>  CONFIG_SPL_NOR_SUPPORT=y
>> diff --git a/configs/uniphier_ld4_sld8_defconfig 
>> b/configs/uniphier_ld4_sld8_defconfig
>> index f5d98d8..b141561 100644
>> --- a/configs/uniphier_ld4_sld8_defconfig
>> +++ b/configs/uniphier_ld4_sld8_defconfig
>> @@ -6,7 +6,6 @@ CONFIG_SPL_NAND_SUPPORT=y
>>  CONFIG_SPL_SERIAL_SUPPORT=y
>>  CONFIG_ARCH_UNIPHIER_LD4_SLD8=y
>>  CONFIG_MICRO_SUPPORT_CARD=y
>> -# CONFIG_MMC is not set
>>  CONFIG_SYS_TEXT_BASE=0x8400
>>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-ld4-ref"
>>  CONFIG_SPL_NOR_SUPPORT=y
>> diff --git a/configs/uniphier_pro4_defconfig 
>> b/configs/uniphier_pro4_defconfig
>> index f45485b..f71ef56 100644
>> --- a/configs/uniphier_pro4_defconfig
>> +++ b/configs/uniphier_pro4_defconfig
>> @@ -5,7 +5,6 @@ CONFIG_SPL_MMC_SUPPORT=y
>>  CONFIG_SPL_NAND_SUPPORT=y
>>  CONFIG_SPL_SERIAL_SUPPORT=y
>>  CONFIG_MICRO_SUPPORT_CARD=y
>> -# CONFIG_MMC is not set
>>  CONFIG_SYS_TEXT_BASE=0x8400
>>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-pro4-ref"
>>  CONFIG_SPL_NOR_SUPPORT=y
>> diff --git a/configs/uniphier_pxs2_ld6b_defconfig 
>> b/configs/uniphier_pxs2_ld6b_defconfig
>> index f17b22f..ba3867f 100644
>> --- a/configs/uniphier_pxs2_ld6b_defconfig
>> +++ b/configs/uniphier_pxs2_ld6b_defconfig

Re: [U-Boot] [PATCH v2 5/6] mmc: move some SDHCI related options to Kconfig

2016-12-08 Thread Jaehoon Chung
On 12/07/2016 10:10 PM, Masahiro Yamada wrote:
> While I moved the options, I also renamed them so that they are all
> prefixed with MMC_SDHCI_.
> 
> This commit was created in the following steps.
> 
> [1] Rename with the following command
> find . -name .git -prune -o ! -path ./scripts/config_whitelist.txt \
> -type f -print | xargs sed -i -e '
> s/CONFIG_MMC_SDMA/CONFIG_MMC_SDHCI_SDMA/g
> s/CONFIG_BCM2835_SDHCI/CONFIG_MMC_SDHCI_BCM2835/g
> s/CONFIG_KONA_SDHCI/CONFIG_MMC_SDHCI_KONA/g
> s/CONFIG_MV_SDHCI/CONFIG_MMC_SDHCI_MV/g
> s/CONFIG_S5P_SDHCI/CONFIG_MMC_SDHCI_S5P/g
> s/CONFIG_SPEAR_SDHCI/CONFIG_MMC_SDHCI_SPEAR/g
> '
> 
> [2] create the Kconfig entries in drivers/mmc/Kconfig
> 
> [3] Move the options by the following command
> tools/moveconfig.py -y MMC_SDHCI_SDMA MMC_SDHCI_BCM2835 \
> MMC_SDHCI_KONA MMC_SDHCI_MV MMC_SDHCI_S5P MMC_SDHCI_SPEAR
> 
> [4] Sort drivers/mmc/Makefile for readability
> 
> Signed-off-by: Masahiro Yamada 


Reviewed-by: Jaehoon Chung 

Best Regards,
Jaehoon Chung


> ---
> 
> Changes in v2: None
> 
>  arch/arm/mach-mvebu/cpu.c  |  2 +-
>  board/broadcom/bcm23550_w1d/bcm23550_w1d.c |  2 +-
>  board/broadcom/bcm28155_ap/bcm28155_ap.c   |  2 +-
>  configs/arndale_defconfig  |  1 +
>  configs/bayleybay_defconfig|  1 +
>  configs/bcm11130_defconfig |  2 +
>  configs/bcm11130_nand_defconfig|  2 +
>  configs/bcm23550_w1d_defconfig |  2 +
>  configs/bcm28155_ap_defconfig  |  2 +
>  configs/bcm28155_w1d_defconfig |  2 +
>  configs/clearfog_defconfig |  2 +
>  ...conga-qeval20-qa3-e3845-internal-uart_defconfig |  1 +
>  configs/conga-qeval20-qa3-e3845_defconfig  |  1 +
>  configs/crownbay_defconfig |  1 +
>  configs/db-88f6820-gp_defconfig|  2 +
>  configs/dfi-bt700-q7x-151_defconfig|  1 +
>  configs/galileo_defconfig  |  1 +
>  configs/minnowmax_defconfig|  1 +
>  configs/odroid-xu3_defconfig   |  1 +
>  configs/odroid_defconfig   |  2 +
>  configs/origen_defconfig   |  2 +
>  configs/peach-pi_defconfig |  1 +
>  configs/peach-pit_defconfig|  1 +
>  configs/rpi_2_defconfig|  1 +
>  configs/rpi_3_32b_defconfig|  1 +
>  configs/rpi_3_defconfig|  1 +
>  configs/rpi_defconfig  |  1 +
>  configs/s5p_goni_defconfig |  1 +
>  configs/s5pc210_universal_defconfig|  2 +
>  configs/smdk5250_defconfig |  1 +
>  configs/smdk5420_defconfig |  1 +
>  configs/smdkv310_defconfig |  2 +
>  configs/snow_defconfig |  1 +
>  configs/spring_defconfig   |  1 +
>  configs/theadorable-x86-dfi-bt700_defconfig|  1 +
>  configs/trats2_defconfig   |  2 +
>  configs/trats_defconfig|  2 +
>  drivers/mmc/Kconfig| 64 
> ++
>  drivers/mmc/Makefile   | 14 +++--
>  drivers/mmc/sdhci.c| 10 ++--
>  include/configs/bayleybay.h|  1 -
>  include/configs/bcm23550_w1d.h |  2 -
>  include/configs/bcm28155_ap.h  |  2 -
>  include/configs/clearfog.h |  2 -
>  include/configs/conga-qeval20-qa3-e3845.h  |  1 -
>  include/configs/crownbay.h |  1 -
>  include/configs/db-88f6820-gp.h|  2 -
>  include/configs/dfi-bt700.h|  1 -
>  include/configs/exynos-common.h|  1 -
>  include/configs/exynos4-common.h   |  1 -
>  include/configs/galileo.h  |  1 -
>  include/configs/minnowmax.h|  1 -
>  include/configs/rpi.h  |  1 -
>  include/configs/s5p_goni.h |  1 -
>  54 files changed, 127 insertions(+), 32 deletions(-)
> 
> diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c
> index 5eb2a39..1445731 100644
> --- a/arch/arm/mach-mvebu/cpu.c
> +++ b/arch/arm/mach-mvebu/cpu.c
> @@ -475,7 +475,7 @@ int arch_misc_init(void)
>  }
>  #endif /* CONFIG_ARCH_MISC_INIT */
>  
> -#ifdef CONFIG_MV_SDHCI
> +#ifdef CONFIG_MMC_SDHCI_MV
>  int board_mmc_init(bd_t *bis)
>  {
>   mv_sdh_init(MVEBU_SDIO_BASE, 0, 0,
> diff --git a/board/broadcom/bcm23550_w1d/bcm23550_w1d.c 
> b/board/broadcom/bcm23550_w1d/bcm23550_w1d.c
> index 

Re: [U-Boot] [PATCH v2 3/6] mmc: make MMC driver entries dependent on MMC

2016-12-08 Thread Jaehoon Chung
On 12/07/2016 10:10 PM, Masahiro Yamada wrote:
> Currently, CONFIG_MMC is not related to any other options by
> "depends on" or "select".  One of big advantages of using Kconfig
> is automatic dependency tracking, but the current state is lacking
> it.  As the first step, make the existing MMC driver entries depend
> on MMC.
> 
> This commit was created by the following steps:
> 
> [1] Run the following script:
> 
> 8<
> rm -f tmp.txt
> 
> for d in $(find . -path './configs/*_defconfig')
> do
> if grep -q -e 'CONFIG_MSM_SDHCI=y' $d ||
>grep -q -e 'CONFIG_ATMEL_SDHCI=y' $d ||
>grep -q -e 'CONFIG_ROCKCHIP_DWMMC=y' $d ||
>grep -q -e 'CONFIG_SH_SDHI=y' $d ||
>grep -q -e 'CONFIG_PIC32_SDHCI=y' $d ||
>grep -q -e 'CONFIG_ZYNQ_SDHCI=y' $d ||
>grep -q -e 'CONFIG_ROCKCHIP_SDHCI=y' $d ||
>grep -q -e 'CONFIG_MMC_UNIPHIER=y' $d ||
>grep -q -e 'CONFIG_SANDBOX_MMC=y' $d
> then
> echo CONFIG_MMC=y >> $d
> echo ${d#./configs/} >> tmp.txt
> fi
> done
> 
> tools/moveconfig.py -y -s -d tmp.txt
> rm tmp.txt
> 8<
> 
> [2] surround MMC driver entries with "if MMC" and "endif"
> 
> Signed-off-by: Masahiro Yamada 
> Reviewed-by: Tom Rini 


Reviewd-by: Jaehoon Chung 

Best Regards,
Jaehoon Chung


> ---
> 
> Changes in v2: None
> 
>  configs/sama5d2_xplained_mmc_defconfig  | 1 -
>  configs/sama5d2_xplained_spiflash_defconfig | 1 -
>  configs/uniphier_ld20_defconfig | 1 -
>  configs/uniphier_ld4_sld8_defconfig | 1 -
>  configs/uniphier_pro4_defconfig | 1 -
>  configs/uniphier_pxs2_ld6b_defconfig| 1 -
>  configs/uniphier_sld3_defconfig | 1 -
>  drivers/mmc/Kconfig | 4 
>  8 files changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/configs/sama5d2_xplained_mmc_defconfig 
> b/configs/sama5d2_xplained_mmc_defconfig
> index 525e08b..931defc 100644
> --- a/configs/sama5d2_xplained_mmc_defconfig
> +++ b/configs/sama5d2_xplained_mmc_defconfig
> @@ -8,7 +8,6 @@ CONFIG_SPL_FAT_SUPPORT=y
>  CONFIG_SPL_LIBDISK_SUPPORT=y
>  CONFIG_SPL_MMC_SUPPORT=y
>  CONFIG_SPL_SERIAL_SUPPORT=y
> -# CONFIG_MMC is not set
>  CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"
>  CONFIG_FIT=y
>  CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_MMC"
> diff --git a/configs/sama5d2_xplained_spiflash_defconfig 
> b/configs/sama5d2_xplained_spiflash_defconfig
> index 939fc8e..a04f9ea 100644
> --- a/configs/sama5d2_xplained_spiflash_defconfig
> +++ b/configs/sama5d2_xplained_spiflash_defconfig
> @@ -7,7 +7,6 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y
>  CONFIG_SPL_SERIAL_SUPPORT=y
>  CONFIG_SPL_SPI_FLASH_SUPPORT=y
>  CONFIG_SPL_SPI_SUPPORT=y
> -# CONFIG_MMC is not set
>  CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"
>  CONFIG_FIT=y
>  CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_SERIALFLASH"
> diff --git a/configs/uniphier_ld20_defconfig b/configs/uniphier_ld20_defconfig
> index 26a1bf8..3e802d3 100644
> --- a/configs/uniphier_ld20_defconfig
> +++ b/configs/uniphier_ld20_defconfig
> @@ -4,7 +4,6 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
>  CONFIG_SPL_SERIAL_SUPPORT=y
>  CONFIG_ARCH_UNIPHIER_LD20=y
>  CONFIG_MICRO_SUPPORT_CARD=y
> -# CONFIG_MMC is not set
>  CONFIG_SYS_TEXT_BASE=0x8400
>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-ld20-ref"
>  CONFIG_SPL_NOR_SUPPORT=y
> diff --git a/configs/uniphier_ld4_sld8_defconfig 
> b/configs/uniphier_ld4_sld8_defconfig
> index f5d98d8..b141561 100644
> --- a/configs/uniphier_ld4_sld8_defconfig
> +++ b/configs/uniphier_ld4_sld8_defconfig
> @@ -6,7 +6,6 @@ CONFIG_SPL_NAND_SUPPORT=y
>  CONFIG_SPL_SERIAL_SUPPORT=y
>  CONFIG_ARCH_UNIPHIER_LD4_SLD8=y
>  CONFIG_MICRO_SUPPORT_CARD=y
> -# CONFIG_MMC is not set
>  CONFIG_SYS_TEXT_BASE=0x8400
>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-ld4-ref"
>  CONFIG_SPL_NOR_SUPPORT=y
> diff --git a/configs/uniphier_pro4_defconfig b/configs/uniphier_pro4_defconfig
> index f45485b..f71ef56 100644
> --- a/configs/uniphier_pro4_defconfig
> +++ b/configs/uniphier_pro4_defconfig
> @@ -5,7 +5,6 @@ CONFIG_SPL_MMC_SUPPORT=y
>  CONFIG_SPL_NAND_SUPPORT=y
>  CONFIG_SPL_SERIAL_SUPPORT=y
>  CONFIG_MICRO_SUPPORT_CARD=y
> -# CONFIG_MMC is not set
>  CONFIG_SYS_TEXT_BASE=0x8400
>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-pro4-ref"
>  CONFIG_SPL_NOR_SUPPORT=y
> diff --git a/configs/uniphier_pxs2_ld6b_defconfig 
> b/configs/uniphier_pxs2_ld6b_defconfig
> index f17b22f..ba3867f 100644
> --- a/configs/uniphier_pxs2_ld6b_defconfig
> +++ b/configs/uniphier_pxs2_ld6b_defconfig
> @@ -6,7 +6,6 @@ CONFIG_SPL_NAND_SUPPORT=y
>  CONFIG_SPL_SERIAL_SUPPORT=y
>  CONFIG_ARCH_UNIPHIER_PRO5_PXS2_LD6B=y
>  CONFIG_MICRO_SUPPORT_CARD=y
> -# CONFIG_MMC is not set
>  CONFIG_SYS_TEXT_BASE=0x8400
>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-pxs2-vodka"
>  

Re: [U-Boot] [PATCH v2 4/6] mmc: move CONFIG_SDHCI to Kconfig, renaming to CONFIG_MMC_SDHCI

2016-12-08 Thread Jaehoon Chung
On 12/07/2016 10:10 PM, Masahiro Yamada wrote:
> Move CONFIG_SDHCI to Kconfig and rename it to CONFIG_MMC_SDHCI.
> My motivation for the rename is, ultimately, to make all the MMC
> options prefixed with MMC_ and SDHCI options with MMC_SDHCI_,
> like Linux.
> 
> This commit was created as follows:
> 
> [1] Rename the config option with the following command:
> find . -name .git -prune -o ! -path ./scripts/config_whitelist.txt \
> -type f -print | xargs sed -i -e 's/CONFIG_SDHCI/CONFIG_MMC_SDHCI/g'
> 
> [2] create the entry for MMC_SDHCI in drivers/mmc/Kconfig
> 
> [3] run "tools/moveconfig.py -y MMC_SDHCI"
> 
> [4] add "depends on MMC_SDHCI" to existing SDHCI driver entries
> 
> Signed-off-by: Masahiro Yamada 
> Reviewed-by: Tom Rini 

Reviewed-by: Jaehoon Chung 

Best Regards,
Jaehoon Chung


> ---
> 
> Changes in v2: None
> 
>  board/samsung/common/board.c|  2 +-
>  configs/arndale_defconfig   |  1 +
>  configs/bayleybay_defconfig |  1 +
>  configs/bcm11130_defconfig  |  1 +
>  configs/bcm11130_nand_defconfig |  1 +
>  configs/bcm23550_w1d_defconfig  |  1 +
>  configs/bcm28155_ap_defconfig   |  1 +
>  configs/bcm28155_w1d_defconfig  |  1 +
>  configs/clearfog_defconfig  |  1 +
>  configs/conga-qeval20-qa3-e3845-internal-uart_defconfig |  1 +
>  configs/conga-qeval20-qa3-e3845_defconfig   |  1 +
>  configs/crownbay_defconfig  |  1 +
>  configs/db-88f6820-gp_defconfig |  1 +
>  configs/dfi-bt700-q7x-151_defconfig |  1 +
>  configs/dragonboard410c_defconfig   |  1 +
>  configs/evb-rk3399_defconfig|  1 +
>  configs/galileo_defconfig   |  1 +
>  configs/minnowmax_defconfig |  1 +
>  configs/odroid-xu3_defconfig|  1 +
>  configs/odroid_defconfig|  1 +
>  configs/origen_defconfig|  1 +
>  configs/peach-pi_defconfig  |  1 +
>  configs/peach-pit_defconfig |  1 +
>  configs/pic32mzdask_defconfig   |  1 +
>  configs/rpi_2_defconfig |  1 +
>  configs/rpi_3_32b_defconfig |  1 +
>  configs/rpi_3_defconfig |  1 +
>  configs/rpi_defconfig   |  1 +
>  configs/s5p_goni_defconfig  |  1 +
>  configs/s5pc210_universal_defconfig |  1 +
>  configs/sama5d2_xplained_mmc_defconfig  |  1 +
>  configs/sama5d2_xplained_spiflash_defconfig |  1 +
>  configs/smdk5250_defconfig  |  1 +
>  configs/smdk5420_defconfig  |  1 +
>  configs/smdkv310_defconfig  |  1 +
>  configs/snow_defconfig  |  1 +
>  configs/spring_defconfig|  1 +
>  configs/theadorable-x86-dfi-bt700_defconfig |  1 +
>  configs/topic_miami_defconfig   |  1 +
>  configs/topic_miamiplus_defconfig   |  1 +
>  configs/trats2_defconfig|  1 +
>  configs/trats_defconfig |  1 +
>  configs/xilinx_zynqmp_ep_defconfig  |  1 +
>  configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig|  1 +
>  configs/xilinx_zynqmp_zc1751_xm018_dc4_defconfig|  1 +
>  configs/xilinx_zynqmp_zc1751_xm019_dc5_defconfig|  1 +
>  configs/xilinx_zynqmp_zcu102_defconfig  |  1 +
>  configs/xilinx_zynqmp_zcu102_revB_defconfig |  1 +
>  configs/zynq_microzed_defconfig |  1 +
>  configs/zynq_picozed_defconfig  |  1 +
>  configs/zynq_zc702_defconfig|  1 +
>  configs/zynq_zc706_defconfig|  1 +
>  configs/zynq_zc770_xm010_defconfig  |  1 +
>  configs/zynq_zed_defconfig  |  1 +
>  configs/zynq_zybo_defconfig |  1 +
>  drivers/mmc/Kconfig | 16 
>  drivers/mmc/Makefile|  2 +-
>  include/configs/bayleybay.h |  1 -
>  include/configs/bcm23550_w1d.h  |  1 -
>  include/configs/bcm28155_ap.h   |  1 -
>  include/configs/clearfog.h  |  1 -
>  

Re: [U-Boot] [PATCH 1/1] arm: mach-omap2: Fix secure file generation

2016-12-08 Thread Tom Rini
On Thu, Dec 08, 2016 at 04:48:07PM -0600, Andrew F. Davis wrote:

> When TI_SECURE_DEV_PKG is not defined we warn that the file '*_HS' was
> not generated but generate an unsigned one anyway. When TI_SECURE_DEV_PKG
> is exported and the user re-builds, make will detect this file as
> unchangedand and so assume it does not need to be re-generated. This
> causes it to pack unsigned files. Fix this by not generating these
> fake unsigned *_HS files.
> 
> Signed-off-by: Andrew F. Davis 

Reviewed-by: Tom Rini 

-- 
Tom


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


Re: [U-Boot] [PATCH 1/7] configs: Fixup defconfigs ordering

2016-12-08 Thread Andrew F. Davis
On 12/08/2016 04:04 PM, Andrew F. Davis wrote:
> When Kconfig options are added, modified, or removed the may this
> may change the 'natural' order of the defconfig files. This order
> is produced with 'make savedefconfig' and tools that automaticaly
> modifiy defconfigs need this order maintained.
> 

Forgot to run the spell check, automatically* modify*

> This can easily be accomplished by running 'tools/moveconfig.py -s'.
> 
> Do this here.
> 
> Signed-off-by: Andrew F. Davis 
> ---
>  configs/A10-OLinuXino-Lime_defconfig   |  2 +-
>  configs/A20-OLinuXino-Lime2_defconfig  |  2 +-
>  configs/A20-OLinuXino-Lime_defconfig   |  2 +-
>  configs/A20-OLinuXino_MICRO_defconfig  |  2 +-
>  configs/A20-Olimex-SOM-EVB_defconfig   |  2 +-
>  configs/B4860QDS_SECURE_BOOT_defconfig |  2 +-
>  configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig |  2 +-
>  configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig |  2 +-
>  configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig  |  2 +-
>  configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig  |  2 +-
>  .../BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig   |  2 +-
>  .../BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig   |  2 +-
>  .../BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig |  2 +-
>  .../BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig |  2 +-
>  configs/Bananapi_defconfig |  2 +-
>  configs/Bananapro_defconfig|  2 +-
>  configs/C29XPCIE_NOR_SECBOOT_defconfig |  2 +-
>  configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig|  2 +-
>  configs/Chuwi_V7_CW0825_defconfig  |  1 -
>  configs/Cubieboard2_defconfig  |  2 +-
>  configs/Cubieboard_defconfig   |  2 +-
>  configs/Cubietruck_defconfig   |  2 +-
>  configs/Itead_Ibox_A20_defconfig   |  2 +-
>  configs/Lamobo_R1_defconfig|  2 +-
>  configs/Linksprite_pcDuino3_Nano_defconfig |  2 +-
>  configs/Linksprite_pcDuino3_defconfig  |  2 +-
>  configs/MPC8610HPCD_defconfig  |  3 +-
>  configs/MPC8641HPCN_36BIT_defconfig|  3 +-
>  configs/MPC8641HPCN_defconfig  |  3 +-
>  configs/MSI_Primo81_defconfig  |  1 -
>  configs/Marsboard_A10_defconfig|  2 +-
>  configs/Mele_A1000_defconfig   |  2 +-
>  configs/Mele_M5_defconfig  |  2 +-
>  configs/Orangepi_defconfig |  2 +-
>  configs/Orangepi_mini_defconfig|  2 +-
>  configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig   |  2 +-
>  configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig|  2 +-
>  .../P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig   |  2 +-
>  configs/P1010RDB-PA_NAND_SECBOOT_defconfig |  2 +-
>  configs/P1010RDB-PA_NOR_SECBOOT_defconfig  |  2 +-
>  configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig |  2 +-
>  configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig   |  2 +-
>  configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig|  2 +-
>  .../P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig   |  2 +-
>  configs/P1010RDB-PB_NAND_SECBOOT_defconfig |  2 +-
>  configs/P1010RDB-PB_NOR_SECBOOT_defconfig  |  2 +-
>  configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig |  2 +-
>  configs/P2041RDB_SECURE_BOOT_defconfig |  2 +-
>  configs/P3041DS_NAND_SECURE_BOOT_defconfig |  2 +-
>  configs/P3041DS_SECURE_BOOT_defconfig  |  2 +-
>  configs/P4080DS_SECURE_BOOT_defconfig  |  2 +-
>  configs/P5020DS_NAND_SECURE_BOOT_defconfig |  2 +-
>  configs/P5020DS_SECURE_BOOT_defconfig  |  2 +-
>  configs/P5040DS_NAND_SECURE_BOOT_defconfig |  2 +-
>  configs/P5040DS_SECURE_BOOT_defconfig  |  2 +-
>  configs/T1023RDB_SECURE_BOOT_defconfig |  2 +-
>  configs/T1024QDS_DDR4_SECURE_BOOT_defconfig|  2 +-
>  configs/T1024QDS_SECURE_BOOT_defconfig |  2 +-
>  configs/T1024RDB_SECURE_BOOT_defconfig |  2 +-
>  configs/T1040D4RDB_SECURE_BOOT_defconfig   |  2 +-
>  configs/T1040QDS_SECURE_BOOT_defconfig |  2 +-
>  configs/T1040RDB_SECURE_BOOT_defconfig |  2 +-
>  configs/T1042D4RDB_SECURE_BOOT_defconfig   |  2 +-
>  configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig |  2 +-
>  configs/T1042RDB_SECURE_BOOT_defconfig |  2 +-
>  configs/T2080QDS_SECURE_BOOT_defconfig |  2 +-
>  configs/T2080RDB_SECURE_BOOT_defconfig |  2 +-
>  configs/T4160QDS_SECURE_BOOT_defconfig |  2 +-
>  configs/T4240QDS_SECURE_BOOT_defconfig |  2 +-
>  configs/Wits_Pro_A20_DKT_defconfig |  2 +-
>  configs/am43xx_evm_defconfig   |  2 +-
>  configs/am43xx_hs_evm_defconfig|  2 +-
>  configs/am57xx_evm_defconfig 

[U-Boot] [PATCH 7/7] disk: Convert CONFIG_EFI_PARTITION to Kconfig

2016-12-08 Thread Andrew F. Davis
Signed-off-by: Andrew F. Davis 
---
 configs/A10-OLinuXino-Lime_defconfig| 1 +
 configs/A10s-OLinuXino-M_defconfig  | 1 +
 configs/A13-OLinuXinoM_defconfig| 1 +
 configs/A13-OLinuXino_defconfig | 1 +
 configs/A20-OLinuXino-Lime2_defconfig   | 1 +
 configs/A20-OLinuXino-Lime_defconfig| 1 +
 configs/A20-OLinuXino_MICRO_defconfig   | 1 +
 configs/A20-Olimex-SOM-EVB_defconfig| 1 +
 configs/A33-OLinuXino_defconfig | 1 +
 configs/Ainol_AW1_defconfig | 1 +
 configs/Ampe_A76_defconfig  | 1 +
 configs/Auxtek-T003_defconfig   | 1 +
 configs/Auxtek-T004_defconfig   | 1 +
 configs/Bananapi_defconfig  | 1 +
 configs/Bananapro_defconfig | 1 +
 configs/CHIP_defconfig  | 1 +
 configs/CSQ_CS908_defconfig | 1 +
 configs/Chuwi_V7_CW0825_defconfig   | 1 +
 configs/Colombus_defconfig  | 1 +
 configs/Cubieboard2_defconfig   | 1 +
 configs/Cubieboard4_defconfig   | 1 +
 configs/Cubieboard_defconfig| 1 +
 configs/Cubietruck_defconfig| 1 +
 configs/Cubietruck_plus_defconfig   | 1 +
 configs/Empire_electronix_d709_defconfig| 1 +
 configs/Empire_electronix_m712_defconfig| 1 +
 configs/Hummingbird_A31_defconfig   | 1 +
 configs/Hyundai_A7HD_defconfig  | 1 +
 configs/Itead_Ibox_A20_defconfig| 1 +
 configs/Lamobo_R1_defconfig | 1 +
 configs/Linksprite_pcDuino3_Nano_defconfig  | 1 +
 configs/Linksprite_pcDuino3_defconfig   | 1 +
 configs/Linksprite_pcDuino_defconfig| 1 +
 configs/MK808C_defconfig| 1 +
 configs/MSI_Primo73_defconfig   | 1 +
 configs/MSI_Primo81_defconfig   | 1 +
 configs/Marsboard_A10_defconfig | 1 +
 configs/Mele_A1000G_quad_defconfig  | 1 +
 configs/Mele_A1000_defconfig| 1 +
 configs/Mele_I7_defconfig   | 1 +
 configs/Mele_M3_defconfig   | 1 +
 configs/Mele_M5_defconfig   | 1 +
 configs/Mele_M9_defconfig   | 1 +
 configs/Merrii_A80_Optimus_defconfig| 1 +
 configs/Mini-X_defconfig| 1 +
 configs/Nintendo_NES_Classic_Edition_defconfig  | 1 +
 configs/Orangepi_defconfig  | 1 +
 configs/Orangepi_mini_defconfig | 1 +
 configs/Sinlinx_SinA31s_defconfig   | 1 +
 configs/Sinlinx_SinA33_defconfig| 1 +
 configs/Sinovoip_BPI_M2_defconfig   | 1 +
 configs/Sinovoip_BPI_M3_defconfig   | 1 +
 configs/UTOO_P66_defconfig  | 1 +
 configs/Wexler_TAB7200_defconfig| 1 +
 configs/Wits_Pro_A20_DKT_defconfig  | 1 +
 configs/Wobo_i5_defconfig   | 1 +
 configs/Yones_Toptech_BD1078_defconfig  | 1 +
 configs/Yones_Toptech_BS1078_V2_defconfig   | 1 +
 configs/am335x_baltos_defconfig | 1 +
 configs/am335x_boneblack_defconfig  | 1 +
 configs/am335x_boneblack_vboot_defconfig| 1 +
 configs/am335x_evm_defconfig| 1 +
 configs/am335x_evm_nor_defconfig| 1 +
 configs/am335x_evm_norboot_defconfig| 1 +
 configs/am335x_evm_spiboot_defconfig| 1 +
 configs/am335x_evm_usbspl_defconfig | 1 +
 configs/am335x_igep0033_defconfig   | 1 +
 configs/am335x_shc_defconfig| 1 +
 configs/am335x_shc_ict_defconfig| 1 +
 configs/am335x_shc_netboot_defconfig| 1 +
 configs/am335x_shc_prompt_defconfig | 1 +
 configs/am335x_shc_sdboot_defconfig | 1 +
 configs/am335x_shc_sdboot_prompt_defconfig  | 1 +
 configs/am335x_sl50_defconfig   | 1 +
 configs/am43xx_evm_defconfig| 1 +
 configs/am43xx_evm_ethboot_defconfig| 1 +
 configs/am43xx_evm_qspiboot_defconfig   | 1 +
 configs/am43xx_evm_usbhost_boot_defconfig   | 1 +
 configs/am43xx_hs_evm_defconfig

[U-Boot] [PATCH 1/1] arm: mach-omap2: Fix secure file generation

2016-12-08 Thread Andrew F. Davis
When TI_SECURE_DEV_PKG is not defined we warn that the file '*_HS' was
not generated but generate an unsigned one anyway. When TI_SECURE_DEV_PKG
is exported and the user re-builds, make will detect this file as
unchangedand and so assume it does not need to be re-generated. This
causes it to pack unsigned files. Fix this by not generating these
fake unsigned *_HS files.

Signed-off-by: Andrew F. Davis 
---
 arch/arm/mach-omap2/config_secure.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/config_secure.mk 
b/arch/arm/mach-omap2/config_secure.mk
index 1122439..33c7059 100644
--- a/arch/arm/mach-omap2/config_secure.mk
+++ b/arch/arm/mach-omap2/config_secure.mk
@@ -35,12 +35,12 @@ cmd_omapsecureimg = 
$(TI_SECURE_DEV_PKG)/scripts/secure-binary-image.sh \
 else
 cmd_omapsecureimg = echo "WARNING:" \
"$(TI_SECURE_DEV_PKG)/scripts/secure-binary-image.sh not found." \
-   "$@ was NOT created!"; cp $< $@
+   "$@ was NOT created!";
 endif
 else
 cmd_omapsecureimg = echo "WARNING: TI_SECURE_DEV_PKG environment" \
"variable must be defined for TI secure devices." \
-   "$@ was NOT created!"; cp $< $@
+   "$@ was NOT created!";
 endif
 endif
 
-- 
2.10.2

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


Re: [U-Boot] [PATCH RESEND 7/9] video: Allow board hook before video init

2016-12-08 Thread Simon Glass
Hi Maxime,

On 6 December 2016 at 12:39, Maxime Ripard
 wrote:
> On Wed, Nov 23, 2016 at 07:21:07PM -0700, Simon Glass wrote:
>> Hi Maxime,
>>
>> On 22 November 2016 at 05:41, Maxime Ripard
>>  wrote:
>> > Hi Simon,
>> >
>> > On Mon, Nov 14, 2016 at 01:44:45PM -0700, Simon Glass wrote:
>> >> Hi Maxime,
>> >>
>> >> On 14 November 2016 at 13:24, Maxime Ripard
>> >>  wrote:
>> >> > Hi Simon,
>> >> >
>> >> > On Fri, Nov 11, 2016 at 09:17:28AM -0700, Simon Glass wrote:
>> >> >> Hi Maxime,
>> >> >>
>> >> >> On 8 November 2016 at 03:19, Maxime Ripard
>> >> >>  wrote:
>> >> >> > Some boards might need to some additional setup right before 
>> >> >> > initialising
>> >> >> > the video console.
>> >> >> >
>> >> >> > Add some hook to allow that.
>> >> >>
>> >> >> Instead of this, can you use driver model (UCLASS_VIDEO)?
>> >> >
>> >> > I don't really know the device model that well, hence 'm not really
>> >> > sure how would that help. Can a board register a hook to be called
>> >> > before a driver is probed?
>> >>
>> >> My suggest would be that the driver can do whatever is required. What
>> >> is the board-specific code actually wanting to do?
>> >
>> > We need to adjust the video-mode environment variable that is going to
>> > be used in the driver's initialisation. We're doing that by
>> > identifying which daughter board is attached, and then setting that
>> > value according to the display output we want to use.
>> >
>> > So we need some hook that would run between the environment
>> > initialisation and the video driver's init.
>>
>> As an example of how you might pass platform data to the video driver,
>> see board_init() in gurnard.c.
>
> That's very useful, thanks!
>
> Can you also postpone the probe of one driver, or at least defer a
> driver's probe until some other is done?

Well a device is not probed until it is used (or at least that is how
it is supposed to work).

So perhaps you can probe the device in the driver that needs it? For
example, if video probe needs GPIOs you can probe the GPIOs
automatically (e.g. if you use something like gpio_request_by_name()
in your video probe()).

>
> The way we identify the daughter boards also rely on some driver in
> the device model (a 1-Wire EEPROM, connected on a GPIO, both of them
> also being part of the device model), so we need to defer the video
> driver probe until both of them have been probed and accessed.
>

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


Re: [U-Boot] [PATCH v3 3/6] arm64: mvebu: pinctrl: Add pin control driver for A8K family

2016-12-08 Thread Simon Glass
Hi,

On 7 December 2016 at 03:03, Kostya Porotchkin  wrote:
> Hello, Simon,
>
> Thank you very much for your review.
> Yes, this patch was only adding some help to Kconfig (as you requested), no 
> other changes from the previous version.
> I have to re-send the entire series one more time for moving the change log 
> from commit messages to comment sections.
> Some changes will be done on other patches, but this one will remain the same 
> as v3.
>

OK, please add my review tag for anything I have reviewed, when you
resend it. It saves me needing to review again.

Thanks,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Makefile: Fix linking with modern binutils

2016-12-08 Thread Simon Glass
On 7 December 2016 at 22:22, Joel Stanley  wrote:
> Since Binutils 1a9ccd70f9a7[1] u-boot will not link targets that set
> CONFIG_SYS_TEXT_BASE=0 with the following error:
>
>   LD  u-boot
> arm-linux-gnueabi-ld.bfd: u-boot: Not enough room for program headers, try
>  linking with -N
> arm-linux-gnueabi-ld.bfd: final link failed: Bad value
>
> The issue can reproduced the bad binutils and the rock2_defconfig target.
>
> This issue was also encountered by the powerpc kernel[2], with the fix
> being to pass --no-dynamic-linker for linkers newer than 2.26 when this
> flag was introduced. While version 2.26 and 2.27 will not show this
> error, we are technically creating invalid ELF files without this
> option.
>
> Ubuntu Zesty's Binutils 2.27.51.20161202 hits this error.
>
> [1] 
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=1a9ccd70f9a7
> [2] 
> https://git.kernel.org/cgit/linux/kernel/git/powerpc/linux.git/commit/?h=next=ff45000fcb56b5b0f1a14a865d3541746d838a0a
>
> Signed-off-by: Joel Stanley 
> ---
>  Makefile | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)

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


Re: [U-Boot] [PATCH] regulator: fixed: Add support to handle enable-active-high DT property

2016-12-08 Thread Simon Glass
On 7 December 2016 at 06:25, Vignesh R  wrote:
> Add support to handle enable-active-high DT property. This property is
> used to drive the gpio controlling fixed regulator as active high when
> claiming gpio line.
>
> Signed-off-by: Vignesh R 
> ---
>  doc/device-tree-bindings/regulator/fixed.txt | 4 
>  drivers/power/regulator/fixed.c  | 7 ++-
>  2 files changed, 10 insertions(+), 1 deletion(-)

Acked-by: Simon Glass 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 08/23] armv8: move reset branch into boot hook

2016-12-08 Thread Simon Glass
On 5 December 2016 at 08:43, Andre Przywara  wrote:
> Hi,
>
> On 05/12/16 06:25, Simon Glass wrote:
>> Hi Andre,
>>
>> On 4 December 2016 at 18:52, Andre Przywara  wrote:
>>> The boot0 hook we have so far is applied _after_ the initial branch
>>> to the "reset" entry point. An upcoming change requires even this
>>> branch to be changed, so we apply the hook macro at the earliest
>>> point, and have the branch in the hook file as well.
>>> This is no functional change at this point, just refactoring to simplify
>>> upcoming patches.
>>>
>>> Signed-off-by: Andre Przywara 
>>> ---
>>>  arch/arm/cpu/armv8/start.S  | 4 ++--
>>>  arch/arm/include/asm/arch-sunxi/boot0.h | 1 +
>>>  2 files changed, 3 insertions(+), 2 deletions(-)
>>
>> Will this not affect other boards which use ARM_SOC_BOOT0_HOOK?
>
> That's a valid question, but the answer is: no.
> This roughly same mechanism is used by two Broadcom ARMv7 boards, but
> the usage is different there: they include the boot0.h header file only
> after the vectors (and not only after the initial branch-to-reset).
> So this is already different and not compatible between armv7 and armv8
> right now, so it's not a regression or change this patch is introducing.
>
> I agree it's a bit confusing to have the same header and Kconfig name,
> but a different behaviour, but I don't see a good solution to unify
> this. If you do, I am all ears.

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


Re: [U-Boot] [PATCH] miniarm-rk3288: set isp/vop qos priority level

2016-12-08 Thread Simon Glass
Hi Nickey,

On 7 December 2016 at 01:16, Nickey Yang  wrote:
> isp-camera image will be broken when enter dual screen display mode.
> We set isp qos high to solve this problem.
>
> Signed-off-by: Nickey Yang 
> ---
>
>  board/rockchip/miniarm_rk3288/miniarm-rk3288.c | 23 +++
>  1 file changed, 23 insertions(+)
>
> diff --git a/board/rockchip/miniarm_rk3288/miniarm-rk3288.c 
> b/board/rockchip/miniarm_rk3288/miniarm-rk3288.c
> index 79541a3..7b90be5 100644
> --- a/board/rockchip/miniarm_rk3288/miniarm-rk3288.c
> +++ b/board/rockchip/miniarm_rk3288/miniarm-rk3288.c
> @@ -5,3 +5,26 @@
>   */
>
>  #include 
> +#include 
> +
> +/* cpu axi qos priority */
> +#define CPU_AXI_QOS_PRIORITY_LEVEL(h, l) \
> +   h) & 3) << 2) | ((l) & 3))
> +
> +int rk_board_late_init(void)
> +{
> +   /* read latency configure */
> +   writel(0x34, 0xffac + 0x14);
> +   writel(0x34, 0xffac0080 + 0x14);

What is this register? Can you please define a struct for it in a
header file in arch/arm/include/asm/arch-rockchip/ ?

> +
> +   /* set isp qos to highest priority */
> +   writel(CPU_AXI_QOS_PRIORITY_LEVEL(2, 2), 0xffad0908);
> +   writel(CPU_AXI_QOS_PRIORITY_LEVEL(2, 2), 0xffad0108);
> +   writel(CPU_AXI_QOS_PRIORITY_LEVEL(2, 2), 0xffad0188);
> +
> +   /* set vop qos to highest priority */
> +   writel(CPU_AXI_QOS_PRIORITY_LEVEL(2, 2), 0xffad0008);
> +   writel(CPU_AXI_QOS_PRIORITY_LEVEL(2, 2), 0xffad0408);
> +
> +   return 0;
> +}
> --
> 1.9.1
>
>

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


Re: [U-Boot] [PATCH 12/14] fdt: eth_fixup: Add hook for board to override MAC

2016-12-08 Thread Simon Glass
Hi Oliver,

On 7 December 2016 at 02:26, Olliver Schinagl  wrote:
>
>
> On December 7, 2016 4:47:23 AM CET, Simon Glass  wrote:
>>Hi Oliver,
>>
>>On 5 December 2016 at 03:28, Olliver Schinagl 
>>wrote:
>>> Hey Simon,
>>>
>>>
>>>
>>> On 05-12-16 07:24, Simon Glass wrote:

 Hi Oliver,

 On 2 December 2016 at 03:16, Olliver Schinagl 
>>wrote:
>
> Hey Joe,
>
>
>
> On 30-11-16 21:40, Joe Hershberger wrote:
>>
>> On Fri, Nov 25, 2016 at 9:30 AM, Olliver Schinagl
>>
>> wrote:
>>>
>>> This patch adds a method for the board to set the MAC address if
>>the
>>> environment is not yet set. The environment based MAC addresses
>>are not
>>> touched, but if the fdt has an alias set, it is parsed and put
>>into the
>>> environment.
>>>
>>> E.g. The environment contains ethaddr and eth1addr, and the fdt
>>> contains
>>> an ethernet1 nothing happens. If the fdt contains ethernet2
>>however, it
>>> is parsed and inserted into the environment as eth2addr.
>>>
>>> Signed-off-by: Olliver Schinagl 
>>> ---
>>>common/fdt_support.c | 8 +++-
>>>1 file changed, 7 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/common/fdt_support.c b/common/fdt_support.c
>>> index c34a13c..f127392 100644
>>> --- a/common/fdt_support.c
>>> +++ b/common/fdt_support.c
>>> @@ -465,6 +465,11 @@ int fdt_fixup_memory(void *blob, u64 start,
>>u64
>>> size)
>>>   return fdt_fixup_memory_banks(blob, , , 1);
>>>}
>>>
>>> +__weak int board_get_enetaddr(const int i, unsigned char
>>*mac_addr)
>>
>> Ugh. This collides with a function in board/v38b/ethaddr.c and in
>> board/intercontrol/digsy_mtc/digsy_mtc.c
>>
>> Also, it's so generic, and only gets called by the fdt fixup
>>stuff...
>> This function should probably be named in such a way that its
>> association with fdt is clear.
>
> I did not notice that, sorry! But naming suggestions are welcome :)
>
> Right now, I use it in two unrelated spots however.
>
> from the fdt as seen above and in a subclass driver (which will
>>come up
> for
> review) as suggested by Simon.
>
> There I do:
>
> +static int sunxi_gmac_eth_read_rom_hwaddr(struct udevice *dev)
> +{
> +   struct eth_pdata *pdata = dev_get_platdata(dev);
> +
> +   return board_get_enetaddr(dev->seq, pdata->enetaddr);
> +}
> +
>   const struct eth_ops sunxi_gmac_eth_ops = {
>  .start  = designware_eth_start,
>  .send   = designware_eth_send,
> @@ -102,6 +110,7 @@ const struct eth_ops sunxi_gmac_eth_ops = {
>  .free_pkt   = designware_eth_free_pkt,
>  .stop   = designware_eth_stop,
>  .write_hwaddr   = designware_eth_write_hwaddr,
> +   .read_rom_hwaddr= sunxi_gmac_eth_read_rom_hwaddr,
>   };
>
> which is completly unrelated to the fdt.
>
> So naming suggestion or overal suggestion how to handle this nice
>>and
> generically?
>
> Based from the name however I would think that all
>>board_get_enetaddr's
> work
> the same however so should have been interchangeable? Or was that
>>silly
> thinking?

 Would it be possible to use a name without 'board' in it? I think
>>this
 / hope is actually sunxi-specific code, not board-specific?
>>>
>>> You are actually correct, we take the serial number of the SoC (sunxi
>>> specific) and generate a serial/MAC from it. So nothing to do with
>>the
>>> board. So I can just name it sunxi_gen_enetaddr(). Would that be then
>>(much)
>>> better?
>>>
>>> The reason why I went to 'board' with my mind, is because a) the
>>original
>>> mac gen code and b) the location was in board/sunxi/board.c. I think
>>it is
>>> thus also sensible to move it out of board/sunxi/board.c as indeed,
>>it has
>>> nothing to do with board(s).
>>
>>That sounds good to me - and you should be able to call it directly
>>from the driver and avoid any weak functions, right?
> The subclass driver can, the fdt fixup however still needs a weak 
> fdt_get_enetaddr()? (Which in our case calls then sunxi_get_enetaddr() i 
> think.)

OK - I feel that the fdt fixups need a bit of thought. At the moment
it is all pretty ad-hoc.

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


Re: [U-Boot] Use of QEMU UEFI payland with persistent environment

2016-12-08 Thread Simon Glass
Hi Otavio,

On 8 December 2016 at 14:03, Otavio Salvador
 wrote:
> On Thu, Dec 8, 2016 at 4:55 PM, Simon Glass  wrote:
>> Hi Otavio,
>>
>> On 8 December 2016 at 10:39, Otavio Salvador
>>  wrote:
>>> Hello everyone,
>>>
>>> We are trying to automate some tests and one of the parts of the
>>> project requires the use of persistent environment.
>>>
>>> Due performance advantages we would like to use x86 with KVM to
>>> execute the tests however after booting QEMU with the UEFI payload it
>>> turns out the environment cannot be saved. Did someone ever made it
>>> work?
>>
>> Do you expect it to save to SPI flash? If so, does QEMU provide a way
>> to emulate that in a persistent file, or similar?
>
> The SPI flash would be ideal as we could keep it for reuse.
>
> It seems we can pass a file with:
>
> -drive if=pflash,format=raw,
>
> But I did not find how to make it writable and make U-Boot to use it.

As an example, chromebook_link enables the SPI environment, so you
could copy the ENV_IS_IN_SPI_FLASH, etc. options from there.

To save it, 'saveenv' should work.

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


[U-Boot] [PATCH 1/7] configs: Fixup defconfigs ordering

2016-12-08 Thread Andrew F. Davis
When Kconfig options are added, modified, or removed the may this
may change the 'natural' order of the defconfig files. This order
is produced with 'make savedefconfig' and tools that automaticaly
modifiy defconfigs need this order maintained.

This can easily be accomplished by running 'tools/moveconfig.py -s'.

Do this here.

Signed-off-by: Andrew F. Davis 
---
 configs/A10-OLinuXino-Lime_defconfig   |  2 +-
 configs/A20-OLinuXino-Lime2_defconfig  |  2 +-
 configs/A20-OLinuXino-Lime_defconfig   |  2 +-
 configs/A20-OLinuXino_MICRO_defconfig  |  2 +-
 configs/A20-Olimex-SOM-EVB_defconfig   |  2 +-
 configs/B4860QDS_SECURE_BOOT_defconfig |  2 +-
 configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig |  2 +-
 configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig |  2 +-
 configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig  |  2 +-
 configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig  |  2 +-
 .../BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig   |  2 +-
 .../BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig   |  2 +-
 .../BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig |  2 +-
 .../BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig |  2 +-
 configs/Bananapi_defconfig |  2 +-
 configs/Bananapro_defconfig|  2 +-
 configs/C29XPCIE_NOR_SECBOOT_defconfig |  2 +-
 configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig|  2 +-
 configs/Chuwi_V7_CW0825_defconfig  |  1 -
 configs/Cubieboard2_defconfig  |  2 +-
 configs/Cubieboard_defconfig   |  2 +-
 configs/Cubietruck_defconfig   |  2 +-
 configs/Itead_Ibox_A20_defconfig   |  2 +-
 configs/Lamobo_R1_defconfig|  2 +-
 configs/Linksprite_pcDuino3_Nano_defconfig |  2 +-
 configs/Linksprite_pcDuino3_defconfig  |  2 +-
 configs/MPC8610HPCD_defconfig  |  3 +-
 configs/MPC8641HPCN_36BIT_defconfig|  3 +-
 configs/MPC8641HPCN_defconfig  |  3 +-
 configs/MSI_Primo81_defconfig  |  1 -
 configs/Marsboard_A10_defconfig|  2 +-
 configs/Mele_A1000_defconfig   |  2 +-
 configs/Mele_M5_defconfig  |  2 +-
 configs/Orangepi_defconfig |  2 +-
 configs/Orangepi_mini_defconfig|  2 +-
 configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig   |  2 +-
 configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig|  2 +-
 .../P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig   |  2 +-
 configs/P1010RDB-PA_NAND_SECBOOT_defconfig |  2 +-
 configs/P1010RDB-PA_NOR_SECBOOT_defconfig  |  2 +-
 configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig |  2 +-
 configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig   |  2 +-
 configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig|  2 +-
 .../P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig   |  2 +-
 configs/P1010RDB-PB_NAND_SECBOOT_defconfig |  2 +-
 configs/P1010RDB-PB_NOR_SECBOOT_defconfig  |  2 +-
 configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig |  2 +-
 configs/P2041RDB_SECURE_BOOT_defconfig |  2 +-
 configs/P3041DS_NAND_SECURE_BOOT_defconfig |  2 +-
 configs/P3041DS_SECURE_BOOT_defconfig  |  2 +-
 configs/P4080DS_SECURE_BOOT_defconfig  |  2 +-
 configs/P5020DS_NAND_SECURE_BOOT_defconfig |  2 +-
 configs/P5020DS_SECURE_BOOT_defconfig  |  2 +-
 configs/P5040DS_NAND_SECURE_BOOT_defconfig |  2 +-
 configs/P5040DS_SECURE_BOOT_defconfig  |  2 +-
 configs/T1023RDB_SECURE_BOOT_defconfig |  2 +-
 configs/T1024QDS_DDR4_SECURE_BOOT_defconfig|  2 +-
 configs/T1024QDS_SECURE_BOOT_defconfig |  2 +-
 configs/T1024RDB_SECURE_BOOT_defconfig |  2 +-
 configs/T1040D4RDB_SECURE_BOOT_defconfig   |  2 +-
 configs/T1040QDS_SECURE_BOOT_defconfig |  2 +-
 configs/T1040RDB_SECURE_BOOT_defconfig |  2 +-
 configs/T1042D4RDB_SECURE_BOOT_defconfig   |  2 +-
 configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig |  2 +-
 configs/T1042RDB_SECURE_BOOT_defconfig |  2 +-
 configs/T2080QDS_SECURE_BOOT_defconfig |  2 +-
 configs/T2080RDB_SECURE_BOOT_defconfig |  2 +-
 configs/T4160QDS_SECURE_BOOT_defconfig |  2 +-
 configs/T4240QDS_SECURE_BOOT_defconfig |  2 +-
 configs/Wits_Pro_A20_DKT_defconfig |  2 +-
 configs/am43xx_evm_defconfig   |  2 +-
 configs/am43xx_hs_evm_defconfig|  2 +-
 configs/am57xx_evm_defconfig   |  4 +-
 configs/am57xx_hs_evm_defconfig|  4 +-
 configs/arndale_defconfig  |  1 -
 configs/bayleybay_defconfig|  2 +-
 configs/chromebit_mickey_defconfig |  7 +---

[U-Boot] [PATCH 6/7] disk: Convert CONFIG_AMIGA_PARTITION to Kconfig

2016-12-08 Thread Andrew F. Davis
Signed-off-by: Andrew F. Davis 
---
 configs/sandbox_defconfig   | 1 +
 configs/sandbox_noblk_defconfig | 1 +
 configs/sandbox_spl_defconfig   | 1 +
 disk/Kconfig| 8 
 include/configs/sandbox.h   | 1 -
 5 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index 3cc72fe..0c35f6a 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -54,6 +54,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_MAC_PARTITION=y
 CONFIG_DOS_PARTITION=y
 CONFIG_ISO_PARTITION=y
+CONFIG_AMIGA_PARTITION=y
 CONFIG_OF_CONTROL=y
 CONFIG_OF_HOSTFILE=y
 CONFIG_NETCONSOLE=y
diff --git a/configs/sandbox_noblk_defconfig b/configs/sandbox_noblk_defconfig
index 06d0f59..4635abc 100644
--- a/configs/sandbox_noblk_defconfig
+++ b/configs/sandbox_noblk_defconfig
@@ -59,6 +59,7 @@ CONFIG_CMD_FS_GENERIC=y
 CONFIG_MAC_PARTITION=y
 CONFIG_DOS_PARTITION=y
 CONFIG_ISO_PARTITION=y
+CONFIG_AMIGA_PARTITION=y
 CONFIG_OF_CONTROL=y
 CONFIG_OF_HOSTFILE=y
 CONFIG_NETCONSOLE=y
diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig
index 42080dd..ec92bba 100644
--- a/configs/sandbox_spl_defconfig
+++ b/configs/sandbox_spl_defconfig
@@ -61,6 +61,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_MAC_PARTITION=y
 CONFIG_DOS_PARTITION=y
 CONFIG_ISO_PARTITION=y
+CONFIG_AMIGA_PARTITION=y
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_HOSTFILE=y
diff --git a/disk/Kconfig b/disk/Kconfig
index b25b6ad..fafd5ef 100644
--- a/disk/Kconfig
+++ b/disk/Kconfig
@@ -32,4 +32,12 @@ config ISO_PARTITION
  for U-Boot to process ISO disk partition and load images from
  ISO partitioned drives.
 
+config AMIGA_PARTITION
+   bool "Support AMIGA Partitions"
+   depends on PARTITIONS
+   help
+ Enable support for AMIGA disk partitions. This provides a means
+ for U-Boot to process AMIGA disk partition and load images from
+ AMIGA partitioned drives.
+
 endmenu
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 09502b2..30b2ff1 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -49,7 +49,6 @@
 
 #define CONFIG_CMD_GPT
 #define CONFIG_PARTITION_UUIDS
-#define CONFIG_AMIGA_PARTITION
 #define CONFIG_EFI_PARTITION
 
 /*
-- 
2.10.2

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


[U-Boot] [PATCH 2/7] disk: Add CONFIG_PARTITION to Kconfig

2016-12-08 Thread Andrew F. Davis
Signed-off-by: Andrew F. Davis 
---
 Kconfig   |  2 ++
 disk/Kconfig  | 11 +++
 include/config_defaults.h |  1 -
 3 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 disk/Kconfig

diff --git a/Kconfig b/Kconfig
index a44ac91..de1dcb9 100644
--- a/Kconfig
+++ b/Kconfig
@@ -313,6 +313,8 @@ source "common/Kconfig"
 
 source "cmd/Kconfig"
 
+source "disk/Kconfig"
+
 source "dts/Kconfig"
 
 source "net/Kconfig"
diff --git a/disk/Kconfig b/disk/Kconfig
new file mode 100644
index 000..7df73fc
--- /dev/null
+++ b/disk/Kconfig
@@ -0,0 +1,11 @@
+menu "Disk Partition Support"
+
+config PARTITIONS
+   bool "Support Disk Partitions"
+   default y
+   help
+ Enable U-Boot's disk partition functions. This provides a means
+ for U-Boot to process disk partition and load images from partitioned
+ drives.
+
+endmenu
diff --git a/include/config_defaults.h b/include/config_defaults.h
index ad08c1d..7ef928b 100644
--- a/include/config_defaults.h
+++ b/include/config_defaults.h
@@ -18,6 +18,5 @@
 
 #define CONFIG_GZIP 1
 #define CONFIG_ZLIB 1
-#define CONFIG_PARTITIONS 1
 
 #endif
-- 
2.10.2

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


[U-Boot] [PATCH 3/7] disk: Convert CONFIG_MAC_PARTITION to Kconfig

2016-12-08 Thread Andrew F. Davis
Signed-off-by: Andrew F. Davis 
---
 configs/CPCI4052_defconfig  | 1 +
 configs/M5253DEMO_defconfig | 1 +
 configs/M5253EVBE_defconfig | 1 +
 configs/MIP405T_defconfig   | 1 +
 configs/MIP405_defconfig| 1 +
 configs/MiniFAP_defconfig   | 1 +
 configs/O2D300_defconfig| 1 +
 configs/O2DNT2_RAMBOOT_defconfig| 1 +
 configs/O2DNT2_defconfig| 1 +
 configs/O2D_defconfig   | 1 +
 configs/O2I_defconfig   | 1 +
 configs/O2MNT_O2M110_defconfig  | 1 +
 configs/O2MNT_O2M112_defconfig  | 1 +
 configs/O2MNT_O2M113_defconfig  | 1 +
 configs/O2MNT_defconfig | 1 +
 configs/O3DNT_defconfig | 1 +
 configs/PIP405_defconfig| 1 +
 configs/PLU405_defconfig| 1 +
 configs/PMC440_defconfig| 1 +
 configs/TQM5200S_HIGHBOOT_defconfig | 1 +
 configs/TQM5200S_defconfig  | 1 +
 configs/TQM5200_B_HIGHBOOT_defconfig| 1 +
 configs/TQM5200_B_defconfig | 1 +
 configs/TQM5200_STK100_defconfig| 1 +
 configs/TQM5200_defconfig   | 1 +
 configs/TQM823L_LCD_defconfig   | 1 +
 configs/TQM823L_defconfig   | 1 +
 configs/TQM823M_defconfig   | 1 +
 configs/TQM850L_defconfig   | 1 +
 configs/TQM850M_defconfig   | 1 +
 configs/TQM855L_defconfig   | 1 +
 configs/TQM855M_defconfig   | 1 +
 configs/TQM860L_defconfig   | 1 +
 configs/TQM860M_defconfig   | 1 +
 configs/TQM862L_defconfig   | 1 +
 configs/TQM862M_defconfig   | 1 +
 configs/TQM866M_defconfig   | 1 +
 configs/TQM885D_defconfig   | 1 +
 configs/TTTech_defconfig| 1 +
 configs/a4m072_defconfig| 1 +
 configs/acadia_defconfig| 1 +
 configs/arches_defconfig| 1 +
 configs/bamboo_defconfig| 1 +
 configs/bayleybay_defconfig | 1 +
 configs/cam5200_defconfig   | 1 +
 configs/cam5200_niosflash_defconfig | 1 +
 configs/canyonlands_defconfig   | 1 +
 configs/charon_defconfig| 1 +
 configs/chromebook_link_defconfig   | 1 +
 configs/chromebook_samus_defconfig  | 1 +
 configs/chromebox_panther_defconfig | 1 +
 configs/cm5200_defconfig| 1 +
 configs/conga-qeval20-qa3-e3845-internal-uart_defconfig | 1 +
 configs/conga-qeval20-qa3-e3845_defconfig   | 1 +
 configs/coreboot-x86_defconfig  | 1 +
 configs/cougarcanyon2_defconfig | 1 +
 configs/crownbay_defconfig  | 1 +
 configs/dbau1000_defconfig  | 1 +
 configs/dbau1100_defconfig  | 1 +
 configs/dbau1500_defconfig  | 1 +
 configs/devconcenter_defconfig  | 1 +
 configs/dfi-bt700-q7x-151_defconfig | 1 +
 configs/efi-x86_defconfig   | 1 +
 configs/fo300_defconfig | 1 +
 configs/galileo_defconfig   | 1 +
 configs/glacier_defconfig   | 1 +
 configs/glacier_ramboot_defconfig   | 1 +
 configs/gr_cpci_ax2000_defconfig| 1 +
 configs/gr_ep2s60_defconfig | 1 +
 configs/gr_xc3s_1500_defconfig  | 1 +
 configs/grsim_defconfig | 1 +
 configs/grsim_leon2_defconfig   | 1 +
 configs/inka4x0_defconfig   | 1 +
 configs/intip_defconfig | 1 +
 configs/jupiter_defconfig   | 1 +
 configs/lwmon5_defconfig| 1 +
 configs/minnowmax_defconfig | 1 +
 configs/mpc5121ads_defconfig| 1 +
 configs/mpc5121ads_rev2_defconfig  

Re: [U-Boot] [PATCH v2] arm: am33xx: Initialize EMIF REG_PR_OLD_COUNT for BBB and am335x-evm

2016-12-08 Thread Jyri Sarha
On 12/08/16 16:30, Tom Rini wrote:
> On Thu, Dec 08, 2016 at 12:19:01PM +0200, Jyri Sarha wrote:
> 
>> Initialize EMIF OCP_CONFIG registers REG_COS_COUNT_1, REG_COS_COUNT_2,
>> and REG_PR_OLD_COUNT field for Beaglebone-Black and am335x-evm. With
>> the default values LCDC suffers from DMA FIFO underflows and frame
>> synchronization lost errors. The initialization values are the highest
>> that work flawlessly when heavy memory load is generated by CPU. 32bpp
>> colors were used in the test. On BBB the video mode used 110MHz pixel
>> clock. The mode supported by the panel of am335x-evm uses 30MHz pixel
>> clock.
>>
>> Signed-off-by: Jyri Sarha 
> 
> Reviewed-by: Tom Rini 
> 
> But, does TI have a whitepaper or tech pub or anything that describes
> how one would calculate that value on a custom design?  Tweaking that
> for optimal usage is something I know happens in some cases and could be
> used in a lot more.  If there's a doc that explains how to figure it
> out, it would be good to link to it in the comments in the patch as
> well.  Since I don't know that such a thing does exist I'll reviewed-by
> it now tho.  Thanks!
> 

No there is no such thing. Actually the documentation of the whole
feature is quite limited in the public documentation. I could add a
reference to "7.3.3.5.2 Command Starvation" in am335x TRM with a remark
that "advanced bandwidth/prioritization control" the section mentions is
broken in all currently available am3 revisions and only
REG_PR_OLD_COUNT has real effect.

In practice the only rule to find an optimal value is to find as high as
possible REG_PR_OLD_COUNT value that does not produce LCDC FIFO
underflows under worst case scenario. The worst case happens when the
highest pixel clock videomode with maximum bpp is used while memory
subsystem is stressed by endless stream of writes hitting the same
memory memory bank (can be the same address).

Best regards,
Jyri
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] zynq: spi: Honour the activation / deactivation delay

2016-12-08 Thread Moritz Fischer
This is not currently implemented. Add support for this so that the
Chrome OS EC can be used reliably.

Signed-off-by: Moritz Fischer 
Cc: Jagan Teki 
Cc: Simon Glass 
Cc: u-boot@lists.denx.de
---
 drivers/spi/zynq_spi.c | 24 
 1 file changed, 24 insertions(+)

diff --git a/drivers/spi/zynq_spi.c b/drivers/spi/zynq_spi.c
index 15ca271..5e7954c 100644
--- a/drivers/spi/zynq_spi.c
+++ b/drivers/spi/zynq_spi.c
@@ -56,6 +56,8 @@ struct zynq_spi_platdata {
struct zynq_spi_regs *regs;
u32 frequency;  /* input frequency */
u32 speed_hz;
+   uint deactivate_delay_us;   /* Delay to wait after deactivate */
+   uint activate_delay_us; /* Delay to wait after activate */
 };
 
 /* zynq spi priv */
@@ -63,6 +65,7 @@ struct zynq_spi_priv {
struct zynq_spi_regs *regs;
u8 cs;
u8 mode;
+   ulong last_transaction_us;  /* Time of last transaction end */
u8 fifo_depth;
u32 freq;   /* required frequency */
 };
@@ -78,6 +81,10 @@ static int zynq_spi_ofdata_to_platdata(struct udevice *bus)
/* FIXME: Use 250MHz as a suitable default */
plat->frequency = fdtdec_get_int(blob, node, "spi-max-frequency",
25000);
+   plat->deactivate_delay_us = fdtdec_get_int(blob, node,
+   "spi-deactivate-delay", 0);
+   plat->activate_delay_us = fdtdec_get_int(blob, node,
+"spi-activate-delay", 0);
plat->speed_hz = plat->frequency / 2;
 
debug("%s: regs=%p max-frequency=%d\n", __func__,
@@ -133,10 +140,19 @@ static int zynq_spi_probe(struct udevice *bus)
 static void spi_cs_activate(struct udevice *dev)
 {
struct udevice *bus = dev->parent;
+   struct zynq_spi_platdata *plat = bus->platdata;
struct zynq_spi_priv *priv = dev_get_priv(bus);
struct zynq_spi_regs *regs = priv->regs;
u32 cr;
 
+   /* If it's too soon to do another transaction, wait */
+   if (plat->deactivate_delay_us && priv->last_transaction_us) {
+   ulong delay_us; /* The delay completed so far */
+   delay_us = timer_get_us() - priv->last_transaction_us;
+   if (delay_us < plat->deactivate_delay_us)
+   udelay(plat->deactivate_delay_us - delay_us);
+   }
+
clrbits_le32(>cr, ZYNQ_SPI_CR_CS_MASK);
cr = readl(>cr);
/*
@@ -147,15 +163,23 @@ static void spi_cs_activate(struct udevice *dev)
 */
cr |= (~(1 << priv->cs) << ZYNQ_SPI_CR_SS_SHIFT) & ZYNQ_SPI_CR_CS_MASK;
writel(cr, >cr);
+
+   if (plat->activate_delay_us)
+   udelay(plat->activate_delay_us);
 }
 
 static void spi_cs_deactivate(struct udevice *dev)
 {
struct udevice *bus = dev->parent;
+   struct zynq_spi_platdata *plat = bus->platdata;
struct zynq_spi_priv *priv = dev_get_priv(bus);
struct zynq_spi_regs *regs = priv->regs;
 
setbits_le32(>cr, ZYNQ_SPI_CR_CS_MASK);
+
+   /* Remember time of this transaction so we can honour the bus delay */
+   if (plat->deactivate_delay_us)
+   priv->last_transaction_us = timer_get_us();
 }
 
 static int zynq_spi_claim_bus(struct udevice *dev)
-- 
2.7.4

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


Re: [U-Boot] [PATCH v6 1/2] armv8/fsl-layerscape: fdt: fixup LS1043A rev1 GIC node

2016-12-08 Thread york sun
On 11/16/2016 05:14 PM, Wenbin Song wrote:
> []  ok, I will make this change  in the next version of the patch.
>

Wenbin,

Have you sent an update for this set?

York

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


Re: [U-Boot] Use of QEMU UEFI payland with persistent environment

2016-12-08 Thread Otavio Salvador
On Thu, Dec 8, 2016 at 4:55 PM, Simon Glass  wrote:
> Hi Otavio,
>
> On 8 December 2016 at 10:39, Otavio Salvador
>  wrote:
>> Hello everyone,
>>
>> We are trying to automate some tests and one of the parts of the
>> project requires the use of persistent environment.
>>
>> Due performance advantages we would like to use x86 with KVM to
>> execute the tests however after booting QEMU with the UEFI payload it
>> turns out the environment cannot be saved. Did someone ever made it
>> work?
>
> Do you expect it to save to SPI flash? If so, does QEMU provide a way
> to emulate that in a persistent file, or similar?

The SPI flash would be ideal as we could keep it for reuse.

It seems we can pass a file with:

-drive if=pflash,format=raw,

But I did not find how to make it writable and make U-Boot to use it.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] Adding MSCC PHY-VSC8530-VSC8531-VSC8540-VSC8541

2016-12-08 Thread Joe Hershberger
Hi John,

I have some additional comments beyond Alexey's.

On Wed, Dec 7, 2016 at 11:11 AM, John Haechten
 wrote:
> From 127c5fb9ef390cad5cf58e446110a696cf111345 Mon Sep 17 00:00:00 2001
> From: John Haechten 
> Date: Wed, 7 Dec 2016 07:51:37 -0800
> Subject: [PATCH] Adding MSCC PHY-VSC8530-VSC8531-VSC8540-VSC8541
>
> (C) Copyright 2016 Microsemi Corporation, MIT License (MIT)
> Author:John Haechten 
> Reviewed-by:Howard Hicks 
> Reviewed-by:Joe Hershberger 

You should not add a "Reviewed-by:" tag just because I gave feedback.
The meaning of a Reviewed-by: tag is that it is reviewed and
acceptable in the eyes of that reviewer. The reviewer will reply with
the Reviewed-by: tag when they approve. If they reply to your patch
and there is no need for a new version, then there is nothing further
that you need to do. If you do get a Reviewed-by: that someone
replies, but some other reviewer or custodian asks for a change that
means a new version, then you need to add any Reviewed-by: or
Tested-by: tags that people sent (unless the change is so drastic as
to invalidate the review or test).

Also, all tags should be followed by a space before the name of the
person or other content. Perhaps this is why patman isn't handling
your tags properly.

> Tested-by:Howard Hicks 
> Version:1

In the future, you should not specify a version until it is version 2.

> Prefix:None
> Signed-off-by: John Haechten 
>
> ---
>
> drivers/net/phy/Makefile|   1 +
> drivers/net/phy/mscc.c  | 480 
> drivers/net/phy/phy.c   |   3 +
> include/config_phylib_all_drivers.h |   1 +
> include/configs/am335x_evm.h|   3 +
> include/phy.h   |   1 +
> 6 files changed, 489 insertions(+)
> create mode 100644 drivers/net/phy/mscc.c
>
> diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
> index 1e299b9..d372971 100644
> --- a/drivers/net/phy/Makefile
> +++ b/drivers/net/phy/Makefile
> @@ -27,3 +27,4 @@ obj-$(CONFIG_PHY_TERANETICS) += teranetics.o
> obj-$(CONFIG_PHY_TI) += ti.o
> obj-$(CONFIG_PHY_XILINX) += xilinx_phy.o
> obj-$(CONFIG_PHY_VITESSE) += vitesse.o
> +obj-$(CONFIG_PHY_MSCC) += mscc.o
> diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c
> new file mode 100644
> index 000..e63bd43
> --- /dev/null
> +++ b/drivers/net/phy/mscc.c
> @@ -0,0 +1,480 @@
> +/*
> + * Driver for Microsemi VSC85xx PHYs
> + *
> + * Author: John Haechten
> + *
> + * The MIT License (MIT)
> + *
> + * Copyright (c) 2016 Microsemi Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a 
> copy
> + * of this software and associated documentation files (the "Software"), to 
> deal
> + * in the Software without restriction, including without limitation the 
> rights
> + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> + * copies of the Software, and to permit persons to whom the Software is
> + * furnished to do so, subject to the following conditions:
> + * The above copyright notice and this permission notice shall be included in
> + * all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
> THE
> + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
> FROM,
> + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
> THE
> + * SOFTWARE.
> + *
> + */
> +
> +#include 
> +#include 
> +
> +/* Note: To include this PHY Driver file, #define CONFIG_PHY_MSCC */
> +
> +/* Microsemi PHY ID's */
> +#define PHY_ID_VSC8530  0x00070560
> +#define PHY_ID_VSC8531  0x00070570
> +#define PHY_ID_VSC8540  0x00070760
> +#define PHY_ID_VSC8541  0x00070770
> +/* Microsemi VSC85xx PHY Register Pages */
> +#define MSCC_EXT_PAGE_ACCESS31 /* Page Access Register */
> +#define MSCC_PHY_PAGE_STD  0x /* Standard registers */
> +#define MSCC_PHY_PAGE_EXT1 0x0001 /* Extended registers - page 1 */
> +#define MSCC_PHY_PAGE_EXT2 0x0002 /* Extended registers - page 2 */
> +#define MSCC_PHY_PAGE_EXT3 0x0003 /* Extended registers - page 3 */
> +#define MSCC_PHY_PAGE_EXT4 0x0004 /* Extended registers - page 4 */
> +#define MSCC_PHY_PAGE_GPIO 0x0010 /* GPIO registers */
> +#define MSCC_PHY_PAGE_TEST 0x2A30 /* TEST Page registers */
> +#define MSCC_PHY_PAGE_TR   0x52B5 /* Token Ring Page registers */
> +/* Std Page Register 

Re: [U-Boot] Use of QEMU UEFI payland with persistent environment

2016-12-08 Thread Simon Glass
Hi Otavio,

On 8 December 2016 at 10:39, Otavio Salvador
 wrote:
> Hello everyone,
>
> We are trying to automate some tests and one of the parts of the
> project requires the use of persistent environment.
>
> Due performance advantages we would like to use x86 with KVM to
> execute the tests however after booting QEMU with the UEFI payload it
> turns out the environment cannot be saved. Did someone ever made it
> work?

Do you expect it to save to SPI flash? If so, does QEMU provide a way
to emulate that in a persistent file, or similar?

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


Re: [U-Boot] [PATCH] usb: gadget: dfu: add functional descriptor in descriptor set

2016-12-08 Thread Marek Vasut
On 12/08/2016 06:10 PM, Patrick Delaunay wrote:
> From: Patrick Delaunay 
> 
> The "DFU descriptor set" must contain the "DFU functional descriptor"
> but it is missing today in U-Boot code
> (cf: DFU spec 1.1, chapter 4.2 DFU Mode Descriptor Set)
> This patch only allocate buffer and copy DFU functional descriptor
> after interfaces.
> 
> 
> Signed-off-by: Patrick Delaunay 
> Signed-off-by: Patrick Delaunay 

+CC Lukasz

> ---
> in DFU spec 1.1 :
> 
>   4.2 DFU Mode Descriptor Set
>   After the host and device agree to perform DFU
>   operations, the host re-enumerates the device.
>   It is at this time that the device exports
>   the DFU descriptor set, which contains:
>   - A DFU device descriptor
>   - A single configuration descriptor
>   - A single interface descriptor (including descriptors
> for alternate settings, if present)
>   - A single functional descriptor
> 
> But after test and code-review the functional descriptor
> is missing in U-Boot in response to USB_DT_CONFIG.
> 
> This descriptor is provided only when it is specifically
> requested (see dfu_handle function for USB_TYPE_STANDARD request
> USB_REQ_GET_DESCRIPTOR for DFU_DT_FUNC).
> 
> cf composite.c:config_desc()
>   descriptor is provided in f->descriptors or f->hs_descriptors
>   set to f_dfu->function in f_dfu.c, in to_dfu_mode()
>   and f_dfu->function is initialized in dfu_prepare_function()
>   only with interfaces
>   but not with DFU functional descriptor !
> 
> This patch only allocate buffer and copy DFU functional descriptor
> after interfaces descriptor and tested with Linux command "lsusb -v"
> 
> =>  "Device Firmware Upgrade Interface Descriptor"
>  is now present as expected
> 
> Device Descriptor:
>   bLength18
>   bDescriptorType 1
> Configuration Descriptor:
> bLength 9
> bDescriptorType 2
> wTotalLength   36
> bNumInterfaces  1
> bConfigurationValue 1
> iConfiguration  2 USB download gadget
> bmAttributes 0xc0
>   Self Powered
> MaxPower2mA
> .
>   Interface Descriptor:
> 
>   Device Firmware Upgrade Interface Descriptor:
> bLength 9
> bDescriptorType33
> bmAttributes   15
>   Will Detach
>   Manifestation Tolerant
>   Upload Supported
>   Download Supported
> wDetachTimeout  0 milliseconds
> wTransferSize4096 bytes
> bcdDFUVersion   1.10
> Device Qualifier (for other device speed):
>   bLength10
>   bDescriptorType 6
>   bcdUSB   2.00
>   bDeviceClass0 (Defined at Interface level)
>   bDeviceSubClass 0
>   bDeviceProtocol 0
>   bMaxPacketSize064
>   bNumConfigurations  1
> Device Status: 0x0001
>   Self Powered
> 
> 
>  drivers/usb/gadget/f_dfu.c | 10 +-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c
> index 8e7c981..73b32f8 100644
> --- a/drivers/usb/gadget/f_dfu.c
> +++ b/drivers/usb/gadget/f_dfu.c
> @@ -654,7 +654,7 @@ static int dfu_prepare_function(struct f_dfu *f_dfu, int 
> n)
>   struct usb_interface_descriptor *d;
>   int i = 0;
>  
> - f_dfu->function = calloc(sizeof(struct usb_descriptor_header *), n + 1);
> + f_dfu->function = calloc(sizeof(struct usb_descriptor_header *), n + 2);
>   if (!f_dfu->function)
>   goto enomem;
>  
> @@ -673,6 +673,14 @@ static int dfu_prepare_function(struct f_dfu *f_dfu, int 
> n)
>  
>   f_dfu->function[i] = (struct usb_descriptor_header *)d;
>   }
> +
> + /* add DFU Functional Descriptor */
> + f_dfu->function[i] = calloc(sizeof(dfu_func), 1);
> + if (!f_dfu->function[i])
> + goto enomem;
> + memcpy(f_dfu->function[i], _func, sizeof(dfu_func));
> +
> + i++;
>   f_dfu->function[i] = NULL;
>  
>   return 0;
> 


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


Re: [U-Boot] net/phy/vitesse: Rework RGMII skew configuration for VSC8601

2016-12-08 Thread Joe Hershberger
Hi Alex,

https://patchwork.ozlabs.org/patch/697937/ was applied to u-boot-net.git.

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


Re: [U-Boot] net: usb: r8152: Use ALLOC_CACHE_ALIGN_BUFFER() to allocate the buffers

2016-12-08 Thread Joe Hershberger
Hi Stefan,

https://patchwork.ozlabs.org/patch/697749/ was applied to u-boot-net.git.

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


Re: [U-Boot] net: phy: realtek: Only force master mode on rtl8211b/c

2016-12-08 Thread Joe Hershberger
Hi oli...@schinagl.nl,

https://patchwork.ozlabs.org/patch/692378/ was applied to u-boot-net.git.

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


Re: [U-Boot] net: phy: realtek: make define more consistent

2016-12-08 Thread Joe Hershberger
Hi oli...@schinagl.nl,

https://patchwork.ozlabs.org/patch/692377/ was applied to u-boot-net.git.

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


Re: [U-Boot] net: fman: fix 2.5G SGMII settings

2016-12-08 Thread Joe Hershberger
Hi shaohui,

https://patchwork.ozlabs.org/patch/694848/ was applied to u-boot-net.git.

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


Re: [U-Boot] net: phy: realtek: Use the BIT() macro

2016-12-08 Thread Joe Hershberger
Hi oli...@schinagl.nl,

https://patchwork.ozlabs.org/patch/692379/ was applied to u-boot-net.git.

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


[U-Boot] [PATCH] usb: gadget: dfu: add functional descriptor in descriptor set

2016-12-08 Thread Patrick Delaunay
From: Patrick Delaunay 

The "DFU descriptor set" must contain the "DFU functional descriptor"
but it is missing today in U-Boot code
(cf: DFU spec 1.1, chapter 4.2 DFU Mode Descriptor Set)
This patch only allocate buffer and copy DFU functional descriptor
after interfaces.


Signed-off-by: Patrick Delaunay 
Signed-off-by: Patrick Delaunay 
---
in DFU spec 1.1 :

  4.2 DFU Mode Descriptor Set
  After the host and device agree to perform DFU
  operations, the host re-enumerates the device.
  It is at this time that the device exports
  the DFU descriptor set, which contains:
  - A DFU device descriptor
  - A single configuration descriptor
  - A single interface descriptor (including descriptors
for alternate settings, if present)
  - A single functional descriptor

But after test and code-review the functional descriptor
is missing in U-Boot in response to USB_DT_CONFIG.

This descriptor is provided only when it is specifically
requested (see dfu_handle function for USB_TYPE_STANDARD request
USB_REQ_GET_DESCRIPTOR for DFU_DT_FUNC).

cf composite.c:config_desc()
  descriptor is provided in f->descriptors or f->hs_descriptors
  set to f_dfu->function in f_dfu.c, in to_dfu_mode()
  and f_dfu->function is initialized in dfu_prepare_function()
  only with interfaces
  but not with DFU functional descriptor !

This patch only allocate buffer and copy DFU functional descriptor
after interfaces descriptor and tested with Linux command "lsusb -v"

=>  "Device Firmware Upgrade Interface Descriptor"
 is now present as expected

Device Descriptor:
  bLength18
  bDescriptorType 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   36
bNumInterfaces  1
bConfigurationValue 1
iConfiguration  2 USB download gadget
bmAttributes 0xc0
  Self Powered
MaxPower2mA
.
  Interface Descriptor:

  Device Firmware Upgrade Interface Descriptor:
bLength 9
bDescriptorType33
bmAttributes   15
  Will Detach
  Manifestation Tolerant
  Upload Supported
  Download Supported
wDetachTimeout  0 milliseconds
wTransferSize4096 bytes
bcdDFUVersion   1.10
Device Qualifier (for other device speed):
  bLength10
  bDescriptorType 6
  bcdUSB   2.00
  bDeviceClass0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize064
  bNumConfigurations  1
Device Status: 0x0001
  Self Powered


 drivers/usb/gadget/f_dfu.c | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c
index 8e7c981..73b32f8 100644
--- a/drivers/usb/gadget/f_dfu.c
+++ b/drivers/usb/gadget/f_dfu.c
@@ -654,7 +654,7 @@ static int dfu_prepare_function(struct f_dfu *f_dfu, int n)
struct usb_interface_descriptor *d;
int i = 0;
 
-   f_dfu->function = calloc(sizeof(struct usb_descriptor_header *), n + 1);
+   f_dfu->function = calloc(sizeof(struct usb_descriptor_header *), n + 2);
if (!f_dfu->function)
goto enomem;
 
@@ -673,6 +673,14 @@ static int dfu_prepare_function(struct f_dfu *f_dfu, int n)
 
f_dfu->function[i] = (struct usb_descriptor_header *)d;
}
+
+   /* add DFU Functional Descriptor */
+   f_dfu->function[i] = calloc(sizeof(dfu_func), 1);
+   if (!f_dfu->function[i])
+   goto enomem;
+   memcpy(f_dfu->function[i], _func, sizeof(dfu_func));
+
+   i++;
f_dfu->function[i] = NULL;
 
return 0;
-- 
1.9.1

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


Re: [U-Boot] [PATCH 1/1] Adding MSCC PHY-VSC8530-VSC8531-VSC8540-VSC8541

2016-12-08 Thread Joe Hershberger
Hi Alexey,

Thanks for the review. I agree with most of your comments, but I'll
note where I don't.

On Thu, Dec 8, 2016 at 6:24 AM, Alexey Brodkin
 wrote:

...

>> +static int mscc_vsc8531_vsc8541_init_scripts(struct phy_device *phydev)
>> +{
>> + u16 reg_val17;
>> + u16 reg_val18;
>
> Any reason to keep variables in different lines?

I think separate lines is cleaner and prefer it stay this way.

>> +
>> + /* Set to Access Token Ring Registers */
>> + phy_write(phydev, MDIO_DEVAD_NONE,
>> + MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_TR);
>> +
>> + /* Update LinkDetectCtrl default to optimized values */
>> + /* Determined during Silicon Validation Testing */
>> + phy_write(phydev, MDIO_DEVAD_NONE, MSCC_PHY_REG_TR_ADDR_16, 0xA7F8);
>
> Cryptic values are not very nice to deal with. I'd advise you to use defines 
> here.
> Moreover I'm wondering:
>  a) why all this complicated setup is required?
>  b) is it mentioned in any datasheet? If it is mentioned it worth adding a 
> comment
> about source of those figures and explanation of the procedure itself.
> This will help mere mortals to figure out what is done here and if 
> required people will
> use that knowledge as a reference in other projects.
>
>> + reg_val17 = phy_read(phydev, MDIO_DEVAD_NONE, MSCC_PHY_REG_TR_DATA_17);
>> + reg_val17 = bitfield_replace(reg_val17, MSCC_PHY_TR_LINKDETCTRL_POS,
>> +MSCC_PHY_TR_LINKDETCTRL_WIDTH, 3);
>> + phy_write(phydev, MDIO_DEVAD_NONE, MSCC_PHY_REG_TR_DATA_17, reg_val17);
>> + phy_write(phydev, MDIO_DEVAD_NONE, MSCC_PHY_REG_TR_ADDR_16, 0x87F8);
>> +
>> + /* Update VgaThresh100 defaults to optimized values */
>> + /* Determined during Silicon Validation Testing */
>> + phy_write(phydev, MDIO_DEVAD_NONE, MSCC_PHY_REG_TR_ADDR_16, 0xAFA4);
>> + reg_val18 = phy_read(phydev, MDIO_DEVAD_NONE, MSCC_PHY_REG_TR_DATA_18);
>> + reg_val18 = bitfield_replace(reg_val18, MSCC_PHY_TR_VGATHRESH100_POS,
>> +MSCC_PHY_TR_VGATHRESH100_WIDTH, 24);
>> + phy_write(phydev, MDIO_DEVAD_NONE, MSCC_PHY_REG_TR_DATA_18, reg_val18);
>> + phy_write(phydev, MDIO_DEVAD_NONE, MSCC_PHY_REG_TR_ADDR_16, 0x8FA4);
>> +
>> + /* Update VgaGain10 defaults to optimized values */
>> + /* Determined during Silicon Validation Testing */
>> + phy_write(phydev, MDIO_DEVAD_NONE, MSCC_PHY_REG_TR_ADDR_16, 0xAF92);
>> + reg_val18 = phy_read(phydev, MDIO_DEVAD_NONE, MSCC_PHY_REG_TR_DATA_18);
>> + reg_val17 = phy_read(phydev, MDIO_DEVAD_NONE, MSCC_PHY_REG_TR_DATA_17);
>> + reg_val18 = bitfield_replace(reg_val18, MSCC_PHY_TR_VGAGAIN10_U_POS,
>> +MSCC_PHY_TR_VGAGAIN10_U_WIDTH, 0);
>> +
>> + reg_val17 = bitfield_replace(reg_val17, MSCC_PHY_TR_VGAGAIN10_L_POS,
>> +MSCC_PHY_TR_VGAGAIN10_L_WIDTH, 1);
>> + phy_write(phydev, MDIO_DEVAD_NONE, MSCC_PHY_REG_TR_DATA_18, reg_val18);
>> + phy_write(phydev, MDIO_DEVAD_NONE, MSCC_PHY_REG_TR_DATA_17, reg_val17);
>> + phy_write(phydev, MDIO_DEVAD_NONE, MSCC_PHY_REG_TR_ADDR_16, 0x8F92);
>> +
>> + /* Set back to Access Standard Page Registers */
>> + phy_write(phydev, MDIO_DEVAD_NONE, MSCC_EXT_PAGE_ACCESS,
>> + MSCC_PHY_PAGE_STD);
>> +
>> + return 0;
>> +}
>> +
>> +static int mscc_parse_status(struct phy_device *phydev)
>> +{
>> + u16 speed;
>> + u16 mii_reg;
>> +
>> + mii_reg = phy_read(phydev, MDIO_DEVAD_NONE, MIIM_AUX_CNTRL_STAT_REG);
>
> u16 speed, mii_reg = phy_read(phydev, MDIO_DEVAD_NONE, 
> MIIM_AUX_CNTRL_STAT_REG);

This is especially ugly. It looks more like a python function
returning a tuple than clean C code. Please do not do this.

>> + if (mii_reg & MIIM_AUX_CNTRL_STAT_F_DUPLEX)
>> +   phydev->duplex = DUPLEX_FULL;
>> + else
>> +   phydev->duplex = DUPLEX_HALF;
>> +
>> + speed = mii_reg & MIIM_AUX_CNTRL_STAT_SPEED_MASK;
>> + speed = speed >> MIIM_AUX_CNTRL_STAT_SPEED_POS;
>> +
>> + switch (speed) {
>> + case MIIM_AUX_CNTRL_STAT_SPEED_1000M:
>> +   phydev->speed = SPEED_1000;
>> +   break;
>> + case MIIM_AUX_CNTRL_STAT_SPEED_100M:
>> +   phydev->speed = SPEED_100;
>> +   break;
>> + case MIIM_AUX_CNTRL_STAT_SPEED_10M:
>> +   phydev->speed = SPEED_10;
>> +   break;
>> + default:
>> +   phydev->speed = SPEED_10;
>> +   break;
>> + }
>> +
>> + return 0;
>> +}
>> +
>> +static int mscc_startup(struct phy_device *phydev)
>> +{
>> + int ret;
>> +
>> + ret = genphy_update_link(phydev);
>
> Merge two lines above together?

I could go either way on this one. I certainly wouldn't ask for this
change, but I'm ok with it.

>> + if (ret)
>> +   return ret;
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2016-12-08 Thread Joe Hershberger
Hi Tom,

The following changes since commit 388019f1e2166638453bc4e0cc5d138c2a19e0c9:

  Merge branch 'master' of git://git.denx.de/u-boot-usb (2016-12-06 08:07:20 
-0500)

are available in the git repository at:


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

for you to fetch changes up to bb135a0180c31fbd7456021fb9700b49bba7f533:

  net/phy/vitesse: Rework RGMII skew configuration for VSC8601 (2016-12-08 
10:36:22 -0600)


Alex (1):
  net/phy/vitesse: Rework RGMII skew configuration for VSC8601

Marek Vasut (1):
  net: phy: micrel: Fix error handling

Stefan Roese (1):
  net: usb: r8152: Use ALLOC_CACHE_ALIGN_BUFFER() to allocate the buffers

oli...@schinagl.nl (3):
  net: phy: realtek: Use the BIT() macro
  net: phy: realtek: make define more consistent
  net: phy: realtek: Only force master mode on rtl8211b/c

shaohui xie (1):
  net: fman: fix 2.5G SGMII settings

 drivers/net/fm/eth.c  | 33 +++--
 drivers/net/fm/memac.c|  1 +
 drivers/net/phy/micrel.c  |  6 --
 drivers/net/phy/realtek.c | 36 ++--
 drivers/net/phy/vitesse.c | 43 ---
 drivers/usb/eth/r8152.c   | 22 --
 include/fsl_memac.h   |  1 +
 7 files changed, 95 insertions(+), 47 deletions(-)

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


Re: [U-Boot] [GIT PULL] Xilinx and SCSI changes

2016-12-08 Thread Tom Rini
On Fri, Dec 02, 2016 at 02:55:00PM +0100, Michal Simek wrote:

> Hi Tom,
> 
> here are some patches I have collected for Xilinx devices, one miiphy
> patch and SCSI changes I have made.
> 
> Simon: I have sent v4 of DM_SCSI + ceva sata driver moved to DM which
> should go through your tree because you have applied
> "dm: blk: Fix get_desc to return block device descriptor"
> which is required. They are based on this branch.
> 
> Tom: I have tested also travis with zynq qemu but it looks like a
> problem with qemu timing for zynq model. The rest of python tests look
> good. https://travis-ci.org/michalsimek-test/u-boot/jobs/180384185
> Also for running this I had to use CONFIG_OF_EMBED=y to handle dtb.
> Anyway I will talk to Qemu guys what I can do with it and when this
> timing issue was solved and which mainline qemu version this requires.
> Is there arm64 qemu available too?
> 
> Thanks,
> Michal
> 
> 
>  The following changes since commit
> 9ae0e14350758e6447c90615ff4df530549a45e2:
> 
>Merge git://www.denx.de/git/u-boot-marvell (2016-12-01 09:24:02 -0500)
> 
>  are available in the git repository at:
> 
> 
>git://www.denx.de/git/u-boot-microblaze.git master
> 
>  for you to fetch changes up to 861fe6503e205622202a61d3ca86cd4ccb80bf03:
> 
>cmd: scsi: Make private functions static (2016-12-02 14:37:32 +0100)

This blows up microblaze-generic, please fix, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v3 1/4] arm: am57xx: cl-som-am57x: add initial board support

2016-12-08 Thread Tom Rini
On Thu, Dec 08, 2016 at 05:37:52PM +0200, Uri Mashiach wrote:

> From: Dmitry Lifshitz 
> 
> Features supported :
> 
> * Serial console
> * SPI Flash
> * MMC/SD Card
> * eMMC storage
> * SATA
> * PCA9555 - GPIO expander over I2C5 bus
> * USB
> 
> Use spl alternate boot device feature to define fallback to
> the main boot device as it is defined by hardware.
> 
> Signed-off-by: Dmitry Lifshitz 
> [uri.mashi...@compulab.co.il: Adjust to v2016.11]
> Signed-off-by: Uri Mashiach 
> Acked-by: Igor Grinberg 

Reviewed-by: Tom Rini 

-- 
Tom


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


[U-Boot] Use of QEMU UEFI payland with persistent environment

2016-12-08 Thread Otavio Salvador
Hello everyone,

We are trying to automate some tests and one of the parts of the
project requires the use of persistent environment.

Due performance advantages we would like to use x86 with KVM to
execute the tests however after booting QEMU with the UEFI payload it
turns out the environment cannot be saved. Did someone ever made it
work?

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 3/4] arm: am57xx: cl-som-am57x: add ETH support

2016-12-08 Thread Uri Mashiach
From: Dmitry Lifshitz 

Add MAC support.

Use PHY, connected to RGMII1 as a default Eth adapter,
by appropriate setting of 'cpsw_data.active_slave'.

'cpsw_phy' env variable can override this setting.

Set the MAC addresses in the U-Boot environment.
The addresses are retrieved from the on-board EEPROM or from the SOC's
MAC fuses.

Set the following PHYs RGMII clock delays:
- Enable RX delay
- Disable TX delay

Signed-off-by: Dmitry Lifshitz 
[uri.mashi...@compulab.co.il: add RGMII clock delays]
Signed-off-by: Uri Mashiach 
Acked-by: Igor Grinberg 
Reviewed-by: Tom Rini 
---
 board/compulab/cl-som-am57x/Makefile |   2 +
 board/compulab/cl-som-am57x/eth.c| 199 +++
 board/compulab/cl-som-am57x/mux.c|  23 
 include/configs/cl-som-am57x.h   |  17 +++
 4 files changed, 241 insertions(+)
 create mode 100644 board/compulab/cl-som-am57x/eth.c

diff --git a/board/compulab/cl-som-am57x/Makefile 
b/board/compulab/cl-som-am57x/Makefile
index 0c59781..566366b 100644
--- a/board/compulab/cl-som-am57x/Makefile
+++ b/board/compulab/cl-som-am57x/Makefile
@@ -13,3 +13,5 @@ obj-y += spl.o mux.o
 else
 obj-y  += cl-som-am57x.o mux.o
 endif
+
+obj-$(CONFIG_DRIVER_TI_CPSW)   += eth.o
diff --git a/board/compulab/cl-som-am57x/eth.c 
b/board/compulab/cl-som-am57x/eth.c
new file mode 100644
index 000..ce91b7f
--- /dev/null
+++ b/board/compulab/cl-som-am57x/eth.c
@@ -0,0 +1,199 @@
+/*
+ * Ethernet specific code for CompuLab CL-SOM-AM57x module
+ *
+ * (C) Copyright 2016 CompuLab, Ltd. http://compulab.co.il/
+ *
+ * Author: Uri Mashiach 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "../common/eeprom.h"
+
+static void cpsw_control(int enabled)
+{
+   /* VTP can be added here */
+}
+
+static struct cpsw_slave_data cl_som_am57x_cpsw_slaves[] = {
+   {
+   .slave_reg_ofs  = 0x208,
+   .sliver_reg_ofs = 0xd80,
+   .phy_addr   = 0,
+   .phy_if = PHY_INTERFACE_MODE_RMII,
+   },
+   {
+   .slave_reg_ofs  = 0x308,
+   .sliver_reg_ofs = 0xdc0,
+   .phy_addr   = 1,
+   .phy_if = PHY_INTERFACE_MODE_RMII,
+
+   },
+};
+
+static struct cpsw_platform_data cl_som_am57_cpsw_data = {
+   .mdio_base  = CPSW_MDIO_BASE,
+   .cpsw_base  = CPSW_BASE,
+   .mdio_div   = 0xff,
+   .channels   = 8,
+   .cpdma_reg_ofs  = 0x800,
+   .slaves = 2,
+   .slave_data = cl_som_am57x_cpsw_slaves,
+   .ale_reg_ofs= 0xd00,
+   .ale_entries= 1024,
+   .host_port_reg_ofs  = 0x108,
+   .hw_stats_reg_ofs   = 0x900,
+   .bd_ram_ofs = 0x2000,
+   .mac_control= (1 << 5),
+   .control= cpsw_control,
+   .host_port_num  = 0,
+   .version= CPSW_CTRL_VERSION_2,
+};
+
+/*
+ * cl_som_am57x_efuse_read_mac_addr() - read Ethernet port MAC address.
+ *   The information is retrieved from the SOC's registers.
+ * @buff: read buffer.
+ * @port_num: port number.
+ */
+static void cl_som_am57x_efuse_read_mac_addr(uchar *buff, uint port_num)
+{
+   uint32_t mac_hi, mac_lo;
+
+   if (port_num) {
+   mac_lo = readl((*ctrl)->control_core_mac_id_1_lo);
+   mac_hi = readl((*ctrl)->control_core_mac_id_1_hi);
+   } else {
+   mac_lo = readl((*ctrl)->control_core_mac_id_0_lo);
+   mac_hi = readl((*ctrl)->control_core_mac_id_0_hi);
+   }
+
+   buff[0] = (mac_hi & 0xFF) >> 16;
+   buff[1] = (mac_hi & 0xFF00) >> 8;
+   buff[2] = mac_hi & 0xFF;
+   buff[3] = (mac_lo & 0xFF) >> 16;
+   buff[4] = (mac_lo & 0xFF00) >> 8;
+   buff[5] = mac_lo & 0xFF;
+}
+
+/*
+ * cl_som_am57x_handle_mac_address() - set MAC address in the U-Boot
+ * environment.
+ *  The address is retrieved retrieved from an EEPROM field or from the
+ * SOC's registers.
+ * @env_name: U-Boot environment name.
+ * @field_name: EEPROM field name.
+ * @port_num: SOC's port number.
+ */
+static int cl_som_am57x_handle_mac_address(char *env_name, uint port_num)
+{
+   int ret;
+   uint8_t enetaddr[6];
+
+   ret = eth_getenv_enetaddr(env_name, enetaddr);
+   if (ret)
+   return 0;
+
+   ret = cl_eeprom_read_mac_addr(enetaddr, CONFIG_SYS_I2C_EEPROM_BUS);
+
+   if (ret || !is_valid_ethaddr(enetaddr))
+   cl_som_am57x_efuse_read_mac_addr(enetaddr, port_num);
+
+   if (!is_valid_ethaddr(enetaddr))
+   return -1;
+
+   ret = eth_setenv_enetaddr(env_name, enetaddr);
+   if (ret)
+   printf("cl-som-am57x: Failed 

[U-Boot] [PATCH v3 1/4] arm: am57xx: cl-som-am57x: add initial board support

2016-12-08 Thread Uri Mashiach
From: Dmitry Lifshitz 

Features supported :

* Serial console
* SPI Flash
* MMC/SD Card
* eMMC storage
* SATA
* PCA9555 - GPIO expander over I2C5 bus
* USB

Use spl alternate boot device feature to define fallback to
the main boot device as it is defined by hardware.

Signed-off-by: Dmitry Lifshitz 
[uri.mashi...@compulab.co.il: Adjust to v2016.11]
Signed-off-by: Uri Mashiach 
Acked-by: Igor Grinberg 
---
---
v2 -> v3: Remove CONFIG_SPL_OS_BOOT from board configuration file -
  CONFIG_SPL_OS_BOOT included in Kconfig
v1 -> v2: Merged with commit "add MMC as a boot devices for spl".
  Commit "add MMC as a boot devices for spl" converted to Kconfig

 arch/arm/mach-omap2/omap5/Kconfig  |   4 +
 board/compulab/cl-som-am57x/Kconfig|  12 ++
 board/compulab/cl-som-am57x/MAINTAINERS|   6 +
 board/compulab/cl-som-am57x/Makefile   |  15 ++
 board/compulab/cl-som-am57x/cl-som-am57x.c |  62 
 board/compulab/cl-som-am57x/mux.c  | 100 +
 board/compulab/cl-som-am57x/spl.c  | 222 +
 configs/cl-som-am57x_defconfig |  41 ++
 include/configs/cl-som-am57x.h | 105 ++
 9 files changed, 567 insertions(+)
 create mode 100644 board/compulab/cl-som-am57x/Kconfig
 create mode 100644 board/compulab/cl-som-am57x/MAINTAINERS
 create mode 100644 board/compulab/cl-som-am57x/Makefile
 create mode 100644 board/compulab/cl-som-am57x/cl-som-am57x.c
 create mode 100644 board/compulab/cl-som-am57x/mux.c
 create mode 100644 board/compulab/cl-som-am57x/spl.c
 create mode 100644 configs/cl-som-am57x_defconfig
 create mode 100644 include/configs/cl-som-am57x.h

diff --git a/arch/arm/mach-omap2/omap5/Kconfig 
b/arch/arm/mach-omap2/omap5/Kconfig
index 22259dc..0ee5ac1 100644
--- a/arch/arm/mach-omap2/omap5/Kconfig
+++ b/arch/arm/mach-omap2/omap5/Kconfig
@@ -40,6 +40,9 @@ choice
prompt "OMAP5 board select"
optional
 
+config TARGET_CL_SOM_AM57X
+   bool "CompuLab CL-SOM-AM57x"
+
 config TARGET_CM_T54
bool "CompuLab CM-T54"
 
@@ -86,6 +89,7 @@ config TI_SECURE_EMIF_PROTECTED_REGION_SIZE
  using hardware memory firewalls. This value must be smaller than the
  TI_SECURE_EMIF_TOTAL_REGION_SIZE value.
 
+source "board/compulab/cl-som-am57x/Kconfig"
 source "board/compulab/cm_t54/Kconfig"
 source "board/ti/omap5_uevm/Kconfig"
 source "board/ti/dra7xx/Kconfig"
diff --git a/board/compulab/cl-som-am57x/Kconfig 
b/board/compulab/cl-som-am57x/Kconfig
new file mode 100644
index 000..85fc9a1
--- /dev/null
+++ b/board/compulab/cl-som-am57x/Kconfig
@@ -0,0 +1,12 @@
+if TARGET_CL_SOM_AM57X
+
+config SYS_BOARD
+   default "cl-som-am57x"
+
+config SYS_VENDOR
+   default "compulab"
+
+config SYS_CONFIG_NAME
+   default "cl-som-am57x"
+
+endif
diff --git a/board/compulab/cl-som-am57x/MAINTAINERS 
b/board/compulab/cl-som-am57x/MAINTAINERS
new file mode 100644
index 000..e0195f4
--- /dev/null
+++ b/board/compulab/cl-som-am57x/MAINTAINERS
@@ -0,0 +1,6 @@
+CL-SOM-AM57x BOARD
+M: Uri Mashiach 
+S: Maintained
+F: board/compulab/cl-som-am57x/
+F: include/configs/cl-som-am57x.h
+F: configs/cl-som-am57x_defconfig
diff --git a/board/compulab/cl-som-am57x/Makefile 
b/board/compulab/cl-som-am57x/Makefile
new file mode 100644
index 000..0c59781
--- /dev/null
+++ b/board/compulab/cl-som-am57x/Makefile
@@ -0,0 +1,15 @@
+#
+# Makefile
+#
+# (C) Copyright 2016 CompuLab, Ltd. 
+#
+# Author: Dmitry Lifshitz 
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+ifdef CONFIG_SPL_BUILD
+obj-y  += spl.o mux.o
+else
+obj-y  += cl-som-am57x.o mux.o
+endif
diff --git a/board/compulab/cl-som-am57x/cl-som-am57x.c 
b/board/compulab/cl-som-am57x/cl-som-am57x.c
new file mode 100644
index 000..4bad644
--- /dev/null
+++ b/board/compulab/cl-som-am57x/cl-som-am57x.c
@@ -0,0 +1,62 @@
+/*
+ * Board functions for CompuLab cl_som_am57x board
+ *
+ * (C) Copyright 2016 CompuLab, Ltd. http://compulab.co.il/
+ *
+ * Author: Dmitry Lifshitz 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+const struct omap_sysinfo sysinfo = {
+   "Board: CL-SOM-AM57x\n"
+};
+
+int board_init(void)
+{
+   /* Disable PMIC Powerhold feature, DEV_CTRL.DEV_ON = 1 */
+   palmas_i2c_write_u8(TPS65903X_CHIP_P1, 0xA0, 0x1);
+
+   gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
+
+   return 0;
+}
+
+#ifdef CONFIG_GENERIC_MMC
+#define SB_SOM_CD_GPIO 187
+#define SB_SOM_WP_GPIO 188
+
+int board_mmc_init(bd_t *bis)
+{
+   int ret0, ret1;
+
+   ret0 = omap_mmc_init(0, 0, 0, SB_SOM_CD_GPIO, SB_SOM_WP_GPIO);
+   if (ret0)
+   printf("cl-som-am57x: failed to initialize mmc0\n");
+
+ 

[U-Boot] [PATCH v3 2/4] arm: am57xx: cl-som-am57x: fetch board rev from EEPROM

2016-12-08 Thread Uri Mashiach
From: Dmitry Lifshitz 

Add PCB revision message.
Implement board revision get_board_rev API.

Signed-off-by: Dmitry Lifshitz 
Commit description update.
Signed-off-by: Uri Mashiach 
Acked-by: Igor Grinberg 
Reviewed-by: Tom Rini 
---
 board/compulab/cl-som-am57x/cl-som-am57x.c | 14 ++
 include/configs/cl-som-am57x.h | 14 ++
 2 files changed, 28 insertions(+)

diff --git a/board/compulab/cl-som-am57x/cl-som-am57x.c 
b/board/compulab/cl-som-am57x/cl-som-am57x.c
index 4bad644..bdd0a2b 100644
--- a/board/compulab/cl-som-am57x/cl-som-am57x.c
+++ b/board/compulab/cl-som-am57x/cl-som-am57x.c
@@ -14,6 +14,8 @@
 #include 
 #include 
 #include 
+#include "../common/common.h"
+#include "../common/eeprom.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -60,3 +62,15 @@ int board_usb_init(int index, enum usb_init_type init)
return 0;
 }
 #endif /* CONFIG_USB_XHCI_OMAP */
+
+int misc_init_r(void)
+{
+   cl_print_pcb_info();
+
+   return 0;
+}
+
+u32 get_board_rev(void)
+{
+   return cl_eeprom_get_board_rev(CONFIG_SYS_I2C_EEPROM_BUS);
+}
diff --git a/include/configs/cl-som-am57x.h b/include/configs/cl-som-am57x.h
index c8d4a00..48c0f7f 100644
--- a/include/configs/cl-som-am57x.h
+++ b/include/configs/cl-som-am57x.h
@@ -24,6 +24,10 @@
 
 #include 
 
+/* misc */
+#define CONFIG_MISC_INIT_R
+#define CONFIG_REVISION_TAG
+
 /* Status LED */
 #define CONFIG_STATUS_LED  /* Status LED enabled */
 #define CONFIG_GPIO_LED
@@ -65,6 +69,16 @@
 #define CONFIG_ENV_OFFSET  (768 * 1024)
 #define CONFIG_ENV_SPI_MAX_HZ  4800
 
+/* EEPROM */
+#define CONFIG_SYS_I2C_EEPROM_ADDR  0x50
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN  1
+#define CONFIG_SYS_I2C_EEPROM_BUS   3
+
+#define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_EEPROM_LAYOUT
+#define CONFIG_ENV_EEPROM_IS_ON_I2C
+#define CONFIG_SYS_EEPROM_SIZE 256
+
 #ifndef CONFIG_SPL_BUILD
 /* SATA */
 #define CONFIG_CMD_SCSI
-- 
2.7.4

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


[U-Boot] [PATCH v3 0/4] cl-som-am57x: initial support

2016-12-08 Thread Uri Mashiach
This patch series adds support for CompuLab CL-SOM-AM57X board and the
SBC-AM57X evaluation kit.

CL-SOM-AM57x is a miniature System-on-Module (SoM) based on
TI Sitara AM57x ARM Cortex-A15 System-on-Chip family.

SBC-AM57x is a single board computer, implemented with the
CL-SOM-AM57x computer-on-module and the SB-SOM-AM57x carrier board.
The CL-SOM-AM57x providing most of the functions and the SB-SOM-AM57x providing
additional peripheral functions and connectors.

The SBC-AM57x has the following features:


CPU:Texas Instruments Sitara AM5728 dual-core ARM Cortex-A15, 
1.5GHz or
Texas Instruments Sitara AM5718 single-core ARM Cortex-A15, 
1.5GHz

RAM:DDR3, 512MB – 4GB

Storage:NAND flash, 512MB - 1GB or eMMC flash, 4GB - 32GB
SPI-flash 2MB

Ethernet:   Up to 2x 10/100/1000Mbps Ethernet ports (MAC+PHY)

WiFi/BT:802.11b/g/n WiFi interface (TI WiLink 8 WL1801 chipset) or
Dual-band 2x2 802.11a/b/g/n WiFi interface (TI WiLink 8 WL1837 
chipset)

Analog Audio:   Audio codec with stereo output, stereo input and microphone 
support

More details can be found here:

https://www.compulab.co.il/products/computer-on-modules/cl-som-am57x-ti-am5728-am5718-system-on-module/

https://www.compulab.co.il/products/sbcs/sbc-am57x-ti-am5728-am5718-single-board-computer/

Dmitry Lifshitz (3):
  arm: am57xx: cl-som-am57x: add initial board support
  arm: am57xx: cl-som-am57x: fetch board rev from EEPROM
  arm: am57xx: cl-som-am57x: add ETH support

Uri Mashiach (1):
  arm: am57xx: cl-som-am57x: update default env

 arch/arm/mach-omap2/omap5/Kconfig  |   4 +
 board/compulab/cl-som-am57x/Kconfig|  12 ++
 board/compulab/cl-som-am57x/MAINTAINERS|   6 +
 board/compulab/cl-som-am57x/Makefile   |  17 +++
 board/compulab/cl-som-am57x/cl-som-am57x.c |  76 ++
 board/compulab/cl-som-am57x/eth.c  | 199 ++
 board/compulab/cl-som-am57x/mux.c  | 123 
 board/compulab/cl-som-am57x/spl.c  | 222 +
 configs/cl-som-am57x_defconfig |  41 ++
 include/configs/cl-som-am57x.h | 197 +
 10 files changed, 897 insertions(+)
 create mode 100644 board/compulab/cl-som-am57x/Kconfig
 create mode 100644 board/compulab/cl-som-am57x/MAINTAINERS
 create mode 100644 board/compulab/cl-som-am57x/Makefile
 create mode 100644 board/compulab/cl-som-am57x/cl-som-am57x.c
 create mode 100644 board/compulab/cl-som-am57x/eth.c
 create mode 100644 board/compulab/cl-som-am57x/mux.c
 create mode 100644 board/compulab/cl-som-am57x/spl.c
 create mode 100644 configs/cl-som-am57x_defconfig
 create mode 100644 include/configs/cl-som-am57x.h

-- 
2.7.4

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


[U-Boot] [PATCH v3 4/4] arm: am57xx: cl-som-am57x: update default env

2016-12-08 Thread Uri Mashiach
Modify U-Boot default env settings.

Boot sequence:
1. SD card boot script
2. SD card boot no script
3. SATA boot script
4. SATA boot no script
5. eMMC boot script
6. eMMC boot no script

Signed-off-by: Uri Mashiach 
Acked-by: Igor Grinberg 
Reviewed-by: Tom Rini 
---
 include/configs/cl-som-am57x.h | 61 ++
 1 file changed, 61 insertions(+)

diff --git a/include/configs/cl-som-am57x.h b/include/configs/cl-som-am57x.h
index 2001b0c..8297182 100644
--- a/include/configs/cl-som-am57x.h
+++ b/include/configs/cl-som-am57x.h
@@ -133,4 +133,65 @@
 
 #endif /* !CONFIG_SPL_BUILD */
 
+/* Default environment */
+#undef CONFIG_EXTRA_ENV_SETTINGS
+#define CONFIG_EXTRA_ENV_SETTINGS \
+   DEFAULT_LINUX_BOOT_ENV \
+   "autoload=no\0" \
+   "baudrate=115200\0" \
+   "console=ttyO2,115200n8\0" \
+   "bootdelay=3\0" \
+   "fdtfile=am57xx-sbc-am57x.dtb\0" \
+   "kernel=zImage-cl-som-am57x\0" \
+   "bootscr=bootscr.img\0" \
+   "displaytype=hdmi\0" \
+   "bootkernel=bootz ${loadaddr} - ${fdtaddr}\0" \
+   "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
+   "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
+   "load_mmc=mmc dev ${mmcdev} && mmc rescan && " \
+   "run mmcloadkernel run mmcloadfdt\0" \
+   "mmcroot=/dev/mmcblk1p2\0" \
+   "mmcrootfstype=ext4 rw rootwait\0" \
+   "mmcargs=setenv bootargs console=${console} root=${mmcroot} " \
+   "rootfstype=${mmcrootfstype}\0" \
+   "mmcbootscript=setenv mmcdev 0; mmc dev ${mmcdev} && mmc rescan && " \
+   "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \
+   "echo Running bootscript from MMC/SD Card ... && " \
+   "source ${loadaddr}\0" \
+   "mmcboot=setenv mmcdev 0 && run load_mmc && " \
+   "run mmcargs && echo Booting from MMC/SD Card ... && " \
+   "run bootkernel\0" \
+   "emmcroot=/dev/mmcblk0p2\0" \
+   "emmcrootfstype=ext4 rw rootwait\0" \
+   "emmcargs=setenv bootargs console=${console} " \
+   "root=${emmcroot} " \
+   "rootfstype=${emmcrootfstype}\0" \
+   "emmcbootscript=setenv mmcdev 1; mmc dev ${mmcdev} && mmc rescan && " \
+   "load mmc ${mmcdev} ${loadaddr} ${bootscr} && " \
+   "echo Running bootscript from eMMC ... && " \
+   "source ${loadaddr}\0" \
+   "emmcboot=setenv mmcdev 1 && run load_mmc && " \
+   "run emmcargs && echo Booting from eMMC ... && " \
+   "run bootkernel\0" \
+   "sataroot=/dev/sda2\0" \
+   "satarootfstype=ext4 rw rootwait\0" \
+   "load_sata=load scsi 0 ${loadaddr} ${kernel} && " \
+   "load scsi 0 ${fdtaddr} ${fdtfile}\0" \
+   "sataargs=setenv bootargs console=${console} " \
+   "root=${sataroot} " \
+   "rootfstype=${satarootfstype}\0" \
+   "satabootscript=load scsi 0 ${loadaddr} ${bootscr} && " \
+   "echo Running bootscript from SATA ... && " \
+   "source ${loadaddr}\0" \
+   "sataboot=run load_sata && run sataargs && " \
+   "echo Booting from SATA ... && " \
+   "run bootkernel\0" \
+
+#undef CONFIG_BOOTCOMMAND
+#define CONFIG_BOOTCOMMAND \
+   "run mmcbootscript || run mmcboot || " \
+   "run satabootscript || run sataboot || " \
+   "run emmcbootscript || run emmcboot"
+
+
 #endif /* __CONFIG_CL_SOM_AM57X_H */
-- 
2.7.4

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


Re: [U-Boot] How to make I2C probe like commands working in u-boot

2016-12-08 Thread Heiko Schocher

Hello lsunkara,

Am 08.12.2016 um 06:37 schrieb lsunkara:

Hi,
  Am trying to validate I2C peripheral on xilinx zynq zc702 evaluation
board in u-boot. When am trying to run the command like i2c probe and i2c
write am facing the issue like i2c commands are not known. Please can
someone tell me how to enable these commands to use it in u-boot


Activate the CMD_I2C symbol through "make menuconfig", or if you have
an old version of U-Boot add it to your board config file.

bye,
Heiko




--
View this message in context: 
http://u-boot.10912.n7.nabble.com/How-to-make-I2C-probe-like-commands-working-in-u-boot-tp276105.html
Sent from the U-Boot mailing list archive at Nabble.com.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot



--
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v5 2/6] ARMv8: Add secure sections for PSCI text and data

2016-12-08 Thread Tom Rini
On Thu, Dec 08, 2016 at 11:58:22AM +0800, Hongbo Zhang wrote:

> This patch adds secure_text, secure_data and secure_stack sections for ARMv8 
> to
> hold PSCI text and data, and it is based on the legacy implementation of 
> ARMv7.
> 
> ARMV8_SECURE_BASE defines the address for PSCI secure sections, ARMV8_PSCI and
> ARMV8_PSCI_NR_CPUS are firstly used in this patch, so they are introduce here
> in Kconfig too.
> 
> Signed-off-by: Hongbo Zhang 
> Reviewed-by: Tom Rini 

Reviewed-by: Tom Rini 

-- 
Tom


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


Re: [U-Boot] [PATCH v5 1/6] ARMv8: LS1043A: change macro CONFIG_ARMV8_PSCI definition

2016-12-08 Thread Tom Rini
On Thu, Dec 08, 2016 at 11:58:21AM +0800, Hongbo Zhang wrote:

> NXP/Freescale uses macro CONFIG_ARMV8_PSCI to enable their private PSCI
> implementation in PPA firmware, but this macro naming too generic, so this
> patch replaces it with a specic one CONFIG_FSL_PPA_ARMV8_PSCI.
> And this macro CONFIG_ARMV8_PSCI will be used for a generic PSCI for ARMv8
> which will be added in following patchs.
> 
> Signed-off-by: Hongbo Zhang 

Reviewed-by: Tom Rini 

-- 
Tom


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


Re: [U-Boot] [PULL] u-boot-socfpga/master

2016-12-08 Thread Tom Rini
On Tue, Dec 06, 2016 at 05:53:10AM +0100, Marek Vasut wrote:

> The following changes since commit 3cfb67d0419c645998b440592d8c2ce010134b8e:
> 
>   Prepare v2017.01-rc1 (2016-12-05 18:36:23 -0500)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-socfpga.git master
> 
> for you to fetch changes up to f22dede20bb57195330ef11e148ca2b5f1280b2e:
> 
>   MAINTAINERS: Fix ALTERA SOCFPGA Files (2016-12-06 01:45:58 +0100)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PULL] u-boot-usb/master

2016-12-08 Thread Tom Rini
On Tue, Dec 06, 2016 at 05:54:19AM +0100, Marek Vasut wrote:

> The following changes since commit 3cfb67d0419c645998b440592d8c2ce010134b8e:
> 
>   Prepare v2017.01-rc1 (2016-12-05 18:36:23 -0500)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-usb.git master
> 
> for you to fetch changes up to 555a347209000f8655ca637a5a04f7275a2fb999:
> 
>   usb: xhci-pci: Add DM support (2016-12-06 01:54:26 +0100)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v2 5/6] mmc: move some SDHCI related options to Kconfig

2016-12-08 Thread Tom Rini
On Wed, Dec 07, 2016 at 10:10:29PM +0900, Masahiro Yamada wrote:

> While I moved the options, I also renamed them so that they are all
> prefixed with MMC_SDHCI_.
> 
> This commit was created in the following steps.
> 
> [1] Rename with the following command
> find . -name .git -prune -o ! -path ./scripts/config_whitelist.txt \
> -type f -print | xargs sed -i -e '
> s/CONFIG_MMC_SDMA/CONFIG_MMC_SDHCI_SDMA/g
> s/CONFIG_BCM2835_SDHCI/CONFIG_MMC_SDHCI_BCM2835/g
> s/CONFIG_KONA_SDHCI/CONFIG_MMC_SDHCI_KONA/g
> s/CONFIG_MV_SDHCI/CONFIG_MMC_SDHCI_MV/g
> s/CONFIG_S5P_SDHCI/CONFIG_MMC_SDHCI_S5P/g
> s/CONFIG_SPEAR_SDHCI/CONFIG_MMC_SDHCI_SPEAR/g
> '
> 
> [2] create the Kconfig entries in drivers/mmc/Kconfig
> 
> [3] Move the options by the following command
> tools/moveconfig.py -y MMC_SDHCI_SDMA MMC_SDHCI_BCM2835 \
> MMC_SDHCI_KONA MMC_SDHCI_MV MMC_SDHCI_S5P MMC_SDHCI_SPEAR
> 
> [4] Sort drivers/mmc/Makefile for readability
> 
> Signed-off-by: Masahiro Yamada 

Reviewed-by: Tom Rini 

-- 
Tom


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


Re: [U-Boot] [PATCH v2] arm: am33xx: Initialize EMIF REG_PR_OLD_COUNT for BBB and am335x-evm

2016-12-08 Thread Tom Rini
On Thu, Dec 08, 2016 at 12:19:01PM +0200, Jyri Sarha wrote:

> Initialize EMIF OCP_CONFIG registers REG_COS_COUNT_1, REG_COS_COUNT_2,
> and REG_PR_OLD_COUNT field for Beaglebone-Black and am335x-evm. With
> the default values LCDC suffers from DMA FIFO underflows and frame
> synchronization lost errors. The initialization values are the highest
> that work flawlessly when heavy memory load is generated by CPU. 32bpp
> colors were used in the test. On BBB the video mode used 110MHz pixel
> clock. The mode supported by the panel of am335x-evm uses 30MHz pixel
> clock.
> 
> Signed-off-by: Jyri Sarha 

Reviewed-by: Tom Rini 

But, does TI have a whitepaper or tech pub or anything that describes
how one would calculate that value on a custom design?  Tweaking that
for optimal usage is something I know happens in some cases and could be
used in a lot more.  If there's a doc that explains how to figure it
out, it would be good to link to it in the comments in the patch as
well.  Since I don't know that such a thing does exist I'll reviewed-by
it now tho.  Thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v3 0/2] ARM: dts: at91: add dts files for the boards of SAMA5D4

2016-12-08 Thread Wenyou.Yang
Hi,

Do you have any comments on this series?

> -Original Message-
> From: Wenyou Yang [mailto:wenyou.y...@atmel.com]
> Sent: 2016年10月31日 13:20
> To: U-Boot Mailing List 
> Cc: Stephen Warren ; andreas.de...@googlemail.com;
> Simon Glass ; Heiko Schocher ; Wenyou
> Yang - A41535 ; Wenyou Yang - A41535
> 
> Subject: [PATCH v3 0/2] ARM: dts: at91: add dts files for the boards of 
> SAMA5D4
> 
> The purpose of the patchset is add the dts files for boards,
> sama5d4 Xplained board and sama5d4ek board.
> 
> Changes in v3:
>  - Fix the compatible of spi flash, use "spi-flash".
>  - Fix the compatible of spi flash, use "spi-flash".
> 
> Changes in v2:
>  - Remove unneeded the pinctrl node for cs pin of spi0.
>  - Remove unneeded the pinctrl node for cs pin of spi0.
> 
> Wenyou Yang (2):
>   ARM: dts: at91: add dts files for sama5d4 Xplained
>   ARM: dts: at91: add dts file for sama5d4ek
> 
>  arch/arm/dts/Makefile  |6 +
>  arch/arm/dts/at91-sama5d4_xplained.dts |  279 +
>  arch/arm/dts/at91-sama5d4ek.dts|  334 ++
>  arch/arm/dts/sama5d4.dtsi  | 1910
> 
>  4 files changed, 2529 insertions(+)
>  create mode 100644 arch/arm/dts/at91-sama5d4_xplained.dts
>  create mode 100644 arch/arm/dts/at91-sama5d4ek.dts  create mode 100644
> arch/arm/dts/sama5d4.dtsi
> 
> --
> 2.7.4

Best Regards,
Wenyou Yang

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


[U-Boot] [PATCH][v2] armv8: fsl-layerscape: Add support of GPIO structure

2016-12-08 Thread Prabhakar Kushwaha
Layerscape Gen2 SoC supports GPIO registers to control GPIO
signals. Adding support of GPIO structure to access GPIO
registers.t rebase --continue

Signed-off-by: Pratiyush Srivastava 
Signed-off-by: Prabhakar Kushwaha 
---
Changes for v2: Incorporated York's comments
- Removed CONFIG_SYS_GPIO1_ADDR as bool
- Renamed CONFIG_SYS_GPIO1_ADDR

This structure is required while supporting ethernent in LS1012AFRDM.

 arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h 
b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
index d684a07..f58be96 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
@@ -52,6 +52,11 @@
 #define QSPI0_BASE_ADDR(CONFIG_SYS_IMMR + 
0x0055)
 #define DSPI1_BASE_ADDR(CONFIG_SYS_IMMR + 
0x0110)
 
+#define GPIO1_BASE_ADDR(CONFIG_SYS_IMMR + 
0x30)
+#define GPIO2_BASE_ADDR(CONFIG_SYS_IMMR + 
0x31)
+#define GPIO3_BASE_ADDR(CONFIG_SYS_IMMR + 
0x32)
+#define GPIO4_BASE_ADDR(CONFIG_SYS_IMMR + 
0x33)
+
 #define LPUART_BASE(CONFIG_SYS_IMMR + 0x0195)
 
 #define AHCI_BASE_ADDR (CONFIG_SYS_IMMR + 0x0220)
@@ -588,6 +593,16 @@ struct ccsr_cci400 {
u8 res_e004[0x1 - 0xe004];
 };
 
+struct ccsr_gpio {
+   u32 gpdir;
+   u32 gpodr;
+   u32 gpdat;
+   u32 gpier;
+   u32 gpimr;
+   u32 gpicr;
+   u32 gpibe;
+};
+
 /* MMU 500 */
 #define SMMU_SCR0  (SMMU_BASE + 0x0)
 #define SMMU_SCR1  (SMMU_BASE + 0x4)
-- 
2.7.4


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


Re: [U-Boot] VAR-SOM-MX6 - Boot Count Limit support?

2016-12-08 Thread Otavio Salvador
On Thu, Dec 8, 2016 at 4:05 AM, brendan  wrote:
> I am new to this and was wondering if anyone could shed any light on what I
> need to look at or how I can somehow implement the Boot Count Limit
> functionality or similar.
...

You need to choose the backend for use. The i.MX has few persistent
registers which can be used for this purpose, depending on the product
design.


-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] Adding MSCC PHY-VSC8530-VSC8531-VSC8540-VSC8541

2016-12-08 Thread Alexey Brodkin
Hi John,

First of all I'm wondering if there was a real need to add that many people in 
Cc?
Normally sybsystem maintainer and active contributors to code you modified are
good options here.

Then have you run your patch through checkpatch?
Obviously it was not the case because it says me:
-->8-
total: 570 errors, 251 warnings, 0 checks, 1170 lines checked
-->8-
Please fix all that first. That's way too many errors for such a small patch!

Take a look at this article - http://www.denx.de/wiki/view/U-Boot/Patches.

Still some comments below.

On Wed, 2016-12-07 at 17:11 +, John Haechten wrote:
> From 127c5fb9ef390cad5cf58e446110a696cf111345 Mon Sep 17 00:00:00 2001
> From: John Haechten 
> Date: Wed, 7 Dec 2016 07:51:37 -0800
> Subject: [PATCH] Adding MSCC PHY-VSC8530-VSC8531-VSC8540-VSC8541

Commit title is not very readable.
Remember this title is what people will see later on while looking at git log.
So maybe something like "net/phy: Add Microsemi vsc85xx PHYs"?

> (C) Copyright 2016 Microsemi Corporation, MIT License (MIT)

Why do you need that in commit message?

> Author:John Haechten 

Shouldn't it be just "Signed-off-by" instead (already existed below)?

> Reviewed-by:Howard Hicks 
> Reviewed-by:Joe Hershberger 
> Tested-by:Howard Hicks 
> Version:1

What's this?

> Prefix:None

Ditto.

> Signed-off-by: John Haechten 
> 
> ---
> 
> drivers/net/phy/Makefile    |   1 +
> drivers/net/phy/mscc.c  | 480 
> drivers/net/phy/phy.c   |   3 +
> include/config_phylib_all_drivers.h |   1 +
> include/configs/am335x_evm.h    |   3 +
> include/phy.h   |   1 +
> 6 files changed, 489 insertions(+)
> create mode 100644 drivers/net/phy/mscc.c
> 
> diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
> index 1e299b9..d372971 100644
> --- a/drivers/net/phy/Makefile
> +++ b/drivers/net/phy/Makefile
> @@ -27,3 +27,4 @@ obj-$(CONFIG_PHY_TERANETICS) += teranetics.o
> obj-$(CONFIG_PHY_TI) += ti.o
> obj-$(CONFIG_PHY_XILINX) += xilinx_phy.o
> obj-$(CONFIG_PHY_VITESSE) += vitesse.o
> +obj-$(CONFIG_PHY_MSCC) += mscc.o
> diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c
> new file mode 100644
> index 000..e63bd43
> --- /dev/null
> +++ b/drivers/net/phy/mscc.c
> @@ -0,0 +1,480 @@
> +/*
> + * Driver for Microsemi VSC85xx PHYs
> + *
> + * Author: John Haechten
> + *
> + * The MIT License (MIT)
> + *
> + * Copyright (c) 2016 Microsemi Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a 
> copy
> + * of this software and associated documentation files (the "Software"), to 
> deal
> + * in the Software without restriction, including without limitation the 
> rights
> + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> + * copies of the Software, and to permit persons to whom the Software is
> + * furnished to do so, subject to the following conditions:
> + * The above copyright notice and this permission notice shall be included in
> + * all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
> THE
> + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
> FROM,
> + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
> THE
> + * SOFTWARE.

Please check 
http://www.denx.de/wiki/view/U-Boot/Patches#Attributing_Code_Copyrights_Sign

> + */
> +
> +#include 
> +#include 

Maybe swap includes so they are sorted alphabetically or this order is really 
required?

> +
> +/* Note: To include this PHY Driver file, #define CONFIG_PHY_MSCC */

IMHO that note should be removed. Even though it might not be super obvious but 
that's
how legacy configuration is done in U-Boot. Moreover I would strongly recommend 
to use Kconfig
stuff for new drivers instead of legacy approach with includes.

> +/* Microsemi PHY ID's */
> +#define PHY_ID_VSC8530      0x00070560
> +#define PHY_ID_VSC8531  0x00070570
> +#define PHY_ID_VSC8540  0x00070760
> +#define PHY_ID_VSC8541  0x00070770

Maybe add a newline here?

> +/* Microsemi VSC85xx PHY Register Pages */
> +#define MSCC_EXT_PAGE_ACCESS    31 /* Page Access Register */
> +#define MSCC_PHY_PAGE_STD  0x /* Standard registers */
> +#define MSCC_PHY_PAGE_EXT1 0x0001 /* Extended registers - page 1 */
> +#define 

[U-Boot] How to make I2C probe like commands working in u-boot

2016-12-08 Thread lsunkara
Hi,
 Am trying to validate I2C peripheral on xilinx zynq zc702 evaluation
board in u-boot. When am trying to run the command like i2c probe and i2c
write am facing the issue like i2c commands are not known. Please can
someone tell me how to enable these commands to use it in u-boot



--
View this message in context: 
http://u-boot.10912.n7.nabble.com/How-to-make-I2C-probe-like-commands-working-in-u-boot-tp276105.html
Sent from the U-Boot mailing list archive at Nabble.com.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Warm reset problems in U-Boot

2016-12-08 Thread Oehen, Marcel
Dear sir or madam,

We are using an Altera cyclone V SoC FPGA and have a problem on warm reset in 
the U-Boot environment. I would be very grateful if you could send this e-mail 
to a responsible person.
It is possible to answer in English or German.


Kind regards,
Marcel Oehen

Siemens Schweiz AG
Mobility
Hammerweg 1
8304 Wallisellen, Switzerland
Tel.: +41 585 580930
mailto:marcel.oe...@siemens.com, www.siemens.ch
www.siemens.com/ingenuityforlife


Important notice: This e-mail and any attachment thereof contain corporate 
proprietary information. If you have received it by mistake, please notify us 
immediately by reply e-mail and delete this e-mail and its attachments from 
your system. Thank you.






PROBLEM:
After a warm reset, we can not reconfigurate the FPGA over a "Altera Remote 
Update IP Core" in the uboot environment. If we read or write data from/to the 
base address 0xc006 (0xc000 HPS2FPGA AXI Bridge + 0x6 Remote Update 
IP Core) we get the message in the uboot console and it is doing a reset:


* Error Message

data abort

MAYBE you should read doc/README.arm-unaligned-accesses

pc : [<0ff9a570>]  lr : [<0ff9a565>]
sp : 0ff325f8  ip : 0002 fp : 0ff33868
r10: 0ff33888  r9 : 0001 r8 : 0ff32f60
r7 : 0ff32616  r6 :  r5 : 0ff32617  r4 : 0078
r3 : c000  r2 : 0076 r1 : 000a  r0 : 0014
Flags: nzcv  IRQs on  FIQs off  Mode SVC_32
Resetting CPU ...

resetting ...

U-Boot SPL 2013.01.01-svn2322 (Dec 06 2016 - 12:04:55)
BOARD : Altera SOCFPGA Cyclone V Board
CLOCK: EOSC1 clock 5 KHz
..
..



GENERAL INFORMATION:
We have all our software images stored in a QSPI flash (Preloader, DeviceTree, 
Uboot, SW-Image 0, SW-Image1, SW-Image2) except the fpga image is in the EPCQ 
flash (Addr: 0x0 FPGA-Image0, Addr: 0x78 FPGA-Image1). After a cold resest 
the preloader will be loaded after the uboot. The uboot write into the 
RU_PAGE_SELECT register (base address: 0xc006000C) from the "Altera Remote 
Update IP Core" the address of the FPGA-Image0 (0x78) and triggers a 
reconfiguration with writing "1" into the RU_RECONFIG register. The fpga 
reconfiguration is working and the kernel is booting one of these 3 software 
images. When we are doing a reboot (shutdown -r) the device is doing a warm 
reset. (side note: we had a problem to reboot the device with a 4Bit QSPI 
flash. We adapted our hardware and resets the QSPI flash with the nRST signal 
-> We changed the default value to 0x2 (rstmgr, register counts, name 
nrstcnt = 0x2).



WHAT WE TRIED:
We tried to reconfigure (cf. "Reconfig FPGA!...") the fpga with a *.rbf stored 
on the sd card + we disable and enable all bridges. This works fine on a warm 
and cold reset (cf. "fpga Status register: mode 0x4" -> FPGA in User Mode).

After the console print ("START -") we are reading the register 
from a region global register and from the Altera Remote Update IP core the 
RU_PAGE_SELECT regsiter write 0x78 into this register and triggers a 
reconfiguration. But this works only on a cold reset!


* Cold reset start up

U-Boot 2013.01.01 (Dec 07 2016 - 14:19:06)

CPU   : Altera SOCFPGA Platform
BOARD : Altera SOCFPGA Cyclone V Board
I2C:   ready
DRAM:  256 MiB
MMC:   ALTERA DWMMC: 0
SF: Read data capture delay calibrated to 4 (1 - 7)
SF: Detected N25Q00 with page size 65536, total: 134217728
In:serial
Out:   serial
Err:   serial
Skipped ethaddr assignment due to invalid EMAC address in EEPROM
Net:   mii0
Warning: failed to set MAC address

Hit any key to stop autoboot:  0
set cycles
tmp1: 0x20a
fpga Status register: 0x9c
Reconfig FPGA!...
## Starting application at 0x0FF78550 ...
## Application terminated, rc = 0x0
reading output_file_128.rbf
4244820 bytes read in 236 ms (17.2 MiB/s)
## Starting application at 0x0FF78550 ...
## Application terminated, rc = 0x0
done!
fpga Status register: mode 0x4
fpga Status register: msel 0x13
Cold reset detected!
ENV_NAME_BOOT_MODE: 0
reconfiguration GW factory
START -
(1xx) RegionGlobal: 0x0
(2xx) RU_PAGE_SELECT: 0x0
(1) epcqGatewareImageAddress: 0x78
(2*)
(2)
(3)
(4)
(5)
RU_RECONFIG_TRIGGER_CONDITIONS: 0x4
RU_PAGE_SELECT: 0x0
**
SND-Settings
qspibootimageaddr: 0x40
snd_statusSoftwareFactory: 0
snd_statusSoftwareUpdated0: 1
snd_statusSoftwareUpdated1: 1
snd_versionSoftwareFactory: -
snd_versionSoftwareUpdated0: -
snd_versionSoftwareUpdated1: -
snd_watchdogOccurred: 0

[U-Boot] VAR-SOM-MX6 - Boot Count Limit support?

2016-12-08 Thread brendan
Hello,

I have a VAR-SOM-MX6 with the following details:

Board: Variscite VAR_SOM_MX6 SOM-Solo
SOC_FAMILY = "mx6:mx6q:mx6dl"
PREFERRED_PROVIDER_virtual/kernel_var-som-mx6 ?= "linux-variscite"
PREFERRED_VERSION_linux-imx_mx6 = "4.1.15"

and the following u-boot details:

U-Boot SPL 2013.10-00027-g58782ac (Mar 09 2015 - 13:33:44)
i.MX6SOLO SOC DDR EEPROM configuration
Part number: VSM-SOLO-102
Assembly: AS151004858
Date: 2016 Feb 08
Ram size 1024
Boot Device: NAND
NAND: 512 MiB


U-Boot 2013.10-00027-g58782ac (Mar 09 2015 - 13:33:44)

CPU:   Freescale i.MX6SOLO rev1.2 at 792 MHz
CPU:   Temperature 51 C, calibration data: 0x5744e269
Reset cause: POR
Board: Variscite VAR_SOM_MX6 SOM-Solo
I2C:   ready
DRAM:  1 GiB
NAND:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
In:serial
Out:   serial
Err:   serial
Board: Variscite VAR_SOM_MX6 SOM-Solo
Net:   using phy at 7


I am using Yocto to create my images (.swu) to update my board through 
swupdate   .  The update
process and loading process via NFS and NAND causes no issues. 

I am trying to implement a system whereby if the board fails to boot, it
should boot to a recovery configuration where the user is presented with the
swupdate landing page to allow for an image (.swu) upload to update or boot
to a recovery .img (uImage, .dtb, rootfs stored on MMC or NAND). 

I have read about uboot's  Boot Count Limit
   which is along the
lines of what I would like to implement i.e. after x failed boot attempts
use an alternate boot action.  However this functionality is not supported
by my board.  

I am new to this and was wondering if anyone could shed any light on what I
need to look at or how I can somehow implement the Boot Count Limit
functionality or similar.  

Thanks for your help.






--
View this message in context: 
http://u-boot.10912.n7.nabble.com/VAR-SOM-MX6-Boot-Count-Limit-support-tp276107.html
Sent from the U-Boot mailing list archive at Nabble.com.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Makefile: Fix linking with modern binutils

2016-12-08 Thread Alan Modra
On Thu, Dec 08, 2016 at 02:22:51PM +1100, Joel Stanley wrote:
> error, we are technically creating invalid ELF files without this
> option.

I don't think you were creating invalid ELF files, just unusual ones.

Anyway, passing --no-dynamic-linker is a good idea.  That tells ld
that the PIE or shared lib that you're creating does not need loaded
program headers.

-- 
Alan Modra
Australia Development Lab, IBM
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 6/6] arm64: mvebu: Enable pin control support in A8K default config

2016-12-08 Thread kostap
From: Konstantin Porotchkin 

Enable mvebu pin control support in the default configuration
files for Armada-7040 and Armada-8040 development boards

Signed-off-by: Konstantin Porotchkin 
Cc: Stefan Roese 
Cc: Nadav Haklai 
Cc: Neta Zur Hershkovits 
Cc: Omri Itach 
Cc: Igal Liberman 
Cc: Haim Boot 
Cc: Hanna Hawa 
---
Changes for v3:
- Move patch change log to comments section

 configs/mvebu_db-88f7040_defconfig | 1 +
 configs/mvebu_db-88f8040_defconfig | 1 +
 2 files changed, 2 insertions(+)

diff --git a/configs/mvebu_db-88f7040_defconfig 
b/configs/mvebu_db-88f7040_defconfig
index ed61f78..e3bdda6 100644
--- a/configs/mvebu_db-88f7040_defconfig
+++ b/configs/mvebu_db-88f7040_defconfig
@@ -51,3 +51,4 @@ CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_SMBIOS_MANUFACTURER=""
+CONFIG_PINCTRL=y
diff --git a/configs/mvebu_db-88f8040_defconfig 
b/configs/mvebu_db-88f8040_defconfig
index fa2f597..5d5be64 100644
--- a/configs/mvebu_db-88f8040_defconfig
+++ b/configs/mvebu_db-88f8040_defconfig
@@ -54,3 +54,4 @@ CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_SMBIOS_MANUFACTURER=""
+CONFIG_PINCTRL=y
-- 
2.7.4

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


[U-Boot] [PATCH v3 5/6] arm64: mvebu: Enable BUBT command support in A8K default config

2016-12-08 Thread kostap
From: Konstantin Porotchkin 

Enable mvebu "bubt" command support in the default configuration
file for Armada-7040 and Armada-8040 development boards

Signed-off-by: Konstantin Porotchkin 
Cc: Stefan Roese 
Cc: Nadav Haklai 
Cc: Neta Zur Hershkovits 
Cc: Omri Itach 
Cc: Igal Liberman 
Cc: Haim Boot 
Cc: Hanna Hawa 
---
Changes for v3:
- Move patch change log to comments section

 configs/mvebu_db-88f7040_defconfig | 1 +
 configs/mvebu_db-88f8040_defconfig | 1 +
 2 files changed, 2 insertions(+)

diff --git a/configs/mvebu_db-88f7040_defconfig 
b/configs/mvebu_db-88f7040_defconfig
index f153b9c..ed61f78 100644
--- a/configs/mvebu_db-88f7040_defconfig
+++ b/configs/mvebu_db-88f7040_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_MVEBU_BUBT=y
 CONFIG_BLOCK_CACHE=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MVTWSI=y
diff --git a/configs/mvebu_db-88f8040_defconfig 
b/configs/mvebu_db-88f8040_defconfig
index 61d58b5..fa2f597 100644
--- a/configs/mvebu_db-88f8040_defconfig
+++ b/configs/mvebu_db-88f8040_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_MVEBU_BUBT=y
 CONFIG_BLOCK_CACHE=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MVTWSI=y
-- 
2.7.4

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


[U-Boot] [PATCH v3 0/6] arm64: mvebu: Armada-8K family patches

2016-12-08 Thread kostap
From: Konstantin Porotchkin 

This set of patches is adding more features for bards based on new
Marvell MoChi platforms - Armada-70x0 and Armada-80x0.
The patches were applied on top of Stefan's mvebu-related patch set v2
with the last patch named 
"dm: core: Add dev_get_addr_size_index() to retrieve addr and size".

The test was done on Armada-70x0 and Armada-80x0 development boards
equipped with SoC release A1.
Since the SPI and I2C channels mapping between A0 and A1 releases
were changed, the execution of added features on A0 boards will fail.

Currently 2 major features were added:
- BUBT command support
- Pin controller driver for A8K family

Changes for v3:
- Move patch change log to comments section (all files)
- Fix the bubt command implementation:
- Minor syntax fixes
- Replace zero function pointers with stubs
- Replace board-specific macros with platform-specific ones

Konstantin Porotchkin (6):
  arm64: mvebu: Modify the A8K SPI and I2C config in DTS
  arm64: mvebu: Add bubt command for flash image burn
  arm64: mvebu: pinctrl: Add pin control driver for A8K family
  arm64: mvebu: Add pin control nodes to A8K family DTS files
  arm64: mvebu: Enable BUBT command support in A8K default config
  arm64: mvebu: Enable pin control support in A8K default config

 arch/arm/dts/armada-7040-db.dts|  64 +-
 arch/arm/dts/armada-8040-db.dts| 114 ++-
 arch/arm/dts/armada-ap806.dtsi |  18 +
 arch/arm/dts/armada-cp110-master.dtsi  |  32 +
 arch/arm/dts/armada-cp110-slave.dtsi   |  19 +
 arch/arm/include/asm/arch-armada8k/soc-info.h  |  17 +
 cmd/Kconfig|   3 +
 cmd/Makefile   |   2 +
 cmd/mvebu/Kconfig  |  52 ++
 cmd/mvebu/Makefile |   8 +
 cmd/mvebu/bubt.c   | 767 +
 configs/mvebu_db-88f7040_defconfig |   2 +
 configs/mvebu_db-88f8040_defconfig |   2 +
 .../pinctrl/marvell,armada-apn806-pinctrl.txt  |  25 +
 .../pinctrl/marvell,armada-cp110-pinctrl.txt   | 270 
 .../pinctrl/marvell,mvebu-pinctrl.txt  | 113 +++
 doc/mvebu/cmd/bubt.txt |  64 ++
 drivers/pinctrl/Kconfig|   1 +
 drivers/pinctrl/Makefile   |   1 +
 drivers/pinctrl/mvebu/Kconfig  |   7 +
 drivers/pinctrl/mvebu/Makefile |   7 +
 drivers/pinctrl/mvebu/pinctrl-mvebu.c  | 179 +
 drivers/pinctrl/mvebu/pinctrl-mvebu.h  |  31 +
 23 files changed, 1734 insertions(+), 64 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-armada8k/soc-info.h
 create mode 100644 cmd/mvebu/Kconfig
 create mode 100644 cmd/mvebu/Makefile
 create mode 100644 cmd/mvebu/bubt.c
 create mode 100644 
doc/device-tree-bindings/pinctrl/marvell,armada-apn806-pinctrl.txt
 create mode 100644 
doc/device-tree-bindings/pinctrl/marvell,armada-cp110-pinctrl.txt
 create mode 100644 doc/device-tree-bindings/pinctrl/marvell,mvebu-pinctrl.txt
 create mode 100644 doc/mvebu/cmd/bubt.txt
 create mode 100644 drivers/pinctrl/mvebu/Kconfig
 create mode 100644 drivers/pinctrl/mvebu/Makefile
 create mode 100644 drivers/pinctrl/mvebu/pinctrl-mvebu.c
 create mode 100644 drivers/pinctrl/mvebu/pinctrl-mvebu.h

-- 
2.7.4

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


[U-Boot] [PATCH v3 4/6] arm64: mvebu: Add pin control nodes to A8K family DTS files

2016-12-08 Thread kostap
From: Konstantin Porotchkin 

Add pin control nodes to APN806, CP-master, CP-slave and
Armada-7040 and Armada-8040 boards DTS files

Signed-off-by: Konstantin Porotchkin 
Cc: Stefan Roese 
Cc: Nadav Haklai 
Cc: Neta Zur Hershkovits 
Cc: Omri Itach 
Cc: Igal Liberman 
Cc: Haim Boot 
Cc: Hanna Hawa 
---
Changes for v3:
- Move patch change log to comments section

 arch/arm/dts/armada-7040-db.dts| 36 ++
 arch/arm/dts/armada-8040-db.dts| 56 ++
 arch/arm/dts/armada-ap806.dtsi | 18 +++
 arch/arm/dts/armada-cp110-master.dtsi  | 32 +
 arch/arm/dts/armada-cp110-slave.dtsi   | 19 
 .../pinctrl/marvell,mvebu-pinctrl.txt  | 44 -
 6 files changed, 183 insertions(+), 22 deletions(-)

diff --git a/arch/arm/dts/armada-7040-db.dts b/arch/arm/dts/armada-7040-db.dts
index 1e4d676..466c6dc 100644
--- a/arch/arm/dts/armada-7040-db.dts
+++ b/arch/arm/dts/armada-7040-db.dts
@@ -66,6 +66,16 @@
};
 };
 
+_pinctl {
+  /* MPP Bus:
+   * SDIO  [0-5]
+   * UART0 [11,19]
+   */
+ /* 0 1 2 3 4 5 6 7 8 9 */
+   pin-func = < 1 1 1 1 1 1 0 0 0 0
+0 3 0 0 0 0 0 0 0 3 >;
+};
+
  {
status = "okay";
 };
@@ -76,11 +86,37 @@
 };
 
 _i2c0 {
+   pinctrl-names = "default";
+   pinctrl-0 = <_i2c0_pins>;
status = "okay";
clock-frequency = <10>;
 };
 
+_pinctl {
+   /* MPP Bus:
+* TDM   [0-11]
+* SPI   [13-16]
+* SATA1 [28]
+* UART0 [29-30]
+* SMI   [32,34]
+* XSMI  [35-36]
+* I2C   [37-38]
+* RGMII1[44-55]
+* SD[56-62]
+*/
+   /*   0   1   2   3   4   5   6   7   8   9 */
+   pin-func = < 4   4   4   4   4   4   4   4   4   4
+4   4   0   3   3   3   3   0   0   0
+0   0   0   0   0   0   0   0   9   0xA
+0xA 0   7   0   7   7   7   2   2   0
+0   0   0   0   1   1   1   1   1   1
+1   1   1   1   1   1   0xE 0xE 0xE 0xE
+0xE 0xE 0xE >;
+};
+
 _spi1 {
+   pinctrl-names = "default";
+   pinctrl-0 = <_spi0_pins>;
status = "okay";
 
spi-flash@0 {
diff --git a/arch/arm/dts/armada-8040-db.dts b/arch/arm/dts/armada-8040-db.dts
index 8a1..40def9d 100644
--- a/arch/arm/dts/armada-8040-db.dts
+++ b/arch/arm/dts/armada-8040-db.dts
@@ -71,6 +71,41 @@
status = "okay";
 };
 
+_pinctl {
+   /* MPP Bus:
+* SDIO  [0-10]
+* UART0 [11,19]
+*/
+ /* 0 1 2 3 4 5 6 7 8 9 */
+   pin-func = < 1 1 1 1 1 1 1 1 1 1
+1 3 0 0 0 0 0 0 0 3 >;
+};
+
+_pinctl {
+   /* MPP Bus:
+* [0-31] = 0xff: Keep default CP0_shared_pins:
+* [11] CLKOUT_MPP_11 (out)
+* [23] LINK_RD_IN_CP2CP (in)
+* [25] CLKOUT_MPP_25 (out)
+* [29] AVS_FB_IN_CP2CP (in)
+* [32,34] SMI
+* [31]GPIO: push button/Wake
+* [35-36] GPIO
+* [37-38] I2C
+* [40-41] SATA[0/1]_PRESENT_ACTIVEn
+* [42-43] XSMI
+* [44-55] RGMII1
+* [56-62] SD
+*/
+   /*   0123456789 */
+   pin-func = < 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
+0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
+0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
+0xff 070700220
+0088111111
+1111110xe  0xe  0xe  0xe
+0xe  0xe  0xe >;
+};
 
 /* CON5 on CP0 expansion */
 _pcie2 {
@@ -78,6 +113,8 @@
 };
 
 _i2c0 {
+   pinctrl-names = "default";
+   pinctrl-0 = <_i2c0_pins>;
status = "okay";
clock-frequency = <10>;
 };
@@ -97,12 +134,31 @@
status = "okay";
 };
 
+_pinctl {
+   /* MPP Bus:
+* [0-11]  RGMII0
+* [13-16] SPI1
+* [27,31] GE_MDIO/MDC
+* [32-62] = 0xff: Keep default CP1_shared_pins:
+*/
+   /*   0123456789 */
+   pin-func = < 0x3  0x3  0x3  0x3  0x3  0x3  0x3  0x3  0x3  0x3
+0x3  0x3  0xff 0x3  0x3  0x3  0x3  0xff 0xff 0xff
+0xff 0xff 0xff 0xff 0xff 0xff 0xff 0x8  0xff 0xff
+0xff 0x8  0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
+0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
+0xff 0xff 0xff 0xff 

[U-Boot] [PATCH v3 3/6] arm64: mvebu: pinctrl: Add pin control driver for A8K family

2016-12-08 Thread kostap
From: Konstantin Porotchkin 

Add a DM port of Marvell pin control driver.
The A8K SoC family contains several silicone dies interconnected
in a single package. Every die is normally equipped with its own
pin controller unit.
There are 2 pin controllers in A70x0 SoC and 3 in A80x0 SoC.

Signed-off-by: Konstantin Porotchkin 
Reviewed-by: Simon Glass 
Cc: Simon Glass 
Cc: Stefan Roese 
Cc: Nadav Haklai 
Cc: Neta Zur Hershkovits 
Cc: Omri Itach 
Cc: Igal Liberman 
Cc: Haim Boot 
Cc: Hanna Hawa 
---
Changes for v3:
- Extend the Kconfig help for pin control driver
- Move patch change log to comments section

 arch/arm/include/asm/arch-armada8k/soc-info.h  |  17 ++
 .../pinctrl/marvell,armada-apn806-pinctrl.txt  |  25 ++
 .../pinctrl/marvell,armada-cp110-pinctrl.txt   | 270 +
 .../pinctrl/marvell,mvebu-pinctrl.txt  | 113 +
 drivers/pinctrl/Kconfig|   1 +
 drivers/pinctrl/Makefile   |   1 +
 drivers/pinctrl/mvebu/Kconfig  |   7 +
 drivers/pinctrl/mvebu/Makefile |   7 +
 drivers/pinctrl/mvebu/pinctrl-mvebu.c  | 179 ++
 drivers/pinctrl/mvebu/pinctrl-mvebu.h  |  31 +++
 10 files changed, 651 insertions(+)
 create mode 100644 arch/arm/include/asm/arch-armada8k/soc-info.h
 create mode 100644 
doc/device-tree-bindings/pinctrl/marvell,armada-apn806-pinctrl.txt
 create mode 100644 
doc/device-tree-bindings/pinctrl/marvell,armada-cp110-pinctrl.txt
 create mode 100644 doc/device-tree-bindings/pinctrl/marvell,mvebu-pinctrl.txt
 create mode 100644 drivers/pinctrl/mvebu/Kconfig
 create mode 100644 drivers/pinctrl/mvebu/Makefile
 create mode 100644 drivers/pinctrl/mvebu/pinctrl-mvebu.c
 create mode 100644 drivers/pinctrl/mvebu/pinctrl-mvebu.h

diff --git a/arch/arm/include/asm/arch-armada8k/soc-info.h 
b/arch/arm/include/asm/arch-armada8k/soc-info.h
new file mode 100644
index 000..bae3995
--- /dev/null
+++ b/arch/arm/include/asm/arch-armada8k/soc-info.h
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2016 Marvell International Ltd.
+ *
+ * SPDX-License-Identifier:GPL-2.0
+ * https://spdx.org/licenses
+ */
+
+#ifndef _SOC_INFO_H_
+#define _SOC_INFO_H_
+
+/* Pin Ctrl driver definitions */
+#define BITS_PER_PIN   4
+#define PIN_FUNC_MASK  ((1 << BITS_PER_PIN) - 1)
+#define PIN_REG_SHIFT  3
+#define PIN_FIELD_MASK ((1 << PIN_REG_SHIFT) - 1)
+
+#endif /* _SOC_INFO_H_ */
diff --git a/doc/device-tree-bindings/pinctrl/marvell,armada-apn806-pinctrl.txt 
b/doc/device-tree-bindings/pinctrl/marvell,armada-apn806-pinctrl.txt
new file mode 100644
index 000..51f2f2c
--- /dev/null
+++ b/doc/device-tree-bindings/pinctrl/marvell,armada-apn806-pinctrl.txt
@@ -0,0 +1,25 @@
+   Functions of Armada APN806 pin controller
+   Function 0x0 for any MPP ID activates GPIO pin mode
+--
+MPP#   0x1 0x2 0x3 0x4
+--
+0  SDIO_CLK-   SPI0_CLK-
+1  SDIO_CMD-   SPI0_MISO   -
+2  SDIO_D[0]   -   SPI0_MOSI   -
+3  SDIO_D[1]   -   SPI0_CS0n   -
+4  SDIO_D[2]   -   I2C0_SDASPI0_CS1n
+5  SDIO_D[3]   -   I2C0_SCK-
+6  SDIO_DS -   -   -
+7  SDIO_D[4]   -   UART1_RXD   -
+8  SDIO_D[5]   -   UART1_TXD   -
+9  SDIO_D[6]   -   SPI0_CS1n   -
+10 SDIO_D[7]   -   -   -
+11 -   -   UART0_TXD   -
+12 SDIO_CARD_PW_OFFSDIO_HW_RST -   -
+13 -   -   -   -
+14 -   -   -   -
+15 -   -   -   -
+16 -   -   -   -
+17 -   -   -   -
+18 -   -   -   -
+19 -   -   UART0_RXD   -
diff --git a/doc/device-tree-bindings/pinctrl/marvell,armada-cp110-pinctrl.txt 
b/doc/device-tree-bindings/pinctrl/marvell,armada-cp110-pinctrl.txt
new file mode 100644
index 000..3adcf3a
--- /dev/null
+++ b/doc/device-tree-bindings/pinctrl/marvell,armada-cp110-pinctrl.txt
@@ -0,0 +1,270 @@
+   Functions of Armada CP110 pin controller
+  

[U-Boot] [PATCH v3 2/6] arm64: mvebu: Add bubt command for flash image burn

2016-12-08 Thread kostap
From: Konstantin Porotchkin 

Add support for mvebu bubt command for flash image
load, check and burn on boot device.

Signed-off-by: Konstantin Porotchkin 
Reviewed-by: Stefan Roese 
Cc: Stefan Roese 
Cc: Nadav Haklai 
Cc: Neta Zur Hershkovits 
Cc: Omri Itach 
Cc: Igal Liberman 
Cc: Haim Boot 
Cc: Hanna Hawa 
---
Changes for v3:
- Move patch change log to comments section
- Move configuration options to cmd/mvebu/Kconfig
- Minor syntax fixes
- Replace zero function pointers with stubs
- Replace board-specific macros with platform-specific ones

 cmd/Kconfig|   3 +
 cmd/Makefile   |   2 +
 cmd/mvebu/Kconfig  |  52 
 cmd/mvebu/Makefile |   8 +
 cmd/mvebu/bubt.c   | 767 +
 doc/mvebu/cmd/bubt.txt |  64 +
 6 files changed, 896 insertions(+)
 create mode 100644 cmd/mvebu/Kconfig
 create mode 100644 cmd/mvebu/Makefile
 create mode 100644 cmd/mvebu/bubt.c
 create mode 100644 doc/mvebu/cmd/bubt.txt

diff --git a/cmd/Kconfig b/cmd/Kconfig
index b16c603..b38d285 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -632,6 +632,9 @@ config CMD_QFW
  This provides access to the QEMU firmware interface.  The main
  feature is to allow easy loading of files passed to qemu-system
  via -kernel / -initrd
+
+source "cmd/mvebu/Kconfig"
+
 endmenu
 
 config CMD_BOOTSTAGE
diff --git a/cmd/Makefile b/cmd/Makefile
index 9c9a9d1..34bc544 100644
--- a/cmd/Makefile
+++ b/cmd/Makefile
@@ -163,3 +163,5 @@ obj-$(CONFIG_CMD_BLOB) += blob.o
 
 # core command
 obj-y += nvedit.o
+
+obj-$(CONFIG_ARCH_MVEBU) += mvebu/
diff --git a/cmd/mvebu/Kconfig b/cmd/mvebu/Kconfig
new file mode 100644
index 000..ad10a57
--- /dev/null
+++ b/cmd/mvebu/Kconfig
@@ -0,0 +1,52 @@
+menu "MVEBU commands"
+depends on ARCH_MVEBU
+
+config CMD_MVEBU_BUBT
+   bool "bubt"
+   default n
+   help
+ bubt - Burn a u-boot image to flash
+ For details about bubt command please see the documentation
+ in doc/mvebu/cmd/bubt.txt
+
+choice
+   prompt "Flash for image"
+   default MVEBU_SPI_BOOT
+
+config MVEBU_NAND_BOOT
+   bool "NAND flash boot"
+   depends on NAND_PXA3XX
+   help
+ Enable boot from NAND flash.
+ Allow usage of NAND flash as a target for "bubt" command
+ For details about bubt command please see the documentation
+ in doc/mvebu/cmd/bubt.txt
+
+config MVEBU_SPI_BOOT
+   bool "SPI flash boot"
+   depends on SPI_FLASH
+   help
+ Enable boot from SPI flash.
+ Allow usage of SPI flash as a target for "bubt" command
+ For details about bubt command please see the documentation
+ in doc/mvebu/cmd/bubt.txt
+
+config MVEBU_MMC_BOOT
+   bool "eMMC flash boot"
+   depends on MVEBU_MMC
+   help
+ Enable boot from eMMC boot partition
+ Allow usage of eMMC/SD device as a target for "bubt" command
+ For details about bubt command please see the documentation
+ in doc/mvebu/cmd/bubt.txt
+
+endchoice
+
+config MVEBU_UBOOT_DFLT_NAME
+   string "Default image name for bubt command"
+   default "flash-image.bin"
+   help
+ This option should contain a default file name to be used with
+ MVEBU "bubt" command if the source file name is omitted
+
+endmenu
diff --git a/cmd/mvebu/Makefile b/cmd/mvebu/Makefile
new file mode 100644
index 000..03de53e
--- /dev/null
+++ b/cmd/mvebu/Makefile
@@ -0,0 +1,8 @@
+#
+# Copyright (C) 2016 Marvell International Ltd.
+#
+# SPDX-License-Identifier: GPL-2.0
+# https://spdx.org/licenses
+
+
+obj-$(CONFIG_CMD_MVEBU_BUBT) += bubt.o
diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c
new file mode 100644
index 000..1cbfcf0
--- /dev/null
+++ b/cmd/mvebu/bubt.c
@@ -0,0 +1,767 @@
+/*
+ * Copyright (C) 2016 Marvell International Ltd.
+ *
+ * SPDX-License-Identifier:GPL-2.0
+ * https://spdx.org/licenses
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#ifndef CONFIG_SYS_MMC_ENV_DEV
+#define CONFIG_SYS_MMC_ENV_DEV 0
+#endif
+
+#if defined(CONFIG_ARMADA_8K)
+#define MAIN_HDR_MAGIC 0xB105B002
+
+struct mvebu_image_header {
+   u32 magic;  /*  0-3  */
+   u32 prolog_size;/*  4-7  */
+   u32 prolog_checksum;/*  8-11 */
+   u32 boot_image_size;/* 12-15 */
+   u32 boot_image_checksum;/* 16-19 */
+   u32 rsrvd0; /* 20-23 */
+   u32 load_addr;  /* 24-27 */
+   u32 exec_addr;  /* 28-31 */
+   u8  uart_cfg;   /*  32   */
+   u8  baudrate;   /*  33   */
+

[U-Boot] [PATCH v3 1/6] arm64: mvebu: Modify the A8K SPI and I2C config in DTS

2016-12-08 Thread kostap
From: Konstantin Porotchkin 

Align the Armada-8040-db and Armada-7040-db SPI and I2C
DTS settings with latest DB settings:
- 8040-db: disable i2c0 and spi0 on AP (MPPs are reserved for SDIO)
- 8040-db: disable cps_i2c0 on CP1
- 8040-db: enable spi1 on CP1 (the new location of the boot flash)
  The spi1 on CP1 is aliased as spi0 since this is the way
  the driver enumerates it.

Signed-off-by: Konstantin Porotchkin 
Reviewed-by: Stefan Roese 
Cc: Stefan Roese 
Cc: Nadav Haklai 
Cc: Neta Zur Hershkovits 
Cc: Omri Itach 
Cc: Igal Liberman 
Cc: Haim Boot 
Cc: Hanna Hawa 
---
Changes for v3:
- Move patch change log to comments section

 arch/arm/dts/armada-7040-db.dts | 32 --
 arch/arm/dts/armada-8040-db.dts | 60 +
 2 files changed, 25 insertions(+), 67 deletions(-)

diff --git a/arch/arm/dts/armada-7040-db.dts b/arch/arm/dts/armada-7040-db.dts
index b8fe5a9..1e4d676 100644
--- a/arch/arm/dts/armada-7040-db.dts
+++ b/arch/arm/dts/armada-7040-db.dts
@@ -66,38 +66,6 @@
};
 };
 
- {
-   status = "okay";
-   clock-frequency = <10>;
-};
-
- {
-   status = "okay";
-
-   spi-flash@0 {
-   #address-cells = <1>;
-   #size-cells = <1>;
-   compatible = "jedec,spi-nor";
-   reg = <0>;
-   spi-max-frequency = <1000>;
-
-   partitions {
-   compatible = "fixed-partitions";
-   #address-cells = <1>;
-   #size-cells = <1>;
-
-   partition@0 {
-   label = "U-Boot";
-   reg = <0 0x20>;
-   };
-   partition@40 {
-   label = "Filesystem";
-   reg = <0x20 0xce>;
-   };
-   };
-   };
-};
-
  {
status = "okay";
 };
diff --git a/arch/arm/dts/armada-8040-db.dts b/arch/arm/dts/armada-8040-db.dts
index 7fb674b..8a1 100644
--- a/arch/arm/dts/armada-8040-db.dts
+++ b/arch/arm/dts/armada-8040-db.dts
@@ -57,7 +57,7 @@
 
aliases {
i2c0 = _i2c0;
-   spi0 = 
+   spi0 = _spi1;
};
 
memory@ {
@@ -66,38 +66,6 @@
};
 };
 
- {
-   status = "okay";
-   clock-frequency = <10>;
-};
-
- {
-   status = "okay";
-
-   spi-flash@0 {
-   #address-cells = <1>;
-   #size-cells = <1>;
-   compatible = "jedec,spi-nor";
-   reg = <0>;
-   spi-max-frequency = <1000>;
-
-   partitions {
-   compatible = "fixed-partitions";
-   #address-cells = <1>;
-   #size-cells = <1>;
-
-   partition@0 {
-   label = "U-Boot";
-   reg = <0 0x20>;
-   };
-   partition@40 {
-   label = "Filesystem";
-   reg = <0x20 0xce>;
-   };
-   };
-   };
-};
-
 /* Accessible over the mini-USB CON9 connector on the main board */
  {
status = "okay";
@@ -134,9 +102,31 @@
status = "okay";
 };
 
-_i2c0 {
+_spi1 {
status = "okay";
-   clock-frequency = <10>;
+
+   spi-flash@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "jedec,spi-nor";
+   reg = <0>;
+   spi-max-frequency = <1000>;
+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label = "U-Boot";
+   reg = <0 0x20>;
+   };
+   partition@40 {
+   label = "Filesystem";
+   reg = <0x20 0xce>;
+   };
+   };
+   };
 };
 
 /* CON4 on CP1 expansion */
-- 
2.7.4

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


[U-Boot] [PATCH v2] arm: am33xx: Initialize EMIF REG_PR_OLD_COUNT for BBB and am335x-evm

2016-12-08 Thread Jyri Sarha
Initialize EMIF OCP_CONFIG registers REG_COS_COUNT_1, REG_COS_COUNT_2,
and REG_PR_OLD_COUNT field for Beaglebone-Black and am335x-evm. With
the default values LCDC suffers from DMA FIFO underflows and frame
synchronization lost errors. The initialization values are the highest
that work flawlessly when heavy memory load is generated by CPU. 32bpp
colors were used in the test. On BBB the video mode used 110MHz pixel
clock. The mode supported by the panel of am335x-evm uses 30MHz pixel
clock.

Signed-off-by: Jyri Sarha 
---
Changes since v2:
- Move board specific EMIF_OCP_CONFIG_* definitions to board/ti/am335x/board.h
  and improve the related comment
- Handle also am335x-evms older than revision 1.5

 arch/arm/include/asm/emif.h  |  1 +
 arch/arm/mach-omap2/am33xx/ddr.c |  4 
 board/ti/am335x/board.c  | 15 +++
 board/ti/am335x/board.h  | 10 ++
 4 files changed, 30 insertions(+)

diff --git a/arch/arm/include/asm/emif.h b/arch/arm/include/asm/emif.h
index b00dece..9a46340 100644
--- a/arch/arm/include/asm/emif.h
+++ b/arch/arm/include/asm/emif.h
@@ -1171,6 +1171,7 @@ struct emif_regs {
u32 sdram_tim1;
u32 sdram_tim2;
u32 sdram_tim3;
+   u32 ocp_config;
u32 read_idle_ctrl;
u32 zq_config;
u32 temp_alert_config;
diff --git a/arch/arm/mach-omap2/am33xx/ddr.c b/arch/arm/mach-omap2/am33xx/ddr.c
index 6acf30c..690487e 100644
--- a/arch/arm/mach-omap2/am33xx/ddr.c
+++ b/arch/arm/mach-omap2/am33xx/ddr.c
@@ -180,6 +180,10 @@ void config_sdram(const struct emif_regs *regs, int nr)
writel(regs->ref_ctrl, _reg[nr]->emif_sdram_ref_ctrl);
writel(regs->ref_ctrl, _reg[nr]->emif_sdram_ref_ctrl_shdw);
writel(regs->sdram_config, _reg[nr]->emif_sdram_config);
+
+   /* Write REG_COS_COUNT_1, REG_COS_COUNT_2, and REG_PR_OLD_COUNT. */
+   if (regs->ocp_config)
+   writel(regs->ocp_config, _reg[nr]->emif_l3_config);
 }
 
 /**
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index da9eab4..b994b42 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -109,6 +109,16 @@ static const struct emif_regs ddr2_emif_reg_data = {
.emif_ddr_phy_ctlr_1 = MT47H128M16RT25E_EMIF_READ_LATENCY,
 };
 
+static const struct emif_regs ddr2_evm_emif_reg_data = {
+   .sdram_config = MT47H128M16RT25E_EMIF_SDCFG,
+   .ref_ctrl = MT47H128M16RT25E_EMIF_SDREF,
+   .sdram_tim1 = MT47H128M16RT25E_EMIF_TIM1,
+   .sdram_tim2 = MT47H128M16RT25E_EMIF_TIM2,
+   .sdram_tim3 = MT47H128M16RT25E_EMIF_TIM3,
+   .ocp_config = EMIF_OCP_CONFIG_AM335X_EVM,
+   .emif_ddr_phy_ctlr_1 = MT47H128M16RT25E_EMIF_READ_LATENCY,
+};
+
 static const struct ddr_data ddr3_data = {
.datardsratio0 = MT41J128MJT125_RD_DQS,
.datawdsratio0 = MT41J128MJT125_WR_DQS,
@@ -198,6 +208,7 @@ static struct emif_regs ddr3_beagleblack_emif_reg_data = {
.sdram_tim1 = MT41K256M16HA125E_EMIF_TIM1,
.sdram_tim2 = MT41K256M16HA125E_EMIF_TIM2,
.sdram_tim3 = MT41K256M16HA125E_EMIF_TIM3,
+   .ocp_config = EMIF_OCP_CONFIG_BEAGLEBONE_BLACK,
.zq_config = MT41K256M16HA125E_ZQ_CFG,
.emif_ddr_phy_ctlr_1 = MT41K256M16HA125E_EMIF_READ_LATENCY,
 };
@@ -208,6 +219,7 @@ static struct emif_regs ddr3_evm_emif_reg_data = {
.sdram_tim1 = MT41J512M8RH125_EMIF_TIM1,
.sdram_tim2 = MT41J512M8RH125_EMIF_TIM2,
.sdram_tim3 = MT41J512M8RH125_EMIF_TIM3,
+   .ocp_config = EMIF_OCP_CONFIG_AM335X_EVM,
.zq_config = MT41J512M8RH125_ZQ_CFG,
.emif_ddr_phy_ctlr_1 = MT41J512M8RH125_EMIF_READ_LATENCY |
PHY_EN_DYN_PWRDN,
@@ -486,6 +498,9 @@ void sdram_init(void)
config_ddr(400, _evmsk, _icev2_data,
   _icev2_cmd_ctrl_data, _icev2_emif_reg_data,
   0);
+   else if (board_is_gp_evm())
+   config_ddr(266, , _data,
+  _cmd_ctrl_data, _evm_emif_reg_data, 0);
else
config_ddr(266, , _data,
   _cmd_ctrl_data, _emif_reg_data, 0);
diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h
index 9776df7..7caaee2 100644
--- a/board/ti/am335x/board.h
+++ b/board/ti/am335x/board.h
@@ -11,6 +11,16 @@
 #ifndef _BOARD_H_
 #define _BOARD_H_
 
+/**
+ * AM335X (EMIF_4D) EMIF REG_COS_COUNT_1, REG_COS_COUNT_2, and
+ * REG_PR_OLD_COUNT values to avoid LCDC DMA FIFO underflows and Frame
+ * Synchronization Lost errors. The values are the biggest that work
+ * reliably with offered video modes and the memory subsystem on the
+ * boards.
+ */
+#define EMIF_OCP_CONFIG_BEAGLEBONE_BLACK   0x00141414
+#define EMIF_OCP_CONFIG_AM335X_EVM 0x003d3d3d
+
 static inline int board_is_bone(void)
 {
return board_ti_is("A335BONE");
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de

Re: [U-Boot] net: e1000: support for intel 82579

2016-12-08 Thread Marcel Ziswiler
On Wed, 2016-12-07 at 16:08 +0100, Markus Valentin wrote:
> Hi,
> 
> did somebody already did some effort to support the intel 82579
> Gigabit
> Ethernet PHY with the e1000 driver?

I have not tried 82579 in particular but back when I brought up our
i210/i211 based modules I do remember that one at least as a bare
minimum would have to add its PCI device ID to the following table:

http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/e1000.c;h=875682b
1b89e1ee31b7226e646be3c108b850933;hb=HEAD#l73

Looking at the mainline Linux 82579 support you also may have to add
some specific automatic PHY configuration (un-)gating. Plus more
advanced features like EEE LPI, ME or jumbo frames may need more work
but are probably not required in a boot loader.

> In my naive try to add it i had no success yet.

Then enabling debugging and looking at whether the driver gets called
from the PCIe side of things at all and later how far it gets in
bringing the Ethernet linke up will help.

> Regards
> Markus

Cheers

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