| #
c57f806b |
| 17-Jul-2016 |
Simon Glass <sjg@chromium.org> |
dm: core: Add a way to find a device by its driver
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
dm: core: Add a way to find a device by its driver
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 <sjg@chromium.org>
show more ...
|
| #
88033d73 |
| 14-Mar-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
b0675050 |
| 11-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: core: Add uclass_first_device_err() to return a valid device
A common pattern is to call uclass_first_device() and then check if it actually returns a device. Add a new function which does this,
dm: core: Add uclass_first_device_err() to return a valid device
A common pattern is to call uclass_first_device() and then check if it actually returns a device. Add a new function which does this, returning an error if there are no devices in that uclass.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
1b30d61d |
| 22-Jan-2016 |
Simon Glass <sjg@chromium.org> |
dm: core: Export uclass_find_device_by_of_offset()
It is sometimes useful to be able to find a device before probing it, perhaps to set up some platform data for it. Allow finding by of_offset also.
dm: core: Export uclass_find_device_by_of_offset()
It is sometimes useful to be able to find a device before probing it, perhaps to set up some platform data for it. Allow finding by of_offset also.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
6905f4d3 |
| 21-Jan-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
20af3c0a |
| 05-Jan-2016 |
Simon Glass <sjg@chromium.org> |
dm: core: Call uclass post_bind() after the driver's bind() method
At present the uclass's post_bind() method is called before the driver's bind() method. This means that the uclass cannot use any o
dm: core: Call uclass post_bind() after the driver's bind() method
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 <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
| #
c275dfef |
| 20-Dec-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Provide uclass_find_device_by_phandle() only when needed
This function cannot be used unless support is enabled for device tree control. Adjust the code to reflect that.
Signed-off-by: Si
dm: core: Provide uclass_find_device_by_phandle() only when needed
This function cannot be used unless support is enabled for device tree control. Adjust the code to reflect that.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
e573bdb3 |
| 30-Oct-2015 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
0eb4cf9c |
| 29-Oct-2015 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://git.denx.de/u-boot-net
|
| #
50dae85c |
| 08-Oct-2015 |
Bin Meng <bmeng.cn@gmail.com> |
dm: core: Remove unnecessary codes in uclass_pre_remove_device()
dev->uclass->uc_drv->per_device_auto_alloc_size is to be freed in device_free(), so is dev->seq. Remove these unnecessary codes.
Sig
dm: core: Remove unnecessary codes in uclass_pre_remove_device()
dev->uclass->uc_drv->per_device_auto_alloc_size is to be freed in device_free(), so is dev->seq. Remove these unnecessary codes.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
c9feb427 |
| 03-Sep-2015 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-rockchip
|
| #
3346c876 |
| 30-Aug-2015 |
Simon Glass <sjg@chromium.org> |
dm: Improve handling of a missing uclass
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 i
dm: Improve handling of a missing uclass
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 <sjg@chromium.org>
show more ...
|
| #
0a5804b5 |
| 11-Aug-2015 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
dm: drop CONFIG_DM_DEVICE_REMOVE from uncmd list
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.unc
dm: drop CONFIG_DM_DEVICE_REMOVE from uncmd list
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 <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
ae27120c |
| 06-Aug-2015 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
d82ba4c0 |
| 03-Jul-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Support finding a device by phandle
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 hav
dm: core: Support finding a device by phandle
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 <sjg@chromium.org>
show more ...
|
| #
1a2728ae |
| 05-Aug-2015 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-x86
|
| #
2fda14ae |
| 31-Jul-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Check for empty list in uclass_find_device()
This function needs to check the list has entries before traversing it. Fix this bug.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-b
dm: core: Check for empty list in uclass_find_device()
This function needs to check the list has entries before traversing it. Fix this bug.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| #
643e6902 |
| 07-Jul-2015 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
dm: change dm_warn() message into debug() in uclass_add()
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()
dm: change dm_warn() message into debug() in uclass_add()
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 <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
b939689c |
| 05-May-2015 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Merge branch 'u-boot/master' into 'u-boot-arm/master'
|
| #
4842c589 |
| 28-Apr-2015 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://www.denx.de/git/u-boot-dm
|
| #
f66529f9 |
| 25-Apr-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Correct bug introduced in uclass_first/next_device()
These functions now rely on uclass_find_first/next_device() and assume that they will either return failure (-ve error code) or a devic
dm: core: Correct bug introduced in uclass_first/next_device()
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 <sjg@chromium.org>
show more ...
|
| #
5f757cdc |
| 23-Apr-2015 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://git.denx.de/u-boot-dm
|
| #
7f9875e7 |
| 28-Feb-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Remove unbind operations when not required
The CONFIG_DM_DEVICE_REMOVE option takes out code related to removing devices. It should also remove the 'unbind' code since if we cannot remove
dm: core: Remove unbind operations when not required
The CONFIG_DM_DEVICE_REMOVE option takes out code related to removing devices. It should also remove the 'unbind' code since if we cannot remove we probably don't need to unbind.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
07d260e0 |
| 19-Apr-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Handle recursive unbinding of uclass devices
Since a device can have children in the same uclass as itself, we need to handle unbinding carefully: we must allow that unbinding a device in
dm: core: Handle recursive unbinding of uclass devices
Since a device can have children in the same uclass as itself, we need to handle unbinding carefully: we must allow that unbinding a device in a uclass may cause another device in the same uclass to be unbound.
Adjust the code to cope.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| #
794d5219 |
| 20-Apr-2015 |
Przemyslaw Marczak <p.marczak@samsung.com> |
dm: core: remove type 'static' of function uclass_get_device_tail()
Uclass API provides a few functions for get/find the device. To provide a complete function set of uclass-internal functions, for
dm: core: remove type 'static' of function uclass_get_device_tail()
Uclass API provides a few functions for get/find the device. To provide a complete function set of uclass-internal functions, for use by the drivers, the function uclass_get_device_tail() should be non-static.
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|