diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2018-08-27 13:27:50 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-09-11 15:32:55 +0300 |
commit | 81ae6e6d0098c9ad7d6746b4f2952a046130999c (patch) | |
tree | c6e1d7b2dc58d8aa40b3238cdee4bf36ca9afc0f /drivers/remoteproc/rproc-uclass.c | |
parent | 880274192cfdcec83b32b15ae47e7cbfc2edc1df (diff) | |
download | u-boot-81ae6e6d0098c9ad7d6746b4f2952a046130999c.tar.xz |
remoteproc: Allow for individual remoteproc initialization
Existing rproc_init() api tries to initialize all available
remoteproc devices. This will fail when there is dependency
among available remoteprocs. So introduce a separate api
that allows to initialize remoteprocs individually based
on id.
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'drivers/remoteproc/rproc-uclass.c')
-rw-r--r-- | drivers/remoteproc/rproc-uclass.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/remoteproc/rproc-uclass.c b/drivers/remoteproc/rproc-uclass.c index 1fc3d424b3..c8a41a6332 100644 --- a/drivers/remoteproc/rproc-uclass.c +++ b/drivers/remoteproc/rproc-uclass.c @@ -272,6 +272,25 @@ int rproc_init(void) return ret; } +int rproc_dev_init(int id) +{ + struct udevice *dev = NULL; + int ret; + + ret = uclass_get_device_by_seq(UCLASS_REMOTEPROC, id, &dev); + if (ret) { + debug("Unknown remote processor id '%d' requested(%d)\n", + id, ret); + return ret; + } + + ret = device_probe(dev); + if (ret) + debug("%s: Failed to initialize - %d\n", dev->name, ret); + + return ret; +} + int rproc_load(int id, ulong addr, ulong size) { struct udevice *dev = NULL; |