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

    Martyn Welch
     

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

    Anup Patel
     

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

    Simon Glass
     
  • 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

    Simon Glass
     
  • 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

    Simon Glass
     

19 Feb, 2019

1 commit


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

    Heinrich Schuchardt
     

13 Feb, 2019

1 commit


12 Feb, 2019

2 commits


10 Feb, 2019

2 commits

  • Samsung sound patches (applied for Samsung maintainer)
    Common sound support
    buildman environment support
    of-platdata documentation improvements

    Tom Rini
     
  • 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

    Lokesh Vutla
     

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

    Marcel Ziswiler
     
  • 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
    done

    Signed-off-by: Roman Kapl

    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

    Heinrich Schuchardt
     

08 Feb, 2019

1 commit


02 Feb, 2019

1 commit


26 Jan, 2019

1 commit


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

    Thomas RIENOESSL
     

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

    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

    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

    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

    Simon Goldschmidt
     

16 Jan, 2019

2 commits


15 Jan, 2019

6 commits


29 Dec, 2018

1 commit


27 Dec, 2018

1 commit


16 Dec, 2018

1 commit


14 Dec, 2018

5 commits


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

    Heinrich Schuchardt