- 21 5月, 2015 1 次提交
-
-
由 Joe Hershberger 提交于
Use a regular expression to apply the default formatting flags for all ethaddr env vars. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 15 5月, 2015 2 次提交
-
-
由 Przemyslaw Marczak 提交于
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: NPrzemyslaw Marczak <p.marczak@samsung.com> Acked-by: NSimon Glass <sjg@chromium.org> Tested on sandbox: Tested-by: NSimon Glass <sjg@chromium.org>
-
由 Przemyslaw Marczak 提交于
This change adds new file to sandbox driver model test environment. The file is: test/dm/power.c, and it includes tests for PMIC framework, which includes PMIC uclass and REGULATOR uclass. All tests are based od Sandbox PMIC emulated device. Some test constants for this device are defined in the header: include/power/sandbox_pmic.h PMIC tests includes: - pmic get - tests, that pmic_get() returns the requested device - pmic I/O - tests I/O by writing and reading some values to PMIC's registers and then compares, that the write/read values are equal. The regulator tests includes: - Regulator get by devname/platname - Voltage set/get - Current set/get - Enable set/get - Mode set/get - Autoset - List autoset For the regulator 'get' test, the returned device pointers are compared, and their names are also compared to the requested one. Every other test, first sets the given attribute and next try to get it. The test pass, when the set/get values are equal. Signed-off-by: NPrzemyslaw Marczak <p.marczak@samsung.com> Acked-by: NSimon Glass <sjg@chromium.org> Tested on sandbox: Tested-by: NSimon Glass <sjg@chromium.org>
-
- 06 5月, 2015 4 次提交
-
-
由 Simon Glass 提交于
Add some simple tests to verify that the RTC uclass works correctly in U-Boot. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Sort these aliases to avoid confusion as to what is present. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Simon Glass 提交于
At present this driver has a few test features. They are needed for running the driver model unit tests but are confusing and unnecessary if using sandbox at the command line. Add a flag to enable the test mode, and don't enable it by default. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
Indicate to the emulated sandbox Ethernet driver when we expect a timeout and tell it to leap forward. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
- 23 4月, 2015 4 次提交
-
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org> Reviewed-by: NJoe Hershberger <joe.hershberger@ni.com> Tested-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Przemyslaw Marczak 提交于
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: NPrzemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Przemyslaw Marczak 提交于
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: NPrzemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Przemyslaw Marczak 提交于
This test introduces new test structure type:dm_test_perdev_uc_pdata. The structure consists of three int values only. For the test purposes, three pattern values are defined by enum, starting with TEST_UC_PDATA_INTVAL1. This commit adds two test cases for uclass platform data: - Test: dm_test_autobind_uclass_pdata_alloc - this tests if: * uclass driver sets: .per_device_platdata_auto_alloc_size field * the devices's: dev->uclass_platdata is non-NULL - Test: dm_test_autobind_uclass_pdata_valid - this tests: * if the devices's: dev->uclass_platdata is non-NULL * the structure of type 'dm_test_perdev_uc_pdata' allocated at address pointed by dev->uclass_platdata. Each structure field, should be equal to proper pattern data, starting from .intval1 == TEST_UC_PDATA_INTVAL1. Signed-off-by: NPrzemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: NSimon Glass <sjg@chromium.org>
-
- 19 4月, 2015 16 次提交
-
-
由 Joe Hershberger 提交于
Finish eliminating CamelCase from net.c and other failures Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
This patch is simply clean-up to make the IPv4 type that is used match what Linux uses. It also attempts to move all variables that are IP addresses use good naming instead of CamelCase. No functional change. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
由 Simon Glass 提交于
As well as running all tests, it is useful to be able to run a selected test. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
由 Simon Glass 提交于
Neither the hyphen nor the equals sign is needed. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
由 Simon Glass 提交于
The uclass pre-probe functions may end up calling back into the device in some circumstances. This can fail if recursion takes place. Adjust the ordering so that we mark the device as active early, then retract this later if needed. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
由 Simon Glass 提交于
Adjust this test to avoid repeating the same code too often. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMarek Vasut <marex@denx.de>
-
由 Joe Hershberger 提交于
Take a pass at plumbing errors through to the users of the network stack Currently only the start() function errors will be returned from NetLoop(). recv() tends not to have errors, so that is likely not worth adding. send() certainly can return errors, but this patch does not attempt to plumb them yet. halt() is not expected to error. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
The effect of the "netretry" env var was recently changed. This test checks that behavior. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
Make sure that the ethrotate behavior occurs as expected. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
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: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
Allow network devices to be referred to as "eth0" instead of "eth@12345678" when specified in ethact. Add tests to verify this behavior. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
Add a test for the eth uclass using the sandbox eth driver. Verify basic functionality of the network stack / eth uclass by exercising the ping function. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
In the case where the arch defines a custom map_sysmem(), make sure that including just mapmem.h is sufficient to have these functions as they are when the arch does not override it. Also split the non-arch specific functions out of common.h Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Add some basic tests to check that things work as expected with sandbox. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 17 4月, 2015 3 次提交
-
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Add a convenience function to access the private data that a uclass stores for each of its devices. Convert over most existing uses for consistency and to provide an example for others. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 13 2月, 2015 2 次提交
-
-
由 Simon Glass 提交于
Add a file to control driver model test features. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMasahiro Yamada <yamada.m@jp.panasonic.com>
-
由 Simon Glass 提交于
As with i2c_read() and i2c_write(), add a dm_ prefix to the driver model versions of these functions to avoid conflicts. Signed-off-by: NSimon Glass <sjg@chromium.org> Acked-by: NHeiko Schocher <hs@denx.de>
-
- 30 1月, 2015 8 次提交
-
-
由 Simon Glass 提交于
At present we go through various contortions to store the SPI slave's chip select in its private data. This only exists when the slave is active so must be set up when it is probed. Until the device is probed we don't actually know what chip select it will appear on. However, now that we can support per-child platform data, we can use that instead. This allows us to set up the chip select when the child is bound, and avoid the messy contortions. Unfortunately this is a fairly large change and it seems to be difficult to break it down further. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Some buses need to set up their devices before they can be used. This setup may well be common to all buses in a particular uclass. Support a common pre-probe method for the uclass, called before any bus devices are probed. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMasahiro Yamada <yamada.m@jp.panasonic.com>
-
由 Simon Glass 提交于
For buses, after a child is bound, allow the uclass to perform some processing. This can be used to figure out the address of the child (e.g. the chip select for SPI slaves) so that it is ready to be probed. This avoids bus drivers having to repeat the same process, which really should be done by the uclass, since it is common. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMasahiro Yamada <yamada.m@jp.panasonic.com>
-
由 Simon Glass 提交于
In many cases the per-child private data for a device's children is defined by the uclass rather than the individual driver. For example, a SPI bus needs to store information about each of its children, but all SPI drivers store the same information. It makes sense to allow the uclass to define this data. If the driver provides a size value for its per-child private data, then use it. Failng that, fall back to that provided by the uclass. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMasahiro Yamada <yamada.m@jp.panasonic.com>
-
由 Simon Glass 提交于
At present we try to use the 'reg' property and device tree aliases to give devices a sequence number. The 'reg' property is often actually a memory address, so the sequence numbers thus-obtained are not useful. It would be better if the devices were just sequentially numbered in that case. In fact neither I2C nor SPI use this feature, so drop it. Some devices need us to look up an alias to number them within the uclass. Add a flag to control this, so it is not done unless it is needed. Adjust the tests to test this new behaviour. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMasahiro Yamada <yamada.m@jp.panasonic.com>
-
由 Simon Glass 提交于
This is useful to check which uclass a device is in. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMasahiro Yamada <yamada.m@jp.panasonic.com>
-
由 Simon Glass 提交于
Allow parent drivers to be called when a new child is bound to them. This allows a bus to set up information it needs for that child. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NMasahiro Yamada <yamada.m@jp.panasonic.com>
-
由 Simon Glass 提交于
In many cases the child platform data for a device's children is defined by the uclass rather than the individual devices. For example, a SPI bus needs to know the chip select and speed for each of its children. It makes sense to allow this information to be defined the SPI uclass rather than each individual driver. If the device provides a size value for its child platdata, then use it. Failng that, fall back to that provided by the uclass. Reviewed-by: NMasahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: NSimon Glass <sjg@chromium.org>
-