[RFCv2 10/11] remoteproc: Find resource table in device memory

From: Sjur BrÃndeland
Date: Fri Dec 14 2012 - 11:08:12 EST


Call rproc_get_rsctab_addr() to get the address
of the resource table in shared memory.

Signed-off-by: Sjur BrÃndeland <sjur.brandeland@xxxxxxxxxxxxxx>
---
drivers/remoteproc/remoteproc_core.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 8a7de5c..f95c08c 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -854,6 +854,13 @@ static void rproc_fw_load(const struct firmware *fw, void *context)
goto clean_up;
}

+ /* Find the new location of the resource table in device memory */
+ table = rproc_get_rsctab_addr(rproc, fw);
+ if (!table) {
+ ret = -EINVAL;
+ goto clean_up;
+ }
+
ret = rproc_handle_resource(rproc, table, tablesz, rproc_handle_reg);
if (ret) {
dev_err(dev, "Failed to process resources: %d\n", ret);
--
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/