| #
5395ac06 |
| 12-Oct-2022 |
Michal Suchanek <msuchanek@suse.de> |
UPSTREAM: dm: treewide: Do not use the return value of simple uclass iterator
uclass_first_device/uclass_next_device return value will be removed, don't use it.
With the current implementation dev
UPSTREAM: dm: treewide: Do not use the return value of simple uclass iterator
uclass_first_device/uclass_next_device return value will be removed, don't use it.
With the current implementation dev is equivalent to !ret. It is redundant to check both, ret check can be replaced with dev check, and ret check inside the iteration is dead code.
Change-Id: Ie500bbed46f8d08721b14b1db7a7be94ea601799 Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org> (cherry picked from commit 4954937d922840c212b7eba297cc2d4779f087ad) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|
| #
b048a4db |
| 04-Sep-2017 |
Patrice Chotard <patrice.chotard@st.com> |
UPSTREAM: dm: test: replace dm_scan_dt() by of dm_extended_scan_fdt() in dm_do_test
This allows to scan the DT including all "clocks" node's sub-nodes in which fixed-clock are defined. All fixed-clo
UPSTREAM: dm: test: replace dm_scan_dt() by of dm_extended_scan_fdt() in dm_do_test
This allows to scan the DT including all "clocks" node's sub-nodes in which fixed-clock are defined. All fixed-clock should be defined inside a clocks node which collect all external oscillators. Until now, all clocks sub-nodes can't be binded except if the "simple-bus" compatible string is added which is a hack.
Update test.dts by moving clk_fixed node inside clocks.
Change-Id: I9c346d812b0ee270f9b6fc6b6f60af7c28ebb46e Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit ee87a097b0f66158ce2985940a5f28ba15a3552d)
show more ...
|
| #
6fb2f579 |
| 19-May-2017 |
Simon Glass <sjg@chromium.org> |
dm: core: Run tests with both livetree and flat tree
Some tests require either livetree or flat tree. Add flags to allow the tests to specify this. Adjust the test runner to run with livetree (if su
dm: core: Run tests with both livetree and flat tree
Some tests require either livetree or flat tree. Add flags to allow the tests to specify this. Adjust the test runner to run with livetree (if supported) and then flat tree.
Some video tests are quite slow and running on flat tree adds little extra test value, so run these on livetree only.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
c166c47b |
| 19-May-2017 |
Simon Glass <sjg@chromium.org> |
dm: test: Add support for running tests with livetree
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
dm: test: Add support for running tests with livetree
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 <sjg@chromium.org>
show more ...
|
| #
801587bd |
| 19-May-2017 |
Simon Glass <sjg@chromium.org> |
dm: test: Show the test filename when running
Show the filename of the test being run. Skip the path and show just the base name.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
| #
f86db10c |
| 19-May-2017 |
Simon Glass <sjg@chromium.org> |
dm: test: Move test running code into a separate function
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-of
dm: test: Move test running code into a separate function
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 <sjg@chromium.org>
show more ...
|
| #
34b744be |
| 19-May-2017 |
Simon Glass <sjg@chromium.org> |
sandbox: Add a way to reset sandbox state for tests
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
sandbox: Add a way to reset sandbox state for tests
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 <sjg@chromium.org>
show more ...
|
| #
19c8205e |
| 19-May-2017 |
Simon Glass <sjg@chromium.org> |
dm: core: Scan the live tree when setting up driver model
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 <s
dm: core: Scan the live tree when setting up driver model
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 <sjg@chromium.org>
show more ...
|
| #
8a36287a |
| 29-Jan-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
26e1becc |
| 28-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/dm: clear unit test failure count each run
The ut command prints a test failure count each time it is executed. This is stored in a global variable which is never reset. Consequently, the print
test/dm: clear unit test failure count each run
The ut command prints a test failure count each time it is executed. This is stored in a global variable which is never reset. Consequently, the printed failure count accumulates across runs. Fix this by clearing the counter each time "ut" is invoked.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
9ce8b402 |
| 09-Nov-2015 |
Simon Glass <sjg@chromium.org> |
test: Record and silence console in tests
When running sandbox tests, silence the console to avoid unwanted output. Also, record the console in case tests want to check it.
The -v option can be use
test: Record and silence console in tests
When running sandbox tests, silence the console to avoid unwanted output. Also, record the console in case tests want to check it.
The -v option can be used to enable stdout during tests.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
24b852a7 |
| 09-Nov-2015 |
Simon Glass <sjg@chromium.org> |
Move console definitions into a new console.h file
The console includes a global variable and several functions that are only used by a small subset of U-Boot files. Before adding more functions, mo
Move console definitions into a new console.h file
The console includes a global variable and several functions that are only used by a small subset of U-Boot files. Before adding more functions, move the definitions into their own header file.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
3884c98c |
| 09-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: usb: Avoid time delays in sandbox tests
Currently the USB tests take around two seconds to run. Remove these unnecessary time delays so that the tests run quickly.
Signed-off-by: Simon Glass <s
dm: usb: Avoid time delays in sandbox tests
Currently the USB tests take around two seconds to run. Remove these unnecessary time delays so that the tests run quickly.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
c02790ce |
| 06-Jul-2015 |
Simon Glass <sjg@chromium.org> |
dm: test: Allow test names to leave out the dm_test_ prefix
All driver model tests have a dm_test_ prefix. Ignore it when matching a test name. This makes it easier to run individual tests, like thi
dm: test: Allow test names to leave out the dm_test_ prefix
All driver model tests have a dm_test_ prefix. Ignore it when matching a test name. This makes it easier to run individual tests, like this:
./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb \ -c "ut dm clk_periph"
We can use 'clk_periph' instead of 'dm_test_clk_periph'.
Also print a message if the requested test is not found.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
b6227d39 |
| 20-May-2015 |
Joe Hershberger <joe.hershberger@ni.com> |
test: dm: Recover the driver model tree after tests
Put the driver model for the system back into a good state after completing the DM testing.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.co
test: dm: Recover the driver model tree after tests
Put the driver model for the system back into a good state after completing the DM testing.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
7cccc66a |
| 20-May-2015 |
Joe Hershberger <joe.hershberger@ni.com> |
test: dm: Don't bail on all tests if one test fails
There's not much point in having a failure count if we always give up on the first failure. Also stop clearing the entire state between tests.
Ma
test: dm: Don't bail on all tests if one test fails
There's not much point in having a failure count if we always give up on the first failure. Also stop clearing the entire state between tests.
Make sure that any failures are still passed out to the command line.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
40441e0b |
| 20-May-2015 |
Joe Hershberger <joe.hershberger@ni.com> |
test: dm: Move the dm tests over to the ut command
Unify the command for running unit tests further by moving the "dm test" command over to "ut dm".
Signed-off-by: Joe Hershberger <joe.hershberger@
test: dm: Move the dm tests over to the ut command
Unify the command for running unit tests further by moving the "dm test" command over to "ut dm".
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
e721b882 |
| 20-May-2015 |
Joe Hershberger <joe.hershberger@ni.com> |
test: Generalize the unit test framework
Separate the ability to define tests and assert status of test functions from the dm tests so they can be used more consistently throughout all tests.
Signe
test: Generalize the unit test framework
Separate the ability to define tests and assert status of test functions from the dm tests so they can be used more consistently throughout all tests.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
f64000c3 |
| 13-May-2015 |
Przemyslaw Marczak <p.marczak@samsung.com> |
test: dm: test.dts - move to sandbox dts directory
The file test.dts from driver model test directory, was compiled by call dtc in script: test/dm/test-dm.sh.
This doesn't allow for including of dt
test: dm: test.dts - move to sandbox dts directory
The file test.dts from driver model test directory, was compiled by call dtc in script: test/dm/test-dm.sh.
This doesn't allow for including of dtsi files and using of C preprocessor routines in this dts file.
Since the mentioned script builds U-Boot before tests, then moving the test.dts file into sandbox dts directory is reasonable.
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Tested on sandbox: Tested-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
b939689c |
| 05-May-2015 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Merge branch 'u-boot/master' into 'u-boot-arm/master'
|
| #
57f54d55 |
| 25-Mar-2015 |
Simon Glass <sjg@chromium.org> |
dm: test: Allow 'dm test' to select a particular test to run
As well as running all tests, it is useful to be able to run a selected test.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by:
dm: test: Allow 'dm test' to select a particular test to run
As well as running all tests, it is useful to be able to run a selected test.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
show more ...
|
| #
84a6df09 |
| 26-Oct-2014 |
Tom Rini <trini@ti.com> |
Merge git://git.denx.de/u-boot-dm
Fix a trivial conflict over adding <dm.h>
Conflicts: arch/arm/cpu/armv7/omap3/board.c
Signed-off-by: Tom Rini <trini@ti.com>
|
| #
756ac0bb |
| 04-Oct-2014 |
Simon Glass <sjg@chromium.org> |
test: dm: Support memory leak checking as a core feature
Check the state of the malloc() heap before each test is run, so that tests can verify that all is well at the end. Provide helper functions
test: dm: Support memory leak checking as a core feature
Check the state of the malloc() heap before each test is run, so that tests can verify that all is well at the end. Provide helper functions to mark the heap and to check that it returns to its initial state.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
c23154aa |
| 08-Aug-2014 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot-arm
|
| #
00606d7e |
| 23-Jul-2014 |
Simon Glass <sjg@chromium.org> |
dm: Allow drivers to be marked 'before relocation'
Driver model currently only operates after relocation is complete. In this state U-Boot typically has a small amount of memory available. In adding
dm: Allow drivers to be marked 'before relocation'
Driver model currently only operates after relocation is complete. In this state U-Boot typically has a small amount of memory available. In adding support for driver model prior to relocation we must try to use as little memory as possible.
In addition, on some machines the memory has not be inited and/or the CPU is not running at full speed or the data cache is off. These can reduce execution performance, so the less initialisation that is done before relocation the better.
An immediately-obvious improvement is to only initialise drivers which are actually going to be used before relocation. On many boards the only such driver is a serial UART, so this provides a very large potential benefit.
Allow drivers to mark themselves as 'pre-reloc' which means that they will be initialised prior to relocation. This can be done either with a driver flag or with a 'dm,pre-reloc' device tree property.
To support this, the various dm scanning function now take a 'pre_reloc_only' parameter which indicates that only drivers marked pre-reloc should be bound.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|