03 Jun, 2020

1 commit

  • The test pings the local IP address though different ports of a sandbox
    DSA device. Port traffic is filtered and the test verifies that ping
    works only on enabled ports.
    The additional interfaces require MAC addresses, these have been added
    to sandbox default environment.

    Signed-off-by: Alex Marginean
    Signed-off-by: Claudiu Manoil

    Alex Marginean
     

09 Apr, 2020

1 commit


01 Apr, 2020

7 commits


31 Mar, 2020

1 commit


28 Mar, 2020

3 commits


13 Mar, 2020

1 commit

  • 4dbc107f4683 ("cmd: gpio: Correct do_gpio() return value") correctly
    changed the behaviour of the gpio command to return CMD_RET_SUCCESS or
    CMD_RET_FAILURE, but any existing script which expects the return value
    to be the pin value is broken by this change.

    Reinstate the legacy behaviour for `gpio input` only.

    Fixes: 4dbc107f4683 ("cmd: gpio: Correct do_gpio() return value")
    Signed-off-by: Alex Kiernan
    Signed-off-by: Alex Kiernan
    Reviewed-by: Simon Glass

    Alex Kiernan
     

13 Feb, 2020

1 commit

  • In the first version, the result of malloc is checked
    with ut_assertnonnull. But on a fail, this macro exit
    the function, so previously malloc are not freed.

    So to avoid a memleak, we don't use ut_assertnonnull,
    but simply check the return of malloc. If one has failed,
    we freed all the allocated memory and quit the function.

    Reported-by: Coverity (CID: 284403)
    Reported-by: Coverity (CID: 284404)
    Reported-by: Coverity (CID: 284405)
    Reported-by: Coverity (CID: 284406)
    Reported-by: Coverity (CID: 284407)
    Signed-off-by: Philippe Reynes

    Philippe Reynes
     

11 Feb, 2020

2 commits


07 Feb, 2020

4 commits

  • At present driver model supports the IRQ uclass but there is no way to
    request a particular interrupt for a driver.

    Add a mechanism, similar to clock and reset, to read the interrupts
    required by a device from the device tree and to request those interrupts.

    U-Boot itself does not have interrupt-driven handlers, so just provide a
    means to read and clear an interrupt. This can be useful to handle
    peripherals which must use an interrupt to determine when data is
    available, for example.

    Bring over the basic binding file as well, from Linux v5.4. Note that the
    older binding is not supported in U-Boot; the newer 'special form' must be
    used.

    Add a simple test of the new functionality.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • There can be different types of interrupt controllers in a system and some
    drivers may need to distinguish between these. In general this can be
    handled using the device tree by adding the interrupt information to
    device nodes.

    However on x86 devices we have interrupt controllers which are not tied
    to any particular device and not really used in U-Boot. These still need
    to be inited, so a convenient method is to give each controller a type
    and allow a particular controller type to be probed.

    Add support for this in sandbox along with a test.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    [bmeng: remove the new bland line at EOF of test/dm/irq.c]
    Signed-off-by: Bin Meng

    Simon Glass
     
  • It is sometimes useful to find a device in a uclass using only its driver
    data. The driver data often indicates the 'subtype' of the device, e,g,
    via its compatible string.

    Add a function to handle this.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • At present we have uclass_foreach_dev() which requires that uclass_get()
    be called beforehand to find the uclass. This is good if we suspect that
    that function might fail, but often we know that the uclass is available.

    Add a new helper which does this uclass_get() automatically, so that only
    the uclass ID is needed.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     

06 Feb, 2020

12 commits

  • At present dm/device.h includes the linux-compatible features. This
    requires including linux/compat.h which in turn includes a lot of headers.
    One of these is malloc.h which we thus end up including in every file in
    U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
    which needs to use the system malloc() in some files.

    Move the compatibility features into a separate header file.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present devres.h is included in all files that include dm.h but few
    make use of it. Also this pulls in linux/compat which adds several more
    headers. Drop the automatic inclusion and require files to include devres
    themselves. This provides a good indication of which files use devres.

    Signed-off-by: Simon Glass
    Reviewed-by: Anatolij Gustschin

    Simon Glass
     
  • At present there is no positive indication that U-Boot has finished
    sending sound data. This means that it is not possible to power down an
    audio codec, for example. Add a new method that is called once all sound
    data has been sent.

    Add a new method for this, called when the sound_play() call is done.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • When writing tests to check the output from commands it is useful to be
    able to check the output line by line using an assertion. Add helper
    macros to support this and to check that there is no unexpected trailing
    data.

    Also some commands produce a dump using print_buffer(). Add a way to check
    that the correct number of bytes are dumped (ignoring the actual
    contents).

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present we reset the console buffer before each test but do not
    actually set the recording flag. Without this, the output is not
    recorded.

    Update the code to set the flag before the test and clear it afterwards.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • It is convenient for bloblist to zero out the contents of a records when
    it is added. This saves the callers having to do it.

    Update the API accordingly.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • A common check is to see if a blob is present, create it if not and make
    sure that the size is large enough. Add a function to handle this.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • It is sometimes useful to process all children, making sure they are
    probed first. Add functions to help with this and a macro to make it more
    convenient.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • When generating ACPI tables we need to make sure that all devices have
    read their platform data, so that they can generate the tables correctly.

    Rather than adding this code in ACPI, create a core function to handle it.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add a function to read a property from the chosen node, providing access
    to its length. Update ofnode_get_chosen_string() to make use of it.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add a new function to read a property that supports reading the length as
    well.

    Reimplement ofnode_read_string() using it and fix its comment.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • This function is actually intended to read a string rather than a
    property. All of its current callers use it that way. Also there is no way
    to return the length of the property from this function.

    Rename it to better indicate its purpose, using ofnode_read as the prefix
    since this matches most other functions.

    Also add some tests which are missing for these functions.

    Signed-off-by: Simon Glass

    Simon Glass
     

05 Feb, 2020

2 commits


04 Feb, 2020

2 commits

  • Unit test for 'abootimg' command. Right now it covers dtb/dtbo
    functionality in Android Boot Image v2, which was added recently.

    Running test:

    $ ./test/py/test.py --bd sandbox --build -k test_abootimg

    shows that 1/1 tests passes successfully.

    Signed-off-by: Sam Protsenko
    Signed-off-by: Lokesh Vutla

    Sam Protsenko
     
  • Convert Android documentation from regular txt format to Sphinx (RST).
    Also add Android index.rst file and reference it in root index.rst, so
    that Android documentation is visible.

    Test:

    $ make htmldocs
    $ xdg-open doc/output/index.html

    Signed-off-by: Sam Protsenko
    Signed-off-by: Lokesh Vutla

    Sam Protsenko
     

31 Jan, 2020

1 commit


28 Jan, 2020

1 commit

  • Per sandbox_cs_info(), sandbox spi controller only supports chip
    select 0. Current test case tries to locate devices on chip select
    1, and any call to spi_get_bus_and_cs() or spi_cs_info() with cs
    number 1 should not return 0.

    This updates the test case to handle it correctly.

    Signed-off-by: Bin Meng
    Reviewed-by: Jagan Teki

    Bin Meng
     

17 Jan, 2020

1 commit