When a remote processor registers, populate the device tree to probe the SRM core driver Signed-off-by: Fabien Dessenne <fabien.dessenne@xxxxxx> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@xxxxxx> Signed-off-by: Loic Pallardy <loic.pallardy@xxxxxx> --- drivers/remoteproc/remoteproc_core.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 283b258..a67f918 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -41,6 +41,7 @@ #include <linux/crc32.h> #include <linux/virtio_ids.h> #include <linux/virtio_ring.h> +#include <linux/of_platform.h> #include <asm/byteorder.h> #include "remoteproc_internal.h" @@ -1485,6 +1486,11 @@ int rproc_add(struct rproc *rproc) return ret; } + /* add resource manager device */ + ret = devm_of_platform_populate(dev->parent); + if (ret < 0) + return ret; + /* expose to rproc_get_by_phandle users */ mutex_lock(&rproc_list_mutex); list_add(&rproc->node, &rproc_list); @@ -1705,6 +1711,8 @@ int rproc_del(struct rproc *rproc) list_del(&rproc->node); mutex_unlock(&rproc_list_mutex); + of_platform_depopulate(rproc->dev.parent); + device_del(&rproc->dev); return 0; -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-remoteproc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html