diff options
author | Simon Glass <sjg@chromium.org> | 2015-01-25 08:27:10 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-01-29 17:09:56 -0700 |
commit | 83c7e434c9dd3ca81f8b763e23c1881b973bcf2f (patch) | |
tree | c0fc096ee51bbcd66ccabd77826e236f49329845 /test/dm/test-fdt.c | |
parent | 1603bf3cc189da65362b83b85831e094a2fe8516 (diff) | |
download | u-boot-midas-83c7e434c9dd3ca81f8b763e23c1881b973bcf2f.tar.gz u-boot-midas-83c7e434c9dd3ca81f8b763e23c1881b973bcf2f.tar.bz2 u-boot-midas-83c7e434c9dd3ca81f8b763e23c1881b973bcf2f.zip |
dm: core: Allow uclass to set up a device's child before it is probed
Some buses need to set up their devices before they can be used. This setup
may well be common to all buses in a particular uclass. Support a common
pre-probe method for the uclass, called before any bus devices are probed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'test/dm/test-fdt.c')
-rw-r--r-- | test/dm/test-fdt.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c index dfcb3af61b..b8ee9599a2 100644 --- a/test/dm/test-fdt.c +++ b/test/dm/test-fdt.c @@ -51,6 +51,13 @@ static int testfdt_drv_probe(struct udevice *dev) priv->ping_total += DM_TEST_START_TOTAL; + /* + * If this device is on a bus, the uclass_flag will be set before + * calling this function. This is used by + * dm_test_bus_child_pre_probe_uclass(). + */ + priv->uclass_total += priv->uclass_flag; + return 0; } |