11 Feb, 2020

1 commit


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

9 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
     
  • 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 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
     

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
     

09 Jan, 2020

2 commits


08 Jan, 2020

5 commits


18 Dec, 2019

1 commit


17 Dec, 2019

2 commits


15 Dec, 2019

3 commits


03 Dec, 2019

1 commit


25 Nov, 2019

1 commit

  • Allow the unit test to pass full 8 byte scan code sequences to the USB
    keyboard emulation driver and to parse multi-byte escape sequences.

    The following features are not yet tested:

    * LED status
    * caps-lock
    * num-lock
    * numerical pad keys

    The following features are not yet implemented by the USB keyboard
    driver and therefore not tested:

    * modifiers for non-alpha-numeric keys, e.g. and
    * some special keys, e.g.
    * some modifiers, e.g. and
    * alternative keyboard layouts

    Signed-off-by: Heinrich Schuchardt

    Heinrich Schuchardt
     

10 Nov, 2019

1 commit

  • support parse regulator standard property:
    regulator-off-in-suspend;
    regulator-init-microvolt;
    regulator-suspend-microvolt:
    regulator_get_suspend_enable
    regulator_set_suspend_enable
    regulator_get_suspend_value
    regulator_set_suspend_value

    Signed-off-by: Joseph Chen
    Signed-off-by: Elaine Zhang
    Reviewed-by: Kever Yang

    Joseph Chen
     

03 Nov, 2019

1 commit

  • On x86 platforms the SPI flash can be mapped into memory so that the
    contents can be read with normal memory accesses.

    Add a new SPI method to find the location of the SPI flash in memory. This
    differs from the existing device-tree "memory-map" mechanism in that the
    location can be discovered at run-time.

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

    Simon Glass
     

01 Nov, 2019

1 commit


28 Oct, 2019

1 commit


22 Oct, 2019

2 commits


14 Oct, 2019

1 commit

  • Display Serial Interface (DSI) host can usefully be modelled
    as their own uclass.
    DSI defines a serial bus and a communication protocol
    between the host and the device (panel, bridge).

    Signed-off-by: Yannick Fertré

    Yannick Fertré
     

11 Oct, 2019

3 commits