26 Apr, 2018

1 commit

  • Commit 286ede6 ("drivers: core: Add translation in live tree case") made
    dev_get_addr always use proper bus translations for addresses read from
    the device tree. But this leads to problems with certain busses, e.g.
    I2C busses, which run into an error during translation, and hence stop
    working.

    It turns out that of_translate_address() and fdt_translate_address()
    stop the address translation with an error when they're asked to
    translate addresses for busses where #size-cells == 0 (comment from
    drivers/core/of_addr.c):

    * Note: We consider that crossing any level with #size-cells == 0 to mean
    * that translation is impossible (that is we are not dealing with a value
    * that can be mapped to a cpu physical address). This is not really specified
    * that way, but this is traditionally the way IBM at least do things

    To fix this case, we check in both the live-tree and non-live tree-case,
    whether the bus of the device whose address is about to be translated
    has size-cell size zero. If this is the case, we just read the address
    as a plain integer and return it, and only apply bus translations if the
    size-cell size if greater than zero.

    Signed-off-by: Mario Six
    Signed-off-by: Martin Fuzzey
    Reported-by: Martin Fuzzey
    Fixes: 286ede6 ("drivers: core: Add translation in live tree case")
    Reviewed-by: Simon Glass

    Mario Six
     

04 Feb, 2018

1 commit


16 Jan, 2018

1 commit


13 Dec, 2017

1 commit

  • This patch extends pmic_bind_children prefix matching. In addition to
    the node name the property regulator-name is used while trying to match
    prefixes. This allows assigning different drivers to regulator nodes
    named regulator@1 and regulator@10 for example.
    I have discarded the idea of using other properties then regulator-name
    as I do not see any benefit in using property compatible or even
    regulator-compatible. Of course I am open to change this if there are
    good reasons to do so.

    Signed-off-by: Felix Brack
    Reviewed-by: Simon Glass

    Felix Brack
     

10 Oct, 2017

1 commit


06 Oct, 2017

1 commit

  • Coverity scan has identified potential buffer overruns in these tests.
    Correct this by zeroing our buffer and using strncpy not strcpy.

    Reported-by: Coverity (CID: 155462, 155463)
    Cc: Joe Hershberger
    Cc: Simon Glass
    Cc: Bin Meng
    Signed-off-by: Tom Rini
    Reviewed-by: Simon Glass
    Reviewed-by: Joe Hershberger

    Tom Rini
     

01 Oct, 2017

1 commit

  • Now that we have changed to remove all devices under the root hub in
    usb_stop(), and corrected the USB emulator select logic, it makes no
    sense to do various tests based on 'usb tree' output since the order
    of devices is no longer fixed. Remove these USB test cases related
    to 'usb tree'.

    For the USB remove test, ideally we should remove an emulator device
    node from the device tree, but this is so far not working. Change to
    test the 'usb stop' only.

    Signed-off-by: Bin Meng

    Bin Meng
     

29 Sep, 2017

2 commits


12 Sep, 2017

2 commits

  • This allows to scan the DT including all "clocks" node's sub-nodes
    in which fixed-clock are defined.
    All fixed-clock should be defined inside a clocks node which collect all
    external oscillators. Until now, all clocks sub-nodes can't be binded except
    if the "simple-bus" compatible string is added which is a hack.

    Update test.dts by moving clk_fixed node inside clocks.

    Signed-off-by: Patrice Chotard
    Reviewed-by: Simon Glass
    Reviewed-by: Simon Glass

    Patrice Chotard
     
  • There is an overflow problem when taking the size instead of the number
    of blocks in blk_create_device(). This results in a wrong device size: the
    device apparent size is its real size modulo 4GB.
    Using the number of blocks instead of the device size fixes the problem and
    is more coherent with the internals of the block layer.

    Signed-off-by: Jean-Jacques Hiblot
    Reviewed-by: Simon Glass

    Jean-Jacques Hiblot
     

16 Aug, 2017

2 commits

  • We are now using an env_ prefix for environment functions. Rename these
    two functions for consistency. Also add function comments in common.h.

    Quite a few places use getenv() in a condition context, provoking a
    warning from checkpatch. These are fixed up in this patch also.

    Suggested-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass
     
  • We are now using an env_ prefix for environment functions. Rename setenv()
    for consistency. Also add function comments in common.h.

    Suggested-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass
     

12 Jul, 2017

2 commits


12 Jun, 2017

3 commits

  • We know that uclass_get_device() and device_find_child_by_of_offset() do
    not return NULL for dev when they succeeds but coverity does not. Add an
    extra check to hopefully keep it happy.

    Signed-off-by: Simon Glass
    Reported-by: Coverity (CID: 163246)
    Fixes: 0753bc2 (dm: Simple Watchdog uclass)

    Simon Glass
     
  • We know that uclass_get_device() does not return NULL for dev when it
    succeeds but coverity does not. Add an extra check to hopefully keep it
    happy.

    Signed-off-by: Simon Glass
    Reported-by: Coverity (CID: 163247)
    Fixes: 0753bc2 (dm: Simple Watchdog uclass)

    Simon Glass
     
  • We know that uclass_get_device() does not return NULL for dev when it
    succeeds but coverity does not. Add an extra check to hopefully keep it
    happy.

    Signed-off-by: Simon Glass
    Reported-by: Coverity (CID: 161690)
    Fixes: 43b4156 (dm: sandbox: pwm: Add a basic pwm test)

    Simon Glass
     

09 Jun, 2017

1 commit


01 Jun, 2017

11 commits


11 May, 2017

1 commit


10 May, 2017

1 commit

  • Those tests check:
    - the ability for a phy-user to get a phy based on its name or its index
    - the ability of a phy device (provider) to manage multiple ports
    - the ability to perform operations on the phy (init,deinit,on,off)
    - the behavior of the uclass when optional operations are not implemented

    Signed-off-by: Jean-Jacques Hiblot
    Reviewed-by: Simon Glass

    Jean-Jacques Hiblot
     

08 May, 2017

1 commit

  • This is a simple uclass for Watchdog Timers. It has four operations:
    start, restart, reset, stop. Drivers must implement start, restart and
    stop operations, while implementing reset is optional: It's default
    implementation expires watchdog timer in one clock tick.

    Signed-off-by: Maxim Sloyko
    Reviewed-by: Simon Glass

    maxims@google.com
     

28 Apr, 2017

1 commit

  • Unfortunately a test for the PWM uclass was not included when it was
    submitted. This was noticed when trying to add more functionality:

    http://patchwork.ozlabs.org/patch/748172/

    Add a simple test to get us started.

    Signed-off-by: Simon Glass

    Simon Glass
     

15 Apr, 2017

4 commits


05 Apr, 2017

2 commits

  • Add a test for the correct device removal. Currently two different ways
    for device removal are supported:

    - Normal device removal via the device_remove() API
    - Removal via selective device driver flags (DM_FLAG_ACTIVE_DMA)

    This new test "remove_active_dma" adds tests cases for those both ways
    of removal. This is done by adding a new test driver, which has this
    flag set.

    Signed-off-by: Stefan Roese
    Cc: Simon Glass

    Stefan Roese
     
  • This patch adds the flags parameter to device_remove() and changes all
    calls to this function to provide the default value of DM_REMOVE_NORMAL
    for "normal" device removal.

    This is in preparation for the driver specific pre-OS (e.g. DMA
    cancelling) remove support.

    Signed-off-by: Stefan Roese
    Cc: Simon Glass
    Acked-by: Simon Glass

    Stefan Roese