Re: [U-Boot] [PATCH v3 6/9] dm: core: Dont export dm_scan_fdt_node()

2017-05-18 Thread sjg
This function is only used in one place. It is better to just declare it internally since there is a simpler replacement for use outside the driver-model core code. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/core/root.c | 17 +++-- include/dm/roo

Re: [U-Boot] [PATCH v3 7/9] dm: core: Replace of_offset with accessor (part 2)

2017-05-18 Thread sjg
At present devices use a simple integer offset to record the device tree node associated with the device. In preparation for supporting a live device tree, which uses a node pointer instead, refactor existing code to access this field through an inline function. Signed-off-by: Simon Glass --- Ch

Re: [U-Boot] [PATCH v3 5/9] dm: Fix up inclusion of common.h

2017-05-18 Thread sjg
It is good practice to include common.h as the first header. This ensures that required features like the DECLARE_GLOBAL_DATA_PTR macro, configuration options and common types are available. Fix up some files which currently don't do this. This is necessary because driver model will soon start usi

Re: [U-Boot] [PATCH v3 1/9] dm: Use dm.h header when driver mode is used

2017-05-18 Thread sjg
This header includes things that are needed to make driver build. Adjust existing users to include that always, even if other dm/ includes are present Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/arm/lib/bootm.c | 2 +- arch/arm/mach

Re: [U-Boot] [PATCH v3 4/9] atmel: Fix up use of dm_scan_fdt_node()

2017-05-18 Thread sjg
This function should not be used outside the core driver-model code. Update it to use dm_scan_fdt_dev() instead. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/gpio/atmel_pio4.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Applied to u-boot-dm __

Re: [U-Boot] [PATCH v3 2/9] dm: core: Move dev_get_addr() etc. into a separate file

2017-05-18 Thread sjg
Move this group of address-related functions into a new file. These use the flat device tree. Future work will provide new versions of these which can support the live tree. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/core/Makefile | 2 +- drivers/core/dev

Re: [U-Boot] [PATCH 7/8] dm: mmc: Rewrite mmc_blk_probe()

2017-05-18 Thread sjg
This function is called when the MMC block device is being probed. There is a recursive call in this function since find_mmc_device() itself can cause the MMC device to be probed. Admittedly the MMC device should already be probed, since we would not be probing its child otherwise, but the current

Re: [U-Boot] [PATCH 4/8] dm: blk: Improve block device claiming

2017-05-18 Thread sjg
The intention with block devices is that the device number (devnum field in its descriptor) matches the alias of its parent device. For example, with: aliases { mmc0 = "/sdhci@700b0600"; mmc1 = "/sdhci@700b0400"; } we expect that the block devices f

Re: [U-Boot] [PATCH 5/8] dm: mmc: Avoid probing block devices in find_mmc_device()

2017-05-18 Thread sjg
We do not need to probe the block device here, so avoid doing so. The MMC device itself must be active, but the block device can come later. Signed-off-by: Simon Glass --- drivers/mmc/mmc-uclass.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Applied to u-boot-dm

Re: [U-Boot] [PATCH 3/8] dm: blk: Add a function to find the next block device number

2017-05-18 Thread sjg
On Wed, May 3, 2017 at 5:36 AM, Simon Glass wrote: > Hi Andy, > > On 24 April 2017 at 02:04, Andy Shevchenko wrote: >> On Mon, Apr 24, 2017 at 5:02 AM, Simon Glass wrote: >>> At present this code is inline. Move it into a function to allow it to >>> be used elsewhere. >>> >>> Signed-off-by: Simo

Re: [U-Boot] [PATCH 8/8] tegra: Convert MMC to use driver model for operations

2017-05-18 Thread sjg
Enable CONFIG_DM_MMC_OPS and CONFIG_BLK for all Tegra devices. This moves Tegra to use driver model fully for MMC. Signed-off-by: Simon Glass --- board/toradex/common/tdx-cfg-block.c | 2 +- configs/apalis-tk1_defconfig | 2 - configs/apalis_t30_defconfig | 2 - configs/beave

Re: [U-Boot] [PATCH 2/8] dm: blk: Allow finding block devices without probing

2017-05-18 Thread sjg
Sometimes it is useful to be able to find a block device without also probing it. Add a function for this as well as the associated test. Signed-off-by: Simon Glass --- drivers/block/blk-uclass.c | 15 +-- include/blk.h | 15 ++- test/dm/blk.c |

Re: [U-Boot] [PATCH] dm: mmc: Don't call board_mmc_power_init() with driver model

2017-05-18 Thread sjg
On Sun, Apr 23, 2017 at 4:10 AM, Simon Glass wrote: > We should not call out to board code from drivers. With driver model, > mmc_power_init() already has code to use a named regulator, but the > legacy code path remains. Update the code to make this clear. > I don't like this patch as it describ

Re: [U-Boot] [PATCH v3 3/9] dm: Rename dev_addr..() functions

2017-05-18 Thread sjg
These support the flat device tree. We want to use the dev_read_..() prefix for functions that support both flat tree and live tree. So rename the existing functions to avoid confusion. In the end we will have: 1. dev_read_addr...()- works on devices, supports flat/live tree 2. devfdt_g

Re: [U-Boot] [PATCH 6/8] dm: mmc: Check that drivers have operations

2017-05-18 Thread sjg
When binding a new MMC device, make sure that it has the required operations. Since for now we still support *not* having the operations (with CONFIG_DM_MMC_OPS not enabled) it makes sense to add this check. Signed-off-by: Simon Glass --- drivers/mmc/mmc-uclass.c | 4 1 file changed, 4 ins

Re: [U-Boot] [PATCH v2 1/2] test: py: Use global pytestmark for hush tests

2017-05-18 Thread Stephen Warren
On 05/18/2017 01:23 AM, Michal Simek wrote: All tests in test_hush_if_test depends on hush parser to be present. This patch simplify test dependencies by using global pytestmark. Acked-by: Stephen Warren ___ U-Boot mailing list U-Boot@lists.denx.de h

Re: [U-Boot] [PATCH v2 2/2] test: py: hush: Add echo dependency

2017-05-18 Thread Stephen Warren
On 05/18/2017 01:23 AM, Michal Simek wrote: Some tests depends on echo command to be present. diff --git a/test/py/tests/test_hush_if_test.py b/test/py/tests/test_hush_if_test.py +@pytest.mark.buildconfigspec('cmd_echo') @pytest.mark.parametrize('expr,result', subtests) def test_hush_i

Re: [U-Boot] [PATCH 8/8] tegra: Convert MMC to use driver model for operations

2017-05-18 Thread Tom Warren
Simon, What testing did you do? Tom -- nvpublic > -Original Message- > From: s...@google.com [mailto:s...@google.com] > Sent: Thursday, May 18, 2017 9:01 AM > To: Simon Glass > Cc: Alban Bedel ; Max Krummenacher > ; Masahiro Yamada > ; Tom Warren ; > peter.ch...@data61.csiro.au; Stephen

Re: [U-Boot] [PATCH 8/8] tegra: Convert MMC to use driver model for operations

2017-05-18 Thread Simon Glass
Hi Tom, On 18 May 2017 at 10:33, Tom Warren wrote: > Simon, > > What testing did you do? This was tested on Nyan. I'd be grateful for any Tegra review / testing that you can arrange. It seems mighty quiet around here :-) > > Tom > -- > nvpublic Regards, Simon __

Re: [U-Boot] Very slow mtest on i.MX6UL over dual-die DDR3 (two chip selects)

2017-05-18 Thread Palacios, Hector
Hi Fabio, On Thu, 18 May 2017 17:52, Fabio Estevam wrote: > I got very slow performance with MX6UL when U-Boot is loaded via > serial download mode. That's it, actually! I was booting the target via USB, booting from the NAND shows normal performance. > This gets fixed by setting the SMP bit:

Re: [U-Boot] Very slow mtest on i.MX6UL over dual-die DDR3 (two chip selects)

2017-05-18 Thread Fabio Estevam
Hi Hector, On Thu, May 18, 2017 at 2:06 PM, Palacios, Hector wrote: > Hi Fabio, > > On Thu, 18 May 2017 17:52, Fabio Estevam wrote: >> I got very slow performance with MX6UL when U-Boot is loaded via >> serial download mode. > > That's it, actually! > I was booting the target via USB, booting fro

[U-Boot] [PATCH] dm: serial: fix uart stop bits

2017-05-18 Thread Álvaro Fernández Rojas
I missed this when I added support for BMIPS UART driver and it's needed to achieve a real 115200 8N1 setup. Signed-off-by: Álvaro Fernández Rojas --- drivers/serial/serial_bcm6345.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/serial/serial_bcm6345.c b/drivers/serial/serial_bcm

[U-Boot] [PATCH] dm: serial: bcm6345: fix uart stop bits

2017-05-18 Thread Álvaro Fernández Rojas
I missed this when I added support for BMIPS UART driver and it's needed to achieve a real 115200 8N1 setup. Signed-off-by: Álvaro Fernández Rojas --- v2: fix commit title (missed bcm6345) drivers/serial/serial_bcm6345.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/serial/seri

[U-Boot] [PATCH 1/4] spi: cadence_spi: Add cdns, trigger-address DT property

2017-05-18 Thread Rush, Jason A.
The socfpga arch uses a different value for the indaddrtrig reg than the ahbbase address. Adopting the cdns,trigger-address DT bindings from the Linux kernel allows the trigger-address to be set correctly on the socfpga arch. Tested on Terasic SoCKit dev board (Altera Cyclone V) Signed-off-by: Ja

[U-Boot] [PATCH 2/4] dts: socfpga: Add trigger-address property to QSPI device

2017-05-18 Thread Rush, Jason A.
Add the 'cdns,trigger-address' property to the cadence QSPI device node for Altera SoC devices. Signed-off-by: Jason A. Rush --- arch/arm/dts/socfpga.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/dts/socfpga.dtsi b/arch/arm/dts/socfpga.dtsi index 8588221e57..abf0648a6f 100644

[U-Boot] [PATCH 0/4] spi: cadence_spi: Add cdns, trigger-address DT property

2017-05-18 Thread Rush, Jason A.
This patch series addresses an issue with the indaddrtrig register on the Cadence QSPI device being programmed with the wrong value for the socfpga arch. Adopting the trigger-address DT bindings from the Linux kernel allows the indaddrtrig register to be set independently from the ahbbase as requi

[U-Boot] [PATCH 4/4] dts: stv0991: Add trigger-address property to QSPI device

2017-05-18 Thread Rush, Jason A.
Add the 'cdns,trigger-address' property to the cadence QSPI device node for the ST STV0991 application board. Signed-off-by: Jason A. Rush --- arch/arm/dts/stv0991.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/dts/stv0991.dts b/arch/arm/dts/stv0991.dts index fa3fd641b2..6bc537

[U-Boot] [PATCH 3/4] dts: k2g: Add trigger-address property to QSPI device

2017-05-18 Thread Rush, Jason A.
Add the 'cdns,trigger-address' property to the cadence QSPI device node for Texas Instruments K2G SoC devices. Signed-off-by: Jason A. Rush --- arch/arm/dts/keystone-k2g.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/dts/keystone-k2g.dtsi b/arch/arm/dts/keystone-k2g.dtsi index

[U-Boot] [PATCH 0/6] spl: add xip booting support

2017-05-18 Thread Vikas Manocha
This patchset adds support for XIP (execute in place) of U-Boot or kernel image and enables it for stm32f7. Vikas Manocha (6): stm32f7: remove duplicate configs stm32: stm32f7: add spl build support SPL: Add XIP booting support serial: stm32f7: disable overrun spl: stm32f7: add kernel b

[U-Boot] [PATCH 1/6] stm32f7: remove duplicate configs

2017-05-18 Thread Vikas Manocha
Signed-off-by: Vikas Manocha --- configs/stm32f746-disco_defconfig | 4 1 file changed, 4 deletions(-) diff --git a/configs/stm32f746-disco_defconfig b/configs/stm32f746-disco_defconfig index 4322aad..a334d50 100644 --- a/configs/stm32f746-disco_defconfig +++ b/configs/stm32f746-disco_defc

[U-Boot] [PATCH 2/6] stm32: stm32f7: add spl build support

2017-05-18 Thread Vikas Manocha
This commit supports booting from stm32 internal nor flash. spl U-Boot initializes the sdram memory, copies next image (e.g. standard U-Boot) to sdram & then jumps to entry point. Here are the flash memory addresses for U-Boot-spl & standard U-Boot: - spl U-Boot: 0x0800_

[U-Boot] [PATCH 6/6] spl: stm32f7: configure for xip booting

2017-05-18 Thread Vikas Manocha
With xip booting configuration, we don't need to copy the next image (U-Boot or linux xipimage) from flash to sdram area. Flash memory organization is like this: spl-U-Boot: u-boot-spl.bin : 0x0800_ U-Boot :u-boot-dtb.bin : 0x0800_8000 linux : xipI

[U-Boot] [PATCH 3/6] SPL: Add XIP booting support

2017-05-18 Thread Vikas Manocha
Enable support for XIP (execute in place) of U-Boot or kernel image. There is no need to copy image from flash to ram if flash supports execute in place. Signed-off-by: Vikas Manocha --- arch/arm/include/asm/spl.h | 1 + board/st/stm32f746-disco/stm32f746-disco.c | 1 + common/

[U-Boot] [PATCH 5/6] spl: stm32f7: add kernel boot support

2017-05-18 Thread Vikas Manocha
Signed-off-by: Vikas Manocha --- arch/arm/mach-stm32/stm32f7/Kconfig| 1 + board/st/stm32f746-disco/stm32f746-disco.c | 8 include/configs/stm32f746-disco.h | 7 +++ 3 files changed, 16 insertions(+) diff --git a/arch/arm/mach-stm32/stm32f7/Kconfig b/arch/arm/mach-

[U-Boot] [PATCH 4/6] serial: stm32f7: disable overrun

2017-05-18 Thread Vikas Manocha
With overrun enabled, serial port console freezes & stops receiving data with overun error if we keep sending data. Signed-off-by: Vikas Manocha --- drivers/serial/serial_stm32x7.c | 3 +++ drivers/serial/serial_stm32x7.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/serial/seri

[U-Boot] [PATCH 00/10] mips: bmips: add SPI support

2017-05-18 Thread Álvaro Fernández Rojas
BCM63xx SPI controller is a bit tricky since it doesn't allow keeping CS active between transfers, so I had to modify the spi_flash driver in order to allow limiting reads. Álvaro Fernández Rojas (10): drivers: spi: allow limiting reads drivers: spi: add config to consider command bytes when w

[U-Boot] [PATCH 01/10] drivers: spi: allow limiting reads

2017-05-18 Thread Álvaro Fernández Rojas
For some SPI controllers it's not possible to keep the CS active between transfers and they are limited to a known number of bytes. This splits spi_flash reads into different iterations in order to respect the SPI controller limits. Signed-off-by: Álvaro Fernández Rojas --- drivers/mtd/spi/spi_f

[U-Boot] [PATCH 03/10] dm: spi: add BCM63xx SPI driver

2017-05-18 Thread Álvaro Fernández Rojas
This driver is a simplified version of linux/drivers/spi/spi-bcm63xx.c Instead of supporting both HW revisions of the controller in a single build, support has been split by the selected config to save space. Signed-off-by: Álvaro Fernández Rojas --- drivers/spi/Kconfig | 23 +++ drivers/

[U-Boot] [PATCH 06/10] mips: bmips: add bcm63xx-spi driver support for BCM6358

2017-05-18 Thread Álvaro Fernández Rojas
This driver manages the SPI controller present on this SoC. Signed-off-by: Álvaro Fernández Rojas --- arch/mips/dts/brcm,bcm6358.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/mips/dts/brcm,bcm6358.dtsi b/arch/mips/dts/brcm,bcm6358.dtsi index 4f63cf8..11f990d 100644

[U-Boot] [PATCH 08/10] mips: bmips: add bcm63xx-spi driver support for BCM63268

2017-05-18 Thread Álvaro Fernández Rojas
This driver manages the low speed SPI controller present on this SoC. Signed-off-by: Álvaro Fernández Rojas --- arch/mips/dts/brcm,bcm63268.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/mips/dts/brcm,bcm63268.dtsi b/arch/mips/dts/brcm,bcm63268.dtsi index 113a96b..8

[U-Boot] [PATCH 02/10] drivers: spi: add config to consider command bytes when writting to flash

2017-05-18 Thread Álvaro Fernández Rojas
Command bytes are part of the written bytes and they should be taken into account when sending a spi transfer. Signed-off-by: Álvaro Fernández Rojas --- drivers/mtd/spi/spi_flash.c | 2 +- drivers/spi/Kconfig | 3 +++ include/spi.h | 8 +++- 3 files changed, 11 insertio

[U-Boot] [PATCH 10/10] mips: bmips: enable the SPI flash on the Netgear CG3100D

2017-05-18 Thread Álvaro Fernández Rojas
It's a Spansion (s25fl064a) 8 MB SPI flash. Signed-off-by: Álvaro Fernández Rojas --- arch/mips/dts/netgear,cg3100d.dts | 13 + configs/netgear_cg3100d_ram_defconfig | 8 2 files changed, 21 insertions(+) diff --git a/arch/mips/dts/netgear,cg3100d.dts b/arch/mips/dts/

[U-Boot] [PATCH 09/10] mips: bmips: enable the SPI flash on the Sagem F@ST1704

2017-05-18 Thread Álvaro Fernández Rojas
It's a Winbond (w25x32) 4 MB SPI flash. Signed-off-by: Álvaro Fernández Rojas --- arch/mips/dts/sagem,f...@st1704.dts | 13 + configs/sagem_f@st1704_ram_defconfig | 8 2 files changed, 21 insertions(+) diff --git a/arch/mips/dts/sagem,f...@st1704.dts b/arch/mips/dts/s

[U-Boot] [PATCH 04/10] mips: bmips: add bcm63xx-spi driver support for BCM6338

2017-05-18 Thread Álvaro Fernández Rojas
This driver manages the SPI controller present on this SoC. Signed-off-by: Álvaro Fernández Rojas --- arch/mips/dts/brcm,bcm6338.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/mips/dts/brcm,bcm6338.dtsi b/arch/mips/dts/brcm,bcm6338.dtsi index eb51a43..614792e 100644

[U-Boot] [PATCH 05/10] mips: bmips: add bcm63xx-spi driver support for BCM6348

2017-05-18 Thread Álvaro Fernández Rojas
This driver manages the SPI controller present on this SoC. Signed-off-by: Álvaro Fernández Rojas --- arch/mips/dts/brcm,bcm6348.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/mips/dts/brcm,bcm6348.dtsi b/arch/mips/dts/brcm,bcm6348.dtsi index 711b643..841f883 100644

[U-Boot] [PATCH 07/10] mips: bmips: add bcm63xx-spi driver support for BCM3380

2017-05-18 Thread Álvaro Fernández Rojas
This driver manages the SPI controller present on this SoC. Signed-off-by: Álvaro Fernández Rojas --- arch/mips/dts/brcm,bcm3380.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/mips/dts/brcm,bcm3380.dtsi b/arch/mips/dts/brcm,bcm3380.dtsi index e351d58..3c19b90 100644

Re: [U-Boot] [PATCH 3/6] SPL: Add XIP booting support

2017-05-18 Thread Alexandru Gagniuc
On 05/18/2017 11:49 AM, Vikas Manocha wrote: Enable support for XIP (execute in place) of U-Boot or kernel image. There is no need to copy image from flash to ram if flash supports execute in place. Awesome. I've had to hack u-boot before to achieve exactly this. It's nice to have a proper imp

[U-Boot] [PATCH] cmd/elf.c: Support passing arguments with bootelf

2017-05-18 Thread Tom Rini
The bootelf command could, but does not, pass additional arguments along on the command line. Make do_bootelf consume bootelf/flags/address as needed and then pass along anything else to the ELF application we've launched. Reported-by: Thomas Doerfler Signed-off-by: Tom Rini --- Yes, this bug w

Re: [U-Boot] [PATCH 2/2] drivers: net: fsl-mc: Include MAC addr fixup in DPL

2017-05-18 Thread york sun
On 05/18/2017 04:19 AM, Bogdan Purcareata wrote: > Previous to MC v10.x, port mac address was specified via DPL. Since > newer MC versions are compatible with old style DPLs, make the u-boot > env mac addresses visible there. This applies only to DPLs that have an > older version. > > DPLs use 32 b

[U-Boot] [PATCH v3 1/2] dm: serial: bcm6345: fix uart stop bits

2017-05-18 Thread Álvaro Fernández Rojas
I missed this when I added support for BMIPS UART driver and it's needed to achieve a real 115200 8N1 setup. Signed-off-by: Álvaro Fernández Rojas --- v3: no changes, added another fix on a separate patch. v2: fix commit title (missed bcm6345) drivers/serial/serial_bcm6345.c | 2 ++ 1 file ch

[U-Boot] [PATCH v3 2/2] dm: serial: bcm6345: fix baud rate clock calculation

2017-05-18 Thread Álvaro Fernández Rojas
It's currently bugged and doesn't work for even cases. Right shift bits instead of dividing and fix even cases. Signed-off-by: Álvaro Fernández Rojas --- drivers/serial/serial_bcm6345.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/serial/serial_bcm6345.c

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

2017-05-18 Thread Tom Rini
On Thu, May 18, 2017 at 11:32:47AM +0200, Marek Vasut wrote: > The following changes since commit fa8967cfbaed5582ba987756fa9f0470a9affbf4: > > Merge git://git.denx.de/u-boot-uniphier (2017-05-17 14:13:58 -0400) > > are available in the git repository at: > > git://git.denx.de/u-boot-usb.gi

Re: [U-Boot] [PATCH v3] fastboot: Add support for flashing zImage

2017-05-18 Thread Tom Rini
On Thu, May 18, 2017 at 03:04:59PM +0300, Sam Protsenko wrote: > This patch adds support for flashing zImage to the Android boot > partition on eMMC. > > Usage: > > $ fastboot flash zImage > > It's based on [1]. > > [1] > http://omapzoom.org/?p=repo/u-boot.git;a=commit;h=3393b908c1e848bb

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

2017-05-18 Thread Tom Rini
On Thu, May 18, 2017 at 11:42:02AM +0200, Marek Vasut wrote: > The following changes since commit fa8967cfbaed5582ba987756fa9f0470a9affbf4: > > Merge git://git.denx.de/u-boot-uniphier (2017-05-17 14:13:58 -0400) > > are available in the git repository at: > > git://git.denx.de/u-boot-socfpg

Re: [U-Boot] [U-Boot, PATCHv2] scripts/Makefile.lib: Always have ...-u-boot.dtsi be able to override

2017-05-18 Thread Tom Rini
On Wed, May 17, 2017 at 02:06:08PM -0400, Tom Rini wrote: > The intention of having a -u-boot.dtsi file is to be able to make > changes to the provided upstream dts files as well as to be able to add > nodes. Change the logic for adding the file from making it the last > included file at the top

Re: [U-Boot] [U-Boot,v2] ARM: dts: am335x-evm: disable mmc3

2017-05-18 Thread Tom Rini
On Wed, May 17, 2017 at 09:22:55PM +0200, Jean-Jacques Hiblot wrote: > SDIO is not supported in u-boot, there is no point in enabling mmc3. > For this purpose, add u-boot specific dtsi that this will be included > automatically while building the dtb. > > Signed-off-by: Jean-Jacques Hiblot > Rev

[U-Boot] [PATCH v2 09/20] fdt: Build the new python libfdt module

2017-05-18 Thread Simon Glass
Build the upstream python libfdt module. At present the legacy module is still built and is the one that it used. Future work will switch this over. Signed-off-by: Simon Glass --- Changes in v2: - Fix building when srcpath is ".." tools/Makefile | 23 +++ 1 file changed, 23

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

2017-05-18 Thread Simon Glass
Hi Tom, On 9 May 2017 at 17:59, Tom Rini wrote: > > On Tue, May 09, 2017 at 04:53:36PM -0600, Simon Glass wrote: > > > Hi Tom, > > > > Here's the conversion to use the upstream pylibfdt implementation. > > > > > > The following changes since commit 85ea850976daea57c8045f3569566fad5ce9fe0f: > > >

Re: [U-Boot] [PATCH] ARM: fixed relocation using proper alignment

2017-05-18 Thread Lokesh Vutla
On Thursday 18 May 2017 09:04 PM, Manfred Schlaegl wrote: > On 2017-05-18 16:59, Lothar Waßmann wrote: >> Manfred Schlaegl wrote: >> >>> On 2017-05-17 06:13, Lokesh Vutla wrote: On Tuesday 16 May 2017 07:59 PM, Manfred Schlaegl wrote: > On 2017-05-11 08:53, Lokesh Vutla wrote:

Re: [U-Boot] [PATCH 1/3] omap: Add routine for setting fastboot variables

2017-05-18 Thread Lokesh Vutla
On Thursday 18 May 2017 06:31 PM, Sam Protsenko wrote: > This patch reuses new option, which allows us to expose variables > from environment to "fastboot getvar" command. Those variables must be > of "fastboot.%s" format. > > Signed-off-by: Sam Protsenko > --- > arch/arm/include/asm/omap_comm

Re: [U-Boot] [PATCH 2/3] arm: am57xx: Set fastboot variables in environment

2017-05-18 Thread Lokesh Vutla
On Thursday 18 May 2017 06:31 PM, Sam Protsenko wrote: > One can obtain those variables using next commands: > > $ fastboot getvar cpu > $ fastboot getvar secure > $ fastboot getvar board_rev > $ fastboot getvar userdata_size > > Those variables are needed for fastboot.sh script

[U-Boot] [PATCH v3 02/72] Update WARN_ON() to return a value

2017-05-18 Thread Simon Glass
In linux v4.9 this returns a value. This saves checking the warning condition twice in some code. Update the U-Boot version to do this also. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None include/linux/compat.h | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions

[U-Boot] [PATCH v3 00/72] dm: Add support for a 'live' device tree

2017-05-18 Thread Simon Glass
(this is series 2 of 3 for live tree support - the final series will fully convert a real board and provide size comparisons) So far U-Boot uses a 'flat' device tree, which means that it is decoded on the fly as needed. This uses the libfdt library and avoids needing extra memory for additional ta

[U-Boot] [PATCH v3 01/72] dm: core: Set return value first in lists_bind_fdt()

2017-05-18 Thread Simon Glass
Adjust the order to make it clear that *devp is set to NULL by default. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/core/lists.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/core/lists.c b/drivers/core/lists.c index 23b6ba78

[U-Boot] [PATCH v3 08/72] dm: core: Add operations on device tree references

2017-05-18 Thread Simon Glass
Since U-Boot supports both a live tree and a flat tree, we need an easy way to access the tree without worrying about which is currently active. To support this, U-Boot has the concept of an ofnode, which can refer either to a live tree node or a flat tree node. For the live tree, the reference co

[U-Boot] [PATCH v3 07/72] dm: core: Rename of_device_is_compatible()

2017-05-18 Thread Simon Glass
The of_ prefix conflicts with the livetree version of this function. Rename it to avoid problems when we add livetree support. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/core/device.c | 2 +- drivers/firmware/psci.c | 4 ++-- drivers/mm

[U-Boot] [PATCH v3 05/72] dm: Add a function to create a 'live' device tree

2017-05-18 Thread Simon Glass
This function converts the flat device tree into a hierarchical one with C structures and pointers. This is easier to access. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None include/of_live.h | 24 lib/Makefile | 1 + lib/of_live.c | 333

[U-Boot] [PATCH v3 04/72] dm: core: Add livetree access functions

2017-05-18 Thread Simon Glass
Add a basic assortment of functions to access the live device tree. These come from Linux v4.9 and are modified for U-Boot to the minimum extent possible. While these functions are now very stable in Linux, it will be possible to merge in fixes if needed. Signed-off-by: Simon Glass --- Changes i

[U-Boot] [PATCH v3 03/72] dm: core: Add livetree definitions

2017-05-18 Thread Simon Glass
Add a Kconfig option to enable a live device tree, built at run time from the flat tree. Also add structure definitions and a root node. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None dts/Kconfig | 11 include/asm-generic/global_data.h | 3

[U-Boot] [PATCH v3 06/72] dm: Build a live tree after relocation

2017-05-18 Thread Simon Glass
If enabled, build a live device tree after relocation. This can then be used by driver model. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None common/board_r.c | 12 1 file changed, 12 insertions(+) diff --git a/common/board_r.c b/common/board_r.c index 28f3

[U-Boot] [PATCH v3 24/72] dm: test: Move test running code into a separate function

2017-05-18 Thread Simon Glass
We want to run the same test on flat and live trees. In preparation for this, create a new function which handles running a test. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None test/dm/test-main.c | 56 ++--- 1 file change

[U-Boot] [PATCH v3 14/72] dm: core: Implement live tree 'read' functions

2017-05-18 Thread Simon Glass
When the live tree is supported some functions need to change a little. Add an implementation which is used when not inlining these functions. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/core/Makefile | 3 + drivers/core/read.c | 140 +

[U-Boot] [PATCH v3 10/72] fdt: Update fdt_get_base_address() to use const

2017-05-18 Thread Simon Glass
This function does not change the device tree so adjust it to use const for this parameter. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None common/fdt_support.c | 2 +- include/fdt_support.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/f

[U-Boot] [PATCH v3 23/72] sandbox: Add a way to reset sandbox state for tests

2017-05-18 Thread Simon Glass
Running a new test should reset the sandbox state to avoid tests interferring with each other. Move the existing state-reset code into a function so it can be used from tests. Also update the code to reset the SPI devices and adjust the test code to call it. Signed-off-by: Simon Glass --- Chang

[U-Boot] [PATCH v3 22/72] dm: core: Update uclass_find_device_by_phandle() for livetree

2017-05-18 Thread Simon Glass
Adjust this function to work with livetree. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/core/uclass.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c index 630b2e7336..21dc696da3 100644 --

[U-Boot] [PATCH v3 13/72] dm: core: Add device-based 'read' functions to access DT

2017-05-18 Thread Simon Glass
It is common to read a device-tree property from the node associated with a device. Add convenience functions to do this so that drivers do not need to deal with accessing the ofnode from the device. These functions all start with 'dev_read_' to provide consistent naming for all functions which re

[U-Boot] [PATCH v3 11/72] dm: core: Add address operations on device tree references

2017-05-18 Thread Simon Glass
Add functions to add addresses in the device tree using ofnode references. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/core/ofnode.c | 27 +++ include/dm/ofnode.h | 23 ++- 2 files changed, 49 insertions(+), 1 del

[U-Boot] [PATCH v3 29/72] dm: gpio: Drop blank line in gpio_xlate_offs_flags() comment

2017-05-18 Thread Simon Glass
This is not needed. Drop it. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None include/asm-generic/gpio.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index b073b39138..d78491dfc2 100644 --- a/include/asm-generi

[U-Boot] [PATCH v3 15/72] dm: core: Allow binding a device from a live tree

2017-05-18 Thread Simon Glass
When a live tree is being used we need to record the node that was used to create the device. Update device_bind_with_driver_data() to support this. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/core/device.c| 18 -- drivers/core/lists.c

[U-Boot] [PATCH v3 16/72] dm: core: Update lists_bind_fdt() to use ofnode

2017-05-18 Thread Simon Glass
Adjust this function to use an ofnode instead of an offset, so it can be used with livetree. This involves updating all callers. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/core/lists.c | 12 ++-- drivers/core/root.c| 2 +- driv

[U-Boot] [PATCH v3 41/72] samsung: Move pmic header out of config file

2017-05-18 Thread Simon Glass
We should not be including a PMIC header file in the board config. Move it to a C file. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to move pmic header out of config file Changes in v2: None board/samsung/common/misc.c | 1 + include/configs/trats2.h| 1 - 2 files change

[U-Boot] [PATCH v3 38/72] string: Add strchrnul()

2017-05-18 Thread Simon Glass
This functions works like strchr() but returns the end of the string if the character is not found. Add an implementation of this. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None include/linux/string.h | 13 + lib/string.c | 8 2 files cha

[U-Boot] [PATCH v3 21/72] dm: simple-bus: Add support for livetree

2017-05-18 Thread Simon Glass
Modify simple-bus to support livetree. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/core/simple-bus.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/core/simple-bus.c b/drivers/core/simple-bus.c index a300217d39..14803e32b1 10064

[U-Boot] [PATCH v3 53/72] dm: test: Separate out the bus DT offset test

2017-05-18 Thread Simon Glass
We cannot access the device tree via an offset when running in livetree mode. Separate out that part of the bus' children tests and mark it as for the flat tree only. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None test/dm/bus.c | 16 +++- 1 file changed, 15

[U-Boot] [PATCH v3 55/72] dm: phy: Update tests to use ut_asserteq()

2017-05-18 Thread Simon Glass
Use ut_asserteq() to test equality since this gives a better error message on failure. Also make a few of the tests more specific. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None test/dm/phy.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --

[U-Boot] [PATCH v3 56/72] dm: mailbox: Update uclass to support livetree

2017-05-18 Thread Simon Glass
Update the mailbox uclass to support livetree. Fix the xlate() method in all callers. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/mailbox/mailbox-uclass.c | 20 drivers/mailbox/tegra-hsp.c | 2 +- include/mailbox-uclass.h |

[U-Boot] [PATCH v3 68/72] dm: sandbox: spi: Convert driver to support livetree

2017-05-18 Thread Simon Glass
Update this driver to support a live device tree. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/mtd/spi/sandbox.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c index a53f4ebc68..1

[U-Boot] [PATCH v3 20/72] dm: regmap: Add support for livetree

2017-05-18 Thread Simon Glass
Modify regmap to support livetree. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/core/regmap.c | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c index 7f21de

[U-Boot] [PATCH v3 09/72] dm: core: Add livetree address functions

2017-05-18 Thread Simon Glass
Add functions to access addresses in the device tree. These are brought in from Linux 4.10. Also fix up the header guard for fdtaddr.h to avoid confusion. Signed-off-by: Simon Glass --- Changes in v3: - Fix up the fdtaddr.h header guard to avoid conflicts Changes in v2: None drivers/core/Mak

[U-Boot] [PATCH v3 42/72] dm: pmic: Convert uclass to livetree

2017-05-18 Thread Simon Glass
Update the pmic uclass and all pmics to support a live device tree. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/power/pmic/act8846.c | 8 +++- drivers/power/pmic/lp873x.c | 12 +--- drivers/power/pmic/max77686.c| 8 +++- drivers

[U-Boot] [PATCH v3 28/72] dm: gpio: Refactor to prepare for live tree support

2017-05-18 Thread Simon Glass
Move the main part of the GPIO request function into a separate function so that it can be used by the live tree function when added. Update the xlate method to use a node reference. Update all GPIO drivers to handle the modified xlate() method. Signed-off-by: Simon Glass --- Changes in v3: Non

[U-Boot] [PATCH v3 12/72] dm: core: Add a place to put extra device-tree reading functions

2017-05-18 Thread Simon Glass
Some functions deal with structured data rather than simple data types. It makes sense to have these in their own file. For now this just has a function to read a flashmap entry. Move the data types also. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/core/Makef

[U-Boot] [PATCH v3 39/72] string: Add strcspn()

2017-05-18 Thread Simon Glass
Add an implementation of strcspn() which returns the number of initial characters that do not match any in a rejection list. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None include/linux/string.h | 15 +++ lib/string.c | 24

[U-Boot] [PATCH v3 44/72] dm: regulator: Convert regulator uclass to support livetree

2017-05-18 Thread Simon Glass
Update the regulator uclass to support a live device tree. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/power/regulator/regulator-uclass.c | 39 -- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/drivers/power/regula

[U-Boot] [PATCH v3 45/72] dm: regulator: Update fixed regulator to support livetree.

2017-05-18 Thread Simon Glass
Update this driver to support a live device tree. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/power/regulator/fixed.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulat

[U-Boot] [PATCH v3 70/72] dm: test: Fix nit with position of backslash

2017-05-18 Thread Simon Glass
Line up this backslash with all the others. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None include/test/ut.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/test/ut.h b/include/test/ut.h index 85434d785a..d176df58c7 100644 --- a/include/test/

[U-Boot] [PATCH v3 26/72] dm: test: Add support for running tests with livetree

2017-05-18 Thread Simon Glass
It is useful to run the driver model tests with both livetree and flat tree in case something is different between the two. Add this feature to the test runner. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None test/dm/test-main.c | 23 --- 1 file chang

[U-Boot] [PATCH v3 18/72] dm: core: Scan the live tree when setting up driver model

2017-05-18 Thread Simon Glass
When starting up driver model with a live tree we need to scan the tree for devices. Add code to handle this. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/core/root.c | 58 + include/dm/root.h | 3 ++- tes

[U-Boot] [PATCH v3 17/72] dm: core: Update device_bind_driver_to_node() to use ofnode

2017-05-18 Thread Simon Glass
Adjust this function to us an ofnode instead of an offset, so it can be used with livetree. This involves updating all callers. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/clk/at91/pmc.c | 2 +- drivers/core/lists.c | 15 ++-

[U-Boot] [PATCH v3 34/72] sandbox: Add a new sandbox_flattree board

2017-05-18 Thread Simon Glass
Add a sandbox board to test the non-livetree build (i.e. with CONFIG_OF_FLAT disabled). This increases our build and test coverage. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None board/sandbox/MAINTAINERS | 7 ++ configs/sandbox_flattree_defconfig | 179 +

<    1   2   3   >