[U-Boot] [PATCH v2 09/22] dm: core: Mark device as active before calling its probe() method

Simon Glass sjg at chromium.org
Sat Mar 21 00:15:50 CET 2015


On 5 March 2015 at 12:25, Simon Glass <sjg at chromium.org> wrote:
> At present the device is not active when the probe() method is called. But
> some probe() methods want to set up the device and this can involve
> accessing it through normal methods. For example a PCI bus may wish to
> set up its PCI parameters using calls to pci_hose_write_config_dword() and
> similar.
>
> At present this does not work because every such call within the probe()
> method sees that the device is not active and attempts to probe it.
>
> Already we mark the device as probed before calling the uclass post_probe()
> method. This is a subtle change but I believe the new approach is better.
> Since the scope of the change is only the probe() method and all its callees
> it should still be within the control of the board author.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v2: None
>
>  drivers/core/device.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

Applied to u-boot-dm/next.


More information about the U-Boot mailing list