| f9fd4558 | 19-Apr-2015 |
Simon Glass <sjg@chromium.org> |
dm: test: Don't clear global_data in dm_test_uclass_before_ready()
We must not clear global_data even in tests, since the ram_buffer (which is used by malloc()) will also be lost, and subsequent tes
dm: test: Don't clear global_data in dm_test_uclass_before_ready()
We must not clear global_data even in tests, since the ram_buffer (which is used by malloc()) will also be lost, and subsequent tests will fail.
Zero only the global_data fields that are required for the test to function.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| 6e0c4880 | 20-Apr-2015 |
Przemyslaw Marczak <p.marczak@samsung.com> |
dm: test: Add tests for get/find uclass's device by name
This commit introduces simple tests for functions: - uclass_find_device_by_name() - uclass_get_device_by_name()
Tests added by this commit:
dm: test: Add tests for get/find uclass's device by name
This commit introduces simple tests for functions: - uclass_find_device_by_name() - uclass_get_device_by_name()
Tests added by this commit: - Test: dm_test_uclass_devices_find_by_name: for uclass id: UCLASS_TEST_FDT * get uclass's devices by uclass_find_first/next_device() each as 'testdev', * for each returned device, call: uclass_find_device_by_name(), with previously returned device's name as an argument ('testdev->name'). * for the found device ('founddev') check if: * founddev != NULL * testdev == founddev * testdev->name == founddev->name (by strcmp)
- Test: dm_test_uclass_devices_get_by_name: for uclass id: UCLASS_TEST_FDT * get uclass's devices by uclass_get_first/next_device() each as 'testdev', * for each returned device, call: uclass_get_device_by_name(), with previously returned device's name as an argument ('testdev->name'). * for the found device ('founddev') check if: * founddev != NULL * founddev is active * testdev == founddev * testdev->name == founddev->name (by strcmp)
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 9e85f13d | 15-Apr-2015 |
Przemyslaw Marczak <p.marczak@samsung.com> |
dm: test: Add tests for get/find uclass devices
This commit introduces simple tests for functions: - uclass_find_first_device() - uclass_find_next_device() - uclass_first_device() - uclass_next_devi
dm: test: Add tests for get/find uclass devices
This commit introduces simple tests for functions: - uclass_find_first_device() - uclass_find_next_device() - uclass_first_device() - uclass_next_device()
Tests added by this commit: - Test: dm_test_uclass_devices_find: * call uclass_find_first_device(), then check if: (dev != NULL), (ret == 0) * for the rest devices, call uclass_find_next_device() and do the same check
- Test: dm_test_uclass_devices_get: * call uclass_first_device(), then check if: -- (dev != NULL), (ret == 0), device_active() * for the rest devices, call uclass_next_device() and do the same check
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| e00cb223 | 25-Mar-2015 |
Simon Glass <sjg@chromium.org> |
dm: usb: Add tests for the USB uclass
This adds a simple test for probing and a functional test using the flash stick emulator, which tests a large chunk of the USB stack.
Signed-off-by: Simon Glas
dm: usb: Add tests for the USB uclass
This adds a simple test for probing and a functional test using the flash stick emulator, which tests a large chunk of the USB stack.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
show more ...
|
| 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 ...
|
| 7d104eab | 22-Mar-2015 |
Joe Hershberger <joe.hershberger@ni.com> |
test: dm: eth: Add testing for ethrotate env var
Make sure that the ethrotate behavior occurs as expected.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chro
test: dm: eth: Add testing for ethrotate env var
Make sure that the ethrotate behavior occurs as expected.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 6536b9bb | 22-Mar-2015 |
Joe Hershberger <joe.hershberger@ni.com> |
dm: eth: Add support for ethprime env var
The ethprime env var is used to indicate the starting device if none is specified in ethact. Also support aliases specified in the ethprime var.
Signed-off
dm: eth: Add support for ethprime env var
The ethprime env var is used to indicate the starting device if none is specified in ethact. Also support aliases specified in the ethprime var.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| fa67f90f | 05-Mar-2015 |
Simon Glass <sjg@chromium.org> |
dm: Show both allocated and requested seq numbers in 'dm uclass'
Both of these values are useful for understanding what is going on, so show them both.
The requested number comes from a device tree
dm: Show both allocated and requested seq numbers in 'dm uclass'
Both of these values are useful for understanding what is going on, so show them both.
The requested number comes from a device tree alias. The allocated one is set up when the device is activated, and is unique throughout the uclass.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 02c07b37 | 05-Mar-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Add a uclass pre_probe() method for devices
Some uclasses want to set up a device before it is probed. Add a method for this.
An example is with PCI, where a PCI uclass wants to set up it
dm: core: Add a uclass pre_probe() method for devices
Some uclasses want to set up a device before it is probed. Add a method for this.
An example is with PCI, where a PCI uclass wants to set up its private data for later use. This allows the device's uclass() method to make calls whcih use that data (for example, read PCI memory regions from device tree, set up bus numbers).
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|