Re: [U-Boot] [PATCH v2 16/17] test: Reduce the number of tests run with sandbox_flattree

2018-10-09 Thread sjg
We only need to run driver-model tests with this config, since this is the only thing that is different when CONFIG_OF_LIVE is not defined. Filter out the other tests to same time. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to reduce the number of tests run with sandbox_flattr

Re: [U-Boot] [PATCH v3 7/8] test: dm: core: Add a test case for driver marked with DM_FLAG_PRE_RELOC flag

2018-10-15 Thread sjg
Now that we fixed the pre-relocation driver binding for driver marked with DM_FLAG_PRE_RELOC flag, add a test case to cover that scenario. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/sandbox/dts/test.dts | 4 test/dm/bus.c

Re: [U-Boot] [PATCH v3 8/8] timer: Sort Kconfig driver entries

2018-10-15 Thread sjg
This is currently out of order. Sort it. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: - rebase on u-boot/master so that patch [4/8] can be applied cleanly Changes in v2: None drivers/timer/Kconfig | 110 +- 1 file change

Re: [U-Boot] [PATCH v3 6/8] dm: core: Mirror the chosen node parse logic in the livetree scanning

2018-10-15 Thread sjg
Commit f2006808f099: ("dm: core: parse chosen node") added a logic to parse the chosen node during dm_scan_fdt_node(), but unfortunately it missed adding the same logic in dm_scan_fdt_live(). This mirrors the logic in the livetree version. The weird thing is that commit f2006808f099 did update the

Re: [U-Boot] [PATCH v3 4/8] dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in lists_bind_fdt()

2018-10-15 Thread sjg
Currently the comments of several APIs (eg: dm_init_and_scan()) say: @pre_reloc_only: If true, bind only drivers with the DM_FLAG_PRE_RELOC flag. If false bind all drivers. The 'Pre-Relocation Support' chapter in doc/driver-model/README.txt documents the same that both device tree properties and

Re: [U-Boot] [PATCH v3 1/8] dm: cpu: Fix print_cpuinfo() output

2018-10-15 Thread sjg
It was observed that current output of print_cpuinfo() on QEMU x86 targets does not have an ending '\n', neither have a leading 'CPU:' any more. However it used to have these before. It turns out commit c0434407b595 introduced a unified DM version of print_cpuinfo() that exposed such issue on QEMU

Re: [U-Boot] [PATCH v3 5/8] dm: Correct pre_reloc_only parameter description in several APIs' comments

2018-10-15 Thread sjg
The pre_reloc_only parameter description currently only mentions drivers with the DM_FLAG_PRE_RELOC flag, but does not mention the special device tree properties. Correct them. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None include/dm/device-inter

Re: [U-Boot] [PATCH v3 2/8] cpu: mpc83xx: Remove unnecessary characters in the description string

2018-10-15 Thread sjg
The description string should not contain unnecessary characters, like the ending '\n' or the leading 'CPU:'. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/cpu/mpc83xx_cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied t

Re: [U-Boot] [PATCH v3 3/8] dm: util: Add a livetree equivalent API of dm_fdt_pre_reloc()

2018-10-15 Thread sjg
This adds a new API dm_ofnode_pre_reloc(), a livetree equivalent API of dm_fdt_pre_reloc(). Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/core/util.c | 25 + include/dm/util.h | 27 ++- 2

Re: [U-Boot] [PATCH v11 16/16] misc: Add IHS FPGA driver

2018-10-15 Thread sjg
Add a driver for gdsys IHS (Integrated Hardware Systems) FPGAs, which supports initialization of the FPGA, as well as information gathering. Reviewed-by: Simon Glass Signed-off-by: Mario Six --- v10 -> v11: No changes v9 -> v10: No changes v8 -> v9: No changes v7 -> v8: No changes v6 -> v7:

Re: [U-Boot] [PATCH v11 04/16] regmap: Improve error handling

2018-10-15 Thread sjg
ofnode_read_simple_addr_cells may fail and return a negative error code. Check for this when initializing regmaps. Also check if both_len is zero, since this is perfectly possible, and would lead to a division-by-zero further down the line. Reviewed-by: Anatolij Gustschin Reviewed-by: Simon Glas

Re: [U-Boot] [PATCH v11 03/16] regmap: Add documentation

2018-10-15 Thread sjg
Document the regmap_alloc() function. Reviewed-by: Anatolij Gustschin Reviewed-by: Simon Glass Signed-off-by: Mario Six --- v10 -> v11: No changes v9 -> v10: No changes v8 -> v9: No changes v7 -> v8: No changes v6 -> v7: No changes v5 -> v6: No changes v4 -> v5: No changes v3 -> v4: No

Re: [U-Boot] [PATCH v11 01/16] test: regmap: Increase size of syscon0 memory

2018-10-15 Thread sjg
The upcoming changes to the regmap interface will contain a proper check for plausibility when reading/writing from/to a register map. To still have the current tests pass, increase the size of the memory region for the syscon0 device, since one of the tests reads and writes beyond this range. Rev

Re: [U-Boot] [PATCH v11 15/16] misc: Add gdsys_soc driver

2018-10-15 Thread sjg
This patch adds a driver for the bus associated with a IHS FPGA. Reviewed-by: Simon Glass Signed-off-by: Mario Six --- v10 -> v11: No changes v9 -> v10: No changes v8 -> v9: No changes v7 -> v8: No changes v6 -> v7: No changes v5 -> v6: No changes v4 -> v5: No changes v3 -> v4: No change

Re: [U-Boot] [PATCH v11 02/16] regmap: Fix documentation

2018-10-15 Thread sjg
The documentation in regmap.h is not in kernel-doc format. Correct this. Reviewed-by: Anatolij Gustschin Reviewed-by: Simon Glass Signed-off-by: Mario Six --- v10 -> v11: No changes v9 -> v10: No changes v8 -> v9: No changes v7 -> v8: No changes v6 -> v7: No changes v5 -> v6: No changes

Re: [U-Boot] [PATCH v11 14/16] misc: Sort Makefile entries

2018-10-15 Thread sjg
Makefile entries should be sorted. Reviewed-by: Anatolij Gustschin Reviewed-by: Simon Glass Signed-off-by: Mario Six Signed-off-by: Anatolij Gustschin --- v10 -> v11: No changes v9 -> v10: No changes v8 -> v9: No changes v7 -> v8: No changes v6 -> v7: No changes v5 -> v6: No changes v4

Re: [U-Boot] [PATCH] core: ofnode: Fix mem leak in error path

2018-10-15 Thread sjg
A newly created property is currently not freed if a name could not be allocated. This patch fixes the resulting memory leak in the error patch. Reported-by: Coverity (CID: 184085) Fixes: e369e58df79c ("core: Add functions to set properties in live-tree") Signed-off-by: Mario Six --- drivers/cor

Re: [U-Boot] [PATCH v3 31/31] doc: Document virtio support

2018-10-24 Thread sjg
Add REAME.virtio to describe the information about U-Boot support for VirtIO devices, including supported boards, build instructions, driver details etc. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: - Added driver remove and flags description in the d

Re: [U-Boot] [PATCH v3 29/31] virtio: Add a Sandbox transport driver

2018-10-24 Thread sjg
On 15 October 2018 at 03:21, Bin Meng wrote: > This driver provides support for Sandbox implementation of virtio > transport driver which is used for testing purpose only. > > Two drivers are provided. The 2nd one is a driver that lacks the > 'notify' op. > > Signed-off-by: Bin Meng > > --- > > C

Re: [U-Boot] [PATCH v3 24/31] x86: qemu: Imply virtio PCI transport and device drivers

2018-10-24 Thread sjg
Add virtio drivers for QEMU x86 targets. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None board/emulation/qemu-x86/Kconfig | 3 +++ 1 file changed, 3 insertions(+) Applied to u-boot-dm/next, thanks! ___ U

Re: [U-Boot] [PATCH v3 30/31] test: dm: virtio: Add test cases for virtio uclass

2018-10-24 Thread sjg
On 15 October 2018 at 03:21, Bin Meng wrote: > Now that we have a sandbox virtio transport driver, add some test > cases to test virtio uclass driver. > > Signed-off-by: Bin Meng > > --- > > Changes in v3: > - Exclude VIRTIO_BLK in sandbox_noblk_defconfig build > > Changes in v2: > - new patch to

Re: [U-Boot] [PATCH v3 22/31] arm: qemu: Add a Kconfig in the board directory

2018-10-24 Thread sjg
This adds a Kconfig file in the board directory, so that some board-specific options can be specified there. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/arm/Kconfig | 1 + board/emulation/qemu-arm/Kconfig | 9 + con

Re: [U-Boot] [PATCH v3 26/31] test: dm: pci: Add cases for finding next PCI capability APIs

2018-10-24 Thread sjg
Add test cases to cover the two newly added PCI APIs: dm_pci_find_next_capability() & dm_pci_find_next_ext_capability(). Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: - adjust swap_case driver to handle request from _dm_pci_find_next_capability() d

Re: [U-Boot] [PATCH v3 21/31] virtio: Add virtio over pci transport driver

2018-10-24 Thread sjg
This adds a transport driver that implements UCLASS_VIRTIO for virtio over pci, which is commonly used on x86. It only supports the legacy interface of the pci transport, which is the default device that QEMU emulates. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Ch

Re: [U-Boot] [PATCH v3 25/31] dm: pci: Add APIs to find next capability and extended capability

2018-10-24 Thread sjg
This introduces two new APIs dm_pci_find_next_capability() and dm_pci_find_next_ext_capability() to get PCI capability address and PCI express extended capability address for a given PCI device starting from a given offset. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: No

Re: [U-Boot] [PATCH v3 28/31] virtio: net: Support non-legacy device

2018-10-24 Thread sjg
For v1.0 compliant device, it always assumes the member 'num_buffers' exists in the struct virtio_net_hdr while the legacy driver only presented 'num_buffers' when VIRTIO_NET_F_MRG_RXBUF was negotiated. Without that feature the structure was 2 bytes shorter. Update the driver to support the non-le

Re: [U-Boot] [PATCH v3 14/31] blk: Introduce IF_TYPE_VIRTIO

2018-10-24 Thread sjg
From: Tuomas Tynkkynen This adds a new block interface type for VirtIO block devices. Signed-off-by: Tuomas Tynkkynen Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None disk/part.c| 6 ++ drivers/block/blk-uclass.c | 2 ++ inclu

Re: [U-Boot] [PATCH 5/6] serial: ns16550: fix debug uart putc called before init

2018-10-24 Thread sjg
On Tue, Oct 23, 2018 at 11:01 AM Marek Vasut wrote: > > On 10/19/2018 05:25 AM, Simon Glass wrote: > > On 9 August 2018 at 13:04, Simon Goldschmidt > > wrote: > >> If _debug_uart_putc() is called before _debug_uart_init(), the > >> ns16550 debug uart driver hangs in a tight loop waiting for the >

Re: [U-Boot] [PATCH v3 23/31] arm: qemu: Enumerate virtio bus during early boot

2018-10-24 Thread sjg
Currently devices on the virtio bus is not automatically enumerated, which means peripherals on the virtio bus are not discovered by their drivers. This uses board_init() to do the virtio enumeration. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: - imp

Re: [U-Boot] [PATCH v2] uclass: Use uclass_foreach_dev() macro instead of open coding

2018-10-24 Thread sjg
Hi Livu, On 28 September 2018 at 10:02, Liviu Dudau wrote: > On Fri, Sep 28, 2018 at 09:57:49AM -0600, Simon Glass wrote: >> On 28 September 2018 at 06:12, Liviu Dudau wrote: >> > Use the uclass_foreach_dev() macro instead of the open coded version. >> > >> > Signed-off-by: Liviu Dudau >> > ---

Re: [U-Boot] [PATCH v3 16/31] virtio: cmd: Add virtio command for virtio devices

2018-10-24 Thread sjg
From: Tuomas Tynkkynen Add 'virtio' command in U-Boot command line. Signed-off-by: Tuomas Tynkkynen Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None cmd/Kconfig | 7 +++ cmd/Makefile | 1 + cmd/virtio.c | 38 +++

Re: [U-Boot] [PATCH v3 04/31] dm: Add a new uclass driver for VirtIO transport devices

2018-10-24 Thread sjg
On 15 October 2018 at 03:21, Bin Meng wrote: > This adds a new virtio uclass driver for “virtio” [1] family of > devices that are are found in virtual environments like QEMU, > yet by design they look like physical devices to the guest. > > The uclass driver provides child_pre_probe() and child_po

Re: [U-Boot] [PATCH v3 20/31] x86: Implement arch-specific io accessor routines

2018-10-24 Thread sjg
At present the generic io{read,write}{8,16,32} routines only support MMIO access. With architecture like x86 that has a separate IO space, these routines cannot be used to access I/O ports. Implement x86-specific version to support both PIO and MMIO access, so that drivers for multiple architectur

Re: [U-Boot] [PATCH v3 18/31] riscv: qemu: Include some useful commands

2018-10-24 Thread sjg
With the virtio net and blk drivers, we can do more stuff with some useful commands. Imply those in the board Kconfig. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None board/emulation/qemu-riscv/Kconfig | 8 1 file changed, 8 insertions(+)

Re: [U-Boot] [PATCH v3 06/31] virtio: Add virtio over mmio transport driver

2018-10-24 Thread sjg
VirtIO can use various different buses and virtio devices are commonly implemented as PCI devices. But virtual environments without PCI support (a common situation in embedded devices models) might use simple memory mapped device (“virtio-mmio”) instead of the PCI device. This adds a transport dri

Re: [U-Boot] [PATCH v3 01/31] dm: core: Allow uclass to set up a device's child after it is probed

2018-10-24 Thread sjg
On 15 October 2018 at 03:20, Bin Meng wrote: > Some buses need to set up their child devices after they are probed. > Support a common child_post_probe() method for the uclass. > > With this change, the two APIs uclass_pre_probe_device() and > uclass_post_probe_device() become symmetric. > > Signe

Re: [U-Boot] [PATCH v3 17/31] riscv: qemu: Enumerate virtio bus during early boot

2018-10-24 Thread sjg
Currently devices on the virtio bus is not automatically enumerated, which means peripherals on the virtio bus are not discovered by their drivers. This uses board_init() to do the virtio enumeration. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None

Re: [U-Boot] [PATCH v11 05/16] regmap: Introduce init_range

2018-10-24 Thread sjg
Both fdtdec_get_addr_size_fixed and of_address_to_resource can fail with an error, which is not currently checked during regmap initialization. Since the indentation depth is already quite deep, extract a new 'init_range' method to do the initialization. Reviewed-by: Anatolij Gustschin Reviewed-

Re: [U-Boot] [PATCH v11 11/16] test: regmap: Add test for regmap_{set, get}

2018-10-24 Thread sjg
Add test for regmap_{set,get} functions. Reviewed-by: Anatolij Gustschin Reviewed-by: Simon Glass Signed-off-by: Mario Six --- v10 -> v11: No changes v9 -> v10: No changes v8 -> v9: No changes v7 -> v8: No changes v6 -> v7: No changes v5 -> v6: No changes v4 -> v5: No changes v3 -> v4:

Re: [U-Boot] [PATCH v11 10/16] regmap: Define regmap_{get,set}

2018-10-24 Thread sjg
It would be convenient if one could use the regmap API in conjunction with register maps defined as structs (i.e. structs that directly mirror the memory layout of the registers in question). A similar approach was planned with the regmap_write32/regmap_read32 macros, but was never used. Hence, im

Re: [U-Boot] [PATCH v3 13/31] blk: Make blk_next_free_devnum() public

2018-10-24 Thread sjg
blk_next_free_devnum() can be helpful in some cases. Make it a public API. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/block/blk-uclass.c | 2 +- include/blk.h | 11 +++ 2 files changed, 12 insertions(+), 1 deletio

Re: [U-Boot] [PATCH v3 08/31] test: dm: blk: Correct blk_base test case

2018-10-24 Thread sjg
The blk_base test case creates a USB mass storage block device with the Sandbox host block device as its parent. This does not make any sense and causes potential issue, for example if the test case tries to read/write anything on the USB mass storage block device it will definitely fail as its par

Re: [U-Boot] [PATCH v3 07/31] virtio: Add net driver support

2018-10-24 Thread sjg
From: Tuomas Tynkkynen This adds virtio net device driver support. Signed-off-by: Tuomas Tynkkynen Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: - Changed virtio net driver feature table to const drivers/virtio/Kconfig | 7 ++ drivers/virt

Re: [U-Boot] [PATCH v3 02/31] test: dm: core: Add test case for uclass driver's child_post_probe()

2018-10-24 Thread sjg
On 15 October 2018 at 03:20, Bin Meng wrote: > Add test case to cover uclass driver's child_post_probe() method. > > Signed-off-by: Bin Meng > > --- > > Changes in v3: None > Changes in v2: > - new patch to add test case for uclass driver's child_post_probe() > > include/dm/test.h | 1 + > tes

Re: [U-Boot] [PATCH v3 03/31] riscv: bootm: Add dm_remove_devices_flags() call to do_bootm_linux()

2018-10-24 Thread sjg
On 15 October 2018 at 03:20, Bin Meng wrote: > This adds a call to dm_remove_devices_flags() to do_bootm_linux() > so that drivers that have one of the removal flags set (e.g. > DM_FLAG_ACTIVE_DMA_REMOVE) in their driver struct, may do some > last-stage cleanup before the OS is started. > > arm an

Re: [U-Boot] [PATCH v3 11/31] blk: Call part_init() in the post_probe() method

2018-10-24 Thread sjg
part_init() is currently called in every DM BLK driver, either in its bind() or probe() method. However we can use the BLK uclass driver's post_probe() method to do it automatically. Update all DM BLK drivers to adopt this change. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in

Re: [U-Boot] [PATCH v11 09/16] regmap: Support reading from specific range

2018-10-24 Thread sjg
It is useful to be able to treat the different ranges of a regmap separately to be able to use distinct offset for them, but this is currently not implemented in the regmap API. To preserve backwards compatibility, add regmap_read_range and regmap_write_range functions that take an additional para

Re: [U-Boot] [PATCH v3 10/31] efi_driver: blk: Switch to use platdata_auto_alloc_size for the driver data

2018-10-24 Thread sjg
Currently the efi block driver uses priv_auto_alloc_size for the driver data, however that's only available after the device probe phase. In order to make it accessible in an earlier phase, switch to use platdata_auto_alloc_size instead. This patch is the prerequisite for the follow up patch of DM

Re: [U-Boot] [PATCH v3 12/31] blk: Drop blk_prepare_device()

2018-10-24 Thread sjg
With the post_probe() changes, this API is no longer needed. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/block/blk-uclass.c | 9 - include/blk.h | 10 -- 2 files changed, 19 deletions(-) Applied to u-boot-

Re: [U-Boot] [PATCH v3 15/31] virtio: Add block driver support

2018-10-24 Thread sjg
From: Tuomas Tynkkynen This adds virtio block device driver support. Signed-off-by: Tuomas Tynkkynen Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: - Correct desc->vendor for PCI transport drivers/virtio/Kconfig | 7 +++ drivers/virtio/Makef

Re: [U-Boot] [PATCH v3 05/31] virtio: Add codes for virtual queue/ring management

2018-10-24 Thread sjg
From: Tuomas Tynkkynen This adds support for managing virtual queue/ring, the channel for high performance I/O between host and guest. Signed-off-by: Tuomas Tynkkynen Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/virtio/Makefile |

Re: [U-Boot] [PATCH v3 27/31] virtio: pci: Support non-legacy PCI transport device

2018-10-24 Thread sjg
By default QEMU creates legacy PCI transport devices, but we can ask QEMU to create non-legacy one if we pass additional device property/value pairs in the command line: -device virtio-blk-pci,disable-legacy=true,disable-modern=false This adds a new driver driver to support non-legacy (modern)

Re: [U-Boot] [PATCH v3 19/31] kconfig: Introduce HAVE_ARCH_IOMAP

2018-10-24 Thread sjg
Introduce a new Kconfig option for architecture codes to control whether it provides io{read,write}{8,16,32} I/O accessor functions. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None include/linux/io.h | 4 lib/Kconfig| 6 ++ 2 files

Re: [U-Boot] [PATCH v3 09/31] sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data

2018-10-24 Thread sjg
Currently the sandbox block driver uses priv_auto_alloc_size for the driver data, however that's only available after the device probe phase. In order to make it accessible in an earlier phase, switch to use platdata_auto_alloc_size instead. This patch is the prerequisite for the follow up patch o

Re: [U-Boot] [PATCH v11 13/16] regmap: Add overview documentation

2018-10-24 Thread sjg
Add some overview documentation that explains the purpose and some of the features and limitations of the regmap interface. Reviewed-by: Bin Meng Signed-off-by: Mario Six --- v10 -> v11: No changes v9 -> v10: No changes v8 -> v9: * Amended for inclusion of endianness setting via DT v7 -> v8:

Re: [U-Boot] [PATCH v11 08/16] regmap: Add raw read/write functions

2018-10-24 Thread sjg
On 15 October 2018 at 01:24, Mario Six wrote: > The regmap functions currently assume that all register map accesses > have a data width of 32 bits, but there are maps that have different > widths. > > To rectify this, implement the regmap_raw_read and regmap_raw_write > functions from the Linux k

Re: [U-Boot] [PATCH v11 12/16] regmap: Add endianness support

2018-10-24 Thread sjg
Add support for switching the endianness of regmap accesses via the "little-endian", "big-endian", and "native-endian" boolean properties in the device tree. The default endianness is native endianness. Signed-off-by: Mario Six Reviewed-by: Simon Glass Reviewed-by: Daniel Schwierzeck --- v10

Re: [U-Boot] [PATCH v11 06/16] regmap: Add error output

2018-10-24 Thread sjg
Add some debug output in cases where the initialization of a regmap fails. Reviewed-by: Anatolij Gustschin Reviewed-by: Simon Glass Signed-off-by: Mario Six --- v10 -> v11: No changes v9 -> v10: No changes v8 -> v9: No changes v7 -> v8: No changes v6 -> v7: No changes v5 -> v6: No changes

Re: [U-Boot] [PATCH 11/13] video: simplefb: Remove DM_FLAG_PRE_RELOC flag

2018-11-06 Thread sjg
On 24 October 2018 at 07:36, Bin Meng wrote: > When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be > bound before relocation. However due to a bug in the DM core, > the flag only takes effect when devices are statically declared > via U_BOOT_DEVICE(). This bug has been fixed recently by

Re: [U-Boot] [PATCH 12/13] watchdog: Remove DM_FLAG_PRE_RELOC flag in various drivers

2018-11-06 Thread sjg
On 24 October 2018 at 07:36, Bin Meng wrote: > When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be > bound before relocation. However due to a bug in the DM core, > the flag only takes effect when devices are statically declared > via U_BOOT_DEVICE(). This bug has been fixed recently by

Re: [U-Boot] [PATCH 07/13] ram: bmips: Remove DM_FLAG_PRE_RELOC flag

2018-11-06 Thread sjg
On 24 October 2018 at 07:36, Bin Meng wrote: > When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be > bound before relocation. However due to a bug in the DM core, > the flag only takes effect when devices are statically declared > via U_BOOT_DEVICE(). This bug has been fixed recently by

Re: [U-Boot] [PATCH 10/13] sysreset: Remove DM_FLAG_PRE_RELOC flag in various drivers

2018-11-06 Thread sjg
On 24 October 2018 at 07:36, Bin Meng wrote: > When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be > bound before relocation. However due to a bug in the DM core, > the flag only takes effect when devices are statically declared > via U_BOOT_DEVICE(). This bug has been fixed recently by

Re: [U-Boot] [PATCH 13/13] dm: doc: Update description of pre-relocation support

2018-11-06 Thread sjg
On 24 October 2018 at 07:36, Bin Meng wrote: > Add some description about pre-relocation driver binding, including > usage of DM_FLAG_PRE_RELOC flag and caveats. > > Signed-off-by: Bin Meng > > --- > > doc/driver-model/README.txt | 16 > 1 file changed, 12 insertions(+), 4 delet

Re: [U-Boot] [PATCH 01/13] arm: stm32mp: Remove DM_FLAG_PRE_RELOC flag

2018-11-06 Thread sjg
> From: U-Boot On Behalf Of Bin Meng > Sent: mercredi 24 octobre 2018 15:36 > > When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be bound before > relocation. However due to a bug in the DM core, the flag only takes effect > when devices are statically declared via U_BOOT_DEVICE(). This

Re: [U-Boot] [PATCH 09/13] serial: Remove DM_FLAG_PRE_RELOC flag in various drivers

2018-11-06 Thread sjg
On 24 October 2018 at 07:36, Bin Meng wrote: > When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be > bound before relocation. However due to a bug in the DM core, > the flag only takes effect when devices are statically declared > via U_BOOT_DEVICE(). This bug has been fixed recently by

Re: [U-Boot] [PATCH 06/13] pinctrl: Remove DM_FLAG_PRE_RELOC flag in various drivers

2018-11-06 Thread sjg
On 24 October 2018 at 07:36, Bin Meng wrote: > When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be > bound before relocation. However due to a bug in the DM core, > the flag only takes effect when devices are statically declared > via U_BOOT_DEVICE(). This bug has been fixed recently by

Re: [U-Boot] [PATCH 05/13] mmc: omap: Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check

2018-11-06 Thread sjg
On 24 October 2018 at 07:36, Bin Meng wrote: > When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be > bound before relocation. However due to a bug in the DM core, > the flag only takes effect when devices are statically declared > via U_BOOT_DEVICE(). This bug has been fixed recently by

Re: [U-Boot] [PATCH 08/13] timer: Remove DM_FLAG_PRE_RELOC flag in various drivers

2018-11-06 Thread sjg
On 24 October 2018 at 07:36, Bin Meng wrote: > When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be > bound before relocation. However due to a bug in the DM core, > the flag only takes effect when devices are statically declared > via U_BOOT_DEVICE(). This bug has been fixed recently by

Re: [U-Boot] [PATCH 02/13] clk: Remove DM_FLAG_PRE_RELOC flag in various drivers

2018-11-06 Thread sjg
On 24 October 2018 at 07:36, Bin Meng wrote: > When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be > bound before relocation. However due to a bug in the DM core, > the flag only takes effect when devices are statically declared > via U_BOOT_DEVICE(). This bug has been fixed recently by

Re: [U-Boot] [PATCH v2 1/2] cpu: Add DM_FLAG_PRE_RELOC flag to various cpu drivers

2018-11-06 Thread sjg
On 14.10.2018 10:07, Bin Meng wrote: > It turns out commit c0434407b595 broke some boards which have DM CPU > driver with CONFIG_DISPLAY_CPUINFO option on. These boards just fail > to boot when print_cpuinfo() is called during boot. > > Fixes: c0434407b595 ("board_f: Use static print_cpuinfo if CON

Re: [U-Boot] [PATCH 04/13] i2c: omap24xx: Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check

2018-11-06 Thread sjg
On 24 October 2018 at 07:36, Bin Meng wrote: > When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be > bound before relocation. However due to a bug in the DM core, > the flag only takes effect when devices are statically declared > via U_BOOT_DEVICE(). This bug has been fixed recently by

Re: [U-Boot] [PATCH 03/13] gpio: Remove DM_FLAG_PRE_RELOC flag in various drivers

2018-11-06 Thread sjg
> From: U-Boot On Behalf Of Bin Meng > Sent: mercredi 24 octobre 2018 15:37 > Subject: [U-Boot] [PATCH 03/13] gpio: Remove DM_FLAG_PRE_RELOC flag in > various drivers > > When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be bound before > relocation. However due to a bug in the DM core,

Re: [U-Boot] [PATCH v2 2/2] cpu: sandbox: Add "u-boot, dm-pre-reloc" for all cpu nodes

2018-11-06 Thread sjg
On 14.10.2018 10:07, Bin Meng wrote: > To support CONFIG_DISPLAY_CPUINFO, add "u-boot,dm-pre-reloc" for > all cpu nodes in Sandbox test.dts. > > Signed-off-by: Bin Meng Reviewed-by: Stefan Roese Thanks, Stefan Applied to u-boot-dm/master, thanks! ___

[U-Boot] (no subject)

2018-11-22 Thread sjg
From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Marek Vasut , Simon Glass , Masahiro Yamada , Rasmus Villemoes , Baruch Siach , Jagdish Gediya , Stephen Warren Subject: [PATCH 1/3] Makefile: Add a warning for boards that don't use

Re: [U-Boot] [PATCH 24/25] sf: Add a method to obtain the block-protect setting

2018-11-22 Thread sjg
It is useful to obtain the block-protect setting of the SPI flash, so we know whether it is fully open or (perhaps partially) write-protected. Add a method for this. Update the sandbox driver to process this operation and add a test. Signed-off-by: Simon Glass --- arch/sandbox/include/asm/test.

Re: [U-Boot] [PATCH 21/25] string: Include the config header

2018-11-22 Thread sjg
At present the config header is not included in this file, but it does use a CONFIG option. Fix it. Signed-off-by: Simon Glass --- lib/string.c | 1 + 1 file changed, 1 insertion(+) Applied to u-boot-dm/master, thanks! ___ U-Boot mailing list U-Boot@

Re: [U-Boot] [PATCH 23/25] test: sf: Add a simple SPI flash test

2018-11-22 Thread sjg
The current test is a functional test, covering all the way from the command line to the sandbox SPI driver. This is useful, but it is easier to diagnose failures with a smaller test. Add a simple test which reads and writes data and checks that it is stored and retrieved correctly. Signed-off-by

Re: [U-Boot] [PATCH 22/25] misc: Update read() and write() methods to return bytes xfered

2018-11-22 Thread sjg
Hi Simon, > From: Simon Glass > Sent: mardi 6 novembre 2018 23:22 > Subject: [PATCH 22/25] misc: Update read() and write() methods to return bytes > > At present these functions return 0 on success. For some devices we want to > know how many bytes were transferred. It seems useful to adjust the

Re: [U-Boot] [PATCH 07/25] sandbox: log: Add a category for sandbox

2018-11-22 Thread sjg
It seems useful to make sandbox its own log category since it is used for so much testing. Add this as a new category. Signed-off-by: Simon Glass --- include/log.h | 1 + 1 file changed, 1 insertion(+) Applied to u-boot-dm/master, thanks! ___ U-Boot

Re: [U-Boot] [PATCH 19/25] video: Update video_set_default_colors() to support invert

2018-11-22 Thread sjg
It is useful to be able to invert the colours in some cases so that the text matches the background colour. Add a parameter to the function to support this. It is strange that function takes a private data structure from another driver as an argument. It seems better to pass the device and have th

Re: [U-Boot] [PATCH 14/25] binman: Add a way to enable debugging from the build

2018-11-22 Thread sjg
When the build fails due to something wrong in binman it is sometimes useful to get a full backtrace showing the location of the failure. Add a BINMAN_DEBUG environment variable to support this along with some documentation. Signed-off-by: Simon Glass --- Makefile| 6 -- tools/b

Re: [U-Boot] [PATCH 08/25] sandbox: Add a function to read a host file

2018-11-22 Thread sjg
Add a way to read a file from the host filesystem. This can be useful for reading test data, for example. Also fix up the writing function which was not the right version, and drop the debugging lines. Signed-off-by: Simon Glass --- arch/sandbox/cpu/os.c | 44 +++

Re: [U-Boot] [PATCH 05/25] cros_ec: Add new features for events and power

2018-11-22 Thread sjg
This adds new commands to the EC related to setting and clearing events as well as controlling power-related settings. Signed-off-by: Simon Glass --- drivers/misc/cros_ec.c | 345 - drivers/misc/cros_ec_sandbox.c | 2 +- include/cros_ec.h |

Re: [U-Boot] [PATCH 02/25] cros_ec: Add error logging on a few commands

2018-11-22 Thread sjg
Add some more logging to provide more information on failures. Signed-off-by: Simon Glass --- drivers/misc/cros_ec.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) Applied to u-boot-dm/master, thanks! ___ U-Boot mailing list U-Boot

Re: [U-Boot] [PATCH 10/25] sandbox: Update some drivers to work in SPL/TPL

2018-11-22 Thread sjg
At present sandbox drivers are mostly not used before relocation. Some of these are needed by Chromium OS verified boot, since it uses sandbox TPL, so update them accordingly. Signed-off-by: Simon Glass --- arch/sandbox/dts/sandbox.dts | 15 +++ 1 file changed, 15 insertions(+) App

Re: [U-Boot] [PATCH 1/2] dm/pci: Change the first CFG read to Vendor ID in enumeration

2018-11-22 Thread sjg
Hi Bin, Thanks a lot for your review! Thanks, Zhiqiang > -Original Message- > From: Bin Meng > Sent: 2018年10月8日 16:53 > To: Z.q. Hou > Cc: U-Boot Mailing List ; Simon Glass > ; Christian Gmeiner ; > Tuomas Tynkkynen ; Bernhard Messerklinger > ; Masahiro Yamada > ; Mingkai Hu ; > M.h. L

Re: [U-Boot] [PATCH 1/1] sandbox: README: setting environment variables

2018-11-22 Thread sjg
On 14 October 2018 at 13:40, Heinrich Schuchardt wrote: > The command to set environment variables is setenv. > > Signed-off-by: Heinrich Schuchardt > --- > board/sandbox/README.sandbox | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Simon Glass Applied t

Re: [U-Boot] [PATCH 15/25] binman: Drop an unnecessary comma in blob handling

2018-11-22 Thread sjg
This comma is not needed. Drop it. Signed-off-by: Simon Glass --- tools/binman/etype/blob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied to u-boot-dm/master, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de

Re: [U-Boot] [PATCH v2] dm: core: Widen the dump tree to show more of the driver's name.

2018-11-22 Thread sjg
With drivers that have prefix names that are quite long (like 'versatile_') it is useful to have a wider column for the driver's name when dumping the device driver tree. Also update the tests to take into account the wider output format. Signed-off-by: Liviu Dudau Reviewed-by: Simon Glass ---

Re: [U-Boot] [PATCH 09/25] sandbox: cros_ec: exynos: Drop use of cros_ec_get_error()

2018-11-22 Thread sjg
On 07/11/18 07:21, Simon Glass wrote: > This function is really just a call to uclass_get_device() and there is no > reason why the caller cannot do it. Update sandbox and snow accordingly. > > Signed-off-by: Simon Glass > --- > > board/samsung/common/board.c | 10 ++ > board/sandbox/sand

Re: [U-Boot] [PATCH 04/25] cros_ec: Align uclass data to a cache boundary

2018-11-22 Thread sjg
The LPC driver expects its buffer to be word-aligned. Add the required flag to the uclass driver to ensure this. Signed-off-by: Simon Glass --- drivers/misc/cros_ec.c | 1 + 1 file changed, 1 insertion(+) Applied to u-boot-dm/master, thanks! ___ U-Bo

Re: [U-Boot] [PATCH 13/25] spl: lz4: Allow use of lz4 compression in SPL

2018-11-22 Thread sjg
In some cases U-Boot is compressed and it is useful to be able to decompress it in SPL. Add a Kconfig and Makefile change to allow this. Note that this does not actually implement decompression. Signed-off-by: Simon Glass --- lib/Kconfig | 8 lib/Makefile | 2 +- 2 files changed, 9 in

Re: [U-Boot] [PATCH 3/4] buildman: Rename the good, better, worse variables

2018-11-22 Thread sjg
At present we don't distinguish between errors and warnings when printing the architecture summary. Rename the variables to better describe their purpose. 'Worse' at present means we got an error, so use that as the name. Signed-off-by: Simon Glass --- tools/buildman/builder.py | 28 ++

Re: [U-Boot] [PATCH 01/25] cros_ec: Use uint instead of u8 for parameters

2018-11-22 Thread sjg
There is no advantage to using a u8 for function parameters. It forces the compiler to mask values and can increase code size. Also the command enum has been extended to 16 bits. Update the functions to use uint instead. Signed-off-by: Simon Glass --- drivers/misc/cros_ec.c | 10 -- 1 f

Re: [U-Boot] [PATCH 2/4] buildman: Detect dtc warnings

2018-11-22 Thread sjg
At present messages from the device-tree compiler like this: arch/arm/dts/socfpga_arria10_socdk_sdmmc.dtb: Warning (avoid_unnecessary_addr_size): /clocks: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property are detected as errors since they don't match the

Re: [U-Boot] [PATCH 03/25] cros_ec: Fail if we cannot determine the flash burst size

2018-11-22 Thread sjg
This value is required for flashing to work correctly. Add a check for it. Signed-off-by: Simon Glass --- drivers/misc/cros_ec.c | 3 +++ 1 file changed, 3 insertions(+) Applied to u-boot-dm/master, thanks! ___ U-Boot mailing list U-Boot@lists.denx.d

Re: [U-Boot] [PATCH 06/25] sandbox: tpm: Allow debugging of data packages

2018-11-22 Thread sjg
This is not normally useful, so change the code to avoid writing out every data package. This can be enabled with #define DEBUG. Signed-off-by: Simon Glass --- drivers/tpm/tpm_tis_sandbox.c | 6 ++ 1 file changed, 6 insertions(+) Applied to u-boot-dm/master, thanks! ___

Re: [U-Boot] [PATCH 1/1] sandbox: README: use setenv ethrotate no

2018-11-22 Thread sjg
On Sun, 14 Oct 2018 at 14:01, Heinrich Schuchardt wrote: > > If we want to control which network interface is actually used, we have to > issue 'setenv ethrotate no'. If ethrotate is not set any interface may be > used. > > Signed-off-by: Heinrich Schuchardt > --- > board/sandbox/README.sandbox

Re: [U-Boot] [PATCH 1/4] buildman: Only print toolchain probing with -v

2018-11-22 Thread sjg
At present --list-tool-chains prints a lot of information about the toolchain-probing process. This is generally not very interesting. Update buildman to print this only if --list-tool-chains is given with -v. Signed-off-by: Simon Glass --- tools/buildman/cmdline.py | 2 +- tools/buildman/contr

Re: [U-Boot] [PATCH 11/25] spl: Support bootstage, log, hash and early malloc in TPL

2018-11-22 Thread sjg
At present these features are supported in SPL but not TPL. Update the Kconfig and Makefile to allow this. Also add a few Makefile comments to make earier to track what is going on. Signed-off-by: Simon Glass --- common/Kconfig | 35 +++ common/Makefile | 10 ++

<    1   2   3   4   5   6   7   8   9   10   >