- Dec 10, 2019
-
-
Heinrich Schuchardt authored
In the device tree UEFI unit test the compatible property of the device is read. Provide the missing property. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
- Dec 02, 2019
-
-
Simon Glass authored
Move these functions into the command.h header file which is a better fit. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
Simon Glass authored
These functions do not use driver model but are fairly widely used in U-Boot. But it is not clear that they will use driver model anytime soon, so we don't want to label them as 'legacy'. Move them to a new irq_func.h header file. Avoid the name 'irq.h' since it is widely used in U-Boot already. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
Simon Glass authored
These functions are CPU-related and do not use driver model. Move them to cpu_func.h Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
- Nov 14, 2019
-
-
Heinrich Schuchardt authored
Compiling arch/sandbox/cpu/os.c results in an error ../arch/sandbox/cpu/os.c: In function ‘os_find_text_base’: ../arch/sandbox/cpu/os.c:823:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 823 | base = (void *)addr; | ^ cc1: all warnings being treated as errors The size of void* differs from that of unsigned long long on 32bit systems. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Nov 12, 2019
-
-
Heinrich Schuchardt authored
On the sandbox the UEFI binaries must match the host architectures. Adjust the Makefiles. Provide the PE/COFF header and relocation files. Allow building helloworld.efi on the sandbox. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
- Oct 27, 2019
-
-
Simon Glass authored
This function needs a prototype so that tests can use it. Add one. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
This function writes to its address so the address should not be declared as const. Fix it. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
- Oct 22, 2019
-
-
Jean-Jacques Hiblot authored
Make sure that the clock self-assignment works by having a clock of clk-sbox be configured automatically when clk-sbox is probed. Signed-off-by:
Jean-Jacques Hiblot <jjhiblot@ti.com>
-
Jean-Jacques Hiblot authored
Add a few more clocks the clk_sandbox clock provider and get them using the managed API. Make sure they are released when the device is removed. Signed-off-by:
Jean-Jacques Hiblot <jjhiblot@ti.com>
-
- Oct 15, 2019
-
-
AKASHI Takahiro authored
Without this patch, compiling may potentially fail. Signed-off-by:
AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
AKASHI Takahiro authored
When I tried to run some new efi tests with pytest, efi_smbios_register() triggered a segmentation fault. Here is the location where it happened: efi_init_obj_list() efi_smbios_register() write_smbios_table() smbios_write_type4() smbios_write_type4_dm() where dev_get_parent_platdata() should return a pointer to struct cpu_platdata, but it is actually NULL because any cpu device on sandbox is attached to "root_driver." With this patch, this issue will be fixed by moving all the definitions of cpus under "cpus" node so that they have a "cpu_bus" parent. Signed-off-by:
AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Oct 13, 2019
-
-
Yannick Fertré authored
Display Serial Interface (DSI) host can usefully be modelled as their own uclass. DSI defines a serial bus and a communication protocol between the host and the device (panel, bridge). Signed-off-by:
Yannick Fertré <yannick.fertre@st.com>
-
- Oct 08, 2019
-
-
Simon Glass authored
The code in swapcase can be used by other sandbox drivers. Move it into a common place to allow this. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Bin Meng <bmeng.cn@gmail.com> [bmeng: remove inclusion of <asm/test.h> in pci_sandbox.c] Signed-off-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
At present PCI address transaction is not supported so drivers must manually read the correct BAR after reading the device tree info. The ns16550 has a suitable implementation, so move this code into the core DM support. Note that there is no live-tree equivalent at present. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Bin Meng <bmeng.cn@gmail.com> [bmeng: correct the unclear comments in test.dts] Signed-off-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Sandbox pci works using emulation drivers which are currently children of the pci device: pci-controller { pci@1f,0 { compatible = "pci-generic"; reg = <0xf800 0 0 0 0>; emul@1f,0 { compatible = "sandbox,swap-case"; }; }; }; In this case the emulation device is attached to pci device on address f800 (device 1f, function 0) and provides the swap-case functionality. However this is not ideal, since every device on a PCI bus has a child device. This is only really the case for sandbox, but we want to avoid special-case code for sandbox. Worse, child devices cannot be probed before their parents. This forces us to use 'find' rather than 'get' to obtain the emulator device. In fact the emulator devices are never probed. There is code in sandbox_pci_emul_post_probe() which tries to track when emulators are active, but at present this does not work. A better approach seems to be to add a separate node elsewhere in the device tree, an 'emulation parent'. This could be given a bogus address (such as -1) to hide the emulators away from the 'pci' command, but it seems better to keep it at the root node to avoid such hacks. Then we can use a phandle to point from the device to the correct emulator, and only on sandbox. The code to find an emulator does not interfere with normal pci operation. Add a new UCLASS_PCI_EMUL_PARENT uclass which allows finding an emulator given a bus, and finding a bus given an emulator. Update the existing device trees and the code for finding an emulator. This brings PCI emulators more into line with I2C. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Bin Meng <bmeng.cn@gmail.com> [bmeng: fix 3 typos in the commit message; encode bus number in the labels of swap_case_emul nodes; mention commit 4345998a in sandbox_pci_get_emul()] Signed-off-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
At present these functions are stubbed out. For more comprehensive testing with PCI devices it is useful to be able to fully emulate I/O access. Add simple implementations for these. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Bin Meng <bmeng.cn@gmail.com> [bmeng: change to use 'const void *' in sandbox_write(); cast 'addr' in read/write macros in arch/sandbox/include/asm/io.h; remove the unnecessary cast in readq/writeq in nvme.h] Signed-off-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Increase the memory space so we can support the p2sb bus which needs multiples of 1MB. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
U-Boot already supports using -D to indicate that it should use the normal device tree. It is sometimes useful to run with the test device tree, e.g. when running a test. Add a -T option for this along with some documentation. It can be used like this: /tmp/b/sandbox/u-boot -T -c "ut dm pci_busdev" (this will use /tmp/b/sandbox/arch/sandbox/dts/test.dtb as the DT) Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
These functions are available on x86 but not sandbox. They are useful shortcuts and clarify the code, so add them to sandbox. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Rename this ID to SANDBOX_PCI_SWAP_CASE_EMUL_ID since it is more descriptive and allows us to add new PCI emulators without any conflict or confusion. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
At present address translation does not work since there is no ranges property in the spmi nodes. Add empty ranges properties and a little more logging so that this shows the error: /tmp/b/sandbox/u-boot -d /tmp/b/sandbox/arch/sandbox/dts/test.dtb \ -c "ut dm spmi_access_peripheral" -L7 -v ... pm8916_gpio_probe() bad address: returning err=-22 Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
At present there is an arch-specific area in the SPL handoff area intended for use by arch-specific code, but there is no explicit call to fill in this data. Add a hook for this. Also use the hook to remove the sandbox-specific test code from write_spl_handoff(). Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
- Aug 19, 2019
-
-
Urja Rannikko authored
It seems that SYSRESET_POWER_OFF was added recently, and all previous code used SYSRESET_POWER for poweroff. SYSRESET_POWER is supposed to be a PMIC-level power cycle, not a poweroff. (Comment by Simon Glass) SYSRESET_POWER means to do a power reset (removing and reinstating all power) SYSRESET_POWER_OFF means to turn the device off and leave it off Signed-off-by:
Urja Rannikko <urjaman@gmail.com> Reviewed-by:
Patrick Delaunay <patrick.delaunay@st.com> (Update comment to help understand the patch) Signed-off-by:
Kever Yang <kever.yang@rock-chips.com>
-
- Jul 29, 2019
-
-
Keerthy authored
commit 49116e6d ("doc: arch: Convert README.sandbox to reST") Moves README.sandbox to doc/arch. Replace all the existing instances to point to the right documentation file. Signed-off-by:
Keerthy <j-keerthy@ti.com>
-
- Jul 22, 2019
-
-
Fabien Dessenne authored
Add the following functions to translate DMA address to CPU address: - dev_translate_dma_address() - ofnode_translate_dma_address() - of_translate_dma_address() - fdt_translate_dma_address() These functions work the same way as xxx_translate_address(), with the difference that the translation relies on the "dma-ranges" property instead of the "ranges" property. Add related test. Test report: => ut dm fdt_translation Test: dm_test_fdt_translation: test-fdt.c Test: dm_test_fdt_translation: test-fdt.c (flat tree) Failures: 0 Signed-off-by:
Fabien Dessenne <fabien.dessenne@st.com>
-
- Jul 19, 2019
-
-
Lukasz Majewski authored
This patch provides code to implement the CCF clock tree in sandbox. It uses all the introduced primitives; some generic ones are reused, some sandbox specific were developed. In that way (after introducing the real CCF tree in sandbox) the recently added to clk-uclass.c: clk_get_by_id() and clk_get_parent_rate() are tested in their natural work environment. Usage (sandbox_defconfig and sandbox_flattree_defconfig): ./u-boot --fdt arch/sandbox/dts/test.dtb --command "ut dm clk_ccf" Signed-off-by:
Lukasz Majewski <lukma@denx.de>
-
Lukasz Majewski authored
This patch adds the 'osc' fixed clock to facilitate the CCF testing in the sandbox U-Boot. It is a starting point for building CCF hierarchy of clocks. Signed-off-by:
Lukasz Majewski <lukma@denx.de>
-
- Jul 18, 2019
-
-
Alex Marginean authored
Adds a test using a makeshift MDIO MUX. The test is based on the existing MDIO test. It uses the last emulated PHY register to verify MUX selection. Signed-off-by:
Alex Marginean <alexm.osslist@gmail.com> Acked-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
- Jul 15, 2019
-
-
Alex Marginean authored
A very simple test for DM_MDIO, mimicks a register write/read through the sandbox bus to a dummy PHY. Signed-off-by:
Alex Marginean <alexm.osslist@gmail.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Bin Meng <bmeng.cn@gmail.com> Acked-by:
Joe Hershberger <joe.hershberger@ni.com>
-
- Jul 11, 2019
-
-
Ramon Fried authored
Add basic PCI endpoint sandbox testing. Signed-off-by:
Ramon Fried <ramon.fried@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Ramon Fried authored
Add a dummy PCI endpoint for sandbox. Supporting only a single function, it allows setting and reading header configuration. Signed-off-by:
Ramon Fried <ramon.fried@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Jul 10, 2019
-
-
Alex Marginean authored
This test is built on top of the existing swap_case driver. It adds EA capability structure support to swap_case and uses that to map BARs. BAR1 works as it used to, swapping upper/lower case. BARs 2,4 map to a couple of magic values. Signed-off-by:
Alex Marginean <alexm.osslist@gmail.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Bin Meng <bmeng.cn@gmail.com>
-
Patrick Delaunay authored
Add a test to check the management of the U-boot relocation properties for device tree SPL generation (fdtgrep result) and platdata: - 'dm-pre-proper' and 'dm-tpl' not included in SPL - 'dm-pre-reloc' and 'dm-spl' included in SPL Signed-off-by:
Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Since the SPI nor conversion, 'sf probe' does not work on sandbox. Fix this by using the expected compatible string in the flash node. Signed-off-by:
Simon Glass <sjg@chromium.org> Fixes: cd353657 (mtd: sf_probe: remove spi-flash compatible)
-
Simon Glass authored
Add a memory node which indicates the size of sandbox memory. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
When cross-compiling, sometimes sdl-config must come from a different path from the default. Add a way to override it, by adding SDL_CONFIG to the environment before building U-Boot. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This function is used for both SPL and TPL. Add a comment to that effect. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
We normally want to load U-Boot from SPL, but if a board wants to do something else, it is currently not possible since the standard loader has the top priority. Lower it to allow other SPL_LOAD_IMAGE_METHOD() declarations to override it. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
At present this returns but it seems better to just exit sandbox immediately. Signed-off-by:
Simon Glass <sjg@chromium.org> reset
-