Re: [U-Boot] [PATCH v1] env_mmc: configure environment offsets via device tree

2017-02-27 Thread Jaehoon Chung
Hi all,

On 02/22/2017 04:35 PM, Igor Grinberg wrote:
> Hi Philipp, Simon,

This patch is delegated to me..but i didn't receive any email in my mail box.
So i didn't know this...i don't read yet fully..

After reading mails, i will reply again.

Thanks.

Best Regards,
Jaehoon Chung

> 
> On 02/22/17 05:59, Simon Glass wrote:
>> Hi,
>>
>> On 20 February 2017 at 02:18, Dr. Philipp Tomsich
>>  wrote:
>>>
>>> On 20 Feb 2017, at 08:22, Igor Grinberg  wrote:
>>>
>>> That sounds too odd...
>>> DT's purpose is to describe the h/w... and that does not look so...
>>> We also, have a dt file name in the environment, so this creates will create
>>> a chicken and an egg problem…
>>>
>>>
>>> I don’t really follow… as far as I knew the DT name would have to come
>>> from some other source anyway, as the device containing the env might
>>> only be described through the device tree (e.g. mmc0).
>>>
>>>
>>> Why? U-Boot can live pretty well w/o DT.
>>>
>>>
>>> If U-Boot runs without DT, then nothing will/should change about how the
>>> setting
>>> is retrieved from CONFIG_ENV_OFFSET.
> 
> ok.
> 
>>>
>>> The platform that motivated this change is ARCH_SUNXI, which does not use
>>> per-board defines but aims to have one generic bootloader per-SoC.
> 
> Well, after a ten year experience with boars and different SoC vendors,
> I don't think it is possible...
> Unless all boards are copies of their respective reference design...
> 
>>>
>>> I really don't think we should go that direction. DT is not meant to provide
>>> a solution to all your problems...
>>>
>>>
>>> I don’t see how this is different from other entries in chosen and config as
>>> of today:
>>> common/autoboot.c allows an override through /config/bootdelay
>>> common/board_r.c uses /config/load-environment
>>> common/cli.c can pull in /config/bootcmd
>>> drivers/serial/serial-uclass.c uses /chosen/stdout-path
>>>
>>> In fact, it is the absence of this mechanism that is causing problems today:
>>> CONFIG_ENV_OFFSET is not configurable through Kconfig, so we would
>>> need board-specific defines (e.g. CONFIG_SUNXI_BOARD_LYNX) and
>>> matching #ifdef primitives in a shared header (sunxi-common.h in our case).
>>>
>>>
>>> Right. Exactly, I think we should move the CONFIG_ENV_OFFSET to Kconfig.
>>> And that will solve the problem.
>>>
>>>
>>> Doing this would still get into the way of architectures that want to build
>>> a single
>>> ‘universal’ bootloader for their SoC: the ENV_OFFSET may not be the same
>>> across all board and vendor configurations. This can easily be handled with
>>> the
>>> (optional) prop in the DT, but not with the compile-time ENV_OFFSET.
> 
> I think Kconfig would be enough for this, but please try your approach.
> The 'universal' thing will probably work if you don't have too many boards and
> they don't differ too much from each other...
> 
>>>
>>> If we decide to this, I’d at least like to introduce the function call to
>>> (the weak
>>> function) mmc_get_env_addr(…), so we can override this in the board code.
> 
> That is how it works today:
> include/environment.h:185:extern int mmc_get_env_addr(struct mmc *mmc, int 
> copy, u32 *env_addr);
> 
>>>
>>> So putting this in the DT is the best (and least intrusive) option
>>> available.
>>>
>>>
>>> Ok. I see your point now. Yet I think we should keep the DT to its purpose -
>>> which
>>> is to describe the h/w (and not the s/w placement layout).
>>
>> Well actually we put things like flash map in there and the
>> environment position seems like a very good thing to have there.
> 
> Well, I thought so too... But I had a discussion with kernel people
> some time ago and they discourage this approach and would not like to
> have the flash mapping in the DT.
> 
>> So I
>> like this patch. There is too compile-time configuration in U-Boot
>> still...
> 
> Yeah, I know you like it ;-) but DT is not the place for it,
> unless DT specs. guys decide to change its purpose and place
> s/w configuration straps inside...
> 
> Although, U-Boot build process is not a pain at all, you might want
> to design another abstraction layer for s/w configuration straps.
> That way you will be able to keep the U-Boot core binary generic...
> Is it worse the effort? I don't know. Currently, having the board
> infrastructure, provides that layer and works fine.
> 
>>
>> In fact I wish we could support this for all environment types.
>> Overall the environment drivers need some work to make them more
>> similar...
> 
> Indeed, but not just that... It would be great to add a DM to env. drivers.
> This will make it possible to use more than one environment driver
> in runtime and make many people who struggle with it happy...
> 
> 

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


Re: [U-Boot] [PATCH v3 1/2] mmc: pci: Add CONFIG_MMC_PCI

2017-02-27 Thread Jaehoon Chung
Hi Andy,

On 02/20/2017 08:24 PM, Andy Shevchenko wrote:
> From: Felipe Balbi 
> 
> We don't want pci_mmc to compile every time x86 compiles, only when
> there's a platform that needs it. For that reason, we're adding a new
> CONFIG_MMC_PCI which platforms can choose to enable.
> 
> Suggested-by: Jaehoon Chung 
> Reviewed-by: Bin Meng 
> Signed-off-by: Felipe Balbi 
> Signed-off-by: Andy Shevchenko 

Applied on u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

> ---
>  configs/bayleybay_defconfig | 1 +
>  configs/conga-qeval20-qa3-e3845-internal-uart_defconfig | 1 +
>  configs/conga-qeval20-qa3-e3845_defconfig   | 1 +
>  configs/crownbay_defconfig  | 1 +
>  configs/dfi-bt700-q7x-151_defconfig | 1 +
>  configs/galileo_defconfig   | 1 +
>  configs/minnowmax_defconfig | 1 +
>  configs/theadorable-x86-dfi-bt700_defconfig | 1 +
>  drivers/mmc/Kconfig | 8 
>  drivers/mmc/Makefile| 2 +-
>  10 files changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/configs/bayleybay_defconfig b/configs/bayleybay_defconfig
> index c6aa24f9be..d2f9f24a19 100644
> --- a/configs/bayleybay_defconfig
> +++ b/configs/bayleybay_defconfig
> @@ -48,6 +48,7 @@ CONFIG_REGMAP=y
>  CONFIG_SYSCON=y
>  CONFIG_CPU=y
>  CONFIG_MMC=y
> +CONFIG_MMC_PCI=y
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_SDMA=y
>  CONFIG_SPI_FLASH=y
> diff --git a/configs/conga-qeval20-qa3-e3845-internal-uart_defconfig 
> b/configs/conga-qeval20-qa3-e3845-internal-uart_defconfig
> index 890d28ce69..d96bfcbe14 100644
> --- a/configs/conga-qeval20-qa3-e3845-internal-uart_defconfig
> +++ b/configs/conga-qeval20-qa3-e3845-internal-uart_defconfig
> @@ -50,6 +50,7 @@ CONFIG_DM_I2C=y
>  CONFIG_SYS_I2C_INTEL=y
>  CONFIG_WINBOND_W83627=y
>  CONFIG_MMC=y
> +CONFIG_MMC_PCI=y
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_SDMA=y
>  CONFIG_SPI_FLASH=y
> diff --git a/configs/conga-qeval20-qa3-e3845_defconfig 
> b/configs/conga-qeval20-qa3-e3845_defconfig
> index 6e4cd843d9..1642bf2926 100644
> --- a/configs/conga-qeval20-qa3-e3845_defconfig
> +++ b/configs/conga-qeval20-qa3-e3845_defconfig
> @@ -49,6 +49,7 @@ CONFIG_DM_I2C=y
>  CONFIG_SYS_I2C_INTEL=y
>  CONFIG_WINBOND_W83627=y
>  CONFIG_MMC=y
> +CONFIG_MMC_PCI=y
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_SDMA=y
>  CONFIG_SPI_FLASH=y
> diff --git a/configs/crownbay_defconfig b/configs/crownbay_defconfig
> index 13a00c2a17..4a88f5f3c5 100644
> --- a/configs/crownbay_defconfig
> +++ b/configs/crownbay_defconfig
> @@ -37,6 +37,7 @@ CONFIG_REGMAP=y
>  CONFIG_SYSCON=y
>  CONFIG_CPU=y
>  CONFIG_MMC=y
> +CONFIG_MMC_PCI=y
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_SDMA=y
>  CONFIG_SPI_FLASH=y
> diff --git a/configs/dfi-bt700-q7x-151_defconfig 
> b/configs/dfi-bt700-q7x-151_defconfig
> index ce447f540a..d5bd66f83c 100644
> --- a/configs/dfi-bt700-q7x-151_defconfig
> +++ b/configs/dfi-bt700-q7x-151_defconfig
> @@ -47,6 +47,7 @@ CONFIG_CPU=y
>  CONFIG_DM_I2C=y
>  CONFIG_NUVOTON_NCT6102D=y
>  CONFIG_MMC=y
> +CONFIG_MMC_PCI=y
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_SDMA=y
>  CONFIG_SPI_FLASH=y
> diff --git a/configs/galileo_defconfig b/configs/galileo_defconfig
> index 570f9ea810..f60abc3422 100644
> --- a/configs/galileo_defconfig
> +++ b/configs/galileo_defconfig
> @@ -42,6 +42,7 @@ CONFIG_REGMAP=y
>  CONFIG_SYSCON=y
>  CONFIG_CPU=y
>  CONFIG_MMC=y
> +CONFIG_MMC_PCI=y
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_SDMA=y
>  CONFIG_SPI_FLASH=y
> diff --git a/configs/minnowmax_defconfig b/configs/minnowmax_defconfig
> index 5f61f2a19c..8dac1d72fb 100644
> --- a/configs/minnowmax_defconfig
> +++ b/configs/minnowmax_defconfig
> @@ -47,6 +47,7 @@ CONFIG_REGMAP=y
>  CONFIG_SYSCON=y
>  CONFIG_CPU=y
>  CONFIG_MMC=y
> +CONFIG_MMC_PCI=y
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_SDMA=y
>  CONFIG_SPI_FLASH=y
> diff --git a/configs/theadorable-x86-dfi-bt700_defconfig 
> b/configs/theadorable-x86-dfi-bt700_defconfig
> index cde33bbfe1..1703cee841 100644
> --- a/configs/theadorable-x86-dfi-bt700_defconfig
> +++ b/configs/theadorable-x86-dfi-bt700_defconfig
> @@ -47,6 +47,7 @@ CONFIG_CPU=y
>  CONFIG_DM_I2C=y
>  CONFIG_NUVOTON_NCT6102D=y
>  CONFIG_MMC=y
> +CONFIG_MMC_PCI=y
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_SDMA=y
>  CONFIG_SPI_FLASH=y
> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
> index 01d1dbfb1b..af8436f337 100644
> --- a/drivers/mmc/Kconfig
> +++ b/drivers/mmc/Kconfig
> @@ -122,6 +122,14 @@ config MMC_MXS
>  
> If unsure, say N.
>  
> +config MMC_PCI
> + bool "Support for MMC controllers on PCI"
> + help
> +   This selects PCI-based MMC controllers.
> +   If you have an MMC controller on a PCI bus, say Y here.
> +
> +   If unsure, say N.
> +
>  

Re: [U-Boot] [PATCH 1/2 RFT] sunxi: power: Add AXP806 and AXP808 support

2017-02-27 Thread Jaehoon Chung
On 02/27/2017 04:01 AM, Rask Ingemann Lambertsen wrote:
> An X-Powers AXP806 or AXP808 PMIC is usually found on boards using the
> Allwinner A80 ARM SoC. This patch adds support for the PMIC's regulators
> and sets up the runtime address and master/slave mode in pmic_bus_init().
> 
> AXP806/AXP808 support is enabled by default on all MACH_SUN9I boards.
> 
> Because there are boards with both an AXP806 and an AXP809,
> drivers/power/Kconfig and arch/arm/mach-sunxi/pmic_bus.c are changed to
> make it possible to have more than one PMIC enabled at a time.
> 
> Signed-off-by: Rask Ingemann Lambertsen 
> ---
> This patch needs to be tested on the following boards which I don't have:
> Cubietech Cubieboard4
> Merrii A80 Optimus
> 

As ChenYu, This patch need to separate to some more patches.

Best Regards,
Jaehoon Chung

> 

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


Re: [U-Boot] [PATCH v3 2/2] mmc: tangier: Add Intel Tangier eMMC/SDHCI driver

2017-02-27 Thread Jaehoon Chung
Hi Andy,

On 02/20/2017 08:24 PM, Andy Shevchenko wrote:
> From: Felipe Balbi 
> 
> This patch adds Intel Tangier eMMC/SDHCI driver.
> 
> Intel Tangier SoC contains a hybrid of PCI and non-PCI devices. SDHCI
> controller is one of the devices which are *not* on a PCI and, hence,
> cannot be enumerated by standard PCI means. This driver, allows for
> SDHCI controller on Tangier SoC to work in U-Boot.
> 
> Signed-off-by: Vincent Tinelli 
> Signed-off-by: Felipe Balbi 
> Signed-off-by: Andy Shevchenko 

Applied on u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

> ---
>  drivers/mmc/Kconfig | 14 
>  drivers/mmc/Makefile|  1 +
>  drivers/mmc/tangier_sdhci.c | 81 
> +
>  3 files changed, 96 insertions(+)
>  create mode 100644 drivers/mmc/tangier_sdhci.c
> 
> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
> index af8436f337..7238aade42 100644
> --- a/drivers/mmc/Kconfig
> +++ b/drivers/mmc/Kconfig
> @@ -318,6 +318,20 @@ config MMC_SDHCI_XENON
>  
> If unsure, say N.
>  
> +config MMC_SDHCI_TANGIER
> + bool "Tangier SDHCI controller support"
> + depends on DM_MMC && BLK
> + depends on MMC_SDHCI
> + help
> +   This selects support for SDHCI controller on Tanginer
> +   SoC. Note that this controller does not sit on PCI bus and,
> +   hence, cannot be enumerated by standard PCI means.
> +
> +   If you're using an Intel Tangier SoC (available on Intel
> +   Edison board), say Y here.
> +
> +   If unsure, say N.
> +
>  config MMC_SDHCI_TEGRA
>   bool "SDHCI platform support for the Tegra SD/MMC Controller"
>   depends on TEGRA
> diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
> index 9fccac8ead..b210d2c3b3 100644
> --- a/drivers/mmc/Makefile
> +++ b/drivers/mmc/Makefile
> @@ -61,6 +61,7 @@ obj-$(CONFIG_MMC_SDHCI_PIC32)   += pic32_sdhci.o
>  obj-$(CONFIG_MMC_SDHCI_ROCKCHIP) += rockchip_sdhci.o
>  obj-$(CONFIG_MMC_SDHCI_S5P)  += s5p_sdhci.o
>  obj-$(CONFIG_MMC_SDHCI_SPEAR)+= spear_sdhci.o
> +obj-$(CONFIG_MMC_SDHCI_TANGIER)  += tangier_sdhci.o
>  obj-$(CONFIG_MMC_SDHCI_TEGRA)+= tegra_mmc.o
>  obj-$(CONFIG_MMC_SDHCI_XENON)+= xenon_sdhci.o
>  obj-$(CONFIG_MMC_SDHCI_ZYNQ) += zynq_sdhci.o
> diff --git a/drivers/mmc/tangier_sdhci.c b/drivers/mmc/tangier_sdhci.c
> new file mode 100644
> index 00..77b18e75f0
> --- /dev/null
> +++ b/drivers/mmc/tangier_sdhci.c
> @@ -0,0 +1,81 @@
> +/*
> + * Copyright (c) 2017 Intel Corporation
> + *
> + * SPDX-License-Identifier:  GPL-2.0+
> + */
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define SDHCI_TANGIER_FMAX   2
> +#define SDHCI_TANGIER_FMIN   40
> +
> +struct sdhci_tangier_plat {
> + struct mmc_config cfg;
> + struct mmc mmc;
> + void __iomem *ioaddr;
> +};
> +
> +static int sdhci_tangier_bind(struct udevice *dev)
> +{
> + struct sdhci_tangier_plat *plat = dev_get_platdata(dev);
> +
> + return sdhci_bind(dev, >mmc, >cfg);
> +}
> +
> +static int sdhci_tangier_probe(struct udevice *dev)
> +{
> + struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
> + struct sdhci_tangier_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->ioaddr = devm_ioremap(dev, base, SZ_1K);
> + if (!plat->ioaddr)
> + return -ENOMEM;
> +
> + host->name = dev->name;
> + host->ioaddr = plat->ioaddr;
> + host->quirks = SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_BROKEN_VOLTAGE |
> +SDHCI_QUIRK_32BIT_DMA_ADDR | SDHCI_QUIRK_WAIT_SEND_CMD;
> +
> + /* MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195 */
> + host->voltages = MMC_VDD_165_195;
> +
> + ret = sdhci_setup_cfg(>cfg, host, SDHCI_TANGIER_FMAX,
> + SDHCI_TANGIER_FMIN);
> + if (ret)
> + return ret;
> +
> + upriv->mmc = >mmc;
> + host->mmc = >mmc;
> + host->mmc->priv = host;
> +
> + return sdhci_probe(dev);
> +}
> +
> +static const struct udevice_id sdhci_tangier_match[] = {
> + { .compatible = "intel,sdhci-tangier" },
> + { /* sentinel */ }
> +};
> +
> +U_BOOT_DRIVER(sdhci_tangier) = {
> + .name   = "sdhci-tangier",
> + .id = UCLASS_MMC,
> + .of_match   = sdhci_tangier_match,
> + .bind   = sdhci_tangier_bind,
> + .probe  = sdhci_tangier_probe,
> + .ops= _ops,
> + .priv_auto_alloc_size = sizeof(struct sdhci_host),
> + .platdata_auto_alloc_size = sizeof(struct sdhci_tangier_plat),
> +};
> 


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

2017-02-27 Thread Jagan Teki
On Mon, Feb 27, 2017 at 2:42 PM, Stefano Babic  wrote:
> Hi Tom,
>
> please pull from u-boot-imx, thanks !
>
> The following changes since commit b24cf8540a85a9bf97975aadd6a7542f166c78a3:
>
>   video: mxsfb: Fix reset hang when videomode variable is not present
> (2017-02-22 21:47:59 +0100)
>
> are available in the git repository at:
>
>   git://www.denx.de/git/u-boot-imx.git master
>
> for you to fetch changes up to 60a38e423b21a897b8fa0d9376d9370ea915ddd8:
>
>   i.MX6Q: isiot: Switch the mmc env based on devno (2017-02-26 13:00:22
> +0100)
>
> 
> Andrey Yurovsky (1):
>   mtd: nand: build MXS driver for MX7 as well
>
> Jagan Teki (25):
>   configs: imx6: Don't define USDHC2_BASE_ADDR
>   arm: imx6ul: Add Engicam Is.IoT MX6UL Starter Kit initial support
>   arm: dts: imx6ul-isiot: Add I2C nodes
>   imx6: isiotmx6ul: Add I2C support
>   arm: dts: imx6ul-isiot: Add FEC node
>   imx6: isiotmx6ul: Add FEC support
>   imx6: isiotmx6ul: Add NAND support
>   imx6: isiotmx6ul: Add nandboot env support
>   imx6ul: isiotmx6ul: Enable I2C support
>   i.MX6: engicam: Include dts files under MAINTAINERS
>   imx6: Add imx6_src_get_boot_mode
>   imx: spl: Update NAND bootmode detection bit
>   imx: Use IMX6_BMODE_* macros instead of numericals
>   imx6: Add src_base structure define macro
>   imx6: isiotmx6ul: Update SPL board boot order for eMMC
>   i.MX6UL: isiot: Add eMMC boot support
>   i.MX6UL: isiot: Add modeboot env via board_late_init
>   i.MX6UL: isiot: Add mmc_late_init
>   i.MX6UL: isiot: Switch the mmc env based on devno
>   arm: dts: imx6qdl-icore-rqs: Add eMMC node
>   imx6: icorem6_rqs: Update SPL board boot order for eMMC
>   imx6: icorem6_rqs: Add eMMC boot support
>   i.MX6Q: icorem6_rqs: Add modeboot env via board_late_init
>   i.MX6Q: icorem6_rqs: Add mmc_late_init
>   i.MX6Q: isiot: Switch the mmc env based on devno

These patches were initiated during early on MW, any possibility to
merge these as well?

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


Re: [U-Boot] [PATCH] ls1046ardb: SPL size reduction in case of non-xip boot

2017-02-27 Thread Sumit Garg
> -Original Message-
> From: york sun
> Sent: Monday, February 27, 2017 10:34 PM
> To: Sumit Garg ; u-boot@lists.denx.de
> Cc: Ruchika Gupta ; Prabhakar Kushwaha
> ; Mingkai Hu ; Vini
> Pillai 
> Subject: Re: [PATCH] ls1046ardb: SPL size reduction in case of non-xip boot
> 
> On 02/20/2017 04:30 AM, Sumit Garg wrote:
> > Using changes in this patch we were able to reduce approx 4k size of
> > u-boot-spl.bin image. Following is breif description of changes to
> > reduce SPL size:
> > 1. Changes in board/freescale/ls1046ardb/Makefile to remove
> >compilation of eth.c and cpld.c in case of SPL build.
> > 2. Changes in board/freescale/ls1046ardb/ls1046ardb.c to keep
> >only ddr_init and board_early_init_f funcations in case of SPL
> >build.
> > 3. Changes in ls1046a_common.h & ls1046ardb.h to remove driver
> >specific macros due to which static data was being compiled in
> >case of SPL build.
> > 4. Disable MMC driver from bieng compiled in case of SPL NAND
> >build and NAND driver from bieng compiled in case of SPL MMC build.
> >
> > Signed-off-by: Vinitha Pillai-B57223 
> 
> Remove B57223 from the name.
> 

Sure, will remove it. 

> > Signed-off-by: Sumit Garg 
> > ---
> >  board/freescale/ls1046ardb/Makefile |  4 +++-
> >  board/freescale/ls1046ardb/ls1046ardb.c | 30 
> --
> >  include/configs/ls1046a_common.h| 12 ++--
> >  include/configs/ls1046ardb.h|  7 ++-
> >  4 files changed, 35 insertions(+), 18 deletions(-)
> >
> 
> This patch causes compiling warning for board/freescale/ls1046aqds/eth.c.
> Please fix.
> 
> York

Will fix compilation warning.

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


Re: [U-Boot] [PATCH] ls1043ardb: SPL size reduction in case of non-xip boot

2017-02-27 Thread Sumit Garg
> -Original Message-
> From: york sun
> Sent: Monday, February 27, 2017 10:33 PM
> To: Sumit Garg ; u-boot@lists.denx.de
> Cc: Ruchika Gupta ; Prabhakar Kushwaha
> ; Mingkai Hu ; Vini
> Pillai 
> Subject: Re: [PATCH] ls1043ardb: SPL size reduction in case of non-xip boot
> 
> On 02/20/2017 03:18 AM, Sumit Garg wrote:
> > Using changes in this patch we were able to reduce approx 10k size of
> > u-boot-spl.bin image. Following is breif description of changes to
> > reduce SPL size:
> > 1. Changes in board/freescale/ls1043ardb/Makefile to remove
> >compilation of eth.c and cpld.c in case of SPL build.
> > 2. Changes in board/freescale/ls1043ardb/ls1043ardb.c to keep
> >only ddr_init and board_early_init_f funcations in case of SPL
> >build.
> > 3. Changes in ls1043a_common.h & ls1043ardb.h to remove driver
> >specific macros due to which static data was being compiled in
> >case of SPL build.
> > 4. Disable MMC driver from bieng compiled in case of SPL NAND
> >build and NAND driver from bieng compiled in case of SPL MMC build.
> > 5. Remove I2C driver support from SPL in case of LS1043ARDB.
> >
> > Signed-off-by: Vinitha Pillai-B57223 
> 
> Remove the B57223 from the name, unless you really want it.
>

Sure will remove it.
 
> > Signed-off-by: Sumit Garg 
> > ---
> >  board/freescale/ls1043ardb/Makefile |  4 +++-
> >  board/freescale/ls1043ardb/ls1043ardb.c | 32 ++-
> -
> >  configs/ls1043ardb_sdcard_defconfig |  1 -
> >  include/configs/ls1043a_common.h| 14 --
> >  include/configs/ls1043ardb.h|  6 ++
> >  5 files changed, 39 insertions(+), 18 deletions(-)
> 
> This patch cause compiling warning for board/freescale/ls1043aqds/eth.c.
> Please fix.
> 
> York
 
Will fix compilation warning.

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


Re: [U-Boot] [PATCH 06/20] arm: socfpga: add reset driver support for Arria 10

2017-02-27 Thread Ley Foon Tan
On Isn, 2017-02-27 at 11:19 +0100, Marek Vasut wrote:
> On 02/27/2017 11:14 AM, Ley Foon Tan wrote:
> > 
> > On Sab, 2017-02-25 at 22:28 +0100, Marek Vasut wrote:
> > > 
> > > On 02/22/2017 10:47 AM, Ley Foon Tan wrote:
> > > > 
> > > > 
> > > > Add reset driver support for Arria 10.
> > > > 
> > > > Signed-off-by: Tien Fong Chee 
> > > > Signed-off-by: Ley Foon Tan 
> > > > ---
> > > >  arch/arm/mach-socfpga/Makefile |   2 +
> > > >  arch/arm/mach-socfpga/include/mach/reset_manager.h |   4 +-
> > > >  .../include/mach/reset_manager_arria10.h   | 144
> > > > 
> > > >  arch/arm/mach-socfpga/reset_manager_arria10.c  | 406
> > > > +
> > > >  include/dt-bindings/reset/altr,rst-mgr-a10.h   | 103
> > > > ++
> > > >  5 files changed, 658 insertions(+), 1 deletion(-)
> > > >  create mode 100755 arch/arm/mach-
> > > > socfpga/include/mach/reset_manager_arria10.h
> > > >  create mode 100644 arch/arm/mach-
> > > > socfpga/reset_manager_arria10.c
> > > >  create mode 100644 include/dt-bindings/reset/altr,rst-mgr-
> > > > a10.h
> > > > 
> > > > diff --git a/arch/arm/mach-socfpga/Makefile b/arch/arm/mach-
> > > > socfpga/Makefile
> > > > index e83da2e..d81f003 100644
> > > > --- a/arch/arm/mach-socfpga/Makefile
> > > > +++ b/arch/arm/mach-socfpga/Makefile
> > > > @@ -10,6 +10,8 @@
> > > >  obj-y  += misc.o timer.o reset_manager.o clock_manager.o
> > > > \
> > > >        fpga_manager.o board.o
> > > >  
> > > > +obj-$(CONFIG_TARGET_SOCFPGA_ARRIA10) +=
> > > > reset_manager_arria10.o
> > > > +
> > > >  obj-$(CONFIG_SPL_BUILD) += spl.o freeze_controller.o
> > > >  
> > > >  # QTS-generated config file wrappers
> > > > diff --git a/arch/arm/mach-socfpga/include/mach/reset_manager.h
> > > > b/arch/arm/mach-socfpga/include/mach/reset_manager.h
> > > > index 9e253bf..64526b6 100644
> > > > --- a/arch/arm/mach-socfpga/include/mach/reset_manager.h
> > > > +++ b/arch/arm/mach-socfpga/include/mach/reset_manager.h
> > > > @@ -43,7 +43,9 @@ void socfpga_per_reset_all(void);
> > > >  /* Create a human-readable reference to SoCFPGA reset. */
> > > >  #define SOCFPGA_RESET(_name)   RSTMGR_##_name
> > > >  
> > > > -#if defined(CONFIG_TARGET_SOCFPGA_GEN5)
> > > > +#if defined(CONFIG_TARGET_SOCFPGA_ARRIA10)
> > > > +#include 
> > > > +#elif defined(CONFIG_TARGET_SOCFPGA_GEN5)
> > > You can use #elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10) instead
> > > to
> > > keep
> > > this list sorted.
> > You want sort with GEN5, ARRIA10 or sorted alphanumerically ARRIA10
> > then GEN5?
> I'd opt for sorting this in the order in which those parts came out,
> but
> that might be just my personal preference ...

Okay, will sorting it with GEN5, ARRIA10.

Thanks.

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


Re: [U-Boot] [PATCH v3] armv8: spl: Call spl_relocate_stack_gd for ARMv8

2017-02-27 Thread Tom Rini
On Tue, Feb 28, 2017 at 02:13:21AM +, André Przywara wrote:
> Hi Tom, Simon,
> 
> can we merge this patch for 2017.03 still?
> This fixes an SD card boot regression for arm64 SPLs for me, introduced
> shortly before -rc1.

This seems like a reasonable thing to bring in, yes.  Thanks for the
reminder.

> 
> Commit b3d2861eb20a ("spl: Remove overwrite of relocated malloc limit"),
> introduced just a few commits before -rc1, broke MMC boot for arm64
> (because malloc fails): The patch moves the simple_malloc setup into
> spl_relocate_stack_gd(), which so far wasn't actually called on arm64
> (see the patch below). So the malloc buffer was 0 bytes, malloc failed,
> the MMC driver couldn't find a boot device and gave up:
> U-Boot SPL 2017.03-rc2-00040-gb7b8021 (Feb 28 2017 - 00:41:35)
> DRAM: 1024 MiB
> Trying to boot from MMC1
> MMC Device 0 not found
> spl: could not find mmc device. error: -19
> SPL: failed to boot from all boot devices
> ### ERROR ### Please RESET the board ###
> This is the current situation since -rc1 for the Pine64, for instance.
> 
> Now one solution to fix this is to actually revert b3d2861eb20a, which
> would move back to the old behaviour of using the SRAM malloc buffer for
> the whole of the SPL, which is fine for the MMC driver.
> 
> But since Andrew's patch is correct, I'd rather merge Philipp's patch
> now, which solves a TODO and just calls spl_relocate_stack_gd(), so that
> we now get access to the proper (and much bigger) DRAM malloc buffer.
> 
> Does that make sense?
> Can we merge Philipp's patch here (fixing the commenting style issue on
> the fly) to fix the regression?
> 
> Cheers,
> Andre.
> 
> > As part of the startup process for boards using the SPL, we need to
> > call spl_relocate_stack_gd. This is needed to set up malloc with its
> > DRAM buffer.
> > 
> > Signed-off-by: Philipp Tomsich 
> > Reviewed-by: Andre Przywara 
> > Reviewed-by: Simon Glass 
> > ---
> >  arch/arm/lib/crt0_64.S | 13 +++--
> >  1 file changed, 11 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S
> > index 19c6a98..a7cead5 100644
> > --- a/arch/arm/lib/crt0_64.S
> > +++ b/arch/arm/lib/crt0_64.S
> > @@ -109,8 +109,17 @@ relocation_return:
> >   */
> > bl  c_runtime_cpu_setup /* still call old routine */
> >  #endif /* !CONFIG_SPL_BUILD */
> > -
> > -/* TODO: For SPL, call spl_relocate_stack_gd() to alloc stack relocation */
> > +#if defined(CONFIG_SPL_BUILD)
> > +   bl  spl_relocate_stack_gd   /* may return NULL */
> > +   /* Perform 'sp = (x0 != NULL) ? x0 : sp' while working
> > +* around the constraint that conditional moves can not
> > +* have 'sp' as an operand
> > +*/
> > +   mov x1, sp
> > +   cmp x0, #0
> > +   cselx0, x0, x1, ne
> > +   mov sp, x0
> > +#endif
> >  
> >  /*
> >   * Clear BSS section
> > 
> 

-- 
Tom


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


Re: [U-Boot] [PATCH v2] serial: Add serial driver for Intel MID

2017-02-27 Thread Kever Yang

Hi Andy,

On 02/28/2017 12:22 AM, Andy Shevchenko wrote:

Add a specific serial driver for Intel MID platforms.

It has special fractional divider which can be programmed via UART_PS,
UART_MUL, and UART_DIV registers.

The UART clock is calculated as

UART clock = XTAL * UART_MUL / UART_DIV

The baudrate is calculated as

baud rate = UART clock / UART_PS / DLAB

Initialize fractional divider correctly for Intel Edison platform.

For backward compatibility we have to set initial DLAB value to 16
and speed to 115200 baud, where initial frequency is 29491200Hz, and
XTAL frequency is 38.4MHz.

Signed-off-by: Andy Shevchenko 
---
  drivers/serial/Kconfig  |  9 ++
  drivers/serial/Makefile |  1 +
  drivers/serial/serial_mid.c | 71 +
  3 files changed, 81 insertions(+)
  create mode 100644 drivers/serial/serial_mid.c

diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index b11f3ff89e..1fb5a7b17d 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -398,6 +398,15 @@ config MESON_SERIAL
  If you have an Amlogic Meson based board and want to use the on-chip
  serial ports, say Y to this option. If unsure, say N.
  
+config MID_SERIAL

+   bool "Intel MID platform UART support"


MID is not a Intel Chip series, right?
So I think if you named MID_SERIAL or serial_mid.c would make people 
confused,
could you add a INTEL- prefix for it or something relate to the SoC chip 
itself?


Thanks,
- Kever

+   depends on DM_SERIAL && OF_CONTROL
+   select SYS_NS16550
+   help
+ Select this to enable a UART for Intel MID platforms.
+ This uses the ns16550 driver as a library which is selected by
+ default.
+
  config MSM_SERIAL
bool "Qualcomm on-chip UART"
depends on DM_SERIAL
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index 8430668bf9..61535212aa 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -28,6 +28,7 @@ obj-$(CONFIG_S5P) += serial_s5p.o
  obj-$(CONFIG_MXC_UART) += serial_mxc.o
  obj-$(CONFIG_PXA_SERIAL) += serial_pxa.o
  obj-$(CONFIG_MESON_SERIAL) += serial_meson.o
+obj-$(CONFIG_MID_SERIAL) += serial_mid.o
  ifdef CONFIG_SPL_BUILD
  obj-$(CONFIG_ROCKCHIP_SERIAL) += serial_rockchip.o
  endif
diff --git a/drivers/serial/serial_mid.c b/drivers/serial/serial_mid.c
new file mode 100644
index 00..eb91ffc7d4
--- /dev/null
+++ b/drivers/serial/serial_mid.c
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/*
+ * The UART clock is calculated as
+ *
+ * UART clock = XTAL * UART_MUL / UART_DIV
+ *
+ * The baudrate is calculated as
+ *
+ * baud rate = UART clock / UART_PS / DLAB
+ */
+#define UART_PS0x30
+#define UART_MUL   0x34
+#define UART_DIV   0x38
+
+static void mid_writel(struct ns16550_platdata *plat, int offset, int value)
+{
+   unsigned char *addr;
+
+   offset *= 1 << plat->reg_shift;
+   addr = (unsigned char *)plat->base + offset;
+
+   writel(value, addr + plat->reg_offset);
+}
+
+static int mid_serial_probe(struct udevice *dev)
+{
+   struct ns16550_platdata *plat = dev_get_platdata(dev);
+
+   /*
+* Initialize fractional divider correctly for Intel Edison
+* platform.
+*
+* For backward compatibility we have to set initial DLAB value
+* to 16 and speed to 115200 baud, where initial frequency is
+* 29491200Hz, and XTAL frequency is 38.4MHz.
+*/
+   mid_writel(plat, UART_MUL, 96);
+   mid_writel(plat, UART_DIV, 125);
+   mid_writel(plat, UART_PS, 16);
+
+   return ns16550_serial_probe(dev);
+}
+
+static const struct udevice_id mid_serial_ids[] = {
+   { .compatible = "intel,mid-uart" },
+   {}
+};
+
+U_BOOT_DRIVER(mid_uart) = {
+   .name   = "mid_uart",
+   .id = UCLASS_SERIAL,
+   .of_match = mid_serial_ids,
+   .ofdata_to_platdata = ns16550_serial_ofdata_to_platdata,
+   .platdata_auto_alloc_size = sizeof(struct ns16550_platdata),
+   .priv_auto_alloc_size = sizeof(struct NS16550),
+   .probe  = mid_serial_probe,
+   .ops= _serial_ops,
+   .flags  = DM_FLAG_PRE_RELOC,
+};



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


Re: [U-Boot] [PATCH v3] armv8: spl: Call spl_relocate_stack_gd for ARMv8

2017-02-27 Thread André Przywara
Hi Tom, Simon,

can we merge this patch for 2017.03 still?
This fixes an SD card boot regression for arm64 SPLs for me, introduced
shortly before -rc1.

Commit b3d2861eb20a ("spl: Remove overwrite of relocated malloc limit"),
introduced just a few commits before -rc1, broke MMC boot for arm64
(because malloc fails): The patch moves the simple_malloc setup into
spl_relocate_stack_gd(), which so far wasn't actually called on arm64
(see the patch below). So the malloc buffer was 0 bytes, malloc failed,
the MMC driver couldn't find a boot device and gave up:
U-Boot SPL 2017.03-rc2-00040-gb7b8021 (Feb 28 2017 - 00:41:35)
DRAM: 1024 MiB
Trying to boot from MMC1
MMC Device 0 not found
spl: could not find mmc device. error: -19
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
This is the current situation since -rc1 for the Pine64, for instance.

Now one solution to fix this is to actually revert b3d2861eb20a, which
would move back to the old behaviour of using the SRAM malloc buffer for
the whole of the SPL, which is fine for the MMC driver.

But since Andrew's patch is correct, I'd rather merge Philipp's patch
now, which solves a TODO and just calls spl_relocate_stack_gd(), so that
we now get access to the proper (and much bigger) DRAM malloc buffer.

Does that make sense?
Can we merge Philipp's patch here (fixing the commenting style issue on
the fly) to fix the regression?

Cheers,
Andre.

> As part of the startup process for boards using the SPL, we need to
> call spl_relocate_stack_gd. This is needed to set up malloc with its
> DRAM buffer.
> 
> Signed-off-by: Philipp Tomsich 
> Reviewed-by: Andre Przywara 
> Reviewed-by: Simon Glass 
> ---
>  arch/arm/lib/crt0_64.S | 13 +++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S
> index 19c6a98..a7cead5 100644
> --- a/arch/arm/lib/crt0_64.S
> +++ b/arch/arm/lib/crt0_64.S
> @@ -109,8 +109,17 @@ relocation_return:
>   */
>   bl  c_runtime_cpu_setup /* still call old routine */
>  #endif /* !CONFIG_SPL_BUILD */
> -
> -/* TODO: For SPL, call spl_relocate_stack_gd() to alloc stack relocation */
> +#if defined(CONFIG_SPL_BUILD)
> + bl  spl_relocate_stack_gd   /* may return NULL */
> + /* Perform 'sp = (x0 != NULL) ? x0 : sp' while working
> +  * around the constraint that conditional moves can not
> +  * have 'sp' as an operand
> +  */
> + mov x1, sp
> + cmp x0, #0
> + cselx0, x0, x1, ne
> + mov sp, x0
> +#endif
>  
>  /*
>   * Clear BSS section
> 

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


[U-Boot] [PATCH 3/4] board: at91sam9n12ek: clean up code

2017-02-27 Thread Wenyou Yang
Since the introduction of the pinctrl and clk driver and
the dts file, remove unneeded hard coded related code from
the board file.

Signed-off-by: Wenyou Yang 
---

 board/atmel/at91sam9n12ek/at91sam9n12ek.c | 53 ---
 1 file changed, 53 deletions(-)

diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c 
b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
index e3f9cbbe50..8a17bb3bbe 100644
--- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c
+++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
@@ -15,8 +15,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 
 #ifdef CONFIG_LCD_INFO
 #include 
@@ -132,50 +130,6 @@ void lcd_show_board_info(void)
 #endif /* CONFIG_LCD_INFO */
 #endif /* CONFIG_LCD */
 
-/* SPI chip select control */
-#ifndef CONFIG_DM_SPI
-#ifdef CONFIG_ATMEL_SPI
-#include 
-int spi_cs_is_valid(unsigned int bus, unsigned int cs)
-{
-   return bus == 0 && cs < 2;
-}
-
-void spi_cs_activate(struct spi_slave *slave)
-{
-   switch (slave->cs) {
-   case 0:
-   at91_set_pio_output(AT91_PIO_PORTA, 14, 0);
-   break;
-   case 1:
-   at91_set_pio_output(AT91_PIO_PORTA, 7, 0);
-   break;
-   }
-}
-
-void spi_cs_deactivate(struct spi_slave *slave)
-{
-   switch (slave->cs) {
-   case 0:
-   at91_set_pio_output(AT91_PIO_PORTA, 14, 1);
-   break;
-   case 1:
-   at91_set_pio_output(AT91_PIO_PORTA, 7, 1);
-   break;
-   }
-}
-#endif /* CONFIG_ATMEL_SPI */
-#endif
-
-#ifdef CONFIG_GENERIC_ATMEL_MCI
-int board_mmc_init(bd_t *bd)
-{
-   at91_mci_hw_init();
-
-   return atmel_mci_init((void *)ATMEL_BASE_HSMCI0);
-}
-#endif
-
 #ifdef CONFIG_KS8851_MLL
 void at91sam9n12ek_ks8851_hw_init(void)
 {
@@ -209,9 +163,6 @@ void at91sam9n12ek_usb_hw_init(void)
 
 int board_early_init_f(void)
 {
-   at91_periph_clk_enable(ATMEL_ID_PIOAB);
-   at91_periph_clk_enable(ATMEL_ID_PIOCD);
-
at91_seriald_hw_init();
return 0;
 }
@@ -225,10 +176,6 @@ int board_init(void)
at91sam9n12ek_nand_hw_init();
 #endif
 
-#ifdef CONFIG_ATMEL_SPI
-   at91_spi0_hw_init(1 << 0);
-#endif
-
 #ifdef CONFIG_LCD
at91_lcd_hw_init();
 #endif
-- 
2.11.0

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


[U-Boot] [PATCH 4/4] board: at91sam9n12ek: enable early debug UART

2017-02-27 Thread Wenyou Yang
Enable early debug UART to debug problems when an ICE or other
debug mechanism is not available.

Signed-off-by: Wenyou Yang 
---

 board/atmel/at91sam9n12ek/at91sam9n12ek.c | 14 ++
 configs/at91sam9n12ek_mmc_defconfig   |  6 ++
 configs/at91sam9n12ek_nandflash_defconfig |  6 ++
 configs/at91sam9n12ek_spiflash_defconfig  |  6 ++
 4 files changed, 32 insertions(+)

diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c 
b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
index 8a17bb3bbe..bd483c1836 100644
--- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c
+++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -161,11 +162,24 @@ void at91sam9n12ek_usb_hw_init(void)
 }
 #endif
 
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
+void board_debug_uart_init(void)
+{
+   at91_seriald_hw_init();
+}
+#endif
+
+#ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
+#ifdef CONFIG_DEBUG_UART
+   debug_uart_init();
+#else
at91_seriald_hw_init();
+#endif
return 0;
 }
+#endif
 
 int board_init(void)
 {
diff --git a/configs/at91sam9n12ek_mmc_defconfig 
b/configs/at91sam9n12ek_mmc_defconfig
index 8fe19c0c55..89232987cd 100644
--- a/configs/at91sam9n12ek_mmc_defconfig
+++ b/configs/at91sam9n12ek_mmc_defconfig
@@ -34,6 +34,12 @@ CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xf200
+CONFIG_DEBUG_UART_CLOCK=0
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
diff --git a/configs/at91sam9n12ek_nandflash_defconfig 
b/configs/at91sam9n12ek_nandflash_defconfig
index 1acacbddc2..5a6eff409e 100644
--- a/configs/at91sam9n12ek_nandflash_defconfig
+++ b/configs/at91sam9n12ek_nandflash_defconfig
@@ -40,6 +40,12 @@ CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xf200
+CONFIG_DEBUG_UART_CLOCK=0
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
diff --git a/configs/at91sam9n12ek_spiflash_defconfig 
b/configs/at91sam9n12ek_spiflash_defconfig
index 74457861b6..10650a3ae2 100644
--- a/configs/at91sam9n12ek_spiflash_defconfig
+++ b/configs/at91sam9n12ek_spiflash_defconfig
@@ -34,6 +34,12 @@ CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xf200
+CONFIG_DEBUG_UART_CLOCK=0
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
-- 
2.11.0

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


[U-Boot] [PATCH 2/4] configs: at91sam9n12ek: update for DT and DM support

2017-02-27 Thread Wenyou Yang
Support the device tree and enable CONFIG_CLK and CONFIG_PINCTRL
options to support at91 clock driver and at91 pinctrl driver.

Enable DM_GPIO, DM_MMC and DM_SPI support, move CONFIG_AT91_GPIO,
CONFIG_GENERIC_ATMEL_MCI and CONFIG_ATMEL_SPI config option to
the default config files.

Due to the limitation of internal SRAM size, disable the CONFIG_SPL
config option for the spi flash configuration.

Signed-off-by: Wenyou Yang 
---

 board/atmel/at91sam9n12ek/at91sam9n12ek.c |  2 ++
 configs/at91sam9n12ek_mmc_defconfig   | 18 +-
 configs/at91sam9n12ek_nandflash_defconfig | 18 +-
 configs/at91sam9n12ek_spiflash_defconfig  | 25 +
 include/configs/at91sam9n12ek.h   | 17 -
 5 files changed, 53 insertions(+), 27 deletions(-)

diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c 
b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
index 58da2d27f8..e3f9cbbe50 100644
--- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c
+++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
@@ -133,6 +133,7 @@ void lcd_show_board_info(void)
 #endif /* CONFIG_LCD */
 
 /* SPI chip select control */
+#ifndef CONFIG_DM_SPI
 #ifdef CONFIG_ATMEL_SPI
 #include 
 int spi_cs_is_valid(unsigned int bus, unsigned int cs)
@@ -164,6 +165,7 @@ void spi_cs_deactivate(struct spi_slave *slave)
}
 }
 #endif /* CONFIG_ATMEL_SPI */
+#endif
 
 #ifdef CONFIG_GENERIC_ATMEL_MCI
 int board_mmc_init(bd_t *bd)
diff --git a/configs/at91sam9n12ek_mmc_defconfig 
b/configs/at91sam9n12ek_mmc_defconfig
index ef9250bce9..8fe19c0c55 100644
--- a/configs/at91sam9n12ek_mmc_defconfig
+++ b/configs/at91sam9n12ek_mmc_defconfig
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9N12EK=y
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9n12ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9N12,SYS_USE_MMC"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -19,9 +20,24 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
diff --git a/configs/at91sam9n12ek_nandflash_defconfig 
b/configs/at91sam9n12ek_nandflash_defconfig
index da0ea60e8b..1acacbddc2 100644
--- a/configs/at91sam9n12ek_nandflash_defconfig
+++ b/configs/at91sam9n12ek_nandflash_defconfig
@@ -6,6 +6,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9n12ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9N12,SYS_USE_NANDFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -25,9 +26,24 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
diff --git a/configs/at91sam9n12ek_spiflash_defconfig 
b/configs/at91sam9n12ek_spiflash_defconfig
index 4e5d10226e..74457861b6 100644
--- a/configs/at91sam9n12ek_spiflash_defconfig
+++ b/configs/at91sam9n12ek_spiflash_defconfig
@@ -1,18 +1,12 @@
 CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_TARGET_AT91SAM9N12EK=y
-CONFIG_SPL_GPIO_SUPPORT=y
-CONFIG_SPL_LIBCOMMON_SUPPORT=y
-CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SPL_SERIAL_SUPPORT=y
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_DEFAULT_DEVICE_TREE="at91sam9n12ek"
 CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9N12,SYS_USE_SPIFLASH"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_SPL=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_CMD_BOOTZ=y
@@ -26,9 +20,24 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
+CONFIG_DM_GPIO=y
+CONFIG_AT91_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_DM_SERIAL=y
+CONFIG_ATMEL_USART=y
+CONFIG_DM_SPI=y
+CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
-CONFIG_OF_LIBFDT=y
diff --git a/include/configs/at91sam9n12ek.h b/include/configs/at91sam9n12ek.h
index c4ac21d351..f1a4e35e17 100644
--- a/include/configs/at91sam9n12ek.h
+++ b/include/configs/at91sam9n12ek.h
@@ -28,11 +28,7 

[U-Boot] [PATCH 1/4] ARM: dts: at91: add dts files for at91sam9n12ek

2017-02-27 Thread Wenyou Yang
The device tree source files of at91sam9n12ek boards are copied
from the Linux v4.10, do the changes as below.
 - Add the reg property for the pinctrl node.
 - Move the gpio (pioA, pioB, pioC, pioD) nodes as the pinctrl's
   slibling nodes, instead of the child nodes.
 - Add spi0 aliases.
 - Change the compatible of the spi flash to "spi-flash".
 - Fix the pinctrl-names of mmc0 node.
 - Fix the compilation warnings.

Signed-off-by: Wenyou Yang 
---

 arch/arm/dts/Makefile  |2 +
 arch/arm/dts/at91sam9n12.dtsi  | 1051 
 arch/arm/dts/at91sam9n12ek.dts |  263 ++
 3 files changed, 1316 insertions(+)
 create mode 100644 arch/arm/dts/at91sam9n12.dtsi
 create mode 100644 arch/arm/dts/at91sam9n12ek.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 76dc6562ed..b77948078a 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -337,6 +337,8 @@ dtb-$(CONFIG_TARGET_AT91SAM9X5EK) += \
at91sam9x25ek.dtb   \
at91sam9x35ek.dtb
 
+dtb-$(CONFIG_TARGET_AT91SAM9N12EK) += at91sam9n12ek.dtb
+
 dtb-$(CONFIG_TARGET_SAMA5D2_XPLAINED) += \
at91-sama5d2_xplained.dtb
 
diff --git a/arch/arm/dts/at91sam9n12.dtsi b/arch/arm/dts/at91sam9n12.dtsi
new file mode 100644
index 00..3def09be48
--- /dev/null
+++ b/arch/arm/dts/at91sam9n12.dtsi
@@ -0,0 +1,1051 @@
+/*
+ * at91sam9n12.dtsi - Device Tree include file for AT91SAM9N12 SoC
+ *
+ *  Copyright (C) 2012 Atmel,
+ *2012 Hong Xu 
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+#include "skeleton.dtsi"
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/ {
+   model = "Atmel AT91SAM9N12 SoC";
+   compatible = "atmel,at91sam9n12";
+   interrupt-parent = <>;
+
+   aliases {
+   serial0 = 
+   serial1 = 
+   serial2 = 
+   serial3 = 
+   serial4 = 
+   gpio0 = 
+   gpio1 = 
+   gpio2 = 
+   gpio3 = 
+   tcb0 = 
+   tcb1 = 
+   i2c0 = 
+   i2c1 = 
+   ssc0 = 
+   pwm0 = 
+   spi0 = 
+   };
+   cpus {
+   #address-cells = <0>;
+   #size-cells = <0>;
+
+   cpu {
+   compatible = "arm,arm926ej-s";
+   device_type = "cpu";
+   };
+   };
+
+   memory {
+   reg = <0x2000 0x1000>;
+   };
+
+   clocks {
+   slow_xtal: slow_xtal {
+   compatible = "fixed-clock";
+   #clock-cells = <0>;
+   clock-frequency = <0>;
+   };
+
+   main_xtal: main_xtal {
+   compatible = "fixed-clock";
+   #clock-cells = <0>;
+   clock-frequency = <0>;
+   };
+   };
+
+   sram: sram@0030 {
+   compatible = "mmio-sram";
+   reg = <0x0030 0x8000>;
+   };
+
+   ahb {
+   compatible = "simple-bus";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges;
+
+   apb {
+   compatible = "simple-bus";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges;
+
+   aic: interrupt-controller@f000 {
+   #interrupt-cells = <3>;
+   compatible = "atmel,at91rm9200-aic";
+   interrupt-controller;
+   reg = <0xf000 0x200>;
+   atmel,external-irqs = <31>;
+   };
+
+   ramc0: ramc@e800 {
+   compatible = "atmel,at91sam9g45-ddramc";
+   reg = <0xe800 0x200>;
+   clocks = <>;
+   clock-names = "ddrck";
+   };
+
+   pmc: pmc@fc00 {
+   compatible = "atmel,at91sam9n12-pmc", "syscon";
+   reg = <0xfc00 0x200>;
+   interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+   interrupt-controller;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   #interrupt-cells = <1>;
+
+   main_rc_osc: main_rc_osc {
+   compatible = 
"atmel,at91sam9x5-clk-main-rc-osc";
+   #clock-cells = <0>;
+   interrupts-extended = < 
AT91_PMC_MOSCRCS>;
+   clock-frequency = <1200>;
+  

[U-Boot] [PATCH 0/4] board: at91sam9n12ek: convert the board to support DM and DT

2017-02-27 Thread Wenyou Yang
The purpose of the patch set is to convert the board to support
the Driver Model and the Device Tree.


Wenyou Yang (4):
  ARM: dts: at91: add dts files for at91sam9n12ek
  configs: at91sam9n12ek: update for DT and DM support
  board: at91sam9n12ek: clean up code
  board: at91sam9n12ek: enable early debug UART

 arch/arm/dts/Makefile |2 +
 arch/arm/dts/at91sam9n12.dtsi | 1051 +
 arch/arm/dts/at91sam9n12ek.dts|  263 
 board/atmel/at91sam9n12ek/at91sam9n12ek.c |   65 +-
 configs/at91sam9n12ek_mmc_defconfig   |   24 +-
 configs/at91sam9n12ek_nandflash_defconfig |   24 +-
 configs/at91sam9n12ek_spiflash_defconfig  |   31 +-
 include/configs/at91sam9n12ek.h   |   17 -
 8 files changed, 1399 insertions(+), 78 deletions(-)
 create mode 100644 arch/arm/dts/at91sam9n12.dtsi
 create mode 100644 arch/arm/dts/at91sam9n12ek.dts

-- 
2.11.0

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


[U-Boot] [ANN] U-Boot v2017.03-rc3 released

2017-02-27 Thread Tom Rini
Hey all,

It's release day and v2017.03-rc3 is out.  All in all, I'm OK with the
contents here.  It's the week after ELC, and you might have noticed I've
been more picky today about PRs than I have in the past.  During the
"Linus and Dirk show" keynote, Linus brought up, as they'd just gone
past some milestone year in the "new" release cycle model, it took them
maybe 5 years to get to the point where everyone knows what is and isn't
allowed at various points in the release cycle.  So I'm going to try and
be better, quicker.  Once -rc2 is out, the window really has closed for
"been around for a bit, stable now, missed the -rc1 cut off tho".  There
will always be another merge window, and on a rather predictable
schedule too.

Something else I want to point out now is that we have a few
architectures that have not seen a lot of activity in the last few
years, aren't functional to varying degrees and don't have a
non-bouncing maintainer address.  Between then and now, I'm going to try
one last time to contact people associated with a few architectures and
then I'm going to remove them after v2017.03 is out.

As a final note, I expect us to release v2017.03 on schedule on the 13th
of March.

Thanks all!

-- 
Tom


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


Re: [U-Boot] Complete verified uboot example

2017-02-27 Thread Rick Altherr
You set the load address for the linux image to the same location as the
FIT.  U-Boot verified the hashes on the FIT and then tried to copy the
kernel over top the FIT.  I assume you put the FIT in flash.  Pick a
location in RAM for the kernel's load address.

On Mon, Feb 27, 2017 at 1:49 PM, Ron Brash  wrote:

> Looks like far more progress:
>
> #> setenv my_bootcount 0; bootm 0xD0084000
> Initial value for argc=3
> Final value for argc=3
> ## Current stack ends at 0x23f11db8 *  kernel: cmdline image address =
> 0xd0084000
>Reading image header from dataflash address d0084000 to RAM address
> 2200
>FIT/FDT format image found at 0x2200, size 0x0016c0b1
>Reading image remaining data from dataflash address d0084040 to RAM
> address 2240
> ## Loading kernel from FIT Image at 2200 ...
> No configuration specified, trying default...
> Found default configuration: 'config@1'
>Using 'config@1' configuration
>Trying 'linux_kernel@1' kernel subimage
>  Description:  Linux zImage
>  Type: Kernel Image
>  Compression:  uncompressed
>  Data Start:   0x22dc
>  Data Size:1465544 Bytes = 1.4 MiB
>  Architecture: ARM
>  OS:   Linux
>  Load Address: 0x2200
>  Entry Point:  0x22008000
>  Hash node:'hash@1'
>  Hash algo:sha256
>  Hash value:   5dcf9a4328bca6fe5c3405e03b9a58
> 402dce36f3a4f0c757e52091b050d2bcb2
>  Hash len: 32
>Verifying Hash Integrity ... sha256+ OK
>kernel data at 0x22dc, len = 0x00165cc8 (1465544)
> *  ramdisk: using config 'config@1' from image at 0x2200
> *  ramdisk: no 'ramdisk' in config
> *  fdt: using config 'config@1' from image at 0x2200
> ## Checking for 'FDT'/'FDT Image' at 2200
> ## Loading fdt from FIT Image at 2200 ...
>Using 'config@1' configuration
>Trying 'fdt@1' fdt subimage
>  Description:  FDT blob
>  Type: Flat Device Tree
>  Compression:  uncompressed
>  Data Start:   0x22165ea4
>  Data Size:21681 Bytes = 21.2 KiB
>  Architecture: ARM
>  Hash node:'hash@1'
>  Hash algo:sha256
>  Hash value:   c7f32d039871d858dda8d397c3b6a6
> 85bc914c78cf70f03d1860f61ecfe9c689
>  Hash len: 32
>Verifying Hash Integrity ... sha256+ OK
>Loading fdt from 0x22165ea4 to 0x2800
>Booting using the fdt blob at 0x2800
>of_flat_tree at 0x2800 size 0x54b1
> Initial value for argc=3
> Final value for argc=3
>Loading Kernel Image ... OK
> CACHE: Misaligned operation at range [2200, 22165cc8]
>kernel loaded at 0x2200, end = 0x22165cc8
> images.os.start = 0x2200, images.os.end = 0x2216c0f1
> images.os.load = 0x2200, load_end = 0x22165cc8
> ERROR: new format image overwritten - must RESET the board to recover
> resetting ...
>
> This appears to be an addressing issue.  Anyone care to comment?
>
> I'll put up how I got to this point after, but I am curious on how all of
> the addresses are leveraged, is there an order they follow and more?
>
>
>
> On 27 February 2017 at 15:58, Rick Altherr  wrote:
>
>> The projects I'm working on are based on Yocto so I've been using the
>> u-boot signing support that is built in there.  I believe the magic you are
>> looking for is in http://git.yoctoproject.org
>> /cgit/cgit.cgi/poky/tree/meta/classes/uboot-sign.bbclass.  Specifically,
>> when you run 'mkimage -F -k  -K  -r ', the
>> public keys will be inserted into the control dtb.  You can then rebuild
>> u-boot with 'make EXT_DTB=' which will use the dtb that
>> includes the keys.
>>
>> On Mon, Feb 27, 2017 at 7:34 AM, Ron Brash  wrote:
>>
>>> Okay - it seems, after working my way through a bunch of the
>>> documentation and examples in /doc/uImage.FIT - I noticed a discrepancy
>>>
>>> /dts-v1/;
>>> /{
>>> description = "Configuration to load a Basic Kernel";
>>> #address-cells = <1>;
>>> images {
>>> linux_kernel@1 {
>>> description = "Linux zImage";
>>> data = /incbin/("zImage");
>>> type = "kernel";
>>> arch = "arm";
>>> os = "linux";
>>> compression = "none";
>>> load =  <0x2000>;
>>> entry = <0x20008000>;
>>> kernel-version = <1>;
>>> hash@1 {
>>> algo = "sha256";
>>> };
>>> };
>>> fdt@1 {
>>> description = "FDT blob";
>>> data = /incbin/("myboard.dtn");
>>> type = "flat_dt";
>>> arch = "arm";
>>> compression = "none";
>>> fdt-version = <1>;
>>> hash@1{
>>> algo = "sha256";
>>> };
>>> };
>>> };
>>> configurations {
>>> default = "config@1";
>>> config@1{
>>> description = "Plain Linux";
>>> kernel = "linux_kernel@1";
>>> fdt = "fdt@1";
>>> signature@1{
>>> algo = "sha256,rsa2048";
>>> key-name-hint = "dev_key";
>>> sign-images = "fdt", "kernel";
>>> };
>>> };
>>> };
>>> };
>>>
>>> Does NOT equal (for brevity - I just used the node)
>>>
>>> fdt@1 {
>>> description = "FDT blob";
>>> data = /incbin/("myboard.dtn");
>>> type = "flat_dt";
>>> arch = "arm";
>>> compression = "none";
>>> 

Re: [U-Boot] Complete verified uboot example

2017-02-27 Thread Rick Altherr
The projects I'm working on are based on Yocto so I've been using the
u-boot signing support that is built in there.  I believe the magic you are
looking for is in
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/uboot-sign.bbclass.
Specifically, when you run 'mkimage -F -k  -K  -r
', the public keys will be inserted into the control dtb.  You can
then rebuild u-boot with 'make EXT_DTB=' which will use the
dtb that includes the keys.

On Mon, Feb 27, 2017 at 7:34 AM, Ron Brash  wrote:

> Okay - it seems, after working my way through a bunch of the documentation
> and examples in /doc/uImage.FIT - I noticed a discrepancy
>
> /dts-v1/;
> /{
> description = "Configuration to load a Basic Kernel";
> #address-cells = <1>;
> images {
> linux_kernel@1 {
> description = "Linux zImage";
> data = /incbin/("zImage");
> type = "kernel";
> arch = "arm";
> os = "linux";
> compression = "none";
> load =  <0x2000>;
> entry = <0x20008000>;
> kernel-version = <1>;
> hash@1 {
> algo = "sha256";
> };
> };
> fdt@1 {
> description = "FDT blob";
> data = /incbin/("myboard.dtn");
> type = "flat_dt";
> arch = "arm";
> compression = "none";
> fdt-version = <1>;
> hash@1{
> algo = "sha256";
> };
> };
> };
> configurations {
> default = "config@1";
> config@1{
> description = "Plain Linux";
> kernel = "linux_kernel@1";
> fdt = "fdt@1";
> signature@1{
> algo = "sha256,rsa2048";
> key-name-hint = "dev_key";
> sign-images = "fdt", "kernel";
> };
> };
> };
> };
>
> Does NOT equal (for brevity - I just used the node)
>
> fdt@1 {
> description = "FDT blob";
> data = /incbin/("myboard.dtn");
> type = "flat_dt";
> arch = "arm";
> compression = "none";
> fdt-version = <1>;
> hash@1{
> algo = "sha256";
> };
> signature@1{
> algo = "sha256,rsa2048";
> key-name-hint = "dev_key";
> };
> };
>
> Apparently, this causes the mkimage tooling in my particular instance to
> explain invalid blob messages.  The large example above indeed does work
> once this nuance was noticed.
>
> Next,  once the final CTRL FDT is created, how does one get it back into
> the actual u-boot binary.  Does/can mkimage insert it into the binary image
> at a particular offset?  What is the command to do so?
>
>
>
>
>
> On 23 February 2017 at 12:27, Rick Altherr  wrote:
>
>>
>>
>> On Thu, Feb 23, 2017 at 7:48 AM, Ron Brash  wrote:
>>
>>> Hello all (and thanks Mr. Altherr for this insight),
>>>
>>> Excellent feedback and I agree that all of this needs to find a home
>>> either on the global docs on the website and/or the text-only
>>> documentation.  Regardless, this leads me to a few questions.
>>>
>>> NOTE: the use of a uboot control DTS, control DTB and control FTD even
>>> in Mr. Altherr's email is confusion provoking.  One term to rule them all
>>> is needed ;)
>>>
>>
>> Agreed.  Technically a flattened device tree (FDT) can be described in an
>> ASCII form (dts) or binary form (dtb).
>>
>>
>>>
>>> 1.)  What if a board doesn't have OR has ever been configured to use
>>> u-boot DTS (could we call this a UDTS or something friendly to
>>> differentiate that fact?); this was a point of misunderstanding until I
>>> started scampering around into arch/arm/dts/?
>>>
>>> * For example, my board is a derivative of an Atmel at91sam9g20.  It had
>>> a very generic implementation of a DTS that covered reference boards in the
>>> Linux kernel, but required a fair bit of modification to make it work.  As
>>> the at91sam(legacy platform) isn't in u-boot's source tree for a DTS - what
>>> would someone like me need to do - do we have a barebones tutorial (again I
>>> don't mind publishing such with proofing)?  Is it even required if we have
>>> a platform/board already working in the traditional u-boot way?
>>>
>>> I believe (but have no verified) that if your board is supported by
>> U-Boot without a control FDT today, you can just create one that contains
>> only the public keys.  I've gathered from the mailing list that using a
>> control FDT and the driver model is how all new boards should be
>> implemented.
>>
>>
>>> 2.)  Just to summarise - everything winds up in two binaries: u-boot and
>>> the FIT image.  So the partition scheme would more or less would look like:
>>>
>>> /-
>>> * Bootstrap/ROM (optional)
>>> /
>>> * U-boot
>>> *Control DTB
>>> * Has keys
>>>
>>
>> Only the public keys.  The private keys are never stored on the target
>> device.
>>
>>
>>> * Driver loadout/init
>>>
>> The control FDT only describes the hardware (see
>> https://www.devicetree.org/ and http://git.kernel.org/cgit/lin
>> ux/kernel/git/torvalds/linux.git/tree/Documentation/devicet
>> ree/usage-model.txt).  U-Boot's driver model matches device drivers
>> against nodes in the FDT and starts them.
>>
>>
>>> /
>>> * U-boot env
>>> *
>>> * FIT image
>>>
>> The FIT shouldn't be in the U-Boot env section.  That's used by U-Boot to
>> store its 

Re: [U-Boot] [PATCH v4 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-27 Thread Marek Vasut
On 02/27/2017 05:14 PM, Roger Quadros wrote:
> On 23/02/17 15:39, Uri Mashiach wrote:
>> Modify the determination of the base address of xHCI registers of DRA7XX
>> targets.
>> Before the commit: by the target.
>> After the commit: by the USB port index.
>>
>> Cc: Lokesh Vutla 
>> Cc: Marek Vasut 
>> Cc: Roger Quadros 
>> Signed-off-by: Uri Mashiach 
> 
> Reviewed-by: Roger Quadros 

Thanks

Acked-by: Marek Vasut 

Feel free to pull through the omap tree as this seems part of a bigger
series.

>> ---
>> V1 -> V2: Replace the commit "fix XHCI registers base address".
>> V2 -> V3: Replace the commit "reintroduce the CONFIG_AM57XX symbol"
>> V3 -> V4: Replace boolean symbols USB_XHCI_DRA7XX_INDEX0 and 
>> USB_XHCI_DRA7XX_INDEX1 with
>>integer symbol USB_XHCI_DRA7XX_INDEX.
>>
>>  configs/dra7xx_evm_defconfig| 1 +
>>  configs/dra7xx_hs_evm_defconfig | 1 +
>>  drivers/usb/host/Kconfig| 9 +
>>  include/linux/usb/xhci-omap.h   | 6 --
>>  4 files changed, 15 insertions(+), 2 deletions(-)
>>
>> diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
>> index 26b26cc..05f7778 100644
>> --- a/configs/dra7xx_evm_defconfig
>> +++ b/configs/dra7xx_evm_defconfig
>> @@ -86,6 +86,7 @@ CONFIG_OMAP_TIMER=y
>>  CONFIG_USB=y
>>  CONFIG_USB_XHCI_HCD=y
>>  CONFIG_USB_XHCI_DWC3=y
>> +CONFIG_USB_XHCI_DRA7XX_INDEX=1
>>  CONFIG_USB_DWC3=y
>>  CONFIG_USB_DWC3_GADGET=y
>>  CONFIG_USB_DWC3_OMAP=y
>> diff --git a/configs/dra7xx_hs_evm_defconfig 
>> b/configs/dra7xx_hs_evm_defconfig
>> index 244940c..23ae2c7 100644
>> --- a/configs/dra7xx_hs_evm_defconfig
>> +++ b/configs/dra7xx_hs_evm_defconfig
>> @@ -91,6 +91,7 @@ CONFIG_OMAP_TIMER=y
>>  CONFIG_USB=y
>>  CONFIG_USB_XHCI_HCD=y
>>  CONFIG_USB_XHCI_DWC3=y
>> +CONFIG_USB_XHCI_DRA7XX_INDEX=1
>>  CONFIG_USB_DWC3=y
>>  CONFIG_USB_DWC3_GADGET=y
>>  CONFIG_USB_DWC3_OMAP=y
>> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
>> index 5129a57..3ff79fc 100644
>> --- a/drivers/usb/host/Kconfig
>> +++ b/drivers/usb/host/Kconfig
>> @@ -43,6 +43,15 @@ config USB_XHCI_ZYNQMP
>>  help
>>Enables support for the on-chip xHCI controller on Xilinx ZynqMP SoCs.
>>  
>> +config USB_XHCI_DRA7XX_INDEX
>> +int "DRA7XX xHCI USB index"
>> +range 0 1
>> +default 0
>> +depends on DRA7XX
>> +help
>> +  Select the DRA7XX xHCI USB index.
>> +  Current supported values: 0, 1.
>> +
>>  endif # USB_XHCI_HCD
>>  
>>  config USB_EHCI_HCD
>> diff --git a/include/linux/usb/xhci-omap.h b/include/linux/usb/xhci-omap.h
>> index 9de80d7..f038ddb 100644
>> --- a/include/linux/usb/xhci-omap.h
>> +++ b/include/linux/usb/xhci-omap.h
>> @@ -10,14 +10,16 @@
>>  #ifndef _ASM_ARCH_XHCI_OMAP_H_
>>  #define _ASM_ARCH_XHCI_OMAP_H_
>>  
>> -#ifdef CONFIG_TARGET_DRA7XX_EVM
>> +#ifdef CONFIG_DRA7XX
>> +#if CONFIG_USB_XHCI_DRA7XX_INDEX == 1
>>  #define OMAP_XHCI_BASE 0x488d
>>  #define OMAP_OCP1_SCP_BASE 0x4A081000
>>  #define OMAP_OTG_WRAPPER_BASE 0x488c
>> -#elif defined CONFIG_TARGET_AM57XX_EVM
>> +#elif CONFIG_USB_XHCI_DRA7XX_INDEX == 0
>>  #define OMAP_XHCI_BASE 0x4889
>>  #define OMAP_OCP1_SCP_BASE 0x4A084c00
>>  #define OMAP_OTG_WRAPPER_BASE 0x4888
>> +#endif /* CONFIG_USB_XHCI_DRA7XX_INDEX == 1 */
>>  #elif defined CONFIG_AM43XX
>>  #define OMAP_XHCI_BASE 0x483d
>>  #define OMAP_OCP1_SCP_BASE 0x483E8000
>>
> 


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


Re: [U-Boot] [PATCH v4 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-27 Thread Marek Vasut
On 02/23/2017 02:39 PM, Uri Mashiach wrote:
> Modify the determination of the base address of xHCI registers of DRA7XX
> targets.
> Before the commit: by the target.
> After the commit: by the USB port index.
> 
> Cc: Lokesh Vutla 
> Cc: Marek Vasut 
> Cc: Roger Quadros 
> Signed-off-by: Uri Mashiach 

Acked-by: Marek Vasut 

Feel free to pull through the omap tree as this seems part of a bigger
series.

> ---
> V1 -> V2: Replace the commit "fix XHCI registers base address".
> V2 -> V3: Replace the commit "reintroduce the CONFIG_AM57XX symbol"
> V3 -> V4: Replace boolean symbols USB_XHCI_DRA7XX_INDEX0 and 
> USB_XHCI_DRA7XX_INDEX1 with
> integer symbol USB_XHCI_DRA7XX_INDEX.
> 
>  configs/dra7xx_evm_defconfig| 1 +
>  configs/dra7xx_hs_evm_defconfig | 1 +
>  drivers/usb/host/Kconfig| 9 +
>  include/linux/usb/xhci-omap.h   | 6 --
>  4 files changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
> index 26b26cc..05f7778 100644
> --- a/configs/dra7xx_evm_defconfig
> +++ b/configs/dra7xx_evm_defconfig
> @@ -86,6 +86,7 @@ CONFIG_OMAP_TIMER=y
>  CONFIG_USB=y
>  CONFIG_USB_XHCI_HCD=y
>  CONFIG_USB_XHCI_DWC3=y
> +CONFIG_USB_XHCI_DRA7XX_INDEX=1
>  CONFIG_USB_DWC3=y
>  CONFIG_USB_DWC3_GADGET=y
>  CONFIG_USB_DWC3_OMAP=y
> diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig
> index 244940c..23ae2c7 100644
> --- a/configs/dra7xx_hs_evm_defconfig
> +++ b/configs/dra7xx_hs_evm_defconfig
> @@ -91,6 +91,7 @@ CONFIG_OMAP_TIMER=y
>  CONFIG_USB=y
>  CONFIG_USB_XHCI_HCD=y
>  CONFIG_USB_XHCI_DWC3=y
> +CONFIG_USB_XHCI_DRA7XX_INDEX=1
>  CONFIG_USB_DWC3=y
>  CONFIG_USB_DWC3_GADGET=y
>  CONFIG_USB_DWC3_OMAP=y
> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
> index 5129a57..3ff79fc 100644
> --- a/drivers/usb/host/Kconfig
> +++ b/drivers/usb/host/Kconfig
> @@ -43,6 +43,15 @@ config USB_XHCI_ZYNQMP
>   help
> Enables support for the on-chip xHCI controller on Xilinx ZynqMP SoCs.
>  
> +config USB_XHCI_DRA7XX_INDEX
> + int "DRA7XX xHCI USB index"
> + range 0 1
> + default 0
> + depends on DRA7XX
> + help
> +   Select the DRA7XX xHCI USB index.
> +   Current supported values: 0, 1.
> +
>  endif # USB_XHCI_HCD
>  
>  config USB_EHCI_HCD
> diff --git a/include/linux/usb/xhci-omap.h b/include/linux/usb/xhci-omap.h
> index 9de80d7..f038ddb 100644
> --- a/include/linux/usb/xhci-omap.h
> +++ b/include/linux/usb/xhci-omap.h
> @@ -10,14 +10,16 @@
>  #ifndef _ASM_ARCH_XHCI_OMAP_H_
>  #define _ASM_ARCH_XHCI_OMAP_H_
>  
> -#ifdef CONFIG_TARGET_DRA7XX_EVM
> +#ifdef CONFIG_DRA7XX
> +#if CONFIG_USB_XHCI_DRA7XX_INDEX == 1
>  #define OMAP_XHCI_BASE 0x488d
>  #define OMAP_OCP1_SCP_BASE 0x4A081000
>  #define OMAP_OTG_WRAPPER_BASE 0x488c
> -#elif defined CONFIG_TARGET_AM57XX_EVM
> +#elif CONFIG_USB_XHCI_DRA7XX_INDEX == 0
>  #define OMAP_XHCI_BASE 0x4889
>  #define OMAP_OCP1_SCP_BASE 0x4A084c00
>  #define OMAP_OTG_WRAPPER_BASE 0x4888
> +#endif /* CONFIG_USB_XHCI_DRA7XX_INDEX == 1 */
>  #elif defined CONFIG_AM43XX
>  #define OMAP_XHCI_BASE 0x483d
>  #define OMAP_OCP1_SCP_BASE 0x483E8000
> 


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


[U-Boot] [PATCH] armv5te: make 'ret lr' produce iinterworking 'bx lr'

2017-02-27 Thread Albert ARIBAUD
Current ARM assembler helper for the 'return to caller' pseudo-instruction
turns 'ret lr' into 'mov pc, lr' for ARMv5TE. This causes the core to remain
in its current ARM state even when the routine doing the 'ret' was called
from Thumb-1 state, triggering an undefined instruction exception.

This causes early run-time failures in all boards compiled using the Thumb-1
instruction set (for instance the Open-RD family).

ARMv5TE supports 'bx lr' which properly implements interworking and thus
correctly returns to Thumb-1 state from ARM state.

This change makes 'ret lr' turn into 'bx lr' for ARMv5TE.

Signed-off-by: Albert ARIBAUD 
---
Note: this patch supersedes patch "openrd: disable private arch memset,
memcpy and libgcc" dated Sun, 26 Feb 2017 16:29:32 +0100.

 arch/arm/include/asm/assembler.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index ae1e42fc06..c56daf2a1f 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -59,7 +59,7 @@
 
.irpc,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo
.macro  ret\c, reg
-#if defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__)
+#if defined(__ARM_ARCH_5E__)
mov\c   pc, \reg
 #else
.ifeqs  "\reg", "lr"
-- 
2.11.0

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


Re: [U-Boot] [PATCH v4 4/7] arm: am57xx: cl-som-am57x: invoke clock API to enable/disable clocks

2017-02-27 Thread Marek Vasut
On 02/27/2017 05:24 PM, Roger Quadros wrote:
> Hi,
> 
> On 26/02/17 14:27, Marek Vasut wrote:
>> On 02/23/2017 02:39 PM, Uri Mashiach wrote:
>>> Invoke enable_usb_clocks during board_usb_init and disable_usb_clocks
>>> during board_usb_exit to enable and disable clocks respectively.
>>>
>>> Modifications:
>>> * Enable USB clocks in the OMAP version of the function
>>>   board_usb_init.
>>> * Disable USB clocks in the OMAP version of the function
>>>   board_usb_cleanup.
>>>
>>> Cc: Marek Vasut 
>>> Signed-off-by: Uri Mashiach 
>>> Reviewed-by: Marek Vasut 
>>> Reviewed-by: Tom Rini 
>>> ---
>>> V1 -> V4: none
>>>
>>>  board/compulab/cl-som-am57x/cl-som-am57x.c | 10 --
>>>  drivers/usb/host/xhci-omap.c   |  2 ++
>>>  2 files changed, 2 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/board/compulab/cl-som-am57x/cl-som-am57x.c 
>>> b/board/compulab/cl-som-am57x/cl-som-am57x.c
>>> index fe1468f..4701b71 100644
>>> --- a/board/compulab/cl-som-am57x/cl-som-am57x.c
>>> +++ b/board/compulab/cl-som-am57x/cl-som-am57x.c
>>> @@ -53,16 +53,6 @@ int board_mmc_init(bd_t *bis)
>>>  }
>>>  #endif /* CONFIG_GENERIC_MMC */
>>>  
>>> -#ifdef CONFIG_USB_XHCI_OMAP
>>> -int omap_xhci_board_usb_init(int index, enum usb_init_type init)
>>> -{
>>> -   setbits_le32((*prcm)->cm_l3init_usb_otg_ss1_clkctrl,
>>> -OTG_SS_CLKCTRL_MODULEMODE_HW | OPTFCLKEN_REFCLK960M);
>>> -
>>> -   return 0;
>>> -}
>>> -#endif /* CONFIG_USB_XHCI_OMAP */
>>> -
>>>  int misc_init_r(void)
>>>  {
>>> cl_print_pcb_info();
>>> diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c
>>> index a1b4f2f..d6c5744 100644
>>> --- a/drivers/usb/host/xhci-omap.c
>>> +++ b/drivers/usb/host/xhci-omap.c
>>> @@ -29,6 +29,7 @@ static struct omap_xhci omap;
>>>  
>>>  __weak int omap_xhci_board_usb_init(int index, enum usb_init_type init)
>>>  {
>>> +   enable_usb_clocks(index);
>>
>> How many OMAP boards will this break btw ? :)
> 
> Why do you think this would break OMAP boards?

Just curious if there is some breakage I should anticipate ...

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


Re: [U-Boot] [PATCH v2] driver: net: ldpaa: Update priv->phydev after free()

2017-02-27 Thread Joe Hershberger
On Tue, Feb 21, 2017 at 7:09 AM, Er Krishna  wrote:
> Hi Guys,
>
> I want to understand cpu release command of u-boot and its implementation.
>
> When we do cpu release  the satndalone application (may be kernel
> or so) starts running on  particular processor. How does it happens ? Can
> anyone pls let me know this logic and point me in U -boot code for this
> function ?

Please dispense with the top-posting and the thread hijacking.

-Joe

> BR/Krish
>
> On Tue, Feb 21, 2017 at 1:17 PM, Ashish Kumar  wrote:
>
>> Hello Joe,
>>
>> Please see inline.
>>
>> Regards
>> Ashish
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v5 6/16] mtd: ubi: Select RBTREE option from MTD_UBI Kconfig entry

2017-02-27 Thread Boris Brezillon
On Mon, 27 Feb 2017 18:22:05 +0100
Maxime Ripard  wrote:

> From: Boris Brezillon 
> 
> Expose the RBTREE feature through Kconfig and select this option from the
> MTD_UBI option.
> 
> Signed-off-by: Boris Brezillon 
> Signed-off-by: Maxime Ripard 
> ---
>  drivers/mtd/ubi/Kconfig | 1 +
>  lib/Kconfig | 3 +++
>  2 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig
> index 0c82395317ab..cb9ba78681ed 100644
> --- a/drivers/mtd/ubi/Kconfig
> +++ b/drivers/mtd/ubi/Kconfig
> @@ -3,6 +3,7 @@ menu "UBI support"
>  config MTD_UBI
>   bool "Enable UBI - Unsorted block images"
>   select CRC32
> + select RBTREE if ARCH_SUNXI

I just grep-ed in the source for CONFIG_CMD_UBI and CONFIG_MTD_UBI, and
it seems that all boards have been converted to select the Kconfig
option instead of having it defined in their .h config header.

This means you could to drop the 'if ARCH_SUNXI' and add the changes
you get after executing the following command to this commit:

# git grep -l "#define CONFIG_RBTREE" | \
  xargs sed -i "/#define CONFIG_RBTREE/d"

Of course, i's just a suggestion, ans we can do that after this series
has been merged.

>   help
> UBI is a software layer above MTD layer which admits of LVM-like
> logical volumes on top of MTD devices, hides some complexities of
> diff --git a/lib/Kconfig b/lib/Kconfig
> index b16062fbe333..5944d967dff4 100644
> --- a/lib/Kconfig
> +++ b/lib/Kconfig
> @@ -52,6 +52,9 @@ config LIB_RAND
>   help
> This library provides pseudo-random number generator functions.
>  
> +config RBTREE
> + bool
> +
>  source lib/dhry/Kconfig
>  
>  source lib/rsa/Kconfig

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


[U-Boot] [PATCH v5 8/16] cmd: nand: Expose optional suboptions in Kconfig

2017-02-27 Thread Maxime Ripard
From: Boris Brezillon 

Sometime we need to enable advanced suboptions of the nand command set.
Expose these suboptions in Kconfig.

Signed-off-by: Boris Brezillon 
Signed-off-by: Maxime Ripard 
---
 cmd/Kconfig | 18 ++
 1 file changed, 18 insertions(+), 0 deletions(-)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index 66d3273fac6f..4e7c0fbcdee5 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -441,6 +441,24 @@ config CMD_NAND
help
  NAND support.
 
+if CMD_NAND
+config CMD_NAND_TRIMFFS
+   bool "nand write.trimffs"
+   help
+ Allows one to skip empty pages when flashing something on a NAND.
+
+config CMD_NAND_LOCK_UNLOCK
+   bool "nand lock/unlock"
+   help
+ NAND locking support.
+
+config CMD_NAND_TORTURE
+   bool "nand torture"
+   help
+ NAND torture support.
+
+endif # CMD_NAND
+
 config CMD_PART
bool "part"
select PARTITION_UUIDS
-- 
git-series 0.8.11
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v5 13/16] nand: sunxi: Add options for the SPL NAND configuration

2017-02-27 Thread Maxime Ripard
The SPL image needs to be built with a different ECC configuration than the
U-Boot binary.

Add Kconfig options with defaults to provide a value that should work for
anyone, but is still configurable if needs be.

Signed-off-by: Maxime Ripard 
Acked-by: Boris Brezillon 
Reviewed-by: Hans de Goede 
Acked-by: Scott Wood 
---
 drivers/mtd/nand/Kconfig | 16 
 1 file changed, 16 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 5601900e4f79..51f901025168 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -74,6 +74,22 @@ config NAND_SUNXI
The SPL driver only supports reading from the NAND using DMA
transfers.
 
+if NAND_SUNXI
+
+config NAND_SUNXI_SPL_ECC_STRENGTH
+   int "Allwinner NAND SPL ECC Strength"
+   default 64
+
+config NAND_SUNXI_SPL_ECC_SIZE
+   int "Allwinner NAND SPL ECC Step Size"
+   default 1024
+
+config NAND_SUNXI_SPL_USABLE_PAGE_SIZE
+   int "Allwinner NAND SPL Usable Page Size"
+   default 1024
+
+endif
+
 config NAND_ARASAN
bool "Configure Arasan Nand"
help
-- 
git-series 0.8.11
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v5 3/16] tools: sunxi: Add spl image builder

2017-02-27 Thread Maxime Ripard
This program generates raw SPL images that can be flashed on the NAND with
the ECC and randomizer properly set up.

This has been copied (and tweaked to find the right headers) from the
sunxi-tools (https://github.com/linux-sunxi/sunxi-tools) upstream
repository, commit 1c3a6ca5.

Signed-off-by: Maxime Ripard 
Acked-by: Boris Brezillon 
Reviewed-by: Hans de Goede 
---
 tools/.gitignore|   1 +-
 tools/Makefile  |   2 +-
 tools/sunxi-spl-image-builder.c | 484 +-
 3 files changed, 487 insertions(+), 0 deletions(-)
 create mode 100644 tools/sunxi-spl-image-builder.c

diff --git a/tools/.gitignore b/tools/.gitignore
index 0d1f076d782a..6ec71f5c7fcf 100644
--- a/tools/.gitignore
+++ b/tools/.gitignore
@@ -16,6 +16,7 @@
 /mkexynosspl
 /mxsboot
 /mksunxiboot
+/sunxi-spl-image-builder
 /ncb
 /proftool
 /relocate-rela
diff --git a/tools/Makefile b/tools/Makefile
index 5000f4d5bbaf..1a3367f253c5 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -179,6 +179,8 @@ hostprogs-$(CONFIG_MX28) += mxsboot
 HOSTCFLAGS_mxsboot.o := -pedantic
 
 hostprogs-$(CONFIG_ARCH_SUNXI) += mksunxiboot
+hostprogs-$(CONFIG_ARCH_SUNXI) += sunxi-spl-image-builder
+sunxi-spl-image-builder-objs := sunxi-spl-image-builder.o lib/bch.o
 
 hostprogs-$(CONFIG_NETCONSOLE) += ncb
 hostprogs-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1
diff --git a/tools/sunxi-spl-image-builder.c b/tools/sunxi-spl-image-builder.c
new file mode 100644
index ..d538a3881319
--- /dev/null
+++ b/tools/sunxi-spl-image-builder.c
@@ -0,0 +1,484 @@
+/*
+ * Allwinner NAND randomizer and image builder implementation:
+ *
+ * Copyright © 2016 NextThing Co.
+ * Copyright © 2016 Free Electrons
+ *
+ * Author: Boris Brezillon 
+ *
+ */
+
+#include 
+
+#include 
+#include 
+
+#define BCH_PRIMITIVE_POLY 0x5803
+
+#define ARRAY_SIZE(arr)(sizeof(arr) / sizeof((arr)[0]))
+#define DIV_ROUND_UP(n,d)  (((n) + (d) - 1) / (d))
+
+struct image_info {
+   int ecc_strength;
+   int ecc_step_size;
+   int page_size;
+   int oob_size;
+   int usable_page_size;
+   int eraseblock_size;
+   int scramble;
+   int boot0;
+   off_t offset;
+   const char *source;
+   const char *dest;
+};
+
+static void swap_bits(uint8_t *buf, int len)
+{
+   int i, j;
+
+   for (j = 0; j < len; j++) {
+   uint8_t byte = buf[j];
+
+   buf[j] = 0;
+   for (i = 0; i < 8; i++) {
+   if (byte & (1 << i))
+   buf[j] |= (1 << (7 - i));
+   }
+   }
+}
+
+static uint16_t lfsr_step(uint16_t state, int count)
+{
+   state &= 0x7fff;
+   while (count--)
+   state = ((state >> 1) |
+state >> 0) ^ (state >> 1)) & 1) << 14)) & 0x7fff;
+
+   return state;
+}
+
+static uint16_t default_scrambler_seeds[] = {
+   0x2b75, 0x0bd0, 0x5ca3, 0x62d1, 0x1c93, 0x07e9, 0x2162, 0x3a72,
+   0x0d67, 0x67f9, 0x1be7, 0x077d, 0x032f, 0x0dac, 0x2716, 0x2436,
+   0x7922, 0x1510, 0x3860, 0x5287, 0x480f, 0x4252, 0x1789, 0x5a2d,
+   0x2a49, 0x5e10, 0x437f, 0x4b4e, 0x2f45, 0x216e, 0x5cb7, 0x7130,
+   0x2a3f, 0x60e4, 0x4dc9, 0x0ef0, 0x0f52, 0x1bb9, 0x6211, 0x7a56,
+   0x226d, 0x4ea7, 0x6f36, 0x3692, 0x38bf, 0x0c62, 0x05eb, 0x4c55,
+   0x60f4, 0x728c, 0x3b6f, 0x2037, 0x7f69, 0x0936, 0x651a, 0x4ceb,
+   0x6218, 0x79f3, 0x383f, 0x18d9, 0x4f05, 0x5c82, 0x2912, 0x6f17,
+   0x6856, 0x5938, 0x1007, 0x61ab, 0x3e7f, 0x57c2, 0x542f, 0x4f62,
+   0x7454, 0x2eac, 0x7739, 0x42d4, 0x2f90, 0x435a, 0x2e52, 0x2064,
+   0x637c, 0x66ad, 0x2c90, 0x0bad, 0x759c, 0x0029, 0x0986, 0x7126,
+   0x1ca7, 0x1605, 0x386a, 0x27f5, 0x1380, 0x6d75, 0x24c3, 0x0f8e,
+   0x2b7a, 0x1418, 0x1fd1, 0x7dc1, 0x2d8e, 0x43af, 0x2267, 0x7da3,
+   0x4e3d, 0x1338, 0x50db, 0x454d, 0x764d, 0x40a3, 0x42e6, 0x262b,
+   0x2d2e, 0x1aea, 0x2e17, 0x173d, 0x3a6e, 0x71bf, 0x25f9, 0x0a5d,
+   0x7c57, 0x0fbe, 0x46ce, 0x4939, 0x6b17, 0x37bb, 0x3e91, 0x76db,
+};
+
+static uint16_t brom_scrambler_seeds[] = { 0x4a80 };
+
+static void scramble(const struct image_info *info,
+int page, uint8_t *data, int datalen)
+{
+   uint16_t state;
+   int i;
+
+   /* Boot0 is always scrambled no matter the command line option. */
+   if (info->boot0) {
+   state = brom_scrambler_seeds[0];
+   } else {
+   unsigned seedmod = info->eraseblock_size / info->page_size;
+
+   /* Bail out earlier if the user didn't ask for scrambling. */
+   if (!info->scramble)
+   return;
+
+   if (seedmod > ARRAY_SIZE(default_scrambler_seeds))
+   seedmod = ARRAY_SIZE(default_scrambler_seeds);
+
+   state = 

[U-Boot] [PATCH v5 0/16] sunxi: Add support for the CHIP Pro

2017-02-27 Thread Maxime Ripard
The CHIP Pro is a SoM made by NextThing Co, and that embeds a GR8 SIP, an
AXP209 PMIC, a WiFi BT chip and a 512MB SLC NAND.

Since the first Allwinner device coming whit an SLC NAND that doesn't have
the shortcomings (and breakages) the MLC NAND has, we can finally enable
the NAND support on a board by default.

This is the occasion to introduce a bunch of additions needed imo to be
able to come up with a sane NAND support for our users.

The biggest pain point is that the BROM uses a different ECC and randomizer
configuration than for the rest of the NAND. In order to lessen the number
of bitflips, you also need to pad with random data the SPL image.

Since it's quite tedious to do right (and most users won't be able to
figure it out) and since if it is not done right, it will eventually turn
into an unusable system (which is bad UX), we think that the best solution
is to generate an SPL image that already embeds all this. We'll possible
have to do the same thing for the U-Boot image (at least for the random
padding) on MLC NANDs.

The only drawback from that is that you need to flash it raw, instead of
using the usual nand write, but it's just a different command, nothing
major anyway.

In order to flash it, from a device switched in FEL, on your host:
sunxi-fel spl spl/sunxi-spl.bin
sunxi-fel write 0x4a00 u-boot-dtb.bin
sunxi-fel write 0x4300 spl/sunxi-spl-with-ecc.bin
sunxi-fel exe 0x4a00

And on the board, once u-boot is running (assuming the NAND is already
erased):

nand write.raw.noverify 0x4300 0 40
nand write.raw.noverify 0x4300 0x40 40

nand write 0x4a00 0x80 0xc

I also encountered some weird bug in the private libgcc that prevents
U-Boot from loading. Disabling CONFIG_USE_PRIVATE_LIBGCC fixes that.

Let me know what you think,
Maxime

Changes from v4:
  - Rebased on top of last pull request
  - Removed irrelevant config options

Changes from v3:
  - Bring new Kconfig patches from Boris
  - Do not define Kconfig defaults in our board Kconfig but directly in the
option declaration
  - Sync the DT with the kernel
  - Fixed build breakages

Changes from v2:
  - Move CMD_NAND and CMD_UBI default to cmd/Kconfig
  - Define the env Kconfig options only for ARCH_SUNXI to avoid build
breakages
  - Define CMD_MTDPARTS only for ARCH_SUNXI

Changes from v1:
  - Allowed to build lib/bch.c for the host, and used that in the image
builder
  - Fixed a bug in the NAND driver
  - Wrote a documentation on how to flash a NAND image on an Allwinner
board
  - Fixed a few compilation breakages and issues
  - Moved U-boot offset out of the config header and into Kconfig
  - Moved the environment into UBI
  - Moved the environment selection to Kconfig
  - Moved the CMD_MTDPARTS options to Kconfig
  - Provide MTDIDS_DEFAULT and MTDPARTS_DEFAULT options through Kconfig
  - Added the tags from everyone

Boris Brezillon (3):
  mtd: ubi: Select RBTREE option from MTD_UBI Kconfig entry
  cmd: Expose a Kconfig option to enable UBIFS commands
  cmd: nand: Expose optional suboptions in Kconfig

Hans de Goede (1):
  sunxi: Enable UBI and NAND support

Maxime Ripard (12):
  nand: sunxi: Fix modulo by zero error
  bch: Allow to build for the host
  tools: sunxi: Add spl image builder
  common: Move environment choice to Kconfig
  cmd: Add Kconfig option for CMD_MTDPARTS and related options
  mtd: sunxi: Select the U-Boot location config option
  mtd: sunxi: Change U-Boot offset
  sunxi: Add the default mtdids and mtdparts to our env
  nand: sunxi: Add options for the SPL NAND configuration
  scripts: sunxi: Build an raw SPL image
  sunxi: Sync GR8 DTS and AXP209 with the kernel
  sunxi: Add support for the CHIP Pro

 Makefile|3 +-
 arch/arm/dts/Makefile   |1 +-
 arch/arm/dts/axp209.dtsi|6 +-
 arch/arm/dts/sun5i-gr8-chip-pro.dts |  266 +++-
 arch/arm/dts/sun5i-gr8.dtsi | 1132 -
 board/sunxi/README.nand |   54 +-
 cmd/Kconfig |   50 +-
 cmd/mtdparts.c  |8 +-
 common/Kconfig  |   69 ++-
 configs/CHIP_pro_defconfig  |   33 +-
 drivers/mtd/nand/Kconfig|   19 +-
 drivers/mtd/nand/sunxi_nand_spl.c   |7 +-
 drivers/mtd/ubi/Kconfig |1 +-
 include/configs/sunxi-common.h  |   33 +-
 include/environment.h   |2 +-
 lib/Kconfig |5 +-
 lib/bch.c   |   48 +-
 scripts/Makefile.spl|   15 +-
 tools/.gitignore|1 +-
 tools/Makefile  |2 +-
 tools/sunxi-spl-image-builder.c |  484 -
 21 files changed, 2224 insertions(+), 15 deletions(-)
 create mode 100644 arch/arm/dts/sun5i-gr8-chip-pro.dts
 create mode 100644 arch/arm/dts/sun5i-gr8.dtsi
 create mode 100644 board/sunxi/README.nand
 create mode 100644 configs/CHIP_pro_defconfig
 

Re: [U-Boot] [PATCH v3 00/10] stm32f7: add clock and pin control drivers

2017-02-27 Thread Vikas MANOCHA
Hi Tom,

If it is ok,  please apply this patchset.

Cheers,
Vikas

> -Original Message-
> From: Vikas MANOCHA
> Sent: Sunday, February 12, 2017 10:26 AM
> To: u-boot@lists.denx.de
> Cc: Vikas MANOCHA 
> Subject: [PATCH v3 00/10] stm32f7: add clock and pin control drivers
> 
> This patchset:
>   - adds support for stm32f7 clock driver.
>   - adds support for stm32f7 pin control driver.
>   - adds device tree nodes for stm32f7 serial & clock.
>   - adds stm32f7 pin control device tree sub nodes :
>   - serial usart1
>   - ethernet
>   - qspi flash
> 
> Changed in v3:
> - remove get length of pin control sub node as not required in case of
>   fdtdec_get_int_array_count
> 
> Changed in v2:
> - added removed blank lines in code.
> - removed not used functions.
> - changed fixed length array read from device node to relaxed length read.
> 
> Vikas Manocha (10):
>   serial: stm32f7: add device tree support
>   clk: stm32f7: add clock driver for stm32f7 family
>   stm32f7: serial: use clock driver to enable clock
>   ARM: DT: stm32f7: add usart1 & clock device tree nodes
>   stm32f7: clk: remove usart1 clock enable from board init
>   PINCTRL: stm32f7: add pin control driver
>   ARM: DT: stm32f7: add pin control device node
>   ARM: DT: stm32f7: add pin control node for serial port pins
>   ARM: DT: stm32f7: add ethernet pin contol node
>   ARM: DT: stm32f7: add qspi pin contol node
> 
>  arch/arm/dts/stm32f746-disco.dts   |  13 ++
>  arch/arm/dts/stm32f746.dtsi|  72 +++
>  arch/arm/mach-stm32/stm32f7/Makefile   |   2 +-
>  arch/arm/mach-stm32/stm32f7/soc.c  |   2 -
>  board/st/stm32f746-disco/stm32f746-disco.c | 111 +
>  configs/stm32f746-disco_defconfig  |   4 +
>  doc/device-tree-bindings/clock/st,stm32-rcc.txt|  95 +++
>  .../pinctrl/st,stm32-pinctrl.txt   | 133 
> +
>  drivers/clk/Makefile   |   2 +-
>  .../stm32f7/clock.c => drivers/clk/clk_stm32f7.c   |  64 +-
>  drivers/pinctrl/Kconfig|   9 ++
>  drivers/pinctrl/Makefile   |   1 +
>  drivers/pinctrl/pinctrl_stm32.c| 117 ++
>  drivers/serial/serial_stm32x7.c|  42 +++
>  14 files changed, 548 insertions(+), 119 deletions(-)  create mode 100644 
> doc/device-tree-bindings/clock/st,stm32-rcc.txt
>  create mode 100644 doc/device-tree-bindings/pinctrl/st,stm32-pinctrl.txt
>  rename arch/arm/mach-stm32/stm32f7/clock.c => drivers/clk/clk_stm32f7.c 
> (85%)  create mode 100644
> drivers/pinctrl/pinctrl_stm32.c
> 
> --
> 1.9.1

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


[U-Boot] [PATCH v5 15/16] sunxi: Sync GR8 DTS and AXP209 with the kernel

2017-02-27 Thread Maxime Ripard
Those DT will be part of 4.10, sync them so we can have our own config.

Signed-off-by: Maxime Ripard 
Reviewed-by: Hans de Goede 
---
 arch/arm/dts/Makefile   |1 +-
 arch/arm/dts/axp209.dtsi|6 +-
 arch/arm/dts/sun5i-gr8-chip-pro.dts |  266 +++-
 arch/arm/dts/sun5i-gr8.dtsi | 1132 -
 4 files changed, 1405 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/dts/sun5i-gr8-chip-pro.dts
 create mode 100644 arch/arm/dts/sun5i-gr8.dtsi

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index eeaa9e028457..1b4ab049406b 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -220,6 +220,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \
sun5i-a13-olinuxino-micro.dtb \
sun5i-a13-q8-tablet.dtb \
sun5i-a13-utoo-p66.dtb \
+   sun5i-gr8-chip-pro.dtb \
sun5i-r8-chip.dtb
 dtb-$(CONFIG_MACH_SUN6I) += \
sun6i-a31-app4-evb1.dtb \
diff --git a/arch/arm/dts/axp209.dtsi b/arch/arm/dts/axp209.dtsi
index afbe89c01df5..675bb0f30825 100644
--- a/arch/arm/dts/axp209.dtsi
+++ b/arch/arm/dts/axp209.dtsi
@@ -53,6 +53,12 @@
interrupt-controller;
#interrupt-cells = <1>;
 
+   axp_gpio: gpio {
+   compatible = "x-powers,axp209-gpio";
+   gpio-controller;
+   #gpio-cells = <2>;
+   };
+
regulators {
/* Default work frequency for buck regulators */
x-powers,dcdc-freq = <1500>;
diff --git a/arch/arm/dts/sun5i-gr8-chip-pro.dts 
b/arch/arm/dts/sun5i-gr8-chip-pro.dts
new file mode 100644
index ..92a2dc6250a5
--- /dev/null
+++ b/arch/arm/dts/sun5i-gr8-chip-pro.dts
@@ -0,0 +1,266 @@
+/*
+ * Copyright 2016 Free Electrons
+ * Copyright 2016 NextThing Co
+ *
+ * Maxime Ripard 
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun5i-gr8.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include 
+#include 
+#include 
+
+/ {
+   model = "NextThing C.H.I.P. Pro";
+   compatible = "nextthing,chip-pro", "nextthing,gr8";
+
+   aliases {
+   i2c0 = 
+   i2c1 = 
+   serial0 = 
+   serial1 = 
+   serial2 = 
+   };
+
+   chosen {
+   stdout-path = "serial0:115200n8";
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   status {
+   label = "chip-pro:white:status";
+   gpios = <_gpio 2 GPIO_ACTIVE_HIGH>;
+   default-state = "on";
+   };
+   };
+
+   mmc0_pwrseq: mmc0_pwrseq {
+   compatible = "mmc-pwrseq-simple";
+   pinctrl-names = "default";
+   pinctrl-0 = <_reg_on_pin_chip_pro>;
+   reset-gpios = < 1 10 GPIO_ACTIVE_LOW>; /* PB10 */
+   };
+};
+
+ {
+   status = "okay";
+};
+
+ {
+   status = "okay";
+};
+
+ {
+   pinctrl-names = "default";
+   pinctrl-0 = 

[U-Boot] [PATCH v5 7/16] cmd: Expose a Kconfig option to enable UBIFS commands

2017-02-27 Thread Maxime Ripard
From: Boris Brezillon 

Create a new Kconfig entry to allow CMD_UBIFS selection from Kconfig and
add an hidden LZO option that can be selected by CMD_UBIFS.

Signed-off-by: Boris Brezillon 
Signed-off-by: Maxime Ripard 
---
 cmd/Kconfig | 8 
 lib/Kconfig | 2 ++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index 0734d669dbd7..66d3273fac6f 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -835,4 +835,12 @@ config CMD_UBI
  (www.linux-mtd.infradead.org). Activate this option if you want
  to use U-Boot UBI commands.
 
+config CMD_UBIFS
+   tristate "Enable UBIFS - Unsorted block images filesystem commands"
+   select CRC32
+   select RBTREE if ARCH_SUNXI
+   select LZO if ARCH_SUNXI
+   help
+ UBIFS is a file system for flash devices which works on top of UBI.
+
 endmenu
diff --git a/lib/Kconfig b/lib/Kconfig
index 5944d967dff4..2dde2e824104 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -122,6 +122,8 @@ config LZ4
  frame format currently (2015) implemented in the Linux kernel
  (generated by 'lz4 -l'). The two formats are incompatible.
 
+config LZO
+   bool
 endmenu
 
 config ERRNO_STR
-- 
git-series 0.8.11
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v5 6/16] mtd: ubi: Select RBTREE option from MTD_UBI Kconfig entry

2017-02-27 Thread Maxime Ripard
From: Boris Brezillon 

Expose the RBTREE feature through Kconfig and select this option from the
MTD_UBI option.

Signed-off-by: Boris Brezillon 
Signed-off-by: Maxime Ripard 
---
 drivers/mtd/ubi/Kconfig | 1 +
 lib/Kconfig | 3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig
index 0c82395317ab..cb9ba78681ed 100644
--- a/drivers/mtd/ubi/Kconfig
+++ b/drivers/mtd/ubi/Kconfig
@@ -3,6 +3,7 @@ menu "UBI support"
 config MTD_UBI
bool "Enable UBI - Unsorted block images"
select CRC32
+   select RBTREE if ARCH_SUNXI
help
  UBI is a software layer above MTD layer which admits of LVM-like
  logical volumes on top of MTD devices, hides some complexities of
diff --git a/lib/Kconfig b/lib/Kconfig
index b16062fbe333..5944d967dff4 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -52,6 +52,9 @@ config LIB_RAND
help
  This library provides pseudo-random number generator functions.
 
+config RBTREE
+   bool
+
 source lib/dhry/Kconfig
 
 source lib/rsa/Kconfig
-- 
git-series 0.8.11
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v5 12/16] sunxi: Add the default mtdids and mtdparts to our env

2017-02-27 Thread Maxime Ripard
In order for the user to be able to see and modify them, add those
variables to the default environment.

Signed-off-by: Maxime Ripard 
Reviewed-by: Tom Rini 
---
 include/configs/sunxi-common.h | 16 
 1 file changed, 16 insertions(+), 0 deletions(-)

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index b1af756a6ac9..5c9657ad137e 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -469,6 +469,20 @@ extern int soft_i2c_gpio_scl;
"stderr=serial\0"
 #endif
 
+#ifdef CONFIG_MTDIDS_DEFAULT
+#define SUNXI_MTDIDS_DEFAULT \
+   "mtdids=" CONFIG_MTDIDS_DEFAULT "\0"
+#else
+#define SUNXI_MTDIDS_DEFAULT
+#endif
+
+#ifdef CONFIG_MTDPARTS_DEFAULT
+#define SUNXI_MTDPARTS_DEFAULT \
+   "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0"
+#else
+#define SUNXI_MTDPARTS_DEFAULT
+#endif
+
 #define CONSOLE_ENV_SETTINGS \
CONSOLE_STDIN_SETTINGS \
CONSOLE_STDOUT_SETTINGS
@@ -479,6 +493,8 @@ extern int soft_i2c_gpio_scl;
DFU_ALT_INFO_RAM \
"fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
"console=ttyS0,115200\0" \
+   SUNXI_MTDIDS_DEFAULT \
+   SUNXI_MTDPARTS_DEFAULT \
BOOTCMD_SUNXI_COMPAT \
BOOTENV
 
-- 
git-series 0.8.11
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v5 10/16] mtd: sunxi: Change U-Boot offset

2017-02-27 Thread Maxime Ripard
The default U-Boot offset for the Allwinner SoCs was set to 32kB.

This was probably to try to maintain some compatibility with the current
image that we build for the MMC where the U-Boot binary is also located at
a 32kB offset.

However, this causes a number of issues. The first one is that it prevents
us from using a backup SPL entirely, which is troublesome in case where the
first would be corrupt (especially on MLC which have a higher number of
bitflips).

We also cannot use the original MMC image on the NAND, because we need to
prepare the SPL image to include the ECCs and randomizer settings, which
reduces the interest of setting it at that particular offset.

It also prevents us from upgrading and flashing the U-Boot and SPLs
independantly, since it's very likely that it will fall in the same erase
block.

Since that default wasn't used by any board, change it for 8MB, which will
be in an erase block of its own, all the erase blocks being multiple of
two. The highest erase block size we encountered is 4MB, which means that
in this particular setup, the first and second erase blocks will be for the
SPL and its backup, and the third for U-Boot.

Signed-off-by: Maxime Ripard 
Reviewed-by: Tom Rini 
---
 drivers/mtd/nand/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 9bcd634df59b..5601900e4f79 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -128,7 +128,7 @@ config SYS_NAND_U_BOOT_LOCATIONS
 
 config SYS_NAND_U_BOOT_OFFS
hex "Location in NAND to read U-Boot from"
-   default 0x8000 if NAND_SUNXI
+   default 0x80 if NAND_SUNXI
depends on SYS_NAND_U_BOOT_LOCATIONS
help
Set the offset from the start of the nand where u-boot should be
-- 
git-series 0.8.11
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v5 14/16] scripts: sunxi: Build an raw SPL image

2017-02-27 Thread Maxime Ripard
Introduce a new sunxi-spl-with-ecc.bin image with already the right header,
ECC, randomizer and padding for the BROM to be able to read it.

It needs to be flashed using a raw access to the NAND so that the
controller doesn't change a thing to it, since we already have all the
right parameters.

Signed-off-by: Maxime Ripard 
Acked-by: Boris Brezillon 
Reviewed-by: Heiko Schocher 
---
 Makefile|  3 ++-
 board/sunxi/README.nand | 54 ++-
 scripts/Makefile.spl| 15 -
 3 files changed, 72 insertions(+), 0 deletions(-)
 create mode 100644 board/sunxi/README.nand

diff --git a/Makefile b/Makefile
index 38b42daf3b5b..f8d24849e1fe 100644
--- a/Makefile
+++ b/Makefile
@@ -1344,6 +1344,9 @@ spl/u-boot-spl: tools prepare \
 spl/sunxi-spl.bin: spl/u-boot-spl
@:
 
+spl/sunxi-spl-with-ecc.bin: spl/sunxi-spl.bin
+   @:
+
 spl/u-boot-spl.sfp: spl/u-boot-spl
@:
 
diff --git a/board/sunxi/README.nand b/board/sunxi/README.nand
new file mode 100644
index ..a5d4ff0e90a3
--- /dev/null
+++ b/board/sunxi/README.nand
@@ -0,0 +1,54 @@
+Allwinner NAND flashing
+===
+
+A lot of Allwinner devices, especially the older ones (pre-H3 era),
+comes with a NAND. NANDs storages are a pretty weak choice when it
+comes to the reliability, and it comes with a number of flaws like
+read and write disturbs, data retention issues, bloks becoming
+unusable, etc.
+
+In order to mitigate that, various strategies have been found to be
+able to recover from those issues like ECC, hardware randomization,
+and of course, redundancy for the critical parts.
+
+This is obviously something that we will take into account when
+creating our images. However, the BROM will use a quite weird pattern
+when accessing the NAND, and will access only at most 4kB per page,
+which means that we also have to split that binary accross several
+pages.
+
+In order to accomodate that, we create a tool that will generate an
+SPL image that is ready to be programmed directly embedding the ECCs,
+randomized, and with the necessary bits needed to reduce the number of
+bitflips. The U-Boot build system, when configured for the NAND will
+also generate the image sunxi-spl-with-ecc.bin that will have been
+generated by that tool.
+
+In order to flash your U-Boot image onto a board, assuming that the
+board is in FEL mode, you'll need the sunxi-tools that you can find at
+this repository: https://github.com/linux-sunxi/sunxi-tools
+
+Then, you'll need to first load an SPL to initialise the RAM:
+sunxi-fel spl spl/sunxi-spl.bin
+
+Load the binaries we'll flash into RAM:
+sunxi-fel write 0x4a00 u-boot-dtb.bin
+sunxi-fel write 0x4300 spl/sunxi-spl-with-ecc.bin
+
+And execute U-Boot
+sunxi-fel exe 0x4a00
+
+On your board, you'll now have all the needed binaries into RAM, so
+you only need to erase the NAND...
+
+nand erase.chip
+
+Then write the SPL and its backup:
+
+nand write.raw.noverify 0x4300 0 40
+nand write.raw.noverify 0x4300 0x40 40
+
+And finally write the U-Boot binary:
+nand write 0x4a00 0x80 0xc
+
+You can now reboot and enjoy your NAND.
\ No newline at end of file
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index b52f9963f7d0..60ea939ac629 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -173,6 +173,10 @@ endif
 
 ifdef CONFIG_ARCH_SUNXI
 ALL-y  += $(obj)/sunxi-spl.bin
+
+ifdef CONFIG_NAND_SUNXI
+ALL-y  += $(obj)/sunxi-spl-with-ecc.bin
+endif
 endif
 
 ifeq ($(CONFIG_SYS_SOC),"at91")
@@ -289,6 +293,17 @@ cmd_mksunxiboot = $(objtree)/tools/mksunxiboot $< $@
 $(obj)/sunxi-spl.bin: $(obj)/$(SPL_BIN).bin FORCE
$(call if_changed,mksunxiboot)
 
+quiet_cmd_sunxi_spl_image_builder = SUNXI_SPL_IMAGE_BUILDER $@
+cmd_sunxi_spl_image_builder = $(objtree)/tools/sunxi-spl-image-builder \
+   -c 
$(CONFIG_NAND_SUNXI_SPL_ECC_STRENGTH)/$(CONFIG_NAND_SUNXI_SPL_ECC_SIZE) \
+   -p $(CONFIG_SYS_NAND_PAGE_SIZE) \
+   -o $(CONFIG_SYS_NAND_OOBSIZE) \
+   -u $(CONFIG_NAND_SUNXI_SPL_USABLE_PAGE_SIZE) \
+   -e $(CONFIG_SYS_NAND_BLOCK_SIZE) \
+   -s -b $< $@
+$(obj)/sunxi-spl-with-ecc.bin: $(obj)/sunxi-spl.bin
+   $(call if_changed,sunxi_spl_image_builder)
+
 # Rule to link u-boot-spl
 # May be overridden by arch/$(ARCH)/config.mk
 quiet_cmd_u-boot-spl ?= LD  $@
-- 
git-series 0.8.11
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v5 9/16] mtd: sunxi: Select the U-Boot location config option

2017-02-27 Thread Maxime Ripard
We'll need that symbol so that the default offset are defined

Signed-off-by: Maxime Ripard 
---
 drivers/mtd/nand/Kconfig | 1 +
 1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 65bb040407b2..9bcd634df59b 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -67,6 +67,7 @@ config NAND_SUNXI
bool "Support for NAND on Allwinner SoCs"
depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
select SYS_NAND_SELF_INIT
+   select SYS_NAND_U_BOOT_LOCATIONS
---help---
Enable support for NAND. This option enables the standard and
SPL drivers.
-- 
git-series 0.8.11
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v5 11/16] sunxi: Enable UBI and NAND support

2017-02-27 Thread Maxime Ripard
From: Hans de Goede 

Enable the NAND and UBI support in the configuration header so that we can
(finally) use it.

Signed-off-by: Hans de Goede 
Signed-off-by: Maxime Ripard 
---
 cmd/Kconfig| 4 
 include/configs/sunxi-common.h | 3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index 4e7c0fbcdee5..8e2a05de82ea 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -438,12 +438,14 @@ config CMD_MMC
 
 config CMD_NAND
bool "nand"
+   default y if ARCH_SUNXI
help
  NAND support.
 
 if CMD_NAND
 config CMD_NAND_TRIMFFS
bool "nand write.trimffs"
+   default y if ARCH_SUNXI
help
  Allows one to skip empty pages when flashing something on a NAND.
 
@@ -845,6 +847,7 @@ config CMD_UBI
tristate "Enable UBI - Unsorted block images commands"
select CRC32
select MTD_UBI
+   default y if ARCH_SUNXI
help
  UBI is a software layer above MTD layer which admits use of LVM-like
  logical volumes on top of MTD devices, hides some complexities of
@@ -858,6 +861,7 @@ config CMD_UBIFS
select CRC32
select RBTREE if ARCH_SUNXI
select LZO if ARCH_SUNXI
+   default y if ARCH_SUNXI
help
  UBIFS is a file system for flash devices which works on top of UBI.
 
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index b9cf315af58d..b1af756a6ac9 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -132,6 +132,9 @@
 #define CONFIG_SYS_NAND_MAX_ECCPOS 1664
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 #define CONFIG_SYS_MAX_NAND_DEVICE 8
+
+#define CONFIG_MTD_DEVICE
+#define CONFIG_MTD_PARTITIONS
 #endif
 
 #ifdef CONFIG_SPL_SPI_SUNXI
-- 
git-series 0.8.11
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v5 4/16] common: Move environment choice to Kconfig

2017-02-27 Thread Maxime Ripard
The environment location is something that might change per board
(depending on what storage options are availaible there) or depending on
the user choice (when we have several options).

Instead of hardcoding it in our configuration header, create a Kconfig
choice with the options we use for now, and the symbols that depend on it.

Once done, also remove the irrelevant sunxi defines.

Signed-off-by: Maxime Ripard 
Reviewed-by: Tom Rini 
---
 common/Kconfig | 69 +++-
 include/configs/sunxi-common.h | 14 +--
 include/environment.h  |  2 +-
 3 files changed, 74 insertions(+), 11 deletions(-)

diff --git a/common/Kconfig b/common/Kconfig
index 8f73c8f757bf..eb7bce0bc2ab 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -158,6 +158,75 @@ config SPI_BOOT
 
 endmenu
 
+menu "Environment"
+
+if ARCH_SUNXI
+
+choice
+   prompt "Environment Device"
+   default ENV_IS_IN_MMC if ARCH_SUNXI
+
+config ENV_IS_IN_MMC
+   bool "Environment in an MMC device"
+   depends on CMD_MMC
+   help
+ Define this if you have an MMC device which you want to use for the
+ environment.
+
+config ENV_IS_IN_NAND
+   bool "Environment in a NAND device"
+   depends on CMD_NAND
+   help
+ Define this if you have a NAND device which you want to use for the
+ environment.
+
+config ENV_IS_IN_UBI
+   bool "Environment in a UBI volume"
+   depends on CMD_UBI
+   depends on CMD_MTDPARTS
+   help
+ Define this if you have a UBI volume which you want to use for the
+ environment.
+
+config ENV_IS_NOWHERE
+   bool "Environment is not stored"
+   help
+ Define this if you don't want to or can't have an environment stored
+ on a storage medium
+
+endchoice
+
+config ENV_OFFSET
+   hex "Environment Offset"
+   depends on !ENV_IS_IN_UBI
+   depends on !ENV_IS_NOWHERE
+   default 0x88000 if ARCH_SUNXI
+   help
+ Offset from the start of the device (or partition)
+
+config ENV_SIZE
+   hex "Environment Size"
+   depends on !ENV_IS_NOWHERE
+   default 0x2 if ARCH_SUNXI
+   help
+ Size of the environment storage area
+
+config ENV_UBI_PART
+   string "UBI partition name"
+   depends on ENV_IS_IN_UBI
+   help
+ MTD partition containing the UBI device
+
+config ENV_UBI_VOLUME
+   string "UBI volume name"
+   depends on ENV_IS_IN_UBI
+   help
+ Name of the volume that you want to store the environment in.
+
+endif
+
+endmenu
+
 config BOOTDELAY
int "delay in seconds before automatically booting"
default 2
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 5fe886b1e193..b9cf315af58d 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -141,7 +141,9 @@
 /* mmc config */
 #ifdef CONFIG_MMC
 #define CONFIG_MMC_SUNXI_SLOT  0
-#define CONFIG_ENV_IS_IN_MMC
+#endif
+
+#if defined(CONFIG_ENV_IS_IN_MMC)
 #define CONFIG_SYS_MMC_ENV_DEV 0   /* first detected MMC 
controller */
 #define CONFIG_SYS_MMC_MAX_DEVICE  4
 #endif
@@ -172,9 +174,6 @@
 
 #define CONFIG_SYS_MONITOR_LEN (768 << 10) /* 768 KiB */
 
-#define CONFIG_ENV_OFFSET  (544 << 10) /* (8 + 24 + 512) KiB */
-#define CONFIG_ENV_SIZE(128 << 10) /* 128 KiB */
-
 #define CONFIG_FAT_WRITE   /* enable write access */
 
 #define CONFIG_SPL_FRAMEWORK
@@ -338,13 +337,6 @@ extern int soft_i2c_gpio_scl;
 #define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
 #endif
 
-#if !defined CONFIG_ENV_IS_IN_MMC && \
-!defined CONFIG_ENV_IS_IN_NAND && \
-!defined CONFIG_ENV_IS_IN_FAT && \
-!defined CONFIG_ENV_IS_IN_SPI_FLASH
-#define CONFIG_ENV_IS_NOWHERE
-#endif
-
 #define CONFIG_MISC_INIT_R
 
 #ifndef CONFIG_SPL_BUILD
diff --git a/include/environment.h b/include/environment.h
index b602e8ac46b6..6f94986c6b3e 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -8,6 +8,8 @@
 #ifndef _ENVIRONMENT_H_
 #define _ENVIRONMENT_H_
 
+#include 
+
 /**
  *
  * The "environment" is stored as a list of '\0' terminated
-- 
git-series 0.8.11
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v5 16/16] sunxi: Add support for the CHIP Pro

2017-02-27 Thread Maxime Ripard
The CHIP Pro is a SoM that features the GR8 SIP, an AXP209, a BT/WiFi chip
and a 512MiB SLC NAND.

This it's an SLC NAND, it doesn't suffer the same drawbacks than found on
the MLC NANDs, and we can enable it right away.

Signed-off-by: Maxime Ripard 
Reviewed-by: Hans de Goede 
---
 configs/CHIP_pro_defconfig | 33 +
 1 file changed, 33 insertions(+), 0 deletions(-)
 create mode 100644 configs/CHIP_pro_defconfig

diff --git a/configs/CHIP_pro_defconfig b/configs/CHIP_pro_defconfig
new file mode 100644
index ..df43e5a12d06
--- /dev/null
+++ b/configs/CHIP_pro_defconfig
@@ -0,0 +1,33 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_SPL_I2C_SUPPORT=y
+# CONFIG_SPL_MMC_SUPPORT is not set
+CONFIG_SPL_NAND_SUPPORT=y
+CONFIG_MACH_SUN5I=y
+CONFIG_DRAM_TIMINGS_DDR3_800E_1066G_1333J=y
+CONFIG_USB0_VBUS_PIN="PB10"
+CONFIG_DEFAULT_DEVICE_TREE="sun5i-gr8-chip-pro"
+CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2,SYS_NAND_BLOCK_SIZE=0x4,SYS_NAND_PAGE_SIZE=4096,SYS_NAND_OOBSIZE=256"
+CONFIG_ENV_IS_IN_UBI=y
+CONFIG_ENV_UBI_PART="UBI"
+CONFIG_ENV_UBI_VOLUME="uboot-env"
+CONFIG_SPL=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_LOADB is not set
+# CONFIG_CMD_LOADS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nand0=sunxi-nand.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=sunxi-nand.0:256k(spl),256k(spl-backup),2m(uboot),2m(uboot-backup),-(UBI)"
+# CONFIG_MMC is not set
+CONFIG_NAND_SUNXI=y
+CONFIG_AXP_ALDO3_VOLT=3300
+CONFIG_AXP_ALDO4_VOLT=3300
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_MUSB_GADGET=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_G_DNL_MANUFACTURER="Allwinner Technology"
+CONFIG_G_DNL_VENDOR_NUM=0x1f3a
+CONFIG_G_DNL_PRODUCT_NUM=0x1010
-- 
git-series 0.8.11
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v5 5/16] cmd: Add Kconfig option for CMD_MTDPARTS and related options

2017-02-27 Thread Maxime Ripard
CMD_MTDPARTS is something the user might or might not want to select, and
might depends on (or be selected by) other options too.

This is even truer for the MTDIDS_DEFAULT and MTDPARTS_DEFAULT options that
might change from one board to another, or from one user to the other,
depending on what it expects and what storage devices are available.

In order to ease that configuration, add those options to Kconfig.

Signed-off-by: Maxime Ripard 
Reviewed-by: Tom Rini 
---
 cmd/Kconfig| 20 
 cmd/mtdparts.c |  8 
 2 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index ef5315631476..0734d669dbd7 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -801,6 +801,26 @@ config CMD_FS_GENERIC
help
  Enables filesystem commands (e.g. load, ls) that work for multiple
  fs types.
+
+config CMD_MTDPARTS
+   depends on ARCH_SUNXI
+   bool "MTD partition support"
+   help
+ MTD partition support
+
+config MTDIDS_DEFAULT
+   string "Default MTD IDs"
+   depends on CMD_MTDPARTS
+   help
+ Defines a default MTD ID
+
+config MTDPARTS_DEFAULT
+   string "Default MTD partition scheme"
+   depends on CMD_MTDPARTS
+   help
+ Defines a default MTD partitioning scheme in the Linux MTD command
+ line partitions format
+
 endmenu
 
 config CMD_UBI
diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c
index b9b160dc1e2f..112bf1f3e3cd 100644
--- a/cmd/mtdparts.c
+++ b/cmd/mtdparts.c
@@ -110,11 +110,19 @@ DECLARE_GLOBAL_DATA_PTR;
 
 /* default values for mtdids and mtdparts variables */
 #if !defined(MTDIDS_DEFAULT)
+#ifdef CONFIG_MTDIDS_DEFAULT
+#define MTDIDS_DEFAULT CONFIG_MTDIDS_DEFAULT
+#else
 #define MTDIDS_DEFAULT NULL
 #endif
+#endif
 #if !defined(MTDPARTS_DEFAULT)
+#ifdef CONFIG_MTDPARTS_DEFAULT
+#define MTDPARTS_DEFAULT CONFIG_MTDPARTS_DEFAULT
+#else
 #define MTDPARTS_DEFAULT NULL
 #endif
+#endif
 #if defined(CONFIG_SYS_MTDPARTS_RUNTIME)
 extern void board_mtdparts_default(const char **mtdids, const char **mtdparts);
 #endif
-- 
git-series 0.8.11
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v5 2/16] bch: Allow to build for the host

2017-02-27 Thread Maxime Ripard
We will need the bch functions in the tool to generate the SPL images for
the Allwinner SoCs.

Do the needed adjustments so that we can use it on the host.

Signed-off-by: Maxime Ripard 
Reviewed-by: Tom Rini 
---
 lib/bch.c | 48 
 1 file changed, 48 insertions(+), 0 deletions(-)

diff --git a/lib/bch.c b/lib/bch.c
index 147715afd06a..ec53483774b5 100644
--- a/lib/bch.c
+++ b/lib/bch.c
@@ -54,10 +54,27 @@
  * finite fields GF(2^q). In Rapport de recherche INRIA no 2829, 1996.
  */
 
+#ifndef USE_HOSTCC
 #include 
 #include 
 
 #include 
+#else
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#undef cpu_to_be32
+#define cpu_to_be32 htobe32
+#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
+#define kmalloc(size, flags)   malloc(size)
+#define kzalloc(size, flags)   calloc(1, size)
+#define kfree free
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+#endif
+
 #include 
 #include 
 
@@ -95,6 +112,37 @@ struct gf_poly_deg1 {
unsigned int   c[2];
 };
 
+#ifdef USE_HOSTCC
+static int fls(int x)
+{
+   int r = 32;
+
+   if (!x)
+   return 0;
+   if (!(x & 0xu)) {
+   x <<= 16;
+   r -= 16;
+   }
+   if (!(x & 0xff00u)) {
+   x <<= 8;
+   r -= 8;
+   }
+   if (!(x & 0xf000u)) {
+   x <<= 4;
+   r -= 4;
+   }
+   if (!(x & 0xc000u)) {
+   x <<= 2;
+   r -= 2;
+   }
+   if (!(x & 0x8000u)) {
+   x <<= 1;
+   r -= 1;
+   }
+   return r;
+}
+#endif
+
 /*
  * same as encode_bch(), but process input data one byte at a time
  */
-- 
git-series 0.8.11
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v5 1/16] nand: sunxi: Fix modulo by zero error

2017-02-27 Thread Maxime Ripard
When trying to autodetect the ECC and randomization configurations, the
driver starts with a randomization disabled and no seeds.

In this case, the number of seeds is obviously 0, and the randomize boolean
is set to false.

However, the logic that retrieves the seed for a given page offset will
blindly use the number of seeds, without testing if the randomization is
enabled, basically doing a modulo by 0.

As it turns out, the libgcc in the common toolchain returns 0 here, which
was our expected value in such a case, and why we would not detect it.
However, U-Boot's libgcc will for some reason return from the function
instead, resulting in an error to load the U-Boot binary in the SPL.

Signed-off-by: Maxime Ripard 
Acked-by: Boris Brezillon 
Acked-by: Scott Wood 
---
 drivers/mtd/nand/sunxi_nand_spl.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/sunxi_nand_spl.c 
b/drivers/mtd/nand/sunxi_nand_spl.c
index 1ef7366d4c42..eed4472bdc34 100644
--- a/drivers/mtd/nand/sunxi_nand_spl.c
+++ b/drivers/mtd/nand/sunxi_nand_spl.c
@@ -245,7 +245,7 @@ static int nand_read_page(const struct nfc_config *conf, 
u32 offs,
 {
dma_addr_t dst = (dma_addr_t)dest;
int nsectors = len / conf->ecc_size;
-   u16 rand_seed;
+   u16 rand_seed = 0;
u32 val;
int page;
 
@@ -258,8 +258,9 @@ static int nand_read_page(const struct nfc_config *conf, 
u32 offs,
/* clear ecc status */
writel(0, SUNXI_NFC_BASE + NFC_ECC_ST);
 
-   /* Choose correct seed */
-   rand_seed = random_seed[page % conf->nseeds];
+   /* Choose correct seed if randomized */
+   if (conf->randomize)
+   rand_seed = random_seed[page % conf->nseeds];
 
writel((rand_seed << 16) | (conf->ecc_strength << 12) |
(conf->randomize ? NFC_ECC_RANDOM_EN : 0) |
-- 
git-series 0.8.11
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 09/10] armv8: mmu: Add a function to change mapping attributes

2017-02-27 Thread york sun
On 02/23/2017 09:54 AM, york@nxp.com wrote:
> On 02/15/2017 03:18 PM, York Sun wrote:
>> Function mmu_change_region_attr() is added to change existing mapping
>> with updated PXN, UXN and memory type. This is a break-before-make
>> process during which the mapping becomes fault (invalid) before final
>> attributres are set.
>>
>> Signed-off-by: York Sun 
>> ---
>>
>> Changes in v2: None
>>
>>  arch/arm/cpu/armv8/cache_v8.c| 72
>> +---
>>  arch/arm/include/asm/armv8/mmu.h |  5 +++
>>  arch/arm/include/asm/system.h|  1 +
>>  3 files changed, 74 insertions(+), 4 deletions(-)
>
> Guys,
>
> Are you OK with this change?
>

Guys,

I intend to merge this set if you don't have objection.

York

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


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

2017-02-27 Thread Stefano Babic
Hi Tom,

please pull from u-boot-imx, thanks !


The following changes since commit 66c246cce7c66019a93ff7105157c3e2126dd277:

  ARM: DRA7xx: Fix memory allocation overflow (2017-02-17 17:24:35 -0500)

are available in the git repository at:

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

for you to fetch changes up to dc05e47a10b11f4266e3a41df96748d486193e6d:

  tqma6: [cosmetic] sanitize environment defines (2017-02-19 17:16:51 +0100)


Andrey Yurovsky (1):
  mtd: nand: build MXS driver for MX7 as well

Markus Niebel (6):
  arm: imx6: tqma6: add configurable CMA size
  imx6: tqma6: rely on default setting for tftp and nfs
  mx6: tqma6: fix typo in env
  mx6: tqma6: add rootfsmode environment for mmc / sd
  tqma6: fix rounding in env
  tqma6: [cosmetic] sanitize environment defines

Peter Robinson (3):
  mx6sx: udoo_neo: Define the default serial console
  mx6sx: udoo_neo: use different load address for ramdisk
  mx6sx: udoo_neo: Enable distro boot options in config

 configs/udoo_neo_defconfig | 11 +--
 drivers/mtd/nand/Kconfig   |  2 +-
 include/configs/tqma6.h| 33 ++---
 include/configs/udoo_neo.h |  3 ++-
 4 files changed, 22 insertions(+), 27 deletions(-)


Best regards,
Stefano

-- 
Meet DENX at the Embedded World Trade Show
14 Mar - 16 Mar 2017, Nuremberg Trade Fair Centre, Hall 4, Booth 581
--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] ls1046ardb: SPL size reduction in case of non-xip boot

2017-02-27 Thread york sun
On 02/20/2017 04:30 AM, Sumit Garg wrote:
> Using changes in this patch we were able to reduce approx 4k
> size of u-boot-spl.bin image. Following is breif description of
> changes to reduce SPL size:
> 1. Changes in board/freescale/ls1046ardb/Makefile to remove
>compilation of eth.c and cpld.c in case of SPL build.
> 2. Changes in board/freescale/ls1046ardb/ls1046ardb.c to keep
>only ddr_init and board_early_init_f funcations in case of SPL
>build.
> 3. Changes in ls1046a_common.h & ls1046ardb.h to remove driver
>specific macros due to which static data was being compiled in
>case of SPL build.
> 4. Disable MMC driver from bieng compiled in case of SPL NAND
>build and NAND driver from bieng compiled in case of SPL MMC build.
>
> Signed-off-by: Vinitha Pillai-B57223 

Remove B57223 from the name.

> Signed-off-by: Sumit Garg 
> ---
>  board/freescale/ls1046ardb/Makefile |  4 +++-
>  board/freescale/ls1046ardb/ls1046ardb.c | 30 --
>  include/configs/ls1046a_common.h| 12 ++--
>  include/configs/ls1046ardb.h|  7 ++-
>  4 files changed, 35 insertions(+), 18 deletions(-)
>

This patch causes compiling warning for 
board/freescale/ls1046aqds/eth.c. Please fix.

York

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


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

2017-02-27 Thread Tom Rini
On Mon, Feb 27, 2017 at 06:02:18PM +0100, Stefano Babic wrote:
> On 27/02/2017 17:41, Fabio Estevam wrote:
> > Hi Stefano,
> > 
> > On Mon, Feb 27, 2017 at 10:29 AM, Stefano Babic  wrote:
> > 
> >> ok - I push it to -next, and I send my PR again after release.
> > 
> > Peter Robinson's patches are bug fixes for mx6sx udoo neo to work
> > correctly with distro config.
> > 
> > Can we get them in for 2017.03?
> > 
> > Thanks
> > 
> 
> In the tree together with Peter's there are also Markus', just fixes and
> related to tqma6. I will propose I reset my tree to
> 76cb4dbc5c1d33d1f251af2553db47d88c3e6a45, this generate a small PR as:
> 
> The following changes since commit b24cf8540a85a9bf97975aadd6a7542f166c78a3:
> 
>   video: mxsfb: Fix reset hang when videomode variable is not present
> (2017-02-22 21:47:59 +0100)
> 
> are available in the git repository at:
> 
>   git://www.denx.de/git/u-boot-imx.git
> 76cb4dbc5c1d33d1f251af2553db47d88c3e6a45
> 
> for you to fetch changes up to 76cb4dbc5c1d33d1f251af2553db47d88c3e6a45:
> 
>   Merge branch 'master' of git://git.denx.de/u-boot (2017-02-25 18:52:37
> +0100)
> 
> 
> Andrey Yurovsky (1):
>   mtd: nand: build MXS driver for MX7 as well
> 
> Markus Niebel (6):
>   arm: imx6: tqma6: add configurable CMA size
>   imx6: tqma6: rely on default setting for tftp and nfs
>   mx6: tqma6: fix typo in env
>   mx6: tqma6: add rootfsmode environment for mmc / sd
>   tqma6: fix rounding in env
>   tqma6: [cosmetic] sanitize environment defines
> 
> Peter Robinson (3):
>   mx6sx: udoo_neo: Define the default serial console
>   mx6sx: udoo_neo: use different load address for ramdisk
>   mx6sx: udoo_neo: Enable distro boot options in config
> 
> Stefano Babic (1):
>   Merge branch 'master' of git://git.denx.de/u-boot
> 
> 
> Tom, should this ok ?

Drop the merge commit and then yes, looks reasonable, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH] ls1043ardb: SPL size reduction in case of non-xip boot

2017-02-27 Thread york sun
On 02/20/2017 03:18 AM, Sumit Garg wrote:
> Using changes in this patch we were able to reduce approx 10k
> size of u-boot-spl.bin image. Following is breif description of
> changes to reduce SPL size:
> 1. Changes in board/freescale/ls1043ardb/Makefile to remove
>compilation of eth.c and cpld.c in case of SPL build.
> 2. Changes in board/freescale/ls1043ardb/ls1043ardb.c to keep
>only ddr_init and board_early_init_f funcations in case of SPL
>build.
> 3. Changes in ls1043a_common.h & ls1043ardb.h to remove driver
>specific macros due to which static data was being compiled in
>case of SPL build.
> 4. Disable MMC driver from bieng compiled in case of SPL NAND
>build and NAND driver from bieng compiled in case of SPL MMC build.
> 5. Remove I2C driver support from SPL in case of LS1043ARDB.
>
> Signed-off-by: Vinitha Pillai-B57223 

Remove the B57223 from the name, unless you really want it.

> Signed-off-by: Sumit Garg 
> ---
>  board/freescale/ls1043ardb/Makefile |  4 +++-
>  board/freescale/ls1043ardb/ls1043ardb.c | 32 ++--
>  configs/ls1043ardb_sdcard_defconfig |  1 -
>  include/configs/ls1043a_common.h| 14 --
>  include/configs/ls1043ardb.h|  6 ++
>  5 files changed, 39 insertions(+), 18 deletions(-)

This patch cause compiling warning for board/freescale/ls1043aqds/eth.c. 
Please fix.

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


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

2017-02-27 Thread Stefano Babic
On 27/02/2017 17:41, Fabio Estevam wrote:
> Hi Stefano,
> 
> On Mon, Feb 27, 2017 at 10:29 AM, Stefano Babic  wrote:
> 
>> ok - I push it to -next, and I send my PR again after release.
> 
> Peter Robinson's patches are bug fixes for mx6sx udoo neo to work
> correctly with distro config.
> 
> Can we get them in for 2017.03?
> 
> Thanks
> 

In the tree together with Peter's there are also Markus', just fixes and
related to tqma6. I will propose I reset my tree to
76cb4dbc5c1d33d1f251af2553db47d88c3e6a45, this generate a small PR as:

The following changes since commit b24cf8540a85a9bf97975aadd6a7542f166c78a3:

  video: mxsfb: Fix reset hang when videomode variable is not present
(2017-02-22 21:47:59 +0100)

are available in the git repository at:

  git://www.denx.de/git/u-boot-imx.git
76cb4dbc5c1d33d1f251af2553db47d88c3e6a45

for you to fetch changes up to 76cb4dbc5c1d33d1f251af2553db47d88c3e6a45:

  Merge branch 'master' of git://git.denx.de/u-boot (2017-02-25 18:52:37
+0100)


Andrey Yurovsky (1):
  mtd: nand: build MXS driver for MX7 as well

Markus Niebel (6):
  arm: imx6: tqma6: add configurable CMA size
  imx6: tqma6: rely on default setting for tftp and nfs
  mx6: tqma6: fix typo in env
  mx6: tqma6: add rootfsmode environment for mmc / sd
  tqma6: fix rounding in env
  tqma6: [cosmetic] sanitize environment defines

Peter Robinson (3):
  mx6sx: udoo_neo: Define the default serial console
  mx6sx: udoo_neo: use different load address for ramdisk
  mx6sx: udoo_neo: Enable distro boot options in config

Stefano Babic (1):
  Merge branch 'master' of git://git.denx.de/u-boot


Tom, should this ok ?

Stefano

-- 
Meet DENX at the Embedded World Trade Show
14 Mar - 16 Mar 2017, Nuremberg Trade Fair Centre, Hall 4, Booth 581
--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


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

2017-02-27 Thread Fabio Estevam
Hi Stefano,

On Mon, Feb 27, 2017 at 10:29 AM, Stefano Babic  wrote:

> ok - I push it to -next, and I send my PR again after release.

Peter Robinson's patches are bug fixes for mx6sx udoo neo to work
correctly with distro config.

Can we get them in for 2017.03?

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


Re: [U-Boot] [PATCH] binman: Explicitly request python2 instead of python from env

2017-02-27 Thread Tom Rini
On Wed, Feb 22, 2017 at 10:25:38AM -0500, Tom Rini wrote:
> On Thu, Feb 23, 2017 at 12:25:48AM +1100, Jonathan Gray wrote:
> > On Mon, Feb 20, 2017 at 07:41:34PM +0100, Paul Kocialkowski wrote:
> > > We now live in a world where python cannot be assumed to be python2.
> > > As a matter of fact, it is no longer the default for python on many
> > > GNU/Linux distributions.
> > > 
> > > Running binman with python3 fails, so explicitly request python2 from
> > > env in the shebang for running it.
> > 
> > On other systems such as OpenBSD the binary is python2.7 not python2
> > or python.  Though there isn't really a way to handle this with
> > how u-boot builds as I understand it (besides local patches).
> 
> I thought, but could be wrong, that "python2" was the canonical way name
> for the python 2.x binary.

So, I looked harder at this and found
https://www.python.org/dev/peps/pep-0394/ which in sum, to me says it is
more reasonable to expect 'python2' to exist than it is to expect that
'python2.7' exists (but is also possibly getting out of date as it
sounds like more than just Arch sets python to python3).

That said, I also found issues that note that OSX (and as you note,
OpenBSD) do not do python2 but rather python2.7 and that the "best"
overall solution is to make the code compatible with python 2 and
python 3 so that 'python' is still the correct thing to look for.

My inclination for this release is to keep the current behavior and hope
that for the next release someone has the time to make binman python2
and python3 compatible.  We do this today with 'patman' but that tool is
more optional than binman is and we certainly have the case today where
patman will fail if the user doesn't have the "future" package installed
in python.  I almost wonder if making binman python3-only would be
easier.

-- 
Tom


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


Re: [U-Boot] [PATCH v4 4/7] arm: am57xx: cl-som-am57x: invoke clock API to enable/disable clocks

2017-02-27 Thread Roger Quadros
Hi,

On 26/02/17 14:27, Marek Vasut wrote:
> On 02/23/2017 02:39 PM, Uri Mashiach wrote:
>> Invoke enable_usb_clocks during board_usb_init and disable_usb_clocks
>> during board_usb_exit to enable and disable clocks respectively.
>>
>> Modifications:
>> * Enable USB clocks in the OMAP version of the function
>>   board_usb_init.
>> * Disable USB clocks in the OMAP version of the function
>>   board_usb_cleanup.
>>
>> Cc: Marek Vasut 
>> Signed-off-by: Uri Mashiach 
>> Reviewed-by: Marek Vasut 
>> Reviewed-by: Tom Rini 
>> ---
>> V1 -> V4: none
>>
>>  board/compulab/cl-som-am57x/cl-som-am57x.c | 10 --
>>  drivers/usb/host/xhci-omap.c   |  2 ++
>>  2 files changed, 2 insertions(+), 10 deletions(-)
>>
>> diff --git a/board/compulab/cl-som-am57x/cl-som-am57x.c 
>> b/board/compulab/cl-som-am57x/cl-som-am57x.c
>> index fe1468f..4701b71 100644
>> --- a/board/compulab/cl-som-am57x/cl-som-am57x.c
>> +++ b/board/compulab/cl-som-am57x/cl-som-am57x.c
>> @@ -53,16 +53,6 @@ int board_mmc_init(bd_t *bis)
>>  }
>>  #endif /* CONFIG_GENERIC_MMC */
>>  
>> -#ifdef CONFIG_USB_XHCI_OMAP
>> -int omap_xhci_board_usb_init(int index, enum usb_init_type init)
>> -{
>> -setbits_le32((*prcm)->cm_l3init_usb_otg_ss1_clkctrl,
>> - OTG_SS_CLKCTRL_MODULEMODE_HW | OPTFCLKEN_REFCLK960M);
>> -
>> -return 0;
>> -}
>> -#endif /* CONFIG_USB_XHCI_OMAP */
>> -
>>  int misc_init_r(void)
>>  {
>>  cl_print_pcb_info();
>> diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c
>> index a1b4f2f..d6c5744 100644
>> --- a/drivers/usb/host/xhci-omap.c
>> +++ b/drivers/usb/host/xhci-omap.c
>> @@ -29,6 +29,7 @@ static struct omap_xhci omap;
>>  
>>  __weak int omap_xhci_board_usb_init(int index, enum usb_init_type init)
>>  {
>> +enable_usb_clocks(index);
> 
> How many OMAP boards will this break btw ? :)

Why do you think this would break OMAP boards?

> 
>>  return 0;
>>  }
>>  
>> @@ -39,6 +40,7 @@ int board_usb_init(int index, enum usb_init_type init)
>>  
>>  __weak int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init)
>>  {
>> +disable_usb_clocks(index);
>>  return 0;
>>  }
>>  
>>
> 
> 

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


Re: [U-Boot] [PATCH v4 3/7] usb: host: xhci-omap: fix double weak board_usb_init functions

2017-02-27 Thread Roger Quadros
Hi,

On 23/02/17 15:39, Uri Mashiach wrote:
> A weak version of the function board_usb_init is implemented in:
> common/usb.c
> drivers/usb/host/xhci-omap.c
> 
> To fix the double implementations:
> * Convert the board_usb_init function in drivers/usb/host/xhci-omap.c
>   normal (not weak).
> * The function board_usb_init in drivers/usb/host/xhci-omap.c calls to
>   the weak function omap_xhci_board_usb_init.
> * Rename board version of the function board_usb_init to
>   omap_xhci_board_usb_init.
>   Done only for boards that defines CONFIG_USB_XHCI_OMAP.
> 
> To achieve the same flexibility with the function board_usb_cleanup:
> * Add a normal (not weak) implementation of the function
>   board_usb_cleanup in drivers/usb/host/xhci-omap.c
> * The function board_usb_cleanup in drivers/usb/host/xhci-omap.c calls
>   to the weak function omap_xhci_board_usb_cleanup.
> * Rename board version of the function board_usb_cleanup to
>   omap_xhci_board_usb_cleanup.
>   Done only for boards that defines CONFIG_USB_XHCI_OMAP.
> 
> Cc: Lokesh Vutla 
> Signed-off-by: Uri Mashiach 
> Acked-by: Marek Vasut 
> Reviewed-by: Tom Rini 
> ---
> V1 -> V2: Use __weak instead of attribute block
> V2 -> V4: none
> 
>  board/compulab/cl-som-am57x/cl-som-am57x.c |  2 +-
>  board/ti/am43xx/board.c|  4 ++--
>  board/ti/am57xx/board.c|  4 ++--
>  board/ti/dra7xx/evm.c  |  4 ++--
>  drivers/usb/host/xhci-omap.c   | 17 +++--

What about board/ti/omap5_uevm/evm.c ?

>  5 files changed, 22 insertions(+), 9 deletions(-)
> 
> diff --git a/board/compulab/cl-som-am57x/cl-som-am57x.c 
> b/board/compulab/cl-som-am57x/cl-som-am57x.c
> index bdd0a2b..fe1468f 100644
> --- a/board/compulab/cl-som-am57x/cl-som-am57x.c
> +++ b/board/compulab/cl-som-am57x/cl-som-am57x.c
> @@ -54,7 +54,7 @@ int board_mmc_init(bd_t *bis)
>  #endif /* CONFIG_GENERIC_MMC */
>  
>  #ifdef CONFIG_USB_XHCI_OMAP
> -int board_usb_init(int index, enum usb_init_type init)
> +int omap_xhci_board_usb_init(int index, enum usb_init_type init)
>  {
>   setbits_le32((*prcm)->cm_l3init_usb_otg_ss1_clkctrl,
>OTG_SS_CLKCTRL_MODULEMODE_HW | OPTFCLKEN_REFCLK960M);
> diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
> index 390cc16..2572029 100644
> --- a/board/ti/am43xx/board.c
> +++ b/board/ti/am43xx/board.c
> @@ -694,7 +694,7 @@ int usb_gadget_handle_interrupts(int index)
>  #endif /* CONFIG_USB_DWC3 */
>  
>  #if defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP)
> -int board_usb_init(int index, enum usb_init_type init)
> +int omap_xhci_board_usb_init(int index, enum usb_init_type init)
>  {
>   enable_usb_clocks(index);
>  #ifdef CONFIG_USB_DWC3
> @@ -725,7 +725,7 @@ int board_usb_init(int index, enum usb_init_type init)
>   return 0;
>  }
>  
> -int board_usb_cleanup(int index, enum usb_init_type init)
> +int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init)
>  {
>  #ifdef CONFIG_USB_DWC3
>   switch (index) {
> diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
> index 1611514..4afa914 100644
> --- a/board/ti/am57xx/board.c
> +++ b/board/ti/am57xx/board.c
> @@ -618,7 +618,7 @@ int usb_gadget_handle_interrupts(int index)
>  #endif /* CONFIG_USB_DWC3 */
>  
>  #if defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP)
> -int board_usb_init(int index, enum usb_init_type init)
> +int omap_xhci_board_usb_init(int index, enum usb_init_type init)
>  {
>   enable_usb_clocks(index);
>   switch (index) {
> @@ -652,7 +652,7 @@ int board_usb_init(int index, enum usb_init_type init)
>   return 0;
>  }
>  
> -int board_usb_cleanup(int index, enum usb_init_type init)
> +int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init)
>  {
>  #ifdef CONFIG_USB_DWC3
>   switch (index) {
> diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
> index bd1c809..65bce93 100644
> --- a/board/ti/dra7xx/evm.c
> +++ b/board/ti/dra7xx/evm.c
> @@ -727,7 +727,7 @@ static struct ti_usb_phy_device usb_phy2_device = {
>   .index = 1,
>  };
>  
> -int board_usb_init(int index, enum usb_init_type init)
> +int omap_xhci_board_usb_init(int index, enum usb_init_type init)
>  {
>   enable_usb_clocks(index);
>   switch (index) {
> @@ -764,7 +764,7 @@ int board_usb_init(int index, enum usb_init_type init)
>   return 0;
>  }
>  
> -int board_usb_cleanup(int index, enum usb_init_type init)
> +int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init)
>  {
>   switch (index) {
>   case 0:
> diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c
> index b881b19..a1b4f2f 100644
> --- a/drivers/usb/host/xhci-omap.c
> +++ b/drivers/usb/host/xhci-omap.c
> @@ -27,12 +27,25 @@ DECLARE_GLOBAL_DATA_PTR;
>  
>  static struct omap_xhci omap;
>  
> -__weak int __board_usb_init(int index, enum usb_init_type init)
> 

[U-Boot] [PATCH v2] serial: Add serial driver for Intel MID

2017-02-27 Thread Andy Shevchenko
Add a specific serial driver for Intel MID platforms.

It has special fractional divider which can be programmed via UART_PS,
UART_MUL, and UART_DIV registers.

The UART clock is calculated as

UART clock = XTAL * UART_MUL / UART_DIV

The baudrate is calculated as

baud rate = UART clock / UART_PS / DLAB

Initialize fractional divider correctly for Intel Edison platform.

For backward compatibility we have to set initial DLAB value to 16
and speed to 115200 baud, where initial frequency is 29491200Hz, and
XTAL frequency is 38.4MHz.

Signed-off-by: Andy Shevchenko 
---
 drivers/serial/Kconfig  |  9 ++
 drivers/serial/Makefile |  1 +
 drivers/serial/serial_mid.c | 71 +
 3 files changed, 81 insertions(+)
 create mode 100644 drivers/serial/serial_mid.c

diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index b11f3ff89e..1fb5a7b17d 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -398,6 +398,15 @@ config MESON_SERIAL
  If you have an Amlogic Meson based board and want to use the on-chip
  serial ports, say Y to this option. If unsure, say N.
 
+config MID_SERIAL
+   bool "Intel MID platform UART support"
+   depends on DM_SERIAL && OF_CONTROL
+   select SYS_NS16550
+   help
+ Select this to enable a UART for Intel MID platforms.
+ This uses the ns16550 driver as a library which is selected by
+ default.
+
 config MSM_SERIAL
bool "Qualcomm on-chip UART"
depends on DM_SERIAL
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index 8430668bf9..61535212aa 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -28,6 +28,7 @@ obj-$(CONFIG_S5P) += serial_s5p.o
 obj-$(CONFIG_MXC_UART) += serial_mxc.o
 obj-$(CONFIG_PXA_SERIAL) += serial_pxa.o
 obj-$(CONFIG_MESON_SERIAL) += serial_meson.o
+obj-$(CONFIG_MID_SERIAL) += serial_mid.o
 ifdef CONFIG_SPL_BUILD
 obj-$(CONFIG_ROCKCHIP_SERIAL) += serial_rockchip.o
 endif
diff --git a/drivers/serial/serial_mid.c b/drivers/serial/serial_mid.c
new file mode 100644
index 00..eb91ffc7d4
--- /dev/null
+++ b/drivers/serial/serial_mid.c
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/*
+ * The UART clock is calculated as
+ *
+ * UART clock = XTAL * UART_MUL / UART_DIV
+ *
+ * The baudrate is calculated as
+ *
+ * baud rate = UART clock / UART_PS / DLAB
+ */
+#define UART_PS0x30
+#define UART_MUL   0x34
+#define UART_DIV   0x38
+
+static void mid_writel(struct ns16550_platdata *plat, int offset, int value)
+{
+   unsigned char *addr;
+
+   offset *= 1 << plat->reg_shift;
+   addr = (unsigned char *)plat->base + offset;
+
+   writel(value, addr + plat->reg_offset);
+}
+
+static int mid_serial_probe(struct udevice *dev)
+{
+   struct ns16550_platdata *plat = dev_get_platdata(dev);
+
+   /*
+* Initialize fractional divider correctly for Intel Edison
+* platform.
+*
+* For backward compatibility we have to set initial DLAB value
+* to 16 and speed to 115200 baud, where initial frequency is
+* 29491200Hz, and XTAL frequency is 38.4MHz.
+*/
+   mid_writel(plat, UART_MUL, 96);
+   mid_writel(plat, UART_DIV, 125);
+   mid_writel(plat, UART_PS, 16);
+
+   return ns16550_serial_probe(dev);
+}
+
+static const struct udevice_id mid_serial_ids[] = {
+   { .compatible = "intel,mid-uart" },
+   {}
+};
+
+U_BOOT_DRIVER(mid_uart) = {
+   .name   = "mid_uart",
+   .id = UCLASS_SERIAL,
+   .of_match = mid_serial_ids,
+   .ofdata_to_platdata = ns16550_serial_ofdata_to_platdata,
+   .platdata_auto_alloc_size = sizeof(struct ns16550_platdata),
+   .priv_auto_alloc_size = sizeof(struct NS16550),
+   .probe  = mid_serial_probe,
+   .ops= _serial_ops,
+   .flags  = DM_FLAG_PRE_RELOC,
+};
-- 
2.11.0

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


Re: [U-Boot] [PATCH v4 2/7] arm: usb: dra7xx: xHCI registers based on USB port index

2017-02-27 Thread Roger Quadros
On 23/02/17 15:39, Uri Mashiach wrote:
> Modify the determination of the base address of xHCI registers of DRA7XX
> targets.
> Before the commit: by the target.
> After the commit: by the USB port index.
> 
> Cc: Lokesh Vutla 
> Cc: Marek Vasut 
> Cc: Roger Quadros 
> Signed-off-by: Uri Mashiach 

Reviewed-by: Roger Quadros 

> ---
> V1 -> V2: Replace the commit "fix XHCI registers base address".
> V2 -> V3: Replace the commit "reintroduce the CONFIG_AM57XX symbol"
> V3 -> V4: Replace boolean symbols USB_XHCI_DRA7XX_INDEX0 and 
> USB_XHCI_DRA7XX_INDEX1 with
> integer symbol USB_XHCI_DRA7XX_INDEX.
> 
>  configs/dra7xx_evm_defconfig| 1 +
>  configs/dra7xx_hs_evm_defconfig | 1 +
>  drivers/usb/host/Kconfig| 9 +
>  include/linux/usb/xhci-omap.h   | 6 --
>  4 files changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
> index 26b26cc..05f7778 100644
> --- a/configs/dra7xx_evm_defconfig
> +++ b/configs/dra7xx_evm_defconfig
> @@ -86,6 +86,7 @@ CONFIG_OMAP_TIMER=y
>  CONFIG_USB=y
>  CONFIG_USB_XHCI_HCD=y
>  CONFIG_USB_XHCI_DWC3=y
> +CONFIG_USB_XHCI_DRA7XX_INDEX=1
>  CONFIG_USB_DWC3=y
>  CONFIG_USB_DWC3_GADGET=y
>  CONFIG_USB_DWC3_OMAP=y
> diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig
> index 244940c..23ae2c7 100644
> --- a/configs/dra7xx_hs_evm_defconfig
> +++ b/configs/dra7xx_hs_evm_defconfig
> @@ -91,6 +91,7 @@ CONFIG_OMAP_TIMER=y
>  CONFIG_USB=y
>  CONFIG_USB_XHCI_HCD=y
>  CONFIG_USB_XHCI_DWC3=y
> +CONFIG_USB_XHCI_DRA7XX_INDEX=1
>  CONFIG_USB_DWC3=y
>  CONFIG_USB_DWC3_GADGET=y
>  CONFIG_USB_DWC3_OMAP=y
> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
> index 5129a57..3ff79fc 100644
> --- a/drivers/usb/host/Kconfig
> +++ b/drivers/usb/host/Kconfig
> @@ -43,6 +43,15 @@ config USB_XHCI_ZYNQMP
>   help
> Enables support for the on-chip xHCI controller on Xilinx ZynqMP SoCs.
>  
> +config USB_XHCI_DRA7XX_INDEX
> + int "DRA7XX xHCI USB index"
> + range 0 1
> + default 0
> + depends on DRA7XX
> + help
> +   Select the DRA7XX xHCI USB index.
> +   Current supported values: 0, 1.
> +
>  endif # USB_XHCI_HCD
>  
>  config USB_EHCI_HCD
> diff --git a/include/linux/usb/xhci-omap.h b/include/linux/usb/xhci-omap.h
> index 9de80d7..f038ddb 100644
> --- a/include/linux/usb/xhci-omap.h
> +++ b/include/linux/usb/xhci-omap.h
> @@ -10,14 +10,16 @@
>  #ifndef _ASM_ARCH_XHCI_OMAP_H_
>  #define _ASM_ARCH_XHCI_OMAP_H_
>  
> -#ifdef CONFIG_TARGET_DRA7XX_EVM
> +#ifdef CONFIG_DRA7XX
> +#if CONFIG_USB_XHCI_DRA7XX_INDEX == 1
>  #define OMAP_XHCI_BASE 0x488d
>  #define OMAP_OCP1_SCP_BASE 0x4A081000
>  #define OMAP_OTG_WRAPPER_BASE 0x488c
> -#elif defined CONFIG_TARGET_AM57XX_EVM
> +#elif CONFIG_USB_XHCI_DRA7XX_INDEX == 0
>  #define OMAP_XHCI_BASE 0x4889
>  #define OMAP_OCP1_SCP_BASE 0x4A084c00
>  #define OMAP_OTG_WRAPPER_BASE 0x4888
> +#endif /* CONFIG_USB_XHCI_DRA7XX_INDEX == 1 */
>  #elif defined CONFIG_AM43XX
>  #define OMAP_XHCI_BASE 0x483d
>  #define OMAP_OCP1_SCP_BASE 0x483E8000
> 

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


[U-Boot] Mailing list moved

2017-02-27 Thread Wolfgang Denk
Hi all,

hopefully unnoticed by anyone, we moved the mailing list to a new
(faster, bigger, better) server.  As far as we can tell, operation
continues unchanged except for the fact that, when accessing the web
interface for administration tasks, the "mailman" part of the URL
was removed (but I think this affects only the moderators, and
nobody else).

There is a slight chance that one or two messages did not make it
into the list archive.  If you notice any such problem, please let
me know which message this was (ideally by telling me the respective
message-id), and we will take care of it.

Also, if you notice any problems, please do not hesitate to contact
me.

Thanks!


Best regards,

Wolfgang Denk

-- 
Meet DENX at the Embedded World Trade Show
14 Mar - 16 Mar 2017, Nuremberg Trade Fair Centre, Hall 4, Booth 581 
-- 
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
A supercomputer is a machine that runs an endless loop in 2 seconds.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 15/20] drivers: Makefile: include fpga build in SPL

2017-02-27 Thread Michal Simek
On 25.2.2017 22:44, Marek Vasut wrote:
> On 02/22/2017 10:47 AM, Ley Foon Tan wrote:
>> Arria 10 SPL needs the drivers/fpga.
>>
>> Signed-off-by: Tien Fong Chee 
>> Signed-off-by: Ley Foon Tan 
>> ---
>>  drivers/Makefile | 1 +
> 
> +CC Michal and Moritz, they did some FPGA/SPL work too.
> 
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/Makefile b/drivers/Makefile
>> index 34c55bf..6e7a2c3 100644
>> --- a/drivers/Makefile
>> +++ b/drivers/Makefile
>> @@ -47,6 +47,7 @@ obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/
>>  obj-$(CONFIG_SPL_SATA_SUPPORT) += block/
>>  obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += block/
>>  obj-$(CONFIG_SPL_MMC_SUPPORT) += block/
>> +obj-$(CONFIG_FPGA) += fpga/
>>  endif
>>  
>>  ifdef CONFIG_TPL_BUILD
>>
> 
> 

I prefer if you can separate these fpga stuff out of this huge series.
This patch doesn't make sense without content.

I can't see that code which requires this.
The biggest questions here are where are you calling fpga code and where
are you taking bitstream from?

Thanks,
Michal


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


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

2017-02-27 Thread Peter Robinson
On Mon, Feb 27, 2017 at 1:29 PM, Stefano Babic  wrote:
> On 27/02/2017 14:22, Tom Rini wrote:
>> On Mon, Feb 27, 2017 at 10:12:59AM +0100, Stefano Babic wrote:
>>> Hi Tom,
>>>
>>> please pull from u-boot-imx, thanks !
>>>
>>> The following changes since commit b24cf8540a85a9bf97975aadd6a7542f166c78a3:
>>>
>>>   video: mxsfb: Fix reset hang when videomode variable is not present
>>> (2017-02-22 21:47:59 +0100)
>>>
>>> are available in the git repository at:
>>>
>>>   git://www.denx.de/git/u-boot-imx.git master
>>>
>>> for you to fetch changes up to 60a38e423b21a897b8fa0d9376d9370ea915ddd8:
>>>
>>>   i.MX6Q: isiot: Switch the mmc env based on devno (2017-02-26 13:00:22
>>> +0100)
>>>
>>> 
>
>>
>> This is too much too close to the release window, sorry.
>>
>
> ok - I push it to -next, and I send my PR again after release.

Maybe do a more focuses -fixes PR?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] travis-ci: Temporarily disable using a newer device tree compiler

2017-02-27 Thread Tom Rini
On Sun, Feb 26, 2017 at 11:52:21PM -0600, Robert Nelson wrote:
> On Sun, Feb 26, 2017 at 11:29 PM, Heiko Schocher  wrote:
> > Hello Robert,
> >
> > Am 27.02.2017 um 05:34 schrieb Robert Nelson:
> >>
> >> On Sun, Feb 26, 2017 at 7:37 PM, Tom Rini  wrote:
> >>>
> >>> On Sun, Feb 26, 2017 at 08:01:19PM -0500, Tom Rini wrote:
> >>>
>  For a long while dtc has warned about various constructs.  This is now
>  leading to log file size being exceeded in travis, and as the majority
>  of these errors need to be fixed in the kernel, switch to using the
>  stock device-tree-compiler package.
> 
>  Signed-off-by: Tom Rini 
> >>>
> >>>
> >>> Applied to u-boot/master, thanks!
> >>>
> >>> But I'm not happy to have to apply it, either.  I do not wish to break
> >>> travis-ci, but sun7i is now exceeding the allowed stdout size.  And
> >>> these are problems that need to be fixed in the kernel first, rather
> >>> than here first.  The patches to fix u-boot local issues (such as x86
> >>> never got picked up either, but likely need to be respun.  I expect that
> >>> once the new DTC version is tagged and populated upstream in the kernel
> >>> as well, we will be able to re-enable the changes we had here.
> >>
> >>
> >> This was fixed (aka a hidden bandaid) in the linux kernel via:
> >>
> >>
> >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/scripts/Makefile.lib?id=bc553986a2f7c56d0de811485d5312ea29692d5d
> >
> >
> > Heh... IIRC, I tried to fix a lot of this messages (in U-Boot), around
> > a year ago, and we decided to not apply them in u-boot, instead they
> > should go away via kernel resyncs, when the warnings are fixed in the
> > kernel!
> >
> > Also I think, I tried a similiar approach as the commit you mentioned...
> > Ah, yes, here:
> > http://lists.denx.de/pipermail/u-boot/2016-April/252408.html
> >
> > We decided (for u-boot) it would be better to fix the problems and
> > not supress the warning, but it seems, the problems get not really fixed
> > in the kernel ...
> >
> > I wasn;t aware of the above patch in the kernel... thanks for pointing!
> 
> and i think by moving the kernel to disable that patch, it's slowed
> down the number of register fix patches..
> 
> ps, this just came in on kbuild list just a few minutes ago:
> 
> https://marc.info/?l=linux-kbuild=148817429929267=2
> 
> one of the issues with bc553986a2f7c56d0de811485d5312ea29692d5d is
> that it breaks the build with older version of dtc that don't know
> what to do with the -Wno-unit_address_vs_reg flag..

Coalescing things back in to one thread, yes, for the next release, we
should switch over to key'ing the warning based on
KBUILD_ENABLE_EXTRA_GCC_CHECKS and only once the patch to conditionally
pass the flag in question is possible as well.  Thanks all!

-- 
Tom


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


[U-Boot] Please pull u-boot-video/master

2017-02-27 Thread Anatolij Gustschin
Hi Tom,

please pull two bug fixes for -rc3. Thanks!

The following changes since commit a0f3e3df4adc451bf56159c0672e570f9c934ee8:

  travis-ci: Temporarily disable using a newer device tree compiler (2017-02-26 
15:25:30 -0500)

are available in the git repository at:

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

for you to fetch changes up to 94412745cd4339f8f6fa7be5f3b460fde65eff85:

  rockchip: video: fix 8350 clock mistake in rockchip HDMI (2017-02-27 
16:10:45 +0100)


Jonathan Golder (1):
  splash: Prevent splash_load_fs from writing to 0x0

Nickey Yang Nickey Yang (1):
  rockchip: video: fix 8350 clock mistake in rockchip HDMI

 common/splash_source.c   | 3 ++-
 drivers/video/rockchip/rk_hdmi.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

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


Re: [U-Boot] [PATCH] arm: mach-omap2: Flush cache after FIT post-processing image

2017-02-27 Thread Tom Rini
On Wed, Feb 22, 2017 at 05:46:39PM -0600, Andrew F. Davis wrote:

> After we authenticate/decrypt an image we need to flush the caches
> as they may still contain bits of the encrypted image. This will
> cause failures if we attempt to jump to this image.
> 
> Reported-by: Yogesh Siraswar
> 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/listinfo/u-boot


Re: [U-Boot] [RESEND PATCH 6/9] doc: Updates info on using Keystone2 secure devices

2017-02-27 Thread Tom Rini
On Fri, Feb 24, 2017 at 06:59:43AM -0600, Andrew F. Davis wrote:

> From: Madan Srinivas 
> 
> Add a section describing the secure boot image used on
> Keystone2 secure devices.
> 
> Signed-off-by: Madan Srinivas 
> 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/listinfo/u-boot


Re: [U-Boot] [RESEND PATCH 8/9] defconfig: k2e_hs_evm: Add k2e_hs_evm_defconfig

2017-02-27 Thread Tom Rini
On Fri, Feb 24, 2017 at 06:59:45AM -0600, Andrew F. Davis wrote:

> From: Vitaly Andrianov 
> 
> TI K2E secure devices have to be built with TI_SECURE_DEVICE, FIT, and
> FIT_IMAGE_POST_PROCESS enabled. Add a dedicated defconfig for this.
> 
> Signed-off-by: Vitaly Andrianov 
> Signed-off-by: Madan Srinivas 
> Signed-off-by: Andrew F. Davis 
> ---
>  configs/k2e_hs_evm_defconfig | 51 
> 
>  1 file changed, 51 insertions(+)
>  create mode 100644 configs/k2e_hs_evm_defconfig
> 
> diff --git a/configs/k2e_hs_evm_defconfig b/configs/k2e_hs_evm_defconfig
> new file mode 100644
> index 00..d515cedaca
> --- /dev/null
> +++ b/configs/k2e_hs_evm_defconfig
> @@ -0,0 +1,51 @@
> +CONFIG_ARM=y
> +CONFIG_ARCH_KEYSTONE=y
> +CONFIG_SYS_TEXT_BASE=0x0c60
> +CONFIG_TARGET_K2E_EVM=y
> +CONFIG_TI_SECURE_DEVICE=y
> +CONFIG_DEFAULT_DEVICE_TREE="keystone-k2e-evm"
> +CONFIG_FIT=y
> +CONFIG_FIT_IMAGE_POST_PROCESS=y
> +CONFIG_OF_BOARD_SETUP=y
> +CONFIG_SYS_CONSOLE_INFO_QUIET=y
> +CONFIG_VERSION_VARIABLE=y
> +CONFIG_HUSH_PARSER=y
> +CONFIG_SYS_PROMPT="K2E HS EVM # "
> +CONFIG_CMD_BOOTZ=y
> +# CONFIG_CMD_IMLS is not set
> +CONFIG_CMD_ASKENV=y
> +# CONFIG_CMD_FLASH is not set
> +CONFIG_CMD_NAND=y
> +CONFIG_CMD_PART=y
> +CONFIG_CMD_SF=y
> +CONFIG_CMD_SPI=y
> +CONFIG_CMD_I2C=y
> +CONFIG_CMD_USB=y
> +# CONFIG_CMD_SETEXPR is not set
> +CONFIG_CMD_DHCP=y
> +CONFIG_CMD_MII=y
> +CONFIG_CMD_PING=y
> +CONFIG_CMD_EXT2=y
> +CONFIG_CMD_EXT4=y
> +CONFIG_CMD_EXT4_WRITE=y
> +CONFIG_CMD_FAT=y
> +CONFIG_CMD_FS_GENERIC=y
> +CONFIG_CMD_UBI=y
> +CONFIG_ISO_PARTITION=y
> +CONFIG_EFI_PARTITION=y
> +CONFIG_OF_CONTROL=y
> +CONFIG_NET_RANDOM_ETHADDR=y
> +CONFIG_DM=y
> +CONFIG_TI_AEMIF=y
> +# CONFIG_MMC is not set
> +CONFIG_DM_SPI_FLASH=y
> +CONFIG_SPI_FLASH=y
> +CONFIG_SPI_FLASH_STMICRO=y
> +CONFIG_DM_ETH=y
> +CONFIG_DM_SERIAL=y
> +CONFIG_SYS_NS16550=y
> +CONFIG_DM_SPI=y
> +CONFIG_USB=y
> +CONFIG_USB_XHCI_HCD=y
> +CONFIG_USB_XHCI_DWC3=y
> +CONFIG_USB_STORAGE=y

This shows a number of the will-be-problems like the AM43/AM33 devices
have.  More things need to be select'd and imply'd so that the _hs_
variant defconfigs do not get out of sync easily and often.

-- 
Tom


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


Re: [U-Boot] [PATCH v4 3/3] configs: am43xx_evm: Enable SPL_DM

2017-02-27 Thread Tom Rini
On Tue, Feb 21, 2017 at 11:40:44AM +0530, Lokesh Vutla wrote:

> Enable SPL_DM on all AM43xx based platforms
> 
> Reviewed-by: Tom Rini 
> Signed-off-by: Lokesh Vutla 

Reviewed-by: Tom Rini 

-- 
Tom


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


Re: [U-Boot] [RESEND PATCH 3/9] arm: mach-omap2: Enable Kconfig support for K2 HS devices

2017-02-27 Thread Tom Rini
On Fri, Feb 24, 2017 at 06:59:40AM -0600, Andrew F. Davis wrote:

> From: Vitaly Andrianov 
> 
> Like the OMAP54xx, AM43xx, & AM33xx family SoCs, the keystone family
> of SoCs also have high security enabled models. Allow K2E devices to
> be built with HS Device Type Support.
> 
> Signed-off-by: Vitaly Andrianov 
> Signed-off-by: Madan Srinivas 
> 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/listinfo/u-boot


Re: [U-Boot] [RESEND PATCH 9/9] defconfig: k2hk_hs_evm: Add k2hk_hs_evm_defconfig

2017-02-27 Thread Tom Rini
On Fri, Feb 24, 2017 at 06:59:46AM -0600, Andrew F. Davis wrote:

> TI K2HK secure devices have to be built with TI_SECURE_DEVICE, FIT, and
> FIT_IMAGE_POST_PROCESS enabled. Add a dedicated defconfig for this.
> 
> Signed-off-by: Andrew F. Davis 
> ---
>  configs/k2hk_hs_evm_defconfig | 51 
> +++
>  1 file changed, 51 insertions(+)
>  create mode 100644 configs/k2hk_hs_evm_defconfig

Same comments as 8/9, thanks!

> 
> diff --git a/configs/k2hk_hs_evm_defconfig b/configs/k2hk_hs_evm_defconfig
> new file mode 100644
> index 00..9fe91ea19c
> --- /dev/null
> +++ b/configs/k2hk_hs_evm_defconfig
> @@ -0,0 +1,51 @@
> +CONFIG_ARM=y
> +CONFIG_ARCH_KEYSTONE=y
> +CONFIG_SYS_TEXT_BASE=0x0c60
> +CONFIG_TARGET_K2HK_EVM=y
> +CONFIG_TI_SECURE_DEVICE=y
> +CONFIG_DEFAULT_DEVICE_TREE="keystone-k2hk-evm"
> +CONFIG_FIT=y
> +CONFIG_FIT_IMAGE_POST_PROCESS=y
> +CONFIG_OF_BOARD_SETUP=y
> +CONFIG_SYS_CONSOLE_INFO_QUIET=y
> +CONFIG_VERSION_VARIABLE=y
> +CONFIG_HUSH_PARSER=y
> +CONFIG_SYS_PROMPT="K2HK EVM # "
> +CONFIG_CMD_BOOTZ=y
> +# CONFIG_CMD_IMLS is not set
> +CONFIG_CMD_ASKENV=y
> +# CONFIG_CMD_FLASH is not set
> +CONFIG_CMD_NAND=y
> +CONFIG_CMD_PART=y
> +CONFIG_CMD_SF=y
> +CONFIG_CMD_SPI=y
> +CONFIG_CMD_I2C=y
> +CONFIG_CMD_USB=y
> +# CONFIG_CMD_SETEXPR is not set
> +CONFIG_CMD_DHCP=y
> +CONFIG_CMD_MII=y
> +CONFIG_CMD_PING=y
> +CONFIG_CMD_EXT2=y
> +CONFIG_CMD_EXT4=y
> +CONFIG_CMD_EXT4_WRITE=y
> +CONFIG_CMD_FAT=y
> +CONFIG_CMD_FS_GENERIC=y
> +CONFIG_CMD_UBI=y
> +CONFIG_ISO_PARTITION=y
> +CONFIG_EFI_PARTITION=y
> +CONFIG_OF_CONTROL=y
> +CONFIG_NET_RANDOM_ETHADDR=y
> +CONFIG_DM=y
> +CONFIG_TI_AEMIF=y
> +# CONFIG_MMC is not set
> +CONFIG_DM_SPI_FLASH=y
> +CONFIG_SPI_FLASH=y
> +CONFIG_SPI_FLASH_STMICRO=y
> +CONFIG_DM_ETH=y
> +CONFIG_DM_SERIAL=y
> +CONFIG_SYS_NS16550=y
> +CONFIG_DM_SPI=y
> +CONFIG_USB=y
> +CONFIG_USB_XHCI_HCD=y
> +CONFIG_USB_XHCI_DWC3=y
> +CONFIG_USB_STORAGE=y
> -- 
> 2.11.0
> 

-- 
Tom


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


Re: [U-Boot] [RESEND PATCH 5/9] ARM: Keystone2: Build secure images for K2

2017-02-27 Thread Tom Rini
On Fri, Feb 24, 2017 at 06:59:42AM -0600, Andrew F. Davis wrote:

> From: Madan Srinivas 
> 
> Adds an additional image type needed for supporting secure keystone
> devices. The build generates u-boot_HS_MLO which can be used to boot
> from all media on secure keystone devices.
> 
> Signed-off-by: Madan Srinivas 
> 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/listinfo/u-boot


Re: [U-Boot] [RESEND PATCH 7/9] Kconfig: Adds SYS_TEXT_BASE config option for Keystone2

2017-02-27 Thread Tom Rini
On Fri, Feb 24, 2017 at 06:59:44AM -0600, Andrew F. Davis wrote:

> From: Madan Srinivas 
> 
> This patch makes SYS_TEXT_BASE a config option for Keystone2
> so that it can be used to load u-boot at different addresses
> on secure and non-secure Keystone2 devices.
> 
> Signed-off-by: Madan Srinivas 
> 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/listinfo/u-boot


Re: [U-Boot] [RESEND PATCH 4/9] arm: mach-omap2: Add secure image name common to OMAP and keystone

2017-02-27 Thread Tom Rini
On Fri, Feb 24, 2017 at 06:59:41AM -0600, Andrew F. Davis wrote:

> From: Madan Srinivas 
> 
> As K2 can directly boot U-Boot, add u-boot_HS_MLO as the secure image
> name for secure K2 devices, for all boot modes other than SPI flash.
> 
> Signed-off-by: Madan Srinivas 
> 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/listinfo/u-boot


Re: [U-Boot] [RESEND PATCH 2/9] arm: mach-keystone: Implements FIT post-processing call for keystone SoCs

2017-02-27 Thread Tom Rini
On Fri, Feb 24, 2017 at 06:59:39AM -0600, Andrew F. Davis wrote:

> From: Vitaly Andrianov 
> 
> This commit implements the board_fit_image_post_process() function for
> the keystone architecture. This function calls into the secure boot
> monitor for secure authentication/decryption of the image. All needed
> work is handled by the boot monitor and, depending on the keystone
> platform, the security functions may be offloaded to other secure
> processing elements in the SoC.
> 
> The boot monitor acts as the gateway to these secure functions and the
> boot monitor for secure devices is available as part of the SECDEV
> package for KS2. For more details refer doc/README.ti-secure
> 
> Signed-off-by: Vitaly Andrianov 
> Signed-off-by: Madan Srinivas 
> 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/listinfo/u-boot


Re: [U-Boot] [PATCH] rockchip: video: fix 83500000 clock mistake in rockchip HDMI

2017-02-27 Thread Anatolij Gustschin
On Mon, 27 Feb 2017 17:04:21 +0800
Nickey Yang nickey.y...@rock-chips.com wrote:

> There is one "0" too many in 8350 mpixelclock in rockchip_mpll_cfg[].
> fix it.
> 
> Signed-off-by: Nickey Yang 
> ---
>  drivers/video/rockchip/rk_hdmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied to u-boot-video/master, thanks!

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


Re: [U-Boot] [PATCH] splash: Prevent splash_load_fs from writing to 0x0

2017-02-27 Thread Anatolij Gustschin
On Fri, 24 Feb 2017 17:46:10 +0100
Jonathan Golder jonathan.gol...@kurz-elektronik.de wrote:

> Passing NULL to fs_read() for actread value results in hanging U-Boot
> at least on our ARM plattform (TI AM335x). Since fs_read() and
> following functions do not catch nullpointers, writing to 0x0 occurs.
> 
> Passing a local dummy var instead of NULL solves this issue.
> 
> Signed-off-by: Jonathan Golder 
> Cc: Anatolij Gustschin 
> ---
>  common/splash_source.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

applied to u-boot-video/master, thanks!

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


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

2017-02-27 Thread Simon Glass
Hi Tom,

On 26 February 2017 at 18:39, Tom Rini  wrote:
>
> On Thu, Feb 23, 2017 at 09:42:57AM -0700, Simon Glass wrote:
>
> > Hi Tom,
> >
> > This includes support for two SoCs that have been in the works for a while:
> > rk3188 from Heiko Stübner and and SPL for rk3399 from Kever Yang. For the
> > former there are a few more patches to come but I'll apply them in a few
> > days once I've had time to test. In addition this includes rk3328 also from
> > Kever which is based on the rk3399 work. I've decided to bring this in also
> > as the impact is minimal.
> >
> > There are a few bugs in mainline affecting rockchip which I'd like to fix
> > for the release also. But I want to take a bit more time to really
> > understand the problem before applying anything. Hopefully I will have
> > those early next week. I'm sending this pull request now as I feel
> > uncomfortable having so many pending patches.
> >
> >
> > The following changes since commit b24cf8540a85a9bf97975aadd6a7542f166c78a3:
> >
> >   video: mxsfb: Fix reset hang when videomode variable is not present
> > (2017-02-22 21:47:59 +0100)
> >
> > are available in the git repository at:
> >
> >   git://git.denx.de/u-boot-rockchip.git
> >
> > for you to fetch changes up to 984fe3b08c8fcc61253965c88f882411ad8c78ec:
> >
> >   rockchip: rk3288: add defconfig for evb-rk3328 (2017-02-23 09:17:59 -0700)
> >
> > 
> > Eddie Cai (1):
> >   rockchip: tinker: configs: use correct mmc instance as boot target
> > device
> >
> > Heiko Stübner (18):
> >   dm: allow limiting pre-reloc markings to spl or tpl
> >   rockchip: clk: rk3288: limit gpll and cpll init to SPL build
> >   rockchip: rk3288: sdram: use constants in ddrconf table
> >   rockchip: rk3288: sdram: style fixes from rk3188 sdram review
> >   rockchip: Move bootrom helper compilation to a hidden option
> >   rockchip: Move bootrom-related declarations to a header
> >   rockchip: mkimage: Allow encoding of loader code in spl images
> >   rockchip: mkimage: Add support rk3188 serial
> >   rockchip: serial: Adapt rockchip of-platdata driver for rk3188
> >   rockchip: rk3188: Add header files for PMU and GRF
> >   rockchip: rk3188: Add pinctrl driver
> >   rockchip: rk3188: Add sysreset driver
> >   rockchip: rk3188: Add rk3066/rk3188 clock bindings
> >   rockchip: rk3188: Add clock driver
> >   rockchip: rk3188: Add core devicetree files
> >   rockchip: rk3188: Add core support
> >   rockchip: rk3188: Add sdram driver
> >   rockchip: rk3188: Add main, spl and tpl boards
> >
> > Jacob Chen (1):
> >   rockchip: firefly: configs: remove config_spl_of_platdata
> >
> > Kever Yang (16):
> >   rockchip: arm64: rk3399: move grf register definitions to grf_rk3399.h
> >   rockchip: clk: rk3399: update driver for spl
> >   rockchip: sdhci: rk3399: update driver to support of-platdata
> >   rockchip: pinctrl: rk3399: add the of-platdata support
> >   rockchip: arm64: rk3399: syscon addition for rk3399
> >   rockchip: arm64: rk3399: add ddr controller driver
> >   rockchip: dts: rk3399: update for spl require driver
> >   rockchip: arm64: rk3399: add SPL support
> >   rockchip: config: rk3399: enable SPL config for evb-rk3399
> >   rockchip: rk3328: add device tree file
> >   rockchip: rk3328: add soc basic support
> >   rockchip: rk3328: add clock driver
> >   rockchip: rk3328: add pinctrl driver
> >   rockchip: rk3328: add sysreset driver
> >   rockchip: rk3328: add evb-rk3328 support
> >   rockchip: rk3288: add defconfig for evb-rk3328
> >
> >  arch/arm/dts/Makefile  |1 +
> >  arch/arm/dts/rk3188.dtsi   |  601
> > ++
> >  arch/arm/dts/rk3328-evb.dts|   45 +
> >  arch/arm/dts/rk3328.dtsi   | 1477
> > +
> >  arch/arm/dts/rk3399-evb.dts|2 +
> >  arch/arm/dts/rk3399-sdram-lpddr3-4GB-1600.dtsi | 1536
> > +++
> >  arch/arm/dts/rk3399.dtsi   |   44 +
> >  arch/arm/dts/rk3xxx.dtsi   |  417 ++
> >  arch/arm/include/asm/arch-rockchip/bootrom.h   |   22 +
> >  arch/arm/include/asm/arch-rockchip/clock.h |9 +
> >  arch/arm/include/asm/arch-rockchip/cru_rk3188.h|  191 +
> >  arch/arm/include/asm/arch-rockchip/cru_rk3328.h|   70 ++
> >  arch/arm/include/asm/arch-rockchip/cru_rk3399.h|5 +
> >  arch/arm/include/asm/arch-rockchip/ddr_rk3188.h|   25 +
> >  arch/arm/include/asm/arch-rockchip/ddr_rk3288.h|8 +
> >  arch/arm/include/asm/arch-rockchip/grf_rk3188.h|  589
> > ++
> >  

Re: [U-Boot] [PATCH v4 00/15] i.MX6: Engicam i.CoreM6/Is.IoT eMMC boot support

2017-02-27 Thread Jagan Teki
Can you try export DTC from this repo if you haven't tried.

git://jdl.com/software/dtc.git


On Feb 27, 2017 8:17 PM, "Sébastien Szymanski" <
sebastien.szyman...@armadeus.com> wrote:

On 02/27/2017 03:38 PM, Jagan Teki wrote:
> On Monday 27 February 2017 07:58 PM, Sébastien Szymanski wrote:
>> Hello,
>>
>> On 02/26/2017 12:54 PM, Stefano Babic wrote:
>>> On 24/02/2017 11:15, Jagan Teki wrote:
 From: Jagan Teki 

 Changes for v3:
 - Rebase on master
 - Fix checkpatch.pl Warnings
 - Add IMX6_BMODE_UART macro for uart bootmode
 - Remove value assignment in enum, since all enum list is order

 Changes for v3:
 - Update IMX6_BMODE_* shift macros with real number instead of bitops
 - %s/IMX6_BMODE_SERIAL/IMX6_BMODE_SERIAL_ROM
 - Assign enums with numbers so-that it can easy to see same in RM
 - Update board MAINTAINERS file with imx6ul-isiot-emmc.dts file

 Changes for v2:
 - Rebase on master
 - Add Is.IoT eMMC boot patches
 - Add few mmc env patches on board

 Jagan Teki (15):
   imx6: Add imx6_src_get_boot_mode
   imx: spl: Update NAND bootmode detection bit
   imx: Use IMX6_BMODE_* macros instead of numericals
   imx6: Add src_base structure define macro
   imx6: isiotmx6ul: Update SPL board boot order for eMMC
   i.MX6UL: isiot: Add eMMC boot support
   i.MX6UL: isiot: Add modeboot env via board_late_init
   i.MX6UL: isiot: Add mmc_late_init
   i.MX6UL: isiot: Switch the mmc env based on devno
   arm: dts: imx6qdl-icore-rqs: Add eMMC node
   imx6: icorem6_rqs: Update SPL board boot order for eMMC
   imx6: icorem6_rqs: Add eMMC boot support
   i.MX6Q: icorem6_rqs: Add modeboot env via board_late_init
   i.MX6Q: icorem6_rqs: Add mmc_late_init
   i.MX6Q: isiot: Switch the mmc env based on devno

  arch/arm/dts/Makefile   |   1 +
  arch/arm/dts/imx6qdl-icore-rqs.dtsi |  22 ++
  arch/arm/dts/imx6ul-isiot-emmc.dts  |  77
 +
  arch/arm/imx-common/init.c  |  10 +++
  arch/arm/imx-common/spl.c   |  49 --
  arch/arm/include/asm/arch-mx6/imx-regs.h|   2 +
  arch/arm/include/asm/imx-common/sys_proto.h |  47 +
  board/engicam/icorem6_rqs/icorem6_rqs.c |  96
 +-
  board/engicam/isiotmx6ul/MAINTAINERS|   2 +
  board/engicam/isiotmx6ul/isiotmx6ul.c   | 101
 +++-
  configs/imx6dl_icore_rqs_mmc_defconfig  |   1 +
  configs/imx6q_icore_rqs_mmc_defconfig   |   1 +
  configs/imx6ul_isiot_emmc_defconfig |  40 +++
  configs/imx6ul_isiot_mmc_defconfig  |   1 +
  configs/imx6ul_isiot_nand_defconfig |   1 +
  include/configs/imx6qdl_icore_rqs.h |  36 +-
  include/configs/imx6ul_isiot.h  |  40 +--
  17 files changed, 462 insertions(+), 65 deletions(-)
  create mode 100644 arch/arm/dts/imx6ul-isiot-emmc.dts
  create mode 100644 configs/imx6ul_isiot_emmc_defconfig

>>>
>>> Applied to u-boot-imx, thanks !
>>
>> The dts files fail to build:
>>
>> Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error
>> FATAL ERROR: Unable to parse input tree
>> scripts/Makefile.lib:322: recipe for target
>> 'arch/arm/dts/imx6ul-isiot-mmc.dtb' failed
>> make[2]: *** [arch/arm/dts/imx6ul-isiot-mmc.dtb] Error 1
>> make[2]: *** Waiting for unfinished jobs
>> Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error
>> FATAL ERROR: Unable to parse input tree
>> scripts/Makefile.lib:322: recipe for target
>> 'arch/arm/dts/imx6ul-isiot-emmc.dtb' failed
>> make[2]: *** [arch/arm/dts/imx6ul-isiot-emmc.dtb] Error 1
>> Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error
>> FATAL ERROR: Unable to parse input tree
>> scripts/Makefile.lib:322: recipe for target
>> 'arch/arm/dts/imx6ul-isiot-nand.dtb' failed
>> make[2]: *** [arch/arm/dts/imx6ul-isiot-nand.dtb] Error 1
>> dts/Makefile:36: recipe for target 'arch-dtbs' failed
>> make[1]: *** [arch-dtbs] Error 2
>> Makefile:860: recipe for target 'dts/dt.dtb' failed
>> make: *** [dts/dt.dtb] Error 2
>>
>> I think that's because there is '/dts-v1/;' in the imx6ul-isiot.dtsi
>> file and in imx6ul-isiot-*.dts files.
>
> What is the dtc version used? mine with
>
> dtc  -v
> Version: DTC 1.4.2-gdaa75e8f
>
> No build issues.
>

I was using:

dtc -v
Version: DTC 1.4.1

With DTC.1.4.2, no build issues.

Thanks !

> thanks!


--
Sébastien Szymanski
Software Engineer, Armadeus Systems
sebastien.szyman...@armadeus.com
Tel: +33 (0)9 72 29 41 44
Fax: +33 (0)9 72 28 79 26
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de

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

2017-02-27 Thread Tom Rini
On Mon, Feb 27, 2017 at 07:51:38PM +0530, Jagan Teki wrote:
> Hi Tom,
> 
> Please pull this PR.
> 
> thanks!
> Jagan
> 
> The following changes since commit b24cf8540a85a9bf97975aadd6a7542f166c78a3:
> 
>   video: mxsfb: Fix reset hang when videomode variable is not present 
> (2017-02-22 21:47:59 +0100)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-sunxi.git master
> 
> for you to fetch changes up to 35affe7698e95c058a1f6c7eb2e1bf35f82461c9:
> 
>   sunxi: add NanoPi NEO Air defconfig (2017-02-25 13:54:15 +0530)
> 
> 
> Andre Przywara (12):
>   sunxi: fix ACTLR.SMP assembly routine
>   ARM: rename CONFIG_TIMER_CLK_FREQ to COUNTER_FREQUENCY
>   fsl: ls102x: remove redundant GENERIC_TIMER_CLK
>   sunxi: simplify ACTLR.SMP bit set #ifdef
>   sunxi: configs: merge sun9i and sun50i SPL memory definitions
>   sunxi: Kconfig: introduce CONFIG_SUNXI_HIGH_SRAM
>   sunxi: provide ARMv8 mem_map for every ARM64 board
>   SPI: SPL: sunxi: fix 64-bit build
>   sunxi: DRAM: add Allwinner H5 support
>   sunxi: prepare for sharing MACH_SUN8I_H3 config symbol
>   sunxi: introduce Allwinner H5 config option
>   sunxi: Add OrangePi PC 2 initial support
> 
> Jelle van der Waa (1):
>   sunxi: add NanoPi NEO Air defconfig

So today is -rc3 day.  Which of the above are bug fixes, rather than new
functionality?  Thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v4 00/15] i.MX6: Engicam i.CoreM6/Is.IoT eMMC boot support

2017-02-27 Thread Sébastien Szymanski
On 02/27/2017 03:38 PM, Jagan Teki wrote:
> On Monday 27 February 2017 07:58 PM, Sébastien Szymanski wrote:
>> Hello,
>>
>> On 02/26/2017 12:54 PM, Stefano Babic wrote:
>>> On 24/02/2017 11:15, Jagan Teki wrote:
 From: Jagan Teki 

 Changes for v3:
 - Rebase on master
 - Fix checkpatch.pl Warnings
 - Add IMX6_BMODE_UART macro for uart bootmode
 - Remove value assignment in enum, since all enum list is order

 Changes for v3:
 - Update IMX6_BMODE_* shift macros with real number instead of bitops
 - %s/IMX6_BMODE_SERIAL/IMX6_BMODE_SERIAL_ROM
 - Assign enums with numbers so-that it can easy to see same in RM
 - Update board MAINTAINERS file with imx6ul-isiot-emmc.dts file

 Changes for v2:
 - Rebase on master
 - Add Is.IoT eMMC boot patches
 - Add few mmc env patches on board

 Jagan Teki (15):
   imx6: Add imx6_src_get_boot_mode
   imx: spl: Update NAND bootmode detection bit
   imx: Use IMX6_BMODE_* macros instead of numericals
   imx6: Add src_base structure define macro
   imx6: isiotmx6ul: Update SPL board boot order for eMMC
   i.MX6UL: isiot: Add eMMC boot support
   i.MX6UL: isiot: Add modeboot env via board_late_init
   i.MX6UL: isiot: Add mmc_late_init
   i.MX6UL: isiot: Switch the mmc env based on devno
   arm: dts: imx6qdl-icore-rqs: Add eMMC node
   imx6: icorem6_rqs: Update SPL board boot order for eMMC
   imx6: icorem6_rqs: Add eMMC boot support
   i.MX6Q: icorem6_rqs: Add modeboot env via board_late_init
   i.MX6Q: icorem6_rqs: Add mmc_late_init
   i.MX6Q: isiot: Switch the mmc env based on devno

  arch/arm/dts/Makefile   |   1 +
  arch/arm/dts/imx6qdl-icore-rqs.dtsi |  22 ++
  arch/arm/dts/imx6ul-isiot-emmc.dts  |  77
 +
  arch/arm/imx-common/init.c  |  10 +++
  arch/arm/imx-common/spl.c   |  49 --
  arch/arm/include/asm/arch-mx6/imx-regs.h|   2 +
  arch/arm/include/asm/imx-common/sys_proto.h |  47 +
  board/engicam/icorem6_rqs/icorem6_rqs.c |  96
 +-
  board/engicam/isiotmx6ul/MAINTAINERS|   2 +
  board/engicam/isiotmx6ul/isiotmx6ul.c   | 101
 +++-
  configs/imx6dl_icore_rqs_mmc_defconfig  |   1 +
  configs/imx6q_icore_rqs_mmc_defconfig   |   1 +
  configs/imx6ul_isiot_emmc_defconfig |  40 +++
  configs/imx6ul_isiot_mmc_defconfig  |   1 +
  configs/imx6ul_isiot_nand_defconfig |   1 +
  include/configs/imx6qdl_icore_rqs.h |  36 +-
  include/configs/imx6ul_isiot.h  |  40 +--
  17 files changed, 462 insertions(+), 65 deletions(-)
  create mode 100644 arch/arm/dts/imx6ul-isiot-emmc.dts
  create mode 100644 configs/imx6ul_isiot_emmc_defconfig

>>>
>>> Applied to u-boot-imx, thanks !
>>
>> The dts files fail to build:
>>
>> Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error
>> FATAL ERROR: Unable to parse input tree
>> scripts/Makefile.lib:322: recipe for target
>> 'arch/arm/dts/imx6ul-isiot-mmc.dtb' failed
>> make[2]: *** [arch/arm/dts/imx6ul-isiot-mmc.dtb] Error 1
>> make[2]: *** Waiting for unfinished jobs
>> Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error
>> FATAL ERROR: Unable to parse input tree
>> scripts/Makefile.lib:322: recipe for target
>> 'arch/arm/dts/imx6ul-isiot-emmc.dtb' failed
>> make[2]: *** [arch/arm/dts/imx6ul-isiot-emmc.dtb] Error 1
>> Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error
>> FATAL ERROR: Unable to parse input tree
>> scripts/Makefile.lib:322: recipe for target
>> 'arch/arm/dts/imx6ul-isiot-nand.dtb' failed
>> make[2]: *** [arch/arm/dts/imx6ul-isiot-nand.dtb] Error 1
>> dts/Makefile:36: recipe for target 'arch-dtbs' failed
>> make[1]: *** [arch-dtbs] Error 2
>> Makefile:860: recipe for target 'dts/dt.dtb' failed
>> make: *** [dts/dt.dtb] Error 2
>>
>> I think that's because there is '/dts-v1/;' in the imx6ul-isiot.dtsi
>> file and in imx6ul-isiot-*.dts files.
> 
> What is the dtc version used? mine with
> 
> dtc  -v
> Version: DTC 1.4.2-gdaa75e8f
> 
> No build issues.
>

I was using:

dtc -v
Version: DTC 1.4.1

With DTC.1.4.2, no build issues.

Thanks !

> thanks!


-- 
Sébastien Szymanski
Software Engineer, Armadeus Systems
sebastien.szyman...@armadeus.com
Tel: +33 (0)9 72 29 41 44
Fax: +33 (0)9 72 28 79 26
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v4 00/15] i.MX6: Engicam i.CoreM6/Is.IoT eMMC boot support

2017-02-27 Thread Stefano Babic
Hi Sebastien,

On 27/02/2017 15:28, Sébastien Szymanski wrote:
> Hello,
> 
> On 02/26/2017 12:54 PM, Stefano Babic wrote:
>> On 24/02/2017 11:15, Jagan Teki wrote:
>>> From: Jagan Teki 
>>>
>>> Changes for v3:
>>> - Rebase on master
>>> - Fix checkpatch.pl Warnings
>>> - Add IMX6_BMODE_UART macro for uart bootmode
>>> - Remove value assignment in enum, since all enum list is order
>>>
>>> Changes for v3:
>>> - Update IMX6_BMODE_* shift macros with real number instead of bitops
>>> - %s/IMX6_BMODE_SERIAL/IMX6_BMODE_SERIAL_ROM
>>> - Assign enums with numbers so-that it can easy to see same in RM
>>> - Update board MAINTAINERS file with imx6ul-isiot-emmc.dts file
>>>
>>> Changes for v2:
>>> - Rebase on master
>>> - Add Is.IoT eMMC boot patches
>>> - Add few mmc env patches on board
>>>
>>> Jagan Teki (15):
>>>   imx6: Add imx6_src_get_boot_mode
>>>   imx: spl: Update NAND bootmode detection bit
>>>   imx: Use IMX6_BMODE_* macros instead of numericals
>>>   imx6: Add src_base structure define macro
>>>   imx6: isiotmx6ul: Update SPL board boot order for eMMC
>>>   i.MX6UL: isiot: Add eMMC boot support
>>>   i.MX6UL: isiot: Add modeboot env via board_late_init
>>>   i.MX6UL: isiot: Add mmc_late_init
>>>   i.MX6UL: isiot: Switch the mmc env based on devno
>>>   arm: dts: imx6qdl-icore-rqs: Add eMMC node
>>>   imx6: icorem6_rqs: Update SPL board boot order for eMMC
>>>   imx6: icorem6_rqs: Add eMMC boot support
>>>   i.MX6Q: icorem6_rqs: Add modeboot env via board_late_init
>>>   i.MX6Q: icorem6_rqs: Add mmc_late_init
>>>   i.MX6Q: isiot: Switch the mmc env based on devno
>>>
>>>  arch/arm/dts/Makefile   |   1 +
>>>  arch/arm/dts/imx6qdl-icore-rqs.dtsi |  22 ++
>>>  arch/arm/dts/imx6ul-isiot-emmc.dts  |  77 +
>>>  arch/arm/imx-common/init.c  |  10 +++
>>>  arch/arm/imx-common/spl.c   |  49 --
>>>  arch/arm/include/asm/arch-mx6/imx-regs.h|   2 +
>>>  arch/arm/include/asm/imx-common/sys_proto.h |  47 +
>>>  board/engicam/icorem6_rqs/icorem6_rqs.c |  96 
>>> +-
>>>  board/engicam/isiotmx6ul/MAINTAINERS|   2 +
>>>  board/engicam/isiotmx6ul/isiotmx6ul.c   | 101 
>>> +++-
>>>  configs/imx6dl_icore_rqs_mmc_defconfig  |   1 +
>>>  configs/imx6q_icore_rqs_mmc_defconfig   |   1 +
>>>  configs/imx6ul_isiot_emmc_defconfig |  40 +++
>>>  configs/imx6ul_isiot_mmc_defconfig  |   1 +
>>>  configs/imx6ul_isiot_nand_defconfig |   1 +
>>>  include/configs/imx6qdl_icore_rqs.h |  36 +-
>>>  include/configs/imx6ul_isiot.h  |  40 +--
>>>  17 files changed, 462 insertions(+), 65 deletions(-)
>>>  create mode 100644 arch/arm/dts/imx6ul-isiot-emmc.dts
>>>  create mode 100644 configs/imx6ul_isiot_emmc_defconfig
>>>
>>
>> Applied to u-boot-imx, thanks !
> 
> The dts files fail to build:
> 
> Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error
> FATAL ERROR: Unable to parse input tree
> scripts/Makefile.lib:322: recipe for target
> 'arch/arm/dts/imx6ul-isiot-mmc.dtb' failed
> make[2]: *** [arch/arm/dts/imx6ul-isiot-mmc.dtb] Error 1
> make[2]: *** Waiting for unfinished jobs
> Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error
> FATAL ERROR: Unable to parse input tree
> scripts/Makefile.lib:322: recipe for target
> 'arch/arm/dts/imx6ul-isiot-emmc.dtb' failed
> make[2]: *** [arch/arm/dts/imx6ul-isiot-emmc.dtb] Error 1
> Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error
> FATAL ERROR: Unable to parse input tree
> scripts/Makefile.lib:322: recipe for target
> 'arch/arm/dts/imx6ul-isiot-nand.dtb' failed
> make[2]: *** [arch/arm/dts/imx6ul-isiot-nand.dtb] Error 1
> dts/Makefile:36: recipe for target 'arch-dtbs' failed
> make[1]: *** [arch-dtbs] Error 2
> Makefile:860: recipe for target 'dts/dt.dtb' failed
> make: *** [dts/dt.dtb] Error 2
> 
> I think that's because there is '/dts-v1/;' in the imx6ul-isiot.dtsi
> file and in imx6ul-isiot-*.dts files.
> 

I cannot confirm this - maybe this depends on dtc compiler. With current
DTC from git, everything is compiled.

> With this change:
> 
> diff --git a/arch/arm/dts/imx6ul-isiot.dtsi b/arch/arm/dts/imx6ul-isiot.dtsi
> index 346079a..9a3c35c 100644
> --- a/arch/arm/dts/imx6ul-isiot.dtsi
> +++ b/arch/arm/dts/imx6ul-isiot.dtsi
> @@ -40,8 +40,6 @@
>   * OTHER DEALINGS IN THE SOFTWARE.
>   */
> 
> -/dts-v1/;

Anyway, this entry is common to mopst (or all) DTS file. Try simply to
grep, and you see that all DTS have it.

Best regards,
Stefano Babic


-- 
Meet DENX at the Embedded World Trade Show
14 Mar - 16 Mar 2017, Nuremberg Trade Fair Centre, Hall 4, Booth 581
--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: 

Re: [U-Boot] [PATCH v4 00/15] i.MX6: Engicam i.CoreM6/Is.IoT eMMC boot support

2017-02-27 Thread Jagan Teki

On Monday 27 February 2017 07:58 PM, Sébastien Szymanski wrote:

Hello,

On 02/26/2017 12:54 PM, Stefano Babic wrote:

On 24/02/2017 11:15, Jagan Teki wrote:

From: Jagan Teki 

Changes for v3:
- Rebase on master
- Fix checkpatch.pl Warnings
- Add IMX6_BMODE_UART macro for uart bootmode
- Remove value assignment in enum, since all enum list is order

Changes for v3:
- Update IMX6_BMODE_* shift macros with real number instead of bitops
- %s/IMX6_BMODE_SERIAL/IMX6_BMODE_SERIAL_ROM
- Assign enums with numbers so-that it can easy to see same in RM
- Update board MAINTAINERS file with imx6ul-isiot-emmc.dts file

Changes for v2:
- Rebase on master
- Add Is.IoT eMMC boot patches
- Add few mmc env patches on board

Jagan Teki (15):
  imx6: Add imx6_src_get_boot_mode
  imx: spl: Update NAND bootmode detection bit
  imx: Use IMX6_BMODE_* macros instead of numericals
  imx6: Add src_base structure define macro
  imx6: isiotmx6ul: Update SPL board boot order for eMMC
  i.MX6UL: isiot: Add eMMC boot support
  i.MX6UL: isiot: Add modeboot env via board_late_init
  i.MX6UL: isiot: Add mmc_late_init
  i.MX6UL: isiot: Switch the mmc env based on devno
  arm: dts: imx6qdl-icore-rqs: Add eMMC node
  imx6: icorem6_rqs: Update SPL board boot order for eMMC
  imx6: icorem6_rqs: Add eMMC boot support
  i.MX6Q: icorem6_rqs: Add modeboot env via board_late_init
  i.MX6Q: icorem6_rqs: Add mmc_late_init
  i.MX6Q: isiot: Switch the mmc env based on devno

 arch/arm/dts/Makefile   |   1 +
 arch/arm/dts/imx6qdl-icore-rqs.dtsi |  22 ++
 arch/arm/dts/imx6ul-isiot-emmc.dts  |  77 +
 arch/arm/imx-common/init.c  |  10 +++
 arch/arm/imx-common/spl.c   |  49 --
 arch/arm/include/asm/arch-mx6/imx-regs.h|   2 +
 arch/arm/include/asm/imx-common/sys_proto.h |  47 +
 board/engicam/icorem6_rqs/icorem6_rqs.c |  96 +-
 board/engicam/isiotmx6ul/MAINTAINERS|   2 +
 board/engicam/isiotmx6ul/isiotmx6ul.c   | 101 +++-
 configs/imx6dl_icore_rqs_mmc_defconfig  |   1 +
 configs/imx6q_icore_rqs_mmc_defconfig   |   1 +
 configs/imx6ul_isiot_emmc_defconfig |  40 +++
 configs/imx6ul_isiot_mmc_defconfig  |   1 +
 configs/imx6ul_isiot_nand_defconfig |   1 +
 include/configs/imx6qdl_icore_rqs.h |  36 +-
 include/configs/imx6ul_isiot.h  |  40 +--
 17 files changed, 462 insertions(+), 65 deletions(-)
 create mode 100644 arch/arm/dts/imx6ul-isiot-emmc.dts
 create mode 100644 configs/imx6ul_isiot_emmc_defconfig



Applied to u-boot-imx, thanks !


The dts files fail to build:

Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:322: recipe for target
'arch/arm/dts/imx6ul-isiot-mmc.dtb' failed
make[2]: *** [arch/arm/dts/imx6ul-isiot-mmc.dtb] Error 1
make[2]: *** Waiting for unfinished jobs
Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:322: recipe for target
'arch/arm/dts/imx6ul-isiot-emmc.dtb' failed
make[2]: *** [arch/arm/dts/imx6ul-isiot-emmc.dtb] Error 1
Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:322: recipe for target
'arch/arm/dts/imx6ul-isiot-nand.dtb' failed
make[2]: *** [arch/arm/dts/imx6ul-isiot-nand.dtb] Error 1
dts/Makefile:36: recipe for target 'arch-dtbs' failed
make[1]: *** [arch-dtbs] Error 2
Makefile:860: recipe for target 'dts/dt.dtb' failed
make: *** [dts/dt.dtb] Error 2

I think that's because there is '/dts-v1/;' in the imx6ul-isiot.dtsi
file and in imx6ul-isiot-*.dts files.


What is the dtc version used? mine with

dtc  -v
Version: DTC 1.4.2-gdaa75e8f

No build issues.

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


Re: [U-Boot] [PATCH v4 00/15] i.MX6: Engicam i.CoreM6/Is.IoT eMMC boot support

2017-02-27 Thread Sébastien Szymanski
Hello,

On 02/26/2017 12:54 PM, Stefano Babic wrote:
> On 24/02/2017 11:15, Jagan Teki wrote:
>> From: Jagan Teki 
>>
>> Changes for v3:
>> - Rebase on master
>> - Fix checkpatch.pl Warnings
>> - Add IMX6_BMODE_UART macro for uart bootmode
>> - Remove value assignment in enum, since all enum list is order
>>
>> Changes for v3:
>> - Update IMX6_BMODE_* shift macros with real number instead of bitops
>> - %s/IMX6_BMODE_SERIAL/IMX6_BMODE_SERIAL_ROM
>> - Assign enums with numbers so-that it can easy to see same in RM
>> - Update board MAINTAINERS file with imx6ul-isiot-emmc.dts file
>>
>> Changes for v2:
>> - Rebase on master
>> - Add Is.IoT eMMC boot patches
>> - Add few mmc env patches on board
>>
>> Jagan Teki (15):
>>   imx6: Add imx6_src_get_boot_mode
>>   imx: spl: Update NAND bootmode detection bit
>>   imx: Use IMX6_BMODE_* macros instead of numericals
>>   imx6: Add src_base structure define macro
>>   imx6: isiotmx6ul: Update SPL board boot order for eMMC
>>   i.MX6UL: isiot: Add eMMC boot support
>>   i.MX6UL: isiot: Add modeboot env via board_late_init
>>   i.MX6UL: isiot: Add mmc_late_init
>>   i.MX6UL: isiot: Switch the mmc env based on devno
>>   arm: dts: imx6qdl-icore-rqs: Add eMMC node
>>   imx6: icorem6_rqs: Update SPL board boot order for eMMC
>>   imx6: icorem6_rqs: Add eMMC boot support
>>   i.MX6Q: icorem6_rqs: Add modeboot env via board_late_init
>>   i.MX6Q: icorem6_rqs: Add mmc_late_init
>>   i.MX6Q: isiot: Switch the mmc env based on devno
>>
>>  arch/arm/dts/Makefile   |   1 +
>>  arch/arm/dts/imx6qdl-icore-rqs.dtsi |  22 ++
>>  arch/arm/dts/imx6ul-isiot-emmc.dts  |  77 +
>>  arch/arm/imx-common/init.c  |  10 +++
>>  arch/arm/imx-common/spl.c   |  49 --
>>  arch/arm/include/asm/arch-mx6/imx-regs.h|   2 +
>>  arch/arm/include/asm/imx-common/sys_proto.h |  47 +
>>  board/engicam/icorem6_rqs/icorem6_rqs.c |  96 +-
>>  board/engicam/isiotmx6ul/MAINTAINERS|   2 +
>>  board/engicam/isiotmx6ul/isiotmx6ul.c   | 101 
>> +++-
>>  configs/imx6dl_icore_rqs_mmc_defconfig  |   1 +
>>  configs/imx6q_icore_rqs_mmc_defconfig   |   1 +
>>  configs/imx6ul_isiot_emmc_defconfig |  40 +++
>>  configs/imx6ul_isiot_mmc_defconfig  |   1 +
>>  configs/imx6ul_isiot_nand_defconfig |   1 +
>>  include/configs/imx6qdl_icore_rqs.h |  36 +-
>>  include/configs/imx6ul_isiot.h  |  40 +--
>>  17 files changed, 462 insertions(+), 65 deletions(-)
>>  create mode 100644 arch/arm/dts/imx6ul-isiot-emmc.dts
>>  create mode 100644 configs/imx6ul_isiot_emmc_defconfig
>>
> 
> Applied to u-boot-imx, thanks !

The dts files fail to build:

Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:322: recipe for target
'arch/arm/dts/imx6ul-isiot-mmc.dtb' failed
make[2]: *** [arch/arm/dts/imx6ul-isiot-mmc.dtb] Error 1
make[2]: *** Waiting for unfinished jobs
Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:322: recipe for target
'arch/arm/dts/imx6ul-isiot-emmc.dtb' failed
make[2]: *** [arch/arm/dts/imx6ul-isiot-emmc.dtb] Error 1
Error: ./arch/arm/dts/imx6ul-isiot.dtsi:43.1-9 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:322: recipe for target
'arch/arm/dts/imx6ul-isiot-nand.dtb' failed
make[2]: *** [arch/arm/dts/imx6ul-isiot-nand.dtb] Error 1
dts/Makefile:36: recipe for target 'arch-dtbs' failed
make[1]: *** [arch-dtbs] Error 2
Makefile:860: recipe for target 'dts/dt.dtb' failed
make: *** [dts/dt.dtb] Error 2

I think that's because there is '/dts-v1/;' in the imx6ul-isiot.dtsi
file and in imx6ul-isiot-*.dts files.

With this change:

diff --git a/arch/arm/dts/imx6ul-isiot.dtsi b/arch/arm/dts/imx6ul-isiot.dtsi
index 346079a..9a3c35c 100644
--- a/arch/arm/dts/imx6ul-isiot.dtsi
+++ b/arch/arm/dts/imx6ul-isiot.dtsi
@@ -40,8 +40,6 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */

-/dts-v1/;
-
 #include 
 #include 
 #include "imx6ul.dtsi"

The compilation passes.

Best regards,

> 
> Best regards,
> Stefano
> 


-- 
Sébastien Szymanski
Software Engineer, Armadeus Systems
sebastien.szyman...@armadeus.com
Tel: +33 (0)9 72 29 41 44
Fax: +33 (0)9 72 28 79 26
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


[U-Boot] Pull request: u-boot-sunxi/master

2017-02-27 Thread Jagan Teki
Hi Tom,

Please pull this PR.

thanks!
Jagan

The following changes since commit b24cf8540a85a9bf97975aadd6a7542f166c78a3:

  video: mxsfb: Fix reset hang when videomode variable is not present 
(2017-02-22 21:47:59 +0100)

are available in the git repository at:

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

for you to fetch changes up to 35affe7698e95c058a1f6c7eb2e1bf35f82461c9:

  sunxi: add NanoPi NEO Air defconfig (2017-02-25 13:54:15 +0530)


Andre Przywara (12):
  sunxi: fix ACTLR.SMP assembly routine
  ARM: rename CONFIG_TIMER_CLK_FREQ to COUNTER_FREQUENCY
  fsl: ls102x: remove redundant GENERIC_TIMER_CLK
  sunxi: simplify ACTLR.SMP bit set #ifdef
  sunxi: configs: merge sun9i and sun50i SPL memory definitions
  sunxi: Kconfig: introduce CONFIG_SUNXI_HIGH_SRAM
  sunxi: provide ARMv8 mem_map for every ARM64 board
  SPI: SPL: sunxi: fix 64-bit build
  sunxi: DRAM: add Allwinner H5 support
  sunxi: prepare for sharing MACH_SUN8I_H3 config symbol
  sunxi: introduce Allwinner H5 config option
  sunxi: Add OrangePi PC 2 initial support

Jelle van der Waa (1):
  sunxi: add NanoPi NEO Air defconfig

 arch/arm/Kconfig  |   4 +
 arch/arm/cpu/armv7/ls102xa/psci.S |   2 +-
 arch/arm/cpu/armv7/ls102xa/timer.c|   2 +-
 arch/arm/cpu/armv7/nonsec_virt.S  |   4 +-
 arch/arm/cpu/armv7/sunxi/psci.c   |   2 +-
 arch/arm/dts/Makefile |   5 +-
 arch/arm/dts/sun50i-h5-orangepi-pc2.dts   | 147 ++
 arch/arm/dts/sun8i-h3-nanopi-neo-air.dts  |  97 +
 arch/arm/include/asm/arch-sunxi/clock_sun6i.h |   4 +-
 arch/arm/include/asm/arch-sunxi/cpu.h |   1 +
 arch/arm/include/asm/arch-sunxi/cpu_sun4i.h   |   4 +-
 arch/arm/include/asm/arch-sunxi/dram.h|   2 +-
 arch/arm/include/asm/arch-sunxi/spl.h |   2 +-
 arch/arm/mach-sunxi/Makefile  |   2 +-
 arch/arm/mach-sunxi/board.c   |  12 +--
 arch/arm/mach-sunxi/clock_sun6i.c |   6 +-
 arch/arm/mach-sunxi/cpu_info.c|   2 +
 arch/arm/mach-sunxi/dram_sun8i_h3.c   |  97 ++---
 arch/arm/mach-sunxi/usb_phy.c |   4 +-
 board/sunxi/Kconfig   |  35 +-
 board/sunxi/MAINTAINERS   |   5 +
 board/sunxi/board.c   |   6 +-
 configs/nanopi_neo_air_defconfig  |  17 +++
 configs/orangepi_pc2_defconfig|  19 
 drivers/mtd/spi/Kconfig   |   2 +-
 drivers/mtd/spi/sunxi_spi_spl.c   |  16 +--
 drivers/net/sun8i_emac.c  |   2 +-
 drivers/power/Kconfig |   4 +-
 drivers/usb/host/ehci-sunxi.c |   2 +-
 include/configs/exynos-common.h   |   2 +-
 include/configs/ls1021aiot.h  |   7 +-
 include/configs/ls1021aqds.h  |   7 +-
 include/configs/ls1021atwr.h  |   7 +-
 include/configs/mx7_common.h  |   2 +-
 include/configs/sun50i.h  |   1 -
 include/configs/sunxi-common.h|  24 ++---
 scripts/config_whitelist.txt  |   1 -
 37 files changed, 458 insertions(+), 100 deletions(-)
 create mode 100644 arch/arm/dts/sun50i-h5-orangepi-pc2.dts
 create mode 100644 arch/arm/dts/sun8i-h3-nanopi-neo-air.dts
 create mode 100644 configs/nanopi_neo_air_defconfig
 create mode 100644 configs/orangepi_pc2_defconfig
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v1] gpt: Fix uuid string format

2017-02-27 Thread Andy Shevchenko
From: Vincent Tinelli 

Change GPT UUID string format from UUID to GUID per specification.

Signed-off-by: Vincent Tinelli 
---
 cmd/gpt.c   | 2 +-
 disk/part_efi.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmd/gpt.c b/cmd/gpt.c
index 196f506335..3e98821868 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -54,7 +54,7 @@ static int extract_env(const char *str, char **env)
if (e == NULL) {
 #ifdef CONFIG_RANDOM_UUID
debug("%s unset. ", str);
-   gen_rand_uuid_str(uuid_str, UUID_STR_FORMAT_STD);
+   gen_rand_uuid_str(uuid_str, UUID_STR_FORMAT_GUID);
setenv(s, uuid_str);
 
e = getenv(s);
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 893cbbdbda..db0c890d5b 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -463,7 +463,7 @@ int gpt_fill_pte(gpt_header *gpt_h, gpt_entry *gpt_e,
str_uuid = partitions[i].uuid;
bin_uuid = gpt_e[i].unique_partition_guid.b;
 
-   if (uuid_str_to_bin(str_uuid, bin_uuid, UUID_STR_FORMAT_STD)) {
+   if (uuid_str_to_bin(str_uuid, bin_uuid, UUID_STR_FORMAT_GUID)) {
printf("Partition no. %d: invalid guid: %s\n",
i, str_uuid);
return -1;
-- 
2.11.0

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


Re: [U-Boot] [PATCH 07/10] sunxi: Convert CONFIG_RGMII to Kconfig

2017-02-27 Thread Thomas Petazzoni
Hello,

On Thu, 23 Feb 2017 16:44:16 +0100, Mylène Josserand wrote:
> Convert CONFIG_RGMII to Kconfig. Thanks to that, it is possible to
> update defconfig files of SYS_EXTRA_OPTIONS accordingly and
> remove it when it is possible.
> 
> Signed-off-by: Mylène Josserand 

I'm not familiar with how Allwinner platforms are handled in U-Boot,
but I have a question for the following patches:

  [PATCH 07/10] sunxi: Convert CONFIG_RGMII to Kconfig
  [PATCH 08/10] sunxi: Convert CONFIG_SATAPWR to Kconfig
  [PATCH 09/10] sunxi: Convert CONFIG_MACPWR to Kconfig
  [PATCH 10/10] sunxi: Convert CONS_INDEX to Kconfig

To me, all these details are hardware specific details that are given
in the Device Tree. For example, RGMII is given in:

 {
pinctrl-names = "default";
pinctrl-0 = <_pins_rgmii_a>;
phy = <>;
phy-mode = "rgmii";
status = "okay";

phy1: ethernet-phy@1 {
reg = <1>;
};
};

The SATA power GPIO is given by:

_ahci_5v {
pinctrl-0 = <_pwr_pin_olinuxinolime>;
gpio = < 2 3 GPIO_ACTIVE_HIGH>;
status = "okay";
};

The MAC power GPIO is given by:

reg_gmac_3v3: gmac-3v3 {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <_power_pin_bananapi>;
regulator-name = "gmac-3v3";
regulator-min-microvolt = <330>;
regulator-max-microvolt = <330>;
startup-delay-us = <10>;
enable-active-high;
gpio = < 7 23 GPIO_ACTIVE_HIGH>;
};

So it seems weird to encode it in the defconfig if the information is
already available in the Device Tree.

In addition, the option names are very generic: CONFIG_SATAPWR,
CONFIG_MACPWR, even though they are completely sunxi specific. So if
those options really need to exist, should be they named
CONFIG_SUNXI_SATAPWR, CONFIG_SUNXI_MACPWR ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


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

2017-02-27 Thread Tom Rini
On Mon, Feb 27, 2017 at 02:29:38PM +0100, Stefano Babic wrote:
> On 27/02/2017 14:22, Tom Rini wrote:
> > On Mon, Feb 27, 2017 at 10:12:59AM +0100, Stefano Babic wrote:
> >> Hi Tom,
> >>
> >> please pull from u-boot-imx, thanks !
> >>
> >> The following changes since commit 
> >> b24cf8540a85a9bf97975aadd6a7542f166c78a3:
> >>
> >>   video: mxsfb: Fix reset hang when videomode variable is not present
> >> (2017-02-22 21:47:59 +0100)
> >>
> >> are available in the git repository at:
> >>
> >>   git://www.denx.de/git/u-boot-imx.git master
> >>
> >> for you to fetch changes up to 60a38e423b21a897b8fa0d9376d9370ea915ddd8:
> >>
> >>   i.MX6Q: isiot: Switch the mmc env based on devno (2017-02-26 13:00:22
> >> +0100)
> >>
> >> 
> 
> > 
> > This is too much too close to the release window, sorry.
> > 
> 
> ok - I push it to -next, and I send my PR again after release.

Thanks!

-- 
Tom


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


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

2017-02-27 Thread Stefano Babic
On 27/02/2017 14:22, Tom Rini wrote:
> On Mon, Feb 27, 2017 at 10:12:59AM +0100, Stefano Babic wrote:
>> Hi Tom,
>>
>> please pull from u-boot-imx, thanks !
>>
>> The following changes since commit b24cf8540a85a9bf97975aadd6a7542f166c78a3:
>>
>>   video: mxsfb: Fix reset hang when videomode variable is not present
>> (2017-02-22 21:47:59 +0100)
>>
>> are available in the git repository at:
>>
>>   git://www.denx.de/git/u-boot-imx.git master
>>
>> for you to fetch changes up to 60a38e423b21a897b8fa0d9376d9370ea915ddd8:
>>
>>   i.MX6Q: isiot: Switch the mmc env based on devno (2017-02-26 13:00:22
>> +0100)
>>
>> 

> 
> This is too much too close to the release window, sorry.
> 

ok - I push it to -next, and I send my PR again after release.

Regards,
Stefano


-- 
Meet DENX at the Embedded World Trade Show
14 Mar - 16 Mar 2017, Nuremberg Trade Fair Centre, Hall 4, Booth 581
--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 0/6] sunxi: update Pine64/A64 DTs

2017-02-27 Thread Chen-Yu Tsai
Hi,

On Mon, Feb 27, 2017 at 5:53 PM, Andre Przywara  wrote:
> Hi,
>
> On 27/02/17 03:30, Chen-Yu Tsai wrote:
>> On Mon, Feb 27, 2017 at 8:26 AM, Andre Przywara  
>> wrote:
>>> Hi,
>>>
>>> in the wake of the sunxi DM enablement series it became apparent that
>>> the current device tree files for the A64 SoC and its board are outdated.
>>>
>>> Since Linux v4.10-rc1 there are now basic .dts files for the Allwinner
>>> A64 SoC and the Pine64 boards in the mainline kernel.
>>> Linux v4.11-rc1 added MMC and USB support.
>>> Because our preliminary device trees used in U-Boot differ significantly,
>>> let's update our copy with what's in the current Linus' master tree.
>>> Since in contrast to U-Boot the kernel still lacks support for Ethernet,
>>> we keep our preliminary nodes for that IP, but adjust it slightly to
>>> match the new clocks and reset bindings.
>>>
>>> As the sun8i-emac driver is actually using the DT for the pinmux setup,
>>> we teach it how to cope with the new pinctrl bindings in the first two
>>> patches. This is probably becoming somewhat obsolete very soon (with
>>> DM GPIO support on the list already), however I consider these two
>>> patches as merely fixes for the existing driver to maintain bisectability.
>>> It would make sense to merge the new DTs before the DM patches, so we
>>> need to have something in place which works meanwhile.
>>>
>>> Let me know what you think.
>>>
>>> Cheers,
>>> Andre.
>>>
>>> Andre Przywara (6):
>>>   sunxi: GPIO: introduce sunxi_gpio_setup_dt_pins()
>>>   net: sun8i-emac: use new, generic GPIO setup routine
>>>   sunxi: dts: update sun50i-a64.dtsi from Linux
>>>   sunxi: dts: update Pine64 .dts
>>>   sunxi: dts: remove now obsolete pine64-common.dtsi
>>>   sunxi: dts: add Bananapi M64 .dts
>>
>> Could we keep this simple, and just do a "sync with the kernel" commit for
>> sun50i, which also keeps the sun8i-emac specific bits. And also explicitly
>> mention the git commit or tag you are syncing to.
>
> So you mean to drop patch 1 and 2 and keep the old style pinctrl
> bindings around for the EMAC node?
> I can certainly do this (if others agree), but didn't want to dodge a
> more proper solution in the first place.

I've actually no preference on this. What I meant was you don't need
four patches to do the sync-up, just one, i.e. copy sun50i*.{dts,dtsi}
from the kernel, and patch back whatever the emac needs, since it's
not in mainline yet.

I guess you could update sun8i-emac to deal with generic pinconf,
or update the gpio driver, but that would be a separate series.

ChenYu

> Another alternative would be to squash the functionality of patch 1
> directly into sun8i_emac.c, so without the moving to pinmux.c. This
> would mean dropping patch 1/6 and just having a fix for the sun8i_emac.
>
> Let me know what's the preferred solution here.
>
> Cheers,
> Andre.
>
>>>  arch/arm/dts/Makefile  |   3 +-
>>>  arch/arm/dts/sun50i-a64-bananapi-m64.dts   | 135 +++
>>>  arch/arm/dts/sun50i-a64-pine64-common.dtsi |  93 -
>>>  arch/arm/dts/sun50i-a64-pine64-plus.dts|  16 +-
>>>  arch/arm/dts/sun50i-a64-pine64.dts |  72 +++-
>>>  arch/arm/dts/sun50i-a64.dtsi   | 615 
>>> +
>>>  arch/arm/include/asm/arch-sunxi/gpio.h |   4 +
>>>  arch/arm/mach-sunxi/pinmux.c   |  77 
>>>  drivers/net/sun8i_emac.c   |  38 +-
>>>  include/dt-bindings/clock/sun50i-a64-ccu.h | 134 +++
>>>  include/dt-bindings/reset/sun50i-a64-ccu.h |  98 +
>>>  11 files changed, 706 insertions(+), 579 deletions(-)
>>>  create mode 100644 arch/arm/dts/sun50i-a64-bananapi-m64.dts
>>>  delete mode 100644 arch/arm/dts/sun50i-a64-pine64-common.dtsi
>>>  create mode 100644 include/dt-bindings/clock/sun50i-a64-ccu.h
>>>  create mode 100644 include/dt-bindings/reset/sun50i-a64-ccu.h
>>>
>>> --
>>> 2.8.2
>>>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot


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

2017-02-27 Thread Tom Rini
On Mon, Feb 27, 2017 at 10:12:59AM +0100, Stefano Babic wrote:
> Hi Tom,
> 
> please pull from u-boot-imx, thanks !
> 
> The following changes since commit b24cf8540a85a9bf97975aadd6a7542f166c78a3:
> 
>   video: mxsfb: Fix reset hang when videomode variable is not present
> (2017-02-22 21:47:59 +0100)
> 
> are available in the git repository at:
> 
>   git://www.denx.de/git/u-boot-imx.git master
> 
> for you to fetch changes up to 60a38e423b21a897b8fa0d9376d9370ea915ddd8:
> 
>   i.MX6Q: isiot: Switch the mmc env based on devno (2017-02-26 13:00:22
> +0100)
> 
> 
> Andrey Yurovsky (1):
>   mtd: nand: build MXS driver for MX7 as well
> 
> Jagan Teki (25):
>   configs: imx6: Don't define USDHC2_BASE_ADDR
>   arm: imx6ul: Add Engicam Is.IoT MX6UL Starter Kit initial support
>   arm: dts: imx6ul-isiot: Add I2C nodes
>   imx6: isiotmx6ul: Add I2C support
>   arm: dts: imx6ul-isiot: Add FEC node
>   imx6: isiotmx6ul: Add FEC support
>   imx6: isiotmx6ul: Add NAND support
>   imx6: isiotmx6ul: Add nandboot env support
>   imx6ul: isiotmx6ul: Enable I2C support
>   i.MX6: engicam: Include dts files under MAINTAINERS
>   imx6: Add imx6_src_get_boot_mode
>   imx: spl: Update NAND bootmode detection bit
>   imx: Use IMX6_BMODE_* macros instead of numericals
>   imx6: Add src_base structure define macro
>   imx6: isiotmx6ul: Update SPL board boot order for eMMC
>   i.MX6UL: isiot: Add eMMC boot support
>   i.MX6UL: isiot: Add modeboot env via board_late_init
>   i.MX6UL: isiot: Add mmc_late_init
>   i.MX6UL: isiot: Switch the mmc env based on devno
>   arm: dts: imx6qdl-icore-rqs: Add eMMC node
>   imx6: icorem6_rqs: Update SPL board boot order for eMMC
>   imx6: icorem6_rqs: Add eMMC boot support
>   i.MX6Q: icorem6_rqs: Add modeboot env via board_late_init
>   i.MX6Q: icorem6_rqs: Add mmc_late_init
>   i.MX6Q: isiot: Switch the mmc env based on devno
> 
> Markus Niebel (13):
>   arm: imx6: tqma6: add configurable CMA size
>   imx6: tqma6: rely on default setting for tftp and nfs
>   mx6: tqma6: fix typo in env
>   mx6: tqma6: add rootfsmode environment for mmc / sd
>   tqma6: fix rounding in env
>   tqma6: [cosmetic] sanitize environment defines
>   arm: imx6: tqma6: use CONFIG_TQM6x for SOM specific settings
>   arm: imx6: tqma6: add support for TQMa6DL variant
>   imx6: tqma6: implement power_init_board
>   imx6: tqma6: use lower driver stength for I2C pins
>   imx6: tqma6: disable spi CS unused in U-Boot
>   imx6: tqma6: adjust ethernet phy reset delay
>   mx6: tqma6: clear enet clk sel for mba6
> 
> Peng Fan (16):
>   imx: mx7ulp: Add mx7ulp to Kconfig
>   imx: mx7ulp: add registers header file
>   imx: mx7ulp: add iomux driver to support IOMUXC0 and IOMUXC1
>   imx: mx7ulp: Add clock framework and functions
>   imx: mx7ulp: Add soc level initialization codes and functions
>   gpio: Add Rapid GPIO2P driver for i.MX7ULP
>   mxc_ocotp: Update driver to support OCOTP controller on i.MX7ULP
>   pinctrl: Add i.MX7ULP pinctrl driver
>   i2c: lpi2c: add lpi2c driver for i.MX7ULP
>   serial: lpuart: restructure lpuart driver
>   serial: lpuart: add i.MX7ULP support
>   mx7ulp: Add HAB boot support
>   arm: dts: add i.MX7ULP dtsi file
>   mmc: fsl_esdhc: support i.MX7ULP
>   imx: imx7ulp: add EVK board support
>   imx: mx7ulp_evk: enable mmc/regulator support
> 
> Peter Robinson (3):
>   mx6sx: udoo_neo: Define the default serial console
>   mx6sx: udoo_neo: use different load address for ramdisk
>   mx6sx: udoo_neo: Enable distro boot options in config
> 
> Stefano Babic (1):
>   Merge branch 'master' of git://git.denx.de/u-boot
> 
> Ye Li (3):
>   imx: mx7ulp: Implement the clock functions for i2c driver
>   mx7ulp: Add iomux pins header file
>   wdog: Add the watchdog driver for MX7ULP.
> 
>  arch/arm/Kconfig|7 +
>  arch/arm/Makefile   |2 +-
>  arch/arm/cpu/armv7/Makefile |3 +-
>  arch/arm/cpu/armv7/mx6/Kconfig  |   12 +
>  arch/arm/cpu/armv7/mx7ulp/Kconfig   |   17 ++
>  arch/arm/cpu/armv7/mx7ulp/Makefile  |8 +
>  arch/arm/cpu/armv7/mx7ulp/clock.c   |  365
> +++
>  arch/arm/cpu/armv7/mx7ulp/iomux.c   |   70 ++
>  arch/arm/cpu/armv7/mx7ulp/pcc.c |  286
> +
>  arch/arm/cpu/armv7/mx7ulp/scg.c | 1086
> ++
>  arch/arm/cpu/armv7/mx7ulp/soc.c |  247
> ++
>  arch/arm/cpu/armv7/vf610/generic.c  |5 +
>  

Re: [U-Boot] [PATCH] openrd: disable private arch memset, memcpy and libgcc

2017-02-27 Thread Albert ARIBAUD
Update:

On Mon, 27 Feb 2017 07:52:10 +0100, Albert ARIBAUD
 wrote:
> Hello Tom,
> 
> On Sun, 26 Feb 2017 20:04:28 -0500, Tom Rini  wrote:
> > On Sun, Feb 26, 2017 at 04:29:32PM +0100, Albert ARIBAUD wrote:
> >   
> > > The switch to private LIBGCC causes 'undefined instruction'
> > > exception in at least the Open-RD Ultimate and Client, and
> > > quite probably the Open-RD Base as well.
> > > 
> > > While debugging this issue, it appeared the switch to
> > > architecture-optimized memset and memcpy also causes the
> > > same exceptions.
> > > 
> > > Until a fix to private libgcc and architecture-optimized
> > > memcpy and memset is mainlined, disable their use in all
> > > openrd configurations.
> > > 
> > > Signed-off-by: Albert ARIBAUD 
> > 
> > Implementation wise, there's two big problems here.  First, all of the
> > code we're talking about is a direct drop-in from the kernel.  So
> > whatever is wrong here is a problem that the kernel itself can trigger,
> > so needs sorting out and fixing.  Second, do you have more details on
> > how to recreate (or not recreate) these problems?  
> 
> Second answer first: the easy way to reproduce this is to build for any
> Thumb-1 board and wait for memset, memcpy or a libgcc function to be
> called, which eventually results in an 'undefined instruction' trap.
> Then add the three CONFIG...=n lines in the board's config file, build,
> and see that the issue is gone. This is 100% reproducible.
> 
> First answer:
> 
> I've looked into a 'slow general fix' in parallel to this 'fast fix',
> starting with the memset case (and assuming the issue is common to the
> memcpy and libgcc cases.
> 
> The cause seems to stem from this:
> 
> - for Thumb-1 boards, the arch/arm/lib/memset.S et al. are built for
>   ARM state, due AFAIR to incompatibilities with the Thumb-1 instruction
>   set.
> 
> - apparently the 'ret lr' in arch/arm/lib/memset.S gets translated into
>   a 'mov pc, lr' which, at least for ATMv5TE, is a simple branch, not
>   an interworking branch.
> 
> - consequently, upon return from the memset call, the CPU remains in
>   ARM state while trying to execute Thumb-1 instructions.
> 
> ISTR there are gnu as, gcc or ldoptions to be passed to cause the 'ret
> lr' to be turned into a 'bx lr', but I could not find them yesterday.
> 
> The 'slow and more correct' fix consists in building the Linux and
> U-Boot source code for the Open-RD board and looking into what code the
> memset.S produces in Linux and what compiler/assembler options were
> passed to it (or digging into the memset, memcpy and libgcc of the
> GCC C compiler, but that's a bit less simple).

I dropped the Linux trail because it builds Kirkwood (not Orion, as I
wrongly stated previously) with ARM instruction set rather than the
Thumb-1 set U-Boot uses, so the issue will never appear in the kernel
(it might possibly happen in userland code if that code uses a custom
libgcc, which I consider quite improbable).

So I dug into the 'ret' pseudo-opcode, which is in fact a macro,
introduced to produce the most adequate opcode for the exact ARM
architecture; it is defined in arch/arm/include/asm/assembler.h.
Currently, defining __ARM_ARCH_5TE__ causes 'ret lr' to be encoded
as 'mov pc, lr' rather than the 'bx lr' which should work.

I will have access again to my Open-RD board later today; I will test
if making 'ret' use 'bx' for ARMv5TE works, and also if the current
Linux version of arch/arm/include/asm/assembler.h can be used with
current U-Boot, but that would be a wider change.

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


Re: [U-Boot] DT warnings and travis-ci problems

2017-02-27 Thread Maxime Ripard
Hi Tom,

On Fri, Feb 24, 2017 at 08:01:36PM -0500, Tom Rini wrote:
> Hey guys,
> 
> It seems as if perhaps travis-ci has recently implemented a limit on log
> file size as the failure I see here:
> https://travis-ci.org/trini/u-boot/jobs/204620482
> is unrelated, entirely, to the changes I'm testing.  As my general hope
> here is that we'll fix these issues by re-syncing with the kernel, has
> progress been made on these currently, upstream?  Thanks!

No, unfortunately, not yet.

Would silencing the warning like what is done in the kernel be an
option?

Maxime

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


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


Re: [U-Boot] [PATCH] ARM: dts: uniphier: move aliases node up to make fdtgrep happy

2017-02-27 Thread Masahiro Yamada
Hi Simon,


2016-04-19 2:48 GMT+09:00 Simon Glass :
> HI Masahiro,
>
> On 18 April 2016 at 00:50, Masahiro Yamada
>  wrote:
>>
>> Hi Simon,
>>
>> No news about fdtgrep?
>>
>> I will apply this patch in a few days, though I am not happy about it.
>
> No sorry I have not got back to it. I recently did some buildman
> fixes. I should get to it in the next few weeks but it will not be in
> time for this release.
>
> Regards,
> Simon



Almost one year has passed since then.


I still suffer from FDT_ERR_BADLAYOUT error of the fdtgrep
when I try to sync DT files with Linux.


Any progress on this?


For example,
http://patchwork.ozlabs.org/patch/732708/

causes the following error.

  OBJCOPY spl/u-boot-spl-nodtb.bin
  FDTGREP spl/u-boot-spl.dtb
Error at 'fdt_find_regions': FDT_ERR_BADLAYOUT
/aliases node must come before all other nodes


This seems unrelated to my patch.
I believe the problem is on the side of the fdtgrep.





>>
>>
>>
>> 2016-03-28 22:10 GMT+09:00 Masahiro Yamada :
>> > Currently, fdtgrep would not accept uniphier-ph1-ld20-ref.dtb
>> > and uniphier-ph1-ld11-ref.dtb unless the aliases node comes
>> > the first in the root node.
>> >
>> > $ make -s uniphier_pxs2_ld6b_defconfig
>> > $ make CROSS_COMPILE=arm-linux-gnueabi- DEVICE_TREE=uniphier-ph1-ld20-ref
>> >   [snip]
>> >   LDS spl/u-boot-spl.lds
>> >   LD  spl/u-boot-spl
>> >   OBJCOPY spl/u-boot-spl-nodtb.bin
>> >   FDTGREP spl/u-boot-spl.dtb
>> > Error at 'fdt_find_regions': FDT_ERR_BADLAYOUT
>> > /aliases node must come before all other nodes
>> > Error: FDT_ERR_BADMAGIC
>> > make[1]: *** [spl/u-boot-spl.dtb] Error 1
>> > make: *** [spl/u-boot-spl] Error 2
>> >
>> > This commit moves the aliases node as the error message from the
>> > fdtgrep tool suggests, although this requirement does not sound
>> > reasonable to me.
>> >
>> > Signed-off-by: Masahiro Yamada 
>> > ---
>> >
>> > Simon,
>> >
>> > I'd like to avoid this patch if possible.
>> >
>> > Not figured out the root cause of the problem yet?
>> >
>> >
>> >
>> >  arch/arm/dts/uniphier-ph1-ld11-ref.dts | 18 +-
>> >  arch/arm/dts/uniphier-ph1-ld20-ref.dts | 18 +-
>> >  2 files changed, 18 insertions(+), 18 deletions(-)
>> >
>> > diff --git a/arch/arm/dts/uniphier-ph1-ld11-ref.dts 
>> > b/arch/arm/dts/uniphier-ph1-ld11-ref.dts
>> > index a624a49..88e7f53 100644
>> > --- a/arch/arm/dts/uniphier-ph1-ld11-ref.dts
>> > +++ b/arch/arm/dts/uniphier-ph1-ld11-ref.dts
>> > @@ -14,15 +14,6 @@
>> > model = "UniPhier PH1-LD11 Reference Board";
>> > compatible = "socionext,ph1-ld11-ref", "socionext,ph1-ld11";
>> >
>> > -   memory {
>> > -   device_type = "memory";
>> > -   reg = <0 0x8000 0 0x4000>;
>> > -   };
>> > -
>> > -   chosen {
>> > -   stdout-path = "serial0:115200n8";
>> > -   };
>> > -
>> > aliases {
>> > serial0 = 
>> > serial1 = 
>> > @@ -35,6 +26,15 @@
>> > i2c4 = 
>> > i2c5 = 
>> > };
>> > +
>> > +   memory {
>> > +   device_type = "memory";
>> > +   reg = <0 0x8000 0 0x4000>;
>> > +   };
>> > +
>> > +   chosen {
>> > +   stdout-path = "serial0:115200n8";
>> > +   };
>> >  };
>> >
>> >   {
>> > diff --git a/arch/arm/dts/uniphier-ph1-ld20-ref.dts 
>> > b/arch/arm/dts/uniphier-ph1-ld20-ref.dts
>> > index 108adeb..a55d90c 100644
>> > --- a/arch/arm/dts/uniphier-ph1-ld20-ref.dts
>> > +++ b/arch/arm/dts/uniphier-ph1-ld20-ref.dts
>> > @@ -14,15 +14,6 @@
>> > model = "UniPhier PH1-LD20 Reference Board";
>> > compatible = "socionext,ph1-ld20-ref", "socionext,ph1-ld20";
>> >
>> > -   memory {
>> > -   device_type = "memory";
>> > -   reg = <0 0x8000 0 0xc000>;
>> > -   };
>> > -
>> > -   chosen {
>> > -   stdout-path = "serial0:115200n8";
>> > -   };
>> > -
>> > aliases {
>> > serial0 = 
>> > serial1 = 
>> > @@ -35,6 +26,15 @@
>> > i2c4 = 
>> > i2c5 = 
>> > };
>> > +
>> > +   memory {
>> > +   device_type = "memory";
>> > +   reg = <0 0x8000 0 0xc000>;
>> > +   };
>> > +
>> > +   chosen {
>> > +   stdout-path = "serial0:115200n8";
>> > +   };
>> >  };
>> >
>> >   {
>> > --
>> > 1.9.1
>> >
>> > ___
>> > U-Boot mailing list
>> > U-Boot@lists.denx.de
>> > http://lists.denx.de/mailman/listinfo/u-boot
>>
>>
>>
>> --
>> Best Regards
>> Masahiro Yamada
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot



-- 
Best Regards
Masahiro Yamada
___
U-Boot 

Re: [U-Boot] [PATCH 1/6] sunxi: GPIO: introduce sunxi_gpio_setup_dt_pins()

2017-02-27 Thread Andre Przywara
Hi,

On 27/02/17 10:07, Maxime Ripard wrote:
> On Mon, Feb 27, 2017 at 12:26:40AM +, Andre Przywara wrote:
>> Instead of hard-coding GPIO pins used for a certain peripheral, we
>> should just use the pinctrl information from the DT.
>> The sun8i-emac driver has some simple implementation of that, so
>> let's just generalize this and move the code into a more common
>> location.
>> On the way we add support for the new, generic pinctrl binding now
>> used by all Allwinner SoCs.
>>
>> Signed-off-by: Andre Przywara 
>> ---
>>  arch/arm/include/asm/arch-sunxi/gpio.h |  4 ++
>>  arch/arm/mach-sunxi/pinmux.c   | 77 
>> ++
>>  2 files changed, 81 insertions(+)
>>
>> diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h 
>> b/arch/arm/include/asm/arch-sunxi/gpio.h
>> index 85a4ec3..ba8c661 100644
>> --- a/arch/arm/include/asm/arch-sunxi/gpio.h
>> +++ b/arch/arm/include/asm/arch-sunxi/gpio.h
>> @@ -239,4 +239,8 @@ int axp_gpio_init(void);
>>  static inline int axp_gpio_init(void) { return 0; }
>>  #endif
>>  
>> +int sunxi_gpio_parse_pin_name(const char *pin_name);
>> +int sunxi_gpio_setup_dt_pins(const void * volatile fdt_blob, int node,
>> + const char * mux_name, int mux_sel);
>> +
>>  #endif /* _SUNXI_GPIO_H */
>> diff --git a/arch/arm/mach-sunxi/pinmux.c b/arch/arm/mach-sunxi/pinmux.c
>> index b026f78..f1e1e8f 100644
>> --- a/arch/arm/mach-sunxi/pinmux.c
>> +++ b/arch/arm/mach-sunxi/pinmux.c
>> @@ -9,6 +9,9 @@
>>  #include 
>>  #include 
>>  #include 
>> +#include 
>> +#include 
>> +#include 
>>  
>>  void sunxi_gpio_set_cfgbank(struct sunxi_gpio *pio, int bank_offset, u32 
>> val)
>>  {
>> @@ -69,3 +72,77 @@ int sunxi_gpio_set_pull(u32 pin, u32 val)
>>  
>>  return 0;
>>  }
>> +
>> +int sunxi_gpio_parse_pin_name(const char *pin_name)
>> +{
>> +int pin;
>> +
>> +if (pin_name[0] != 'P')
>> +return -1;
>> +
>> +if (pin_name[1] < 'A' || pin_name[1] > 'Z')
>> +return -1;
>> +
>> +pin = (pin_name[1] - 'A') << 5;
>> +pin += simple_strtol(_name[2], NULL, 10);
>> +
>> +return pin;
>> +}
> 
> That function already exists, sunxi_name_to_gpio.

Indeed, I found this yesterday _after_ sending the patches ;-)
For some reasons I missed that when I originally wrote the patches,
sorry for that.

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


Re: [U-Boot] [PATCH] splash: Prevent splash_load_fs from writing to 0x0

2017-02-27 Thread Igor Grinberg
Hi Jonathan,

On 02/27/17 10:10, Jonathan Golder wrote:
> Hi Igor,
> 
>> I haven't looked at fs_read() yet, but from the above it seems that
>> a better approach would be to fix the fs_read()? Might there be use
>> cases when it is legitimate to pass NULL?
> 
> 
> Well, actually I have not dived into the depths of the fs_read ()
> deeper than realising that something went wrong.
> 
> Before posting this patch I greped for usages of fs_read() with NULL
> as last parameter and found only this occurrence. So I supposed that
> passing NULL for actread is not an intended use case of fs_read ().

Probably, yet this use case appeared and correct me if I'm wrong,
the splash source code does not really care of that parameter, and
it wants to use the fs_read().
So maybe the problem is in fs_read() API not covering a legitimate
use case?
Of course this patch will fix the problem by hiding it till next time.

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


Re: [U-Boot] [PATCH 06/20] arm: socfpga: add reset driver support for Arria 10

2017-02-27 Thread Marek Vasut
On 02/27/2017 11:14 AM, Ley Foon Tan wrote:
> On Sab, 2017-02-25 at 22:28 +0100, Marek Vasut wrote:
>> On 02/22/2017 10:47 AM, Ley Foon Tan wrote:
>>>
>>> Add reset driver support for Arria 10.
>>>
>>> Signed-off-by: Tien Fong Chee 
>>> Signed-off-by: Ley Foon Tan 
>>> ---
>>>  arch/arm/mach-socfpga/Makefile |   2 +
>>>  arch/arm/mach-socfpga/include/mach/reset_manager.h |   4 +-
>>>  .../include/mach/reset_manager_arria10.h   | 144 
>>>  arch/arm/mach-socfpga/reset_manager_arria10.c  | 406
>>> +
>>>  include/dt-bindings/reset/altr,rst-mgr-a10.h   | 103 ++
>>>  5 files changed, 658 insertions(+), 1 deletion(-)
>>>  create mode 100755 arch/arm/mach-
>>> socfpga/include/mach/reset_manager_arria10.h
>>>  create mode 100644 arch/arm/mach-socfpga/reset_manager_arria10.c
>>>  create mode 100644 include/dt-bindings/reset/altr,rst-mgr-a10.h
>>>
>>> diff --git a/arch/arm/mach-socfpga/Makefile b/arch/arm/mach-
>>> socfpga/Makefile
>>> index e83da2e..d81f003 100644
>>> --- a/arch/arm/mach-socfpga/Makefile
>>> +++ b/arch/arm/mach-socfpga/Makefile
>>> @@ -10,6 +10,8 @@
>>>  obj-y  += misc.o timer.o reset_manager.o clock_manager.o \
>>>fpga_manager.o board.o
>>>  
>>> +obj-$(CONFIG_TARGET_SOCFPGA_ARRIA10) += reset_manager_arria10.o
>>> +
>>>  obj-$(CONFIG_SPL_BUILD) += spl.o freeze_controller.o
>>>  
>>>  # QTS-generated config file wrappers
>>> diff --git a/arch/arm/mach-socfpga/include/mach/reset_manager.h
>>> b/arch/arm/mach-socfpga/include/mach/reset_manager.h
>>> index 9e253bf..64526b6 100644
>>> --- a/arch/arm/mach-socfpga/include/mach/reset_manager.h
>>> +++ b/arch/arm/mach-socfpga/include/mach/reset_manager.h
>>> @@ -43,7 +43,9 @@ void socfpga_per_reset_all(void);
>>>  /* Create a human-readable reference to SoCFPGA reset. */
>>>  #define SOCFPGA_RESET(_name)   RSTMGR_##_name
>>>  
>>> -#if defined(CONFIG_TARGET_SOCFPGA_GEN5)
>>> +#if defined(CONFIG_TARGET_SOCFPGA_ARRIA10)
>>> +#include 
>>> +#elif defined(CONFIG_TARGET_SOCFPGA_GEN5)
>> You can use #elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10) instead to
>> keep
>> this list sorted.
> You want sort with GEN5, ARRIA10 or sorted alphanumerically ARRIA10
> then GEN5?

I'd opt for sorting this in the order in which those parts came out, but
that might be just my personal preference ...

[...]

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


Re: [U-Boot] [PATCH 06/20] arm: socfpga: add reset driver support for Arria 10

2017-02-27 Thread Ley Foon Tan
On Sab, 2017-02-25 at 22:28 +0100, Marek Vasut wrote:
> On 02/22/2017 10:47 AM, Ley Foon Tan wrote:
> > 
> > Add reset driver support for Arria 10.
> > 
> > Signed-off-by: Tien Fong Chee 
> > Signed-off-by: Ley Foon Tan 
> > ---
> >  arch/arm/mach-socfpga/Makefile |   2 +
> >  arch/arm/mach-socfpga/include/mach/reset_manager.h |   4 +-
> >  .../include/mach/reset_manager_arria10.h   | 144 
> >  arch/arm/mach-socfpga/reset_manager_arria10.c  | 406
> > +
> >  include/dt-bindings/reset/altr,rst-mgr-a10.h   | 103 ++
> >  5 files changed, 658 insertions(+), 1 deletion(-)
> >  create mode 100755 arch/arm/mach-
> > socfpga/include/mach/reset_manager_arria10.h
> >  create mode 100644 arch/arm/mach-socfpga/reset_manager_arria10.c
> >  create mode 100644 include/dt-bindings/reset/altr,rst-mgr-a10.h
> > 
> > diff --git a/arch/arm/mach-socfpga/Makefile b/arch/arm/mach-
> > socfpga/Makefile
> > index e83da2e..d81f003 100644
> > --- a/arch/arm/mach-socfpga/Makefile
> > +++ b/arch/arm/mach-socfpga/Makefile
> > @@ -10,6 +10,8 @@
> >  obj-y  += misc.o timer.o reset_manager.o clock_manager.o \
> >        fpga_manager.o board.o
> >  
> > +obj-$(CONFIG_TARGET_SOCFPGA_ARRIA10) += reset_manager_arria10.o
> > +
> >  obj-$(CONFIG_SPL_BUILD) += spl.o freeze_controller.o
> >  
> >  # QTS-generated config file wrappers
> > diff --git a/arch/arm/mach-socfpga/include/mach/reset_manager.h
> > b/arch/arm/mach-socfpga/include/mach/reset_manager.h
> > index 9e253bf..64526b6 100644
> > --- a/arch/arm/mach-socfpga/include/mach/reset_manager.h
> > +++ b/arch/arm/mach-socfpga/include/mach/reset_manager.h
> > @@ -43,7 +43,9 @@ void socfpga_per_reset_all(void);
> >  /* Create a human-readable reference to SoCFPGA reset. */
> >  #define SOCFPGA_RESET(_name)   RSTMGR_##_name
> >  
> > -#if defined(CONFIG_TARGET_SOCFPGA_GEN5)
> > +#if defined(CONFIG_TARGET_SOCFPGA_ARRIA10)
> > +#include 
> > +#elif defined(CONFIG_TARGET_SOCFPGA_GEN5)
> You can use #elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10) instead to
> keep
> this list sorted.
You want sort with GEN5, ARRIA10 or sorted alphanumerically ARRIA10
then GEN5?
> 
> > 
> >  #include 
> >  #endif
> >  
> > diff --git a/arch/arm/mach-
> > socfpga/include/mach/reset_manager_arria10.h b/arch/arm/mach-
> > socfpga/include/mach/reset_manager_arria10.h
> > new file mode 100755
> > index 000..2668a86
> > --- /dev/null
> > +++ b/arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h
> > @@ -0,0 +1,144 @@
> > +/*
> > + *  Copyright (C) 2012-2017 Altera Corporation 
> > + *
> > + * SPDX-License-Identifier:GPL-2.0+
> > + */
> > +
> > +#ifndef_RESET_MANAGER_ARRIA10_H_
> > +#define_RESET_MANAGER_ARRIA10_H_
> Use #ifdef[space]FOO and #define[space]FOO
Okay
> 
> > 
> > +void watchdog_disable(void);
> > +void reset_deassert_noc_ddr_scheduler(void);
> > +int is_wdt_in_reset(void);
> > +void emac_manage_reset(ulong emacbase, uint state);
> > +int reset_deassert_bridges_handoff(void);
> > +void reset_assert_fpga_connected_peripherals(void);
> > +void reset_deassert_osc1wd0(void);
> > +void reset_assert_uart(void);
> > +void reset_deassert_uart(void);
> [...]
> 
> > 
> > +#endif /* _RESET_MANAGER_ARRIA10_H_ */
> > diff --git a/arch/arm/mach-socfpga/reset_manager_arria10.c
> > b/arch/arm/mach-socfpga/reset_manager_arria10.c
> > new file mode 100644
> > index 000..01156de
> > --- /dev/null
> > +++ b/arch/arm/mach-socfpga/reset_manager_arria10.c
> > @@ -0,0 +1,406 @@
> > +/*
> > + * Copyright (C) 2016-2017 Intel Corporation
> > + *
> > + * SPDX-License-Identifier:GPL-2.0
> > + */
> > +
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +
> > +DECLARE_GLOBAL_DATA_PTR;
> > +
> > +static const struct socfpga_reset_manager *reset_manager_base =
> > +   (void *)SOCFPGA_RSTMGR_ADDRESS;
> > +static const struct socfpga_system_manager *sysmgr_regs =
> > +   (struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS;
> Use the tabs consistently, one or two, but pick one.
Okay.
> 
> > 
> > +static int get_bridge_init_val(const void *blob, int compat_id);
> > +
> > +#define ECC_MASK (ALT_RSTMGR_PER0MODRST_EMACECC0_SET_MSK|\
> > +   ALT_RSTMGR_PER0MODRST_EMACECC1_SET_MSK|\
> > +   ALT_RSTMGR_PER0MODRST_EMACECC2_SET_MSK|\
> > +   ALT_RSTMGR_PER0MODRST_NANDECC_SET_MSK|\
> > +   ALT_RSTMGR_PER0MODRST_QSPIECC_SET_MSK|\
> > +   ALT_RSTMGR_PER0MODRST_SDMMCECC_SET_MSK)
> MSK | \
> 
> Keep the spacing please.
Okay.
> 
> > 
> > +void reset_assert_uart(void)
> > +{
> > +   u32 mask = 0;
> > +   unsigned int com_port;
> > +
> > +   com_port = uart_com_port(gd->fdt_blob);
> What's this function , is it defined later in the patchset ?
Oh ya, it is in later patch [misc]. I will try to rearrange this.
> 
> > 
> > +   if (SOCFPGA_UART1_ADDRESS == com_port)
> > +   mask |= ALT_RSTMGR_PER1MODRST_UART1_SET_MSK;
> > 

Re: [U-Boot] [PATCH 05/20] arm: socfpga: add A10 defines

2017-02-27 Thread Ley Foon Tan
On Isn, 2017-02-27 at 11:00 +0100, Marek Vasut wrote:
> On 02/27/2017 10:45 AM, Ley Foon Tan wrote:
> > 
> > On Sab, 2017-02-25 at 22:20 +0100, Marek Vasut wrote:
> > > 
> > > On 02/22/2017 10:47 AM, Ley Foon Tan wrote:
> > > > 
> > > > 
> > > > add i2c, timer and other A10 defines.
> > > Start with capital letter please.
> > > 
> > > > 
> > > > 
> > > > Signed-off-by: Dinh Nguyen 
> > > > Signed-off-by: Ley Foon Tan 
> > > > ---
> > > >  arch/arm/mach-socfpga/include/mach/base_addr_a10.h | 8
> > > > +++-
> > > >  1 file changed, 7 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/arch/arm/mach-socfpga/include/mach/base_addr_a10.h
> > > > b/arch/arm/mach-socfpga/include/mach/base_addr_a10.h
> > > > index a7056d4..d3dea0b 100644
> > > > --- a/arch/arm/mach-socfpga/include/mach/base_addr_a10.h
> > > > +++ b/arch/arm/mach-socfpga/include/mach/base_addr_a10.h
> > > > @@ -1,5 +1,5 @@
> > > >  /*
> > > > - * Copyright (C) 2014 Altera Corporation 
> > > > + * Copyright (C) 2014-2017 Altera Corporation 
> > > >   *
> > > >   * SPDX-License-Identifier:GPL-2.0+
> > > >   */
> > > > @@ -29,14 +29,20 @@
> > > >  #define SOCFPGA_MPUL2_ADDRESS  0xf00
> > > > 0
> > > >  #define SOCFPGA_I2C0_ADDRESS   0xffc02200
> > > >  #define SOCFPGA_I2C1_ADDRESS   0xffc02300
> > > > +#define SOCFPGA_I2C2_ADDRESS   0xffc02400
> > > > +#define SOCFPGA_I2C3_ADDRESS   0xffc02500
> > > > +#define SOCFPGA_I2C4_ADDRESS   0xffc02600
> > > Shouldn't all this come from DT already ? What's the point of
> > > having
> > > those macros at all ?
> > They are used for CONFIG_SYS_I2C_BASE in socfpag_common.h now. I
> > will
> > add #ifndef CONFIG_DM_I2C switch in socfpga_common.h and remove
> > these
> > defines from this file.
> Ah hm, ok, then keep them. Unless you want to convert the i2c
> driver
> to DM of course, which would be more then welcome.
Then I will keep them for now. Yes, converting to DM is better, we will
try to that when enabling i2c.
> 
> > 
> > > 
> > > 
> > > > 
> > > > 
> > > >  #define SOCFPGA_ECC_OCRAM_ADDRESS  0xff8c3000
> > > >  #define SOCFPGA_UART0_ADDRESS  0xffc0200
> > > > 0
> > > >  #define SOCFPGA_OSC1TIMER0_ADDRESS 0xffd0
> > > > +#define SOCFPGA_OSC1TIMER1_ADDRESS 0xffd00100
> > > >  #define SOCFPGA_CLKMGR_ADDRESS 0xffd040
> > > > 00
> > > >  #define SOCFPGA_RSTMGR_ADDRESS 0xffd050
> > > > 00
> > > >  
> > > >  #define SOCFPGA_SDR_ADDRESS0xffcfb000
> > > > +#define SOCFPGA_NOC_L4_PRIV_FLT_OFST   0xffd11000
> > > > +#define SOCFPGA_NOC_FW_H2F_SCR_OFST0xffd13500
> > > >  #define SOCFPGA_SDR_SCHEDULER_ADDRESS  0xffd1240
> > > > 0
> > > >  #define SOCFPGA_SDR_FIREWALL_OCRAM_ADDRESS 0xffd13200
> > > >  #define SOCFPGA_SDR_FIREWALL_MPU_FPGA_ADDRESS  0xffd1330
> > > > 0
> > > > 
> 
Thanks

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


Re: [U-Boot] [PATCH 1/6] sunxi: GPIO: introduce sunxi_gpio_setup_dt_pins()

2017-02-27 Thread Maxime Ripard
On Mon, Feb 27, 2017 at 12:26:40AM +, Andre Przywara wrote:
> Instead of hard-coding GPIO pins used for a certain peripheral, we
> should just use the pinctrl information from the DT.
> The sun8i-emac driver has some simple implementation of that, so
> let's just generalize this and move the code into a more common
> location.
> On the way we add support for the new, generic pinctrl binding now
> used by all Allwinner SoCs.
> 
> Signed-off-by: Andre Przywara 
> ---
>  arch/arm/include/asm/arch-sunxi/gpio.h |  4 ++
>  arch/arm/mach-sunxi/pinmux.c   | 77 
> ++
>  2 files changed, 81 insertions(+)
> 
> diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h 
> b/arch/arm/include/asm/arch-sunxi/gpio.h
> index 85a4ec3..ba8c661 100644
> --- a/arch/arm/include/asm/arch-sunxi/gpio.h
> +++ b/arch/arm/include/asm/arch-sunxi/gpio.h
> @@ -239,4 +239,8 @@ int axp_gpio_init(void);
>  static inline int axp_gpio_init(void) { return 0; }
>  #endif
>  
> +int sunxi_gpio_parse_pin_name(const char *pin_name);
> +int sunxi_gpio_setup_dt_pins(const void * volatile fdt_blob, int node,
> +  const char * mux_name, int mux_sel);
> +
>  #endif /* _SUNXI_GPIO_H */
> diff --git a/arch/arm/mach-sunxi/pinmux.c b/arch/arm/mach-sunxi/pinmux.c
> index b026f78..f1e1e8f 100644
> --- a/arch/arm/mach-sunxi/pinmux.c
> +++ b/arch/arm/mach-sunxi/pinmux.c
> @@ -9,6 +9,9 @@
>  #include 
>  #include 
>  #include 
> +#include 
> +#include 
> +#include 
>  
>  void sunxi_gpio_set_cfgbank(struct sunxi_gpio *pio, int bank_offset, u32 val)
>  {
> @@ -69,3 +72,77 @@ int sunxi_gpio_set_pull(u32 pin, u32 val)
>  
>   return 0;
>  }
> +
> +int sunxi_gpio_parse_pin_name(const char *pin_name)
> +{
> + int pin;
> +
> + if (pin_name[0] != 'P')
> + return -1;
> +
> + if (pin_name[1] < 'A' || pin_name[1] > 'Z')
> + return -1;
> +
> + pin = (pin_name[1] - 'A') << 5;
> + pin += simple_strtol(_name[2], NULL, 10);
> +
> + return pin;
> +}

That function already exists, sunxi_name_to_gpio.

Maxime

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


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


Re: [U-Boot] [PATCH 05/20] arm: socfpga: add A10 defines

2017-02-27 Thread Marek Vasut
On 02/27/2017 10:45 AM, Ley Foon Tan wrote:
> On Sab, 2017-02-25 at 22:20 +0100, Marek Vasut wrote:
>> On 02/22/2017 10:47 AM, Ley Foon Tan wrote:
>>>
>>> add i2c, timer and other A10 defines.
>> Start with capital letter please.
>>
>>>
>>> Signed-off-by: Dinh Nguyen 
>>> Signed-off-by: Ley Foon Tan 
>>> ---
>>>  arch/arm/mach-socfpga/include/mach/base_addr_a10.h | 8 +++-
>>>  1 file changed, 7 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm/mach-socfpga/include/mach/base_addr_a10.h
>>> b/arch/arm/mach-socfpga/include/mach/base_addr_a10.h
>>> index a7056d4..d3dea0b 100644
>>> --- a/arch/arm/mach-socfpga/include/mach/base_addr_a10.h
>>> +++ b/arch/arm/mach-socfpga/include/mach/base_addr_a10.h
>>> @@ -1,5 +1,5 @@
>>>  /*
>>> - * Copyright (C) 2014 Altera Corporation 
>>> + * Copyright (C) 2014-2017 Altera Corporation 
>>>   *
>>>   * SPDX-License-Identifier:GPL-2.0+
>>>   */
>>> @@ -29,14 +29,20 @@
>>>  #define SOCFPGA_MPUL2_ADDRESS  0xf000
>>>  #define SOCFPGA_I2C0_ADDRESS   0xffc02200
>>>  #define SOCFPGA_I2C1_ADDRESS   0xffc02300
>>> +#define SOCFPGA_I2C2_ADDRESS   0xffc02400
>>> +#define SOCFPGA_I2C3_ADDRESS   0xffc02500
>>> +#define SOCFPGA_I2C4_ADDRESS   0xffc02600
>> Shouldn't all this come from DT already ? What's the point of having
>> those macros at all ?
> They are used for CONFIG_SYS_I2C_BASE in socfpag_common.h now. I will
> add #ifndef CONFIG_DM_I2C switch in socfpga_common.h and remove these
> defines from this file.

Ah hm, ok, then keep them. Unless you want to convert the i2c driver
to DM of course, which would be more then welcome.

>>
>>>
>>>  #define SOCFPGA_ECC_OCRAM_ADDRESS  0xff8c3000
>>>  #define SOCFPGA_UART0_ADDRESS  0xffc02000
>>>  #define SOCFPGA_OSC1TIMER0_ADDRESS 0xffd0
>>> +#define SOCFPGA_OSC1TIMER1_ADDRESS 0xffd00100
>>>  #define SOCFPGA_CLKMGR_ADDRESS 0xffd04000
>>>  #define SOCFPGA_RSTMGR_ADDRESS 0xffd05000
>>>  
>>>  #define SOCFPGA_SDR_ADDRESS0xffcfb000
>>> +#define SOCFPGA_NOC_L4_PRIV_FLT_OFST   0xffd11000
>>> +#define SOCFPGA_NOC_FW_H2F_SCR_OFST0xffd13500
>>>  #define SOCFPGA_SDR_SCHEDULER_ADDRESS  0xffd12400
>>>  #define SOCFPGA_SDR_FIREWALL_OCRAM_ADDRESS 0xffd13200
>>>  #define SOCFPGA_SDR_FIREWALL_MPU_FPGA_ADDRESS  0xffd13300
>>>
>>


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


Re: [U-Boot] [PATCH 05/20] arm: socfpga: add A10 defines

2017-02-27 Thread Ley Foon Tan
On Sab, 2017-02-25 at 22:20 +0100, Marek Vasut wrote:
> On 02/22/2017 10:47 AM, Ley Foon Tan wrote:
> > 
> > add i2c, timer and other A10 defines.
> Start with capital letter please.
> 
> > 
> > Signed-off-by: Dinh Nguyen 
> > Signed-off-by: Ley Foon Tan 
> > ---
> >  arch/arm/mach-socfpga/include/mach/base_addr_a10.h | 8 +++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/mach-socfpga/include/mach/base_addr_a10.h
> > b/arch/arm/mach-socfpga/include/mach/base_addr_a10.h
> > index a7056d4..d3dea0b 100644
> > --- a/arch/arm/mach-socfpga/include/mach/base_addr_a10.h
> > +++ b/arch/arm/mach-socfpga/include/mach/base_addr_a10.h
> > @@ -1,5 +1,5 @@
> >  /*
> > - * Copyright (C) 2014 Altera Corporation 
> > + * Copyright (C) 2014-2017 Altera Corporation 
> >   *
> >   * SPDX-License-Identifier:GPL-2.0+
> >   */
> > @@ -29,14 +29,20 @@
> >  #define SOCFPGA_MPUL2_ADDRESS  0xf000
> >  #define SOCFPGA_I2C0_ADDRESS   0xffc02200
> >  #define SOCFPGA_I2C1_ADDRESS   0xffc02300
> > +#define SOCFPGA_I2C2_ADDRESS   0xffc02400
> > +#define SOCFPGA_I2C3_ADDRESS   0xffc02500
> > +#define SOCFPGA_I2C4_ADDRESS   0xffc02600
> Shouldn't all this come from DT already ? What's the point of having
> those macros at all ?
They are used for CONFIG_SYS_I2C_BASE in socfpag_common.h now. I will
add #ifndef CONFIG_DM_I2C switch in socfpga_common.h and remove these
defines from this file.
> 
> > 
> >  #define SOCFPGA_ECC_OCRAM_ADDRESS  0xff8c3000
> >  #define SOCFPGA_UART0_ADDRESS  0xffc02000
> >  #define SOCFPGA_OSC1TIMER0_ADDRESS 0xffd0
> > +#define SOCFPGA_OSC1TIMER1_ADDRESS 0xffd00100
> >  #define SOCFPGA_CLKMGR_ADDRESS 0xffd04000
> >  #define SOCFPGA_RSTMGR_ADDRESS 0xffd05000
> >  
> >  #define SOCFPGA_SDR_ADDRESS0xffcfb000
> > +#define SOCFPGA_NOC_L4_PRIV_FLT_OFST   0xffd11000
> > +#define SOCFPGA_NOC_FW_H2F_SCR_OFST0xffd13500
> >  #define SOCFPGA_SDR_SCHEDULER_ADDRESS  0xffd12400
> >  #define SOCFPGA_SDR_FIREWALL_OCRAM_ADDRESS 0xffd13200
> >  #define SOCFPGA_SDR_FIREWALL_MPU_FPGA_ADDRESS  0xffd13300
> > 
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/6] sunxi: update Pine64/A64 DTs

2017-02-27 Thread Andre Przywara
Hi,

On 27/02/17 03:30, Chen-Yu Tsai wrote:
> On Mon, Feb 27, 2017 at 8:26 AM, Andre Przywara  
> wrote:
>> Hi,
>>
>> in the wake of the sunxi DM enablement series it became apparent that
>> the current device tree files for the A64 SoC and its board are outdated.
>>
>> Since Linux v4.10-rc1 there are now basic .dts files for the Allwinner
>> A64 SoC and the Pine64 boards in the mainline kernel.
>> Linux v4.11-rc1 added MMC and USB support.
>> Because our preliminary device trees used in U-Boot differ significantly,
>> let's update our copy with what's in the current Linus' master tree.
>> Since in contrast to U-Boot the kernel still lacks support for Ethernet,
>> we keep our preliminary nodes for that IP, but adjust it slightly to
>> match the new clocks and reset bindings.
>>
>> As the sun8i-emac driver is actually using the DT for the pinmux setup,
>> we teach it how to cope with the new pinctrl bindings in the first two
>> patches. This is probably becoming somewhat obsolete very soon (with
>> DM GPIO support on the list already), however I consider these two
>> patches as merely fixes for the existing driver to maintain bisectability.
>> It would make sense to merge the new DTs before the DM patches, so we
>> need to have something in place which works meanwhile.
>>
>> Let me know what you think.
>>
>> Cheers,
>> Andre.
>>
>> Andre Przywara (6):
>>   sunxi: GPIO: introduce sunxi_gpio_setup_dt_pins()
>>   net: sun8i-emac: use new, generic GPIO setup routine
>>   sunxi: dts: update sun50i-a64.dtsi from Linux
>>   sunxi: dts: update Pine64 .dts
>>   sunxi: dts: remove now obsolete pine64-common.dtsi
>>   sunxi: dts: add Bananapi M64 .dts
> 
> Could we keep this simple, and just do a "sync with the kernel" commit for
> sun50i, which also keeps the sun8i-emac specific bits. And also explicitly
> mention the git commit or tag you are syncing to.

So you mean to drop patch 1 and 2 and keep the old style pinctrl
bindings around for the EMAC node?
I can certainly do this (if others agree), but didn't want to dodge a
more proper solution in the first place.

Another alternative would be to squash the functionality of patch 1
directly into sun8i_emac.c, so without the moving to pinmux.c. This
would mean dropping patch 1/6 and just having a fix for the sun8i_emac.

Let me know what's the preferred solution here.

Cheers,
Andre.

>>  arch/arm/dts/Makefile  |   3 +-
>>  arch/arm/dts/sun50i-a64-bananapi-m64.dts   | 135 +++
>>  arch/arm/dts/sun50i-a64-pine64-common.dtsi |  93 -
>>  arch/arm/dts/sun50i-a64-pine64-plus.dts|  16 +-
>>  arch/arm/dts/sun50i-a64-pine64.dts |  72 +++-
>>  arch/arm/dts/sun50i-a64.dtsi   | 615 
>> +
>>  arch/arm/include/asm/arch-sunxi/gpio.h |   4 +
>>  arch/arm/mach-sunxi/pinmux.c   |  77 
>>  drivers/net/sun8i_emac.c   |  38 +-
>>  include/dt-bindings/clock/sun50i-a64-ccu.h | 134 +++
>>  include/dt-bindings/reset/sun50i-a64-ccu.h |  98 +
>>  11 files changed, 706 insertions(+), 579 deletions(-)
>>  create mode 100644 arch/arm/dts/sun50i-a64-bananapi-m64.dts
>>  delete mode 100644 arch/arm/dts/sun50i-a64-pine64-common.dtsi
>>  create mode 100644 include/dt-bindings/clock/sun50i-a64-ccu.h
>>  create mode 100644 include/dt-bindings/reset/sun50i-a64-ccu.h
>>
>> --
>> 2.8.2
>>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2017-02-27 Thread Stefano Babic
Hi Tom,

please pull from u-boot-imx, thanks !

The following changes since commit b24cf8540a85a9bf97975aadd6a7542f166c78a3:

  video: mxsfb: Fix reset hang when videomode variable is not present
(2017-02-22 21:47:59 +0100)

are available in the git repository at:

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

for you to fetch changes up to 60a38e423b21a897b8fa0d9376d9370ea915ddd8:

  i.MX6Q: isiot: Switch the mmc env based on devno (2017-02-26 13:00:22
+0100)


Andrey Yurovsky (1):
  mtd: nand: build MXS driver for MX7 as well

Jagan Teki (25):
  configs: imx6: Don't define USDHC2_BASE_ADDR
  arm: imx6ul: Add Engicam Is.IoT MX6UL Starter Kit initial support
  arm: dts: imx6ul-isiot: Add I2C nodes
  imx6: isiotmx6ul: Add I2C support
  arm: dts: imx6ul-isiot: Add FEC node
  imx6: isiotmx6ul: Add FEC support
  imx6: isiotmx6ul: Add NAND support
  imx6: isiotmx6ul: Add nandboot env support
  imx6ul: isiotmx6ul: Enable I2C support
  i.MX6: engicam: Include dts files under MAINTAINERS
  imx6: Add imx6_src_get_boot_mode
  imx: spl: Update NAND bootmode detection bit
  imx: Use IMX6_BMODE_* macros instead of numericals
  imx6: Add src_base structure define macro
  imx6: isiotmx6ul: Update SPL board boot order for eMMC
  i.MX6UL: isiot: Add eMMC boot support
  i.MX6UL: isiot: Add modeboot env via board_late_init
  i.MX6UL: isiot: Add mmc_late_init
  i.MX6UL: isiot: Switch the mmc env based on devno
  arm: dts: imx6qdl-icore-rqs: Add eMMC node
  imx6: icorem6_rqs: Update SPL board boot order for eMMC
  imx6: icorem6_rqs: Add eMMC boot support
  i.MX6Q: icorem6_rqs: Add modeboot env via board_late_init
  i.MX6Q: icorem6_rqs: Add mmc_late_init
  i.MX6Q: isiot: Switch the mmc env based on devno

Markus Niebel (13):
  arm: imx6: tqma6: add configurable CMA size
  imx6: tqma6: rely on default setting for tftp and nfs
  mx6: tqma6: fix typo in env
  mx6: tqma6: add rootfsmode environment for mmc / sd
  tqma6: fix rounding in env
  tqma6: [cosmetic] sanitize environment defines
  arm: imx6: tqma6: use CONFIG_TQM6x for SOM specific settings
  arm: imx6: tqma6: add support for TQMa6DL variant
  imx6: tqma6: implement power_init_board
  imx6: tqma6: use lower driver stength for I2C pins
  imx6: tqma6: disable spi CS unused in U-Boot
  imx6: tqma6: adjust ethernet phy reset delay
  mx6: tqma6: clear enet clk sel for mba6

Peng Fan (16):
  imx: mx7ulp: Add mx7ulp to Kconfig
  imx: mx7ulp: add registers header file
  imx: mx7ulp: add iomux driver to support IOMUXC0 and IOMUXC1
  imx: mx7ulp: Add clock framework and functions
  imx: mx7ulp: Add soc level initialization codes and functions
  gpio: Add Rapid GPIO2P driver for i.MX7ULP
  mxc_ocotp: Update driver to support OCOTP controller on i.MX7ULP
  pinctrl: Add i.MX7ULP pinctrl driver
  i2c: lpi2c: add lpi2c driver for i.MX7ULP
  serial: lpuart: restructure lpuart driver
  serial: lpuart: add i.MX7ULP support
  mx7ulp: Add HAB boot support
  arm: dts: add i.MX7ULP dtsi file
  mmc: fsl_esdhc: support i.MX7ULP
  imx: imx7ulp: add EVK board support
  imx: mx7ulp_evk: enable mmc/regulator support

Peter Robinson (3):
  mx6sx: udoo_neo: Define the default serial console
  mx6sx: udoo_neo: use different load address for ramdisk
  mx6sx: udoo_neo: Enable distro boot options in config

Stefano Babic (1):
  Merge branch 'master' of git://git.denx.de/u-boot

Ye Li (3):
  imx: mx7ulp: Implement the clock functions for i2c driver
  mx7ulp: Add iomux pins header file
  wdog: Add the watchdog driver for MX7ULP.

 arch/arm/Kconfig|7 +
 arch/arm/Makefile   |2 +-
 arch/arm/cpu/armv7/Makefile |3 +-
 arch/arm/cpu/armv7/mx6/Kconfig  |   12 +
 arch/arm/cpu/armv7/mx7ulp/Kconfig   |   17 ++
 arch/arm/cpu/armv7/mx7ulp/Makefile  |8 +
 arch/arm/cpu/armv7/mx7ulp/clock.c   |  365
+++
 arch/arm/cpu/armv7/mx7ulp/iomux.c   |   70 ++
 arch/arm/cpu/armv7/mx7ulp/pcc.c |  286
+
 arch/arm/cpu/armv7/mx7ulp/scg.c | 1086
++
 arch/arm/cpu/armv7/mx7ulp/soc.c |  247
++
 arch/arm/cpu/armv7/vf610/generic.c  |5 +
 arch/arm/dts/Makefile   |7 +-
 arch/arm/dts/imx6qdl-icore-rqs.dtsi |   22 ++
 arch/arm/dts/imx6ul-isiot-emmc.dts  |   77 ++
 arch/arm/dts/imx6ul-isiot-mmc.dts   |   50 
 arch/arm/dts/imx6ul-isiot-nand.dts 

Re: [U-Boot] [PATCH] rockchip: video: fix mpixelclock in rockchip HDMI

2017-02-27 Thread Nickey.Yang

Hi Simon,

在 2017年02月24日 00:19, Simon Glass 写道:

Hi Nickey,

On 22 February 2017 at 23:56, Nickey.Yang  wrote:

Hi Simon,



在 2017年02月23日 11:52, Simon Glass 写道:

Hi,

On 11 January 2017 at 22:08, Simon Glass  wrote:

On 28 December 2016 at 23:01, Nickey Yang 
wrote:

Correct mpixelclock errors in rockchip_phy_config[] and
rockchip_mpll_cfg[].

Signed-off-by: Nickey Yang 
---
   drivers/video/rockchip/rk_hdmi.c | 20 ++--
   1 file changed, 10 insertions(+), 10 deletions(-)

Applied to u-boot-rockchip, thanks!

I only just noticed, but this patch breaks HDMI output on firefly. Can
you please take a look? What does this patch actually fix?

Regards,
Simon


  You can add

 printf("---YYS  mpll.cpce = %x \n",rockchip_mpll_cfg[i].cpce);
 printf("---YYS  mpll.gmp = %x \n",rockchip_mpll_cfg[i].gmp);
 printf("---YYS  mpll.curr = %x \n",rockchip_mpll_cfg[i].curr);

in  hdmi_phy_configure(rk_hdmi.c   line 409), all of those value will be 0
without this patch.
We want to get those different value by near clock settings between
rockchip_mpll_cfg[] in fact.

Yes it makes sense


by the way,HDMI output on firefly will work well when reset this patch?

Yes it works when I revert.

Regards,
Simon





I am sorry for my mistake.
There is one "0" too many in 8350 mpixelclock in rockchip_mpll_cfg[].
I have send new patch  rockchip: video: fix 8350 clock mistake in 
rockchip HDMI to fix it.


Regards,
Nickey




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


  1   2   >