09 Mar, 2019
1 commit
-
The syntax of dumpimage was simplified in commit 12b831879a76 ("tools:
dumpimage: Simplify arguments"), but the test
(test/image/test-imagetools.sh) was not updated and is now failing.Update the test to use the new syntax.
Reported-by: Vagrant Cascadian
Signed-off-by: Martyn Welch
Tested-by: Vagrant Cascadian
27 Feb, 2019
1 commit
-
This patch adds fixed-factor clock driver which derives clock
rate by dividing (div) and multiplying (mult) fixed factors
to a parent clock.Signed-off-by: Atish Patra
Signed-off-by: Anup Patel
Reviewed-by: Simon Glass
20 Feb, 2019
3 commits
-
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
Reviewed-by: Bin Meng -
At present the PCH has 4 operations and these are reasonably widely used
in the drivers. But sometimes we want to add rarely used operations, and
each of these currently adds to the size of the PCH operations table.Add an ioctl() method which can be easily expanded without any more impact
on the operations table.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng -
This uclass currently has no tests. Add a sandbox driver and some simple
tests to provide basic coverage.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
[bmeng: Use "sandbox,pch" for the compatible string, for consistency]
Signed-off-by: Bin Meng
19 Feb, 2019
1 commit
-
Enable usage of gdbserver for all sandbox targets (sandbox,
sandbox_flattree etc.).Signed-off-by: Igor Opaniuk
Reviewed-by: Tom Rini
Reviewed-by: Simon Glass
16 Feb, 2019
1 commit
-
In test/py/conftest.py the assumption is made that for if a test is called
with `ut unicode` the test function name starts with 'unicode_test_'. As
the Unicode tests did not follow this naming scheme they were not executed
by `make tests`.Rename the Unicode test functions.
Signed-off-by: Heinrich Schuchardt
13 Feb, 2019
1 commit
-
Provide unit tests for u16_strdup() and u16_strcpy().
Signed-off-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf
12 Feb, 2019
2 commits
-
On x86_64 the size of the file u-boot loaded by the tftp test has grown in
size such that when loading the file to 0x200000 it overwrites a memory
area reserved for PCI.If no load address is specified for tftp do not use the ram base address
(or if zero 0x200000) but the default address.Signed-off-by: Heinrich Schuchardt
-
- DM I2C improvements
10 Feb, 2019
2 commits
-
Samsung sound patches (applied for Samsung maintainer)
Common sound support
buildman environment support
of-platdata documentation improvements -
regulator_set_enable() api throws an error in the following three cases:
- when requested to disable an always-on regulator
- when set_enable() ops not provided by regulator driver
- when enabling is actually failed.(Error returned by the regulator driver)Sometimes consumer drivers doesn't want to track the first two scenarios
and just need to worry about the case where enabling is actually failed.
But it is also a good practice to have an error value returned in the
first two cases.So introduce an api regulator_set_enable_if_allowed() which ignores the
first two error cases and returns an error as given by regulator driver.
Consumer drivers can use this api need not worry about the first two
error conditions.Signed-off-by: Lokesh Vutla
Reviewed-by: Simon Glass
09 Feb, 2019
3 commits
-
While uclass_find_device() fails with -ENODEV in case of list_empty
strangely uclass_find_first_device() returns 0.Fix uclass_find_first_device() to also fail with -ENODEV instead.
Signed-off-by: Marcel Ziswiler
Reviewed-by: Simon Glass -
Only first previously deleted entry was recognized, leading hsearch_r
to think that there was no previously deleted entry. It then conluded
that a free entry was found, even if there were no free entries and it
overwrote a random entry.This patch makes sure all deleted or free entries are always found and
also introduces constants for the 0 and -1 numbers. Unit tests to excersise a
simple hash table usage and catch the corruption were added.To trash your environment, simply run this loop:
setenv i 0
while true; do
setenv v_$i $i
setenv v_$i
setexpr i $i + 1
doneSigned-off-by: Roman Kapl
-
Memory functions may have architecture specific implementations. These
should be tested.Provide unit tests for memset(), memcpy(), memmove().
Provide a 'ut lib' sub-command to execute the tests.
Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass
08 Feb, 2019
1 commit
-
It is checking the highest alias ID for eth, gpio, pci, i2c and error
code on non existing alias.Signed-off-by: Michal Simek
Reviewed-by: Heiko Schocher
Reviewed-by: Simon Glass
02 Feb, 2019
1 commit
-
This adds one test case that checks that allocation with multiple
DRAM banks works correctly.Signed-off-by: Simon Goldschmidt
Reviewed-by: Simon Glass
26 Jan, 2019
1 commit
-
As a follow-up, change the name of the newly introduced function
'lmb_get_unreserved_size' to 'lmb_get_free_size', which is more
appropriate.Signed-off-by: Simon Goldschmidt
[trini: Fix test/lib/lmb.c]
Signed-off-by: Tom Rini
25 Jan, 2019
1 commit
-
When dealing with two ethernet ports and having "netretry" set
to "once", it could occur that the connection (e.g. an ARP
request) failed, hence the status of the netloop was
"NETLOOP_FAIL". Due to the setting of "netretry", the network
logic would then switch to the other network interface,
assigning "ret" with the return value of "net_start_again()".
If this call succeeded we would return 0 (i.e. success) to
the caller when in reality the network action failed.Signed-off-by: Thomas RIENOESSL
Reviewed-by: Christian Gmeiner
Acked-by: Joe Hershberger
17 Jan, 2019
4 commits
-
This adds two new functions, lmb_alloc_addr and
lmb_get_unreserved_size.lmb_alloc_addr behaves like lmb_alloc, but it tries to allocate a
pre-specified address range. Unlike lmb_reserve, this address range
must be inside one of the memory ranges that has been set up with
lmb_add.lmb_get_unreserved_size returns the number of bytes that can be
used up to the next reserved region or the end of valid ram. This
can be 0 if the address passed is reserved.Added test for these new functions.
Reviewed-by: Simon Glass
Signed-off-by: Simon Goldschmidt -
lmb_add_region handles overlapping regions wrong: instead of merging
or rejecting to add a new reserved region that overlaps an existing
one, it just adds the new region.Since internally the same function is used for lmb_alloc, change
lmb_add_region to reject overlapping regions.Also, to keep reserved memory correct after 'free', reserved entries
created by allocating memory must not set their size to a multiple
of alignment but to the original size. This ensures the reserved
region is completely removed when the caller calls 'lmb_free', as
this one takes the same size as passed to 'lmb_alloc' etc.Add test to assert this.
Reviewed-by: Simon Glass
Signed-off-by: Simon Goldschmidt -
The lmb code fails if base + size of RAM overflows to zero.
Fix this by calculating end as 'base + size - 1' instead of 'base + size'
where appropriate.Added tests to assert this is fixed.
Reviewed-by: Simon Glass
Signed-off-by: Simon Goldschmidt -
Add basic tests for the lmb memory allocation code used to reserve and
allocate memory during boot.Signed-off-by: Simon Goldschmidt
Reviewed-by: Simon Glass
16 Jan, 2019
2 commits
-
Fix recent changes to serial API for driver model
Buildman clang support and a few fixes
Small fixes to 'dm tree' and regmap test
Improve sandbox build compatibility
A few other minor fixes -
Some tests have ended up using double quotes where single quotes could be
used. Adjust this for consistency with the rest of U-Boot's Python code.Signed-off-by: Simon Glass
Reviewed-by: Heinrich Schuchardt
15 Jan, 2019
6 commits
-
All driver-model functions should have a device as the first parameter.
Update this function accordingly.Signed-off-by: Simon Glass
Reviewed-by: Andy Shevchenko -
All driver-model functions should have a device as the first parameter.
Update this function accordingly.Signed-off-by: Simon Glass
Reviewed-by: Andy Shevchenko -
All driver-model functions should have a device as the first parameter.
Update this function accordingly.Signed-off-by: Simon Glass
Reviewed-by: Andy Shevchenko -
At present one of the regmap tests takes 5 seconds to run since it waits
for a timeout. This should be handled using sandbox_timer_add_offset()
which advances time for test purposes.This requires a little change to make the regmap_read_poll_timeout()
testable.Update the macro and the test.
Fixes: ebe3497c9c ("test: regmap: add regmap_read_poll_timeout test")
Signed-off-by: Simon Glass
-
At present the 'Index' column assumes there is only one digit. But on some
devices (e.g. snow) there are a lot of regulators and GPIO banks. Adjust
the output to allow for two digits without messing up the display.Also capatalise the heading to match.
Fixes: 5197dafc42 (dm: core: Widen the dump tree to show more of the
driver's name.)Signed-off-by: Simon Glass
Reviewed-by: Liviu Dudau -
Add a test for the bootcount uclass, which uses the RTC bootcount backend
(i.e. drivers/bootcount/rtc.c is implictly also tested).Signed-off-by: Philipp Tomsich
Reviewed-by: Simon Glass
29 Dec, 2018
1 commit
-
With enabled default Nimbus font dm_test_video_truetype* tests fail.
Update expected expressions to fix them.Signed-off-by: Anatolij Gustschin
Reviewed-by: Simon Glass
27 Dec, 2018
1 commit
-
Enable device tree overlay tests by default if unit tests are selected
and the runtime is configured via device tree.Overlays have been mainlined in the device tree compiler so there is no
reason anymore to disable the tests by default.Signed-off-by: Heinrich Schuchardt
16 Dec, 2018
1 commit
-
The "dm" command under CONFIG_CMD_DM should live under cmd/ rather than
test/dm/ so move it.Signed-off-by: Tom Rini
14 Dec, 2018
5 commits
-
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
-
The current dev_read...() functions use s32 and u32 which are convenient
for device tree but not so useful for normal code, which often wants to
use normal integers for values.Add a helper which supports returning an unsigned int. Also add signed
versions of the unsigned readers.Signed-off-by: Simon Glass
-
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
-
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
-
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
13 Dec, 2018
1 commit
-
The uts created in do_ut_overlay() is not the one used in
cmd_ut_category(). Currently all tests are therefore called with
uts->priv = NULL and fail.Using a static variable is the easiest fix here.
Fixes: e93232e15ec9 ("test: overlay: Use cmd_ut_category()")
Signed-off-by: Heinrich Schuchardt