- Feb 20, 2020
-
-
Masahiro Yamada authored
To avoid "asm/dma-mapping.h: No such file or directory" error, we need something. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
- Feb 07, 2020
-
-
Simon Glass authored
There can be different types of interrupt controllers in a system and some drivers may need to distinguish between these. In general this can be handled using the device tree by adding the interrupt information to device nodes. However on x86 devices we have interrupt controllers which are not tied to any particular device and not really used in U-Boot. These still need to be inited, so a convenient method is to give each controller a type and allow a particular controller type to be probed. Add support for this in sandbox along with a test. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> [bmeng: remove the new bland line at EOF of test/dm/irq.c] Signed-off-by:
Bin Meng <bmeng.cn@gmail.com>
-
- Feb 06, 2020
-
-
Simon Glass authored
On high-DPI displays U-Boot's LCD window can look very small. Add a -K flag to expand it to make things easier to read, while still using the existing resolution internally. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Anatolij Gustschin <agust@denx.de>
-
Simon Glass authored
At present there is no positive indication that U-Boot has finished sending sound data. This means that it is not possible to power down an audio codec, for example. Add a new method that is called once all sound data has been sent. Add a new method for this, called when the sound_play() call is done. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Some files use U-Boot headers but still need to access the system malloc(). Allow this by creating a new asm/malloc.h which can be used so long as U-Boot's malloc.h has not been included. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Dec 17, 2019
-
-
Robert Beckett authored
Add support for setting the chip address offset mask to EEPROM sumulator and add tests to test it. Signed-off-by:
Robert Beckett <bob.beckett@collabora.com> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
Robert Beckett authored
Improve i2c EEPROM simulator testing by providing access functions to check the previous chip addr and offset. Given that we can now directly test the offsets, also simplified the offset mapping and allow for wrapping acceses. Signed-off-by:
Robert Beckett <bob.beckett@collabora.com> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
- Dec 15, 2019
-
-
Simon Glass authored
Add a sandbox driver and PCI-device emulator for p2sb. Also add a test which uses a simple 'adder' driver to test the p2sb functionality. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Add a simple PMC for sandbox to permit tests to run. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
- 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
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>
-
- 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 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
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>
-
- 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 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>
-
- 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>
-
- Apr 24, 2019
-
-
Simon Glass authored
At present if one of the initcalls fails on sandbox the address printing is not help, e.g.: initcall sequence 0000557678967c80 failed at call 00005576709dfe1f (err=-96) This is because U-Boot gets relocated high into memory and the relocation offset (gd->reloc_off) does not work correctly for sandbox. Add support for finding the base address of the text region (at least on Linux) and use that to set the relocation offset. This makes the output better: initcall sequence 0000560775957c80 failed at call 0000000000048134 (err=-96) Then you use can use grep to see which init call failed, e.g.: $ grep 0000000000048134 u-boot.map stdio_add_devices Of course another option is to run it with a debugger such as gdb: $ gdb u-boot ... (gdb) br initcall.h:41 Breakpoint 1 at 0x4db9d: initcall.h:41. (2 locations) Note that two locations are reported, since this function is used in both board_init_f() and board_init_r(). (gdb) r Starting program: /tmp/b/sandbox/u-boot [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". U-Boot 2018.09-00264-ge0c2ba9814-dirty (Sep 22 2018 - 12:21:46 -0600) DRAM: 128 MiB MMC: Breakpoint 1, initcall_run_list (init_sequence=0x5555559619e0 <init_sequence_f>) at /scratch/sglass/cosarm/src/third_party/u-boot/files/include/initcall.h:41 41 printf("initcall sequence %p failed at call %p (err=%d)\n", (gdb) print *init_fnc_ptr $1 = (const init_fnc_t) 0x55555559c114 <stdio_add_devices> (gdb) Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Apr 23, 2019
-
-
Neil Armstrong authored
When fixing sandbox test for regmap_read_poll_timeout(), the sandbox_timer_add_offset was introduced but only defined in sandbox code thus generating warnings when used out of sandbox : include/regmap.h:289:2: note: in expansion of macro 'regmap_read_poll_timeout_test' regmap_read_poll_timeout_test(map, addr, val, cond, sleep_us, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/meson_spifc.c:169:8: note: in expansion of macro 'regmap_read_poll_timeout' ret = regmap_read_poll_timeout(spifc->regmap, REG_SLAVE, data, ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/meson_spifc.c: In function 'meson_spifc_txrx': include/regmap.h:277:4: warning: implicit declaration of function 'sandbox_timer_add_offset' [-Wimplicit-function-declaration] This fix adds a timer_test_add_offset() only defined in sandbox, and renames the previous sandbox_timer_add_offset() to it. Cc: Simon Glass <sjg@chromium.org> Reported-by:
Tom Rini <trini@konsulko.com> Fixes: df9cf1cc ("test: dm: regmap: Fix the long test delay") Signed-off-by:
Neil Armstrong <narmstrong@baylibre.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Apr 12, 2019
-
-
Christian Gmeiner authored
Fixes following compile problem: ➜ u-boot-mainline git:(master) ✗ make sandbox_defconfig all NO_SDL=1 scripts/kconfig/conf --syncconfig Kconfig CHK include/config.h CFG u-boot.cfg GEN include/autoconf.mk GEN include/autoconf.mk.dep CHK include/config/uboot.release CHK include/generated/version_autogenerated.h CHK include/generated/timestamp_autogenerated.h UPD include/generated/timestamp_autogenerated.h CHK include/generated/generic-asm-offsets.h HOSTCC tools/mkenvimage.o HOSTLD tools/mkenvimage HOSTCC tools/fit_image.o HOSTCC tools/image-host.o HOSTCC tools/dumpimage.o HOSTLD tools/dumpimage HOSTCC tools/mkimage.o HOSTLD tools/mkimage HOSTLD tools/fit_info HOSTLD tools/fit_check_sign CC cmd/version.o GZIP cmd/config_data.gz CHK cmd/config_data_gz.h CHK cmd/config_data_size.h CHK cmd/license_data_gz.h CHK cmd/license_data_size.h LD cmd/built-in.o CC common/main.o LD common/built-in.o CC drivers/fastboot/fb_getvar.o LD drivers/fastboot/built-in.o LD drivers/video/built-in.o ld.bfd: drivers/video/sandbox_sdl.o: in function `sandbox_sdl_sound_play': /home/christian/projects/u-boot-mainline/./arch/sandbox/include/asm/sdl.h:110: multiple definition of `sandbox_sdl_sound_play'; drivers/video/video-uclass.o:/home/christian/projects/u-boot-mainline/./arch/sandbox/include/asm/sdl.h:110: first defined here ld.bfd: drivers/video/sandbox_sdl.o: in function `sandbox_sdl_sound_init': /home/christian/projects/u-boot-mainline/./arch/sandbox/include/asm/sdl.h:120: multiple definition of `sandbox_sdl_sound_init'; drivers/video/video-uclass.o:/home/christian/projects/u-boot-mainline/./arch/sandbox/include/asm/sdl.h:120: first defined here make[3]: *** [scripts/Makefile.build:355: drivers/video/built-in.o] Fehler 1 make[2]: *** [scripts/Makefile.build:432: drivers/video] Fehler 2 make[1]: *** [Makefile:1531: drivers] Fehler 2 make: *** [Makefile:485: __build_one_by_one] Fehler 2 Fixes: f2b25c9b ("dm: sound: Complete migration to driver model") Signed-off-by:
Christian Gmeiner <christian.gmeiner@gmail.com>
-
Thierry Reding authored
If 64-bit physical addresses support is enabled, make sure the sandox defines the correct types for phys_addr_t and phys_size_t. Signed-off-by:
Thierry Reding <treding@nvidia.com>
-
- Feb 20, 2019
-
-
Simon Glass authored
Some audio codecs such as Intel HDA do not need to use digital data to play sounds, but instead have a way to emit beeps. Add this interface as an option. If the beep interface is not supported, then the sound uclass falls back to the I2S interface. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
This uclass currently has no tests. Add a sandbox driver and some simple tests to provide basic coverage. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> [bmeng: Use "sandbox,pch" for the compatible string, for consistency] Signed-off-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
This struct is getting larger and in some cases is being used for things which would be better put into a driver. For example hwspinlock is not used outside of sandbox_hwspinlock.c. Add a note to encourage people to put things elsewhere. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
- Jan 15, 2019
-
-
Christian GMEINER authored
These functions could be used by drivers. Signed-off-by:
Christian GMEINER <christian.GMEINER@bachmann.info> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Dec 13, 2018
-
-
Simon Glass authored
At present these parameters are hard-coded in the sdl interface code. Allow them to be specified by the driver instead. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
All users of sound are converted to use driver model. Drop the old code and the CONFIG_DM_SOUND option. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Update sandbox's device tree and config to use driver model for sound. Use the double buffer for sound output so that we don't need to wait for the sound to complete before returning. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
The sound driver pulls together the audio codec and i2s drivers in order to actually make sounds. It supports setup() and play() methods. The sound_find_codec_i2s() function allows locating the linked codec and i2s devices. They can be referred to from uclass-private data. Add a uclass and a test for sound. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
The i2s bus is commonly used with audio codecs. It provides a way to stream digital data sychronously in both directions. U-Boot only supports audio output, so this uclass is very simple, with a single tx_data() method. Add a uclass and a test for i2s. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
An audio codec provides a way to convert digital data to sound and vice versa. Add a simple uclass which just supports setting the parameters for the codec. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Dec 07, 2018
-
-
Benjamin Gaignard authored
This is uclass for Hardware Spinlocks. It implements two mandatory operations: lock and unlock and one optional relax operation. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Patrice Chotard <patrice.chotard@st.com>
-
- Dec 05, 2018
-
-
Simon Glass authored
At present the RAM buffer is not inited unless it is read from a file, likely produced by an earlier phase of U-Boot. This causes valgrind warnings whenever the RAM buffer is used. Correct this by initing it if needed. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Nov 26, 2018
-
-
Simon Glass authored
There is some basic informaton that SPL normally wants to pass through to U-Boot, such as the SDRAM size and bank information. Mkae use of the new bloblist structure for this. Add a new 'handoff' blob which is set up in SPL and passed to U-Boot proper. Also adda test for sandbox_spl that checks that this works correctly and a new 'sb' command to show the information passed from SPL. Reviewed-by:
Tom Rini <trini@konsulko.com> Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
The old 'sb' command was deprecated in 2015 and replaced with 'host'. It is useful to be able to access some internal sandbox state, particularly for testing. Resurrect the old command and provide a way to print some basic state information (currently just the arguments to sandbox). Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
At present we don't have a test that of-platdata can be accessed in SPL. Add this in as a command-line option to SPL. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Nov 21, 2018
-
-
Simon Glass authored
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 <sjg@chromium.org>
-