- Nov 14, 2018
-
-
Bin Meng authored
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 <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
Add virtio drivers for QEMU x86 targets. Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
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 <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
This adds a Kconfig file in the board directory, so that some board-specific options can be specified there. Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
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 <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
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 architectures can use these accessors without the need to know whether it's MMIO or PIO. These are ported from Linux kernel lib/iomap.c, with slight changes. Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
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 <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
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 <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
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 <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Tuomas Tynkkynen authored
Add 'virtio' command in U-Boot command line. Signed-off-by:
Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Tuomas Tynkkynen authored
This adds virtio block device driver support. Signed-off-by:
Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Tuomas Tynkkynen authored
This adds a new block interface type for VirtIO block devices. Signed-off-by:
Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
blk_next_free_devnum() can be helpful in some cases. Make it a public API. Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
With the post_probe() changes, this API is no longer needed. Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
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 <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
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 BLK driver changes to work with EFI loader. Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
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 of DM BLK driver changes to work with Sandbox. Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
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 parent is not on USB bus at all. Correct the test case by creating another Sandbox host block device instead of the USB mass storage one and adjust the case accordingly. Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Tuomas Tynkkynen authored
This adds virtio net device driver support. Signed-off-by:
Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
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 driver that implements UCLASS_VIRTIO for virtio over mmio. Signed-off-by:
Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Tuomas Tynkkynen authored
This adds support for managing virtual queue/ring, the channel for high performance I/O between host and guest. Signed-off-by:
Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
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_post_probe() methods to do some common operations for virtio device drivers like device and driver supported feature negotiation, etc. [1] http://docs.oasis-open.org/virtio/virtio/v1.0/virtio-v1.0.pdf Signed-off-by:
Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
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 and x86 already did such, and we should do the same for riscv. Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
Add test case to cover uclass driver's child_post_probe() method. Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
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. Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Mario Six authored
Add some overview documentation that explains the purpose and some of the features and limitations of the regmap interface. Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Mario Six authored
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 <mario.six@gdsys.cc> Reviewed-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
-
Mario Six authored
Add test for regmap_{set,get} functions. Reviewed-by:
Anatolij Gustschin <agust@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Mario Six authored
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, implement regmap_set/regmap_range_set and regmap_get/regmap_range_get macros, which, given a register map, a struct describing the layout of the register map, and a member name automatically produce regmap_read/regmap_write calls that access the specified member in the register map. Reviewed-by:
Anatolij Gustschin <agust@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Mario Six authored
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 parameter 'range_num' that identifies the range to operate on. Reviewed-by:
Anatolij Gustschin <agust@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Mario Six authored
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 kernel API that specify the width of a desired read or write operation on a regmap. Implement the regmap_read and regmap_write functions using these raw functions in a backwards-compatible manner. Reviewed-by:
Anatolij Gustschin <agust@denx.de> Signed-off-by:
Mario Six <mario.six@gdsys.cc> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Mario Six authored
MIPS is the only architecture currently supported by U-Boot that does not implement any of the in/out register access functions. To have a interface that is useable across architectures, add the functions to the MIPS architecture (implemented using the __raw_write and __raw_read functions). Reviewed-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Stefan Roese <sr@denx.de> Reviewed-by:
Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Mario Six authored
Add some debug output in cases where the initialization of a regmap fails. Reviewed-by:
Anatolij Gustschin <agust@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Mario Six authored
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 <agust@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Simon Glass authored
At present 'buildman sandbox' will build all 5 boards for the sandbox architecture rather than the single board 'sandbox'. The only current way to exclude sandbox_spl, sandbox_noblk, etc. is to use -x which is a bit clumbsy. Add a --boards option to allow individual build targets to be specified. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Use a starting address of 256MB which should be available. This helps to make sandbox RAM buffers pointers more recognisable. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Mario Six authored
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: e369e58d ("core: Add functions to set properties in live-tree") Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Mario Six authored
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 <sjg@chromium.org> Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Mario Six authored
This patch adds a driver for the bus associated with a IHS FPGA. Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Mario Six <mario.six@gdsys.cc>
-
Mario Six authored
Makefile entries should be sorted. Reviewed-by:
Anatolij Gustschin <agust@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Mario Six <mario.six@gdsys.cc> Signed-off-by:
Anatolij Gustschin <agust@denx.de>
-