11 Feb, 2020

1 commit


07 Feb, 2020

1 commit


06 Feb, 2020

1 commit


28 Oct, 2019

1 commit


15 Oct, 2019

1 commit

  • For CONFIG_OF_PRIOR_STAGE, in the absence of a device tree alias for a
    given device, use the next request number for that type of device.
    This allows aliases to be used when they're available, while still
    allowing unaliased devices to be probed.

    Signed-off-by: Thomas Fitzsimmons
    Cc: Bin Meng
    Cc: Simon Glass

    Thomas Fitzsimmons
     

08 Oct, 2019

2 commits


13 Jul, 2019

1 commit


05 Jul, 2019

1 commit

  • This uclass is intended for devices that do not need any features from the
    uclass, including binding children.
    This will typically be used by devices that are used to bind child devices
    but do not use dm_scan_fdt_dev() to do it. That is for example the case of
    several USB wrappers that have 2 child devices (1 for device and 1 for
    host) but bind only one at a any given time.

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

    Jean-Jacques Hiblot
     

09 Feb, 2019

1 commit


10 Dec, 2018

1 commit

  • If OF_CONTROL is not enabled and DM_SEQ_ALIAS is enabled, we must
    assign an alias (requested sequence number) to devices that belongs to a
    class with the DM_UC_FLAG_SEQ_ALIAS flag. Otherwise
    uclass_find_device_by_seq() cannot be used to get/probe a device. In
    particular i2c_get_chip_for_busnum() cannot be used.

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

    Jean-Jacques Hiblot
     

30 Nov, 2018

1 commit


17 Nov, 2018

1 commit


15 Nov, 2018

2 commits


21 Aug, 2018

1 commit


09 Jul, 2018

1 commit


07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

31 Mar, 2018

1 commit


04 Feb, 2018

1 commit


12 Jul, 2017

2 commits


01 Jun, 2017

2 commits


14 Apr, 2017

1 commit


05 Apr, 2017

1 commit

  • 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
     

08 Feb, 2017

1 commit

  • At present devices use a simple integer offset to record the device tree
    node associated with the device. In preparation for supporting a live
    device tree, which uses a node pointer instead, refactor existing code to
    access this field through an inline function.

    Signed-off-by: Simon Glass

    Simon Glass
     

11 Oct, 2016

1 commit


26 Jul, 2016

1 commit

  • Some SoCs have a single clock device. Provide a way to find it given its
    driver name. This is handled by the linker so will fail if the name is not
    found, avoiding strange errors when names change and do not match. It is
    also faster than a string comparison.

    Signed-off-by: Simon Glass

    Simon Glass
     

15 Mar, 2016

1 commit


22 Jan, 2016

1 commit


21 Jan, 2016

2 commits

  • At present the uclass's post_bind() method is called before the driver's
    bind() method. This means that the uclass cannot use any of the information
    set up by the driver. Move it later in the sequence to permit this.

    This is an ordering change which is always fairly major in nature. The main
    impact is that devices which have children will not see them appear in their
    bind() method. From what I can see, existing drivers do not look at their
    children in the bind() method, so this should be safe.

    Conceptually this change seems to result in a 'more correct' ordering, since
    the uclass (which is broader than the device) gets the last word.

    Signed-off-by: Simon Glass
    Reviewed-by: Tom Rini

    Simon Glass
     
  • This function cannot be used unless support is enabled for device tree
    control. Adjust the code to reflect that.

    Signed-off-by: Simon Glass

    Simon Glass
     

30 Oct, 2015

1 commit


03 Sep, 2015

1 commit

  • When a uclass definition is missing, no drivers in that uclass can operate.
    This can happen if a board has a strange collection of options (e.g. the
    driver is enabled but the uclass is not).

    Unfortunately this is very confusing at present. Starting up driver model
    results in a -ENOENT error, which is pretty generic. Quite a big of digging
    is needed to get to the root cause.

    To help with this, change the error to a very strange one with no other
    users in U-Boot. Also add a debug message.

    Signed-off-by: Simon Glass

    Simon Glass
     

19 Aug, 2015

1 commit

  • We do not want to compile the DM remove code for SPL. Currently,
    we undef it in include/config_uncmd_spl.h (for C files) and in
    scripts/Makefile.uncmd_spl (for Makefiles). This is really ugly.

    This commit demonstrates how we can deprecate those two files.

    Use $(SPL_) for the entry in the Makfile and CONFIG_IS_ENABLED()
    in C files.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Tom Rini
    Reviewed-by: Simon Glass

    Masahiro Yamada
     

06 Aug, 2015

1 commit

  • It is common for one node to reference another via a phandle. Add support
    for obtaining an attached device by this method. As an example, a node may
    have a 'power-supply' property which references a regulator, allowing the
    driver to turn on its power.

    Signed-off-by: Simon Glass

    Simon Glass
     

05 Aug, 2015

1 commit


22 Jul, 2015

1 commit

  • The command "dm uclass" tries to display all the UClasses, but
    some of them might be disabled by Kconfig.

    The function do_dm_dump_uclass() iterates over all the UClass IDs
    and calls uclass_get() for each of them. Then, it displays annoying
    message "Cannot find uclass for id ..." every time it fails to get
    the UClass.

    As a result, we get much noisier log for the "dm uclass" command.

    => dm uclass
    uclass 0: root
    - * root_driver @ bfb54028, seq 0, (req -1)

    Cannot find uclass for id 1: please add the UCLASS_DRIVER() ...
    Cannot find uclass for id 2: please add the UCLASS_DRIVER() ...
    Cannot find uclass for id 3: please add the UCLASS_DRIVER() ...
    Cannot find uclass for id 4: please add the UCLASS_DRIVER() ...
    Cannot find uclass for id 5: please add the UCLASS_DRIVER() ...
    Cannot find uclass for id 6: please add the UCLASS_DRIVER() ...

    This commit suppresses these warnings.

    Signed-off-by: Masahiro Yamada
    Acked-by: Simon Glass

    Masahiro Yamada
     

29 Apr, 2015

1 commit

  • These functions now rely on uclass_find_first/next_device() and assume that
    they will either return failure (-ve error code) or a device. In fact,
    coming to the end of a list is not considered failure and they return 0
    in that case.

    The logic to deal with this was replaced in commit acb9ca2a with just using
    uclass_get_device_tail(). Add back the missing logic. This bug was
    caught by unit tests but since they were broken for other reasons at the
    time, this was not noticed.

    Signed-off-by: Simon Glass

    Simon Glass