diff options
| -rw-r--r-- | drivers/remoteproc/da8xx_remoteproc.c | 1 | ||||
| -rw-r--r-- | drivers/remoteproc/omap_remoteproc.c | 2 | ||||
| -rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 15 | ||||
| -rw-r--r-- | drivers/remoteproc/ste_modem_rproc.c | 1 | ||||
| -rw-r--r-- | include/linux/remoteproc.h | 2 |
5 files changed, 8 insertions, 13 deletions
diff --git a/drivers/remoteproc/da8xx_remoteproc.c b/drivers/remoteproc/da8xx_remoteproc.c index 89fd057e5f1d..f8d6a0661c14 100644 --- a/drivers/remoteproc/da8xx_remoteproc.c +++ b/drivers/remoteproc/da8xx_remoteproc.c | |||
| @@ -224,6 +224,7 @@ static int da8xx_rproc_probe(struct platform_device *pdev) | |||
| 224 | 224 | ||
| 225 | drproc = rproc->priv; | 225 | drproc = rproc->priv; |
| 226 | drproc->rproc = rproc; | 226 | drproc->rproc = rproc; |
| 227 | rproc->has_iommu = false; | ||
| 227 | 228 | ||
| 228 | platform_set_drvdata(pdev, rproc); | 229 | platform_set_drvdata(pdev, rproc); |
| 229 | 230 | ||
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index e85f30370760..b74368a91235 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c | |||
| @@ -202,6 +202,8 @@ static int omap_rproc_probe(struct platform_device *pdev) | |||
| 202 | 202 | ||
| 203 | oproc = rproc->priv; | 203 | oproc = rproc->priv; |
| 204 | oproc->rproc = rproc; | 204 | oproc->rproc = rproc; |
| 205 | /* All existing OMAP IPU and DSP processors have an MMU */ | ||
| 206 | rproc->has_iommu = true; | ||
| 205 | 207 | ||
| 206 | platform_set_drvdata(pdev, rproc); | 208 | platform_set_drvdata(pdev, rproc); |
| 207 | 209 | ||
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 3cd85a638afa..11cdb119e4f3 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c | |||
| @@ -94,19 +94,8 @@ static int rproc_enable_iommu(struct rproc *rproc) | |||
| 94 | struct device *dev = rproc->dev.parent; | 94 | struct device *dev = rproc->dev.parent; |
| 95 | int ret; | 95 | int ret; |
| 96 | 96 | ||
| 97 | /* | 97 | if (!rproc->has_iommu) { |
| 98 | * We currently use iommu_present() to decide if an IOMMU | 98 | dev_dbg(dev, "iommu not present\n"); |
| 99 | * setup is needed. | ||
| 100 | * | ||
| 101 | * This works for simple cases, but will easily fail with | ||
| 102 | * platforms that do have an IOMMU, but not for this specific | ||
| 103 | * rproc. | ||
| 104 | * | ||
| 105 | * This will be easily solved by introducing hw capabilities | ||
| 106 | * that will be set by the remoteproc driver. | ||
| 107 | */ | ||
| 108 | if (!iommu_present(dev->bus)) { | ||
| 109 | dev_dbg(dev, "iommu not found\n"); | ||
| 110 | return 0; | 99 | return 0; |
| 111 | } | 100 | } |
| 112 | 101 | ||
diff --git a/drivers/remoteproc/ste_modem_rproc.c b/drivers/remoteproc/ste_modem_rproc.c index 16b7b7bd805b..dd193f35a1ff 100644 --- a/drivers/remoteproc/ste_modem_rproc.c +++ b/drivers/remoteproc/ste_modem_rproc.c | |||
| @@ -289,6 +289,7 @@ static int sproc_probe(struct platform_device *pdev) | |||
| 289 | sproc = rproc->priv; | 289 | sproc = rproc->priv; |
| 290 | sproc->mdev = mdev; | 290 | sproc->mdev = mdev; |
| 291 | sproc->rproc = rproc; | 291 | sproc->rproc = rproc; |
| 292 | rproc->has_iommu = false; | ||
| 292 | mdev->drv_data = sproc; | 293 | mdev->drv_data = sproc; |
| 293 | 294 | ||
| 294 | /* Provide callback functions to modem device */ | 295 | /* Provide callback functions to modem device */ |
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index 9e7e745dac55..78b8a9b9d40a 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h | |||
| @@ -404,6 +404,7 @@ enum rproc_crash_type { | |||
| 404 | * @table_ptr: pointer to the resource table in effect | 404 | * @table_ptr: pointer to the resource table in effect |
| 405 | * @cached_table: copy of the resource table | 405 | * @cached_table: copy of the resource table |
| 406 | * @table_csum: checksum of the resource table | 406 | * @table_csum: checksum of the resource table |
| 407 | * @has_iommu: flag to indicate if remote processor is behind an MMU | ||
| 407 | */ | 408 | */ |
| 408 | struct rproc { | 409 | struct rproc { |
| 409 | struct klist_node node; | 410 | struct klist_node node; |
| @@ -435,6 +436,7 @@ struct rproc { | |||
| 435 | struct resource_table *table_ptr; | 436 | struct resource_table *table_ptr; |
| 436 | struct resource_table *cached_table; | 437 | struct resource_table *cached_table; |
| 437 | u32 table_csum; | 438 | u32 table_csum; |
| 439 | bool has_iommu; | ||
| 438 | }; | 440 | }; |
| 439 | 441 | ||
| 440 | /* we currently support only two vrings per rvdev */ | 442 | /* we currently support only two vrings per rvdev */ |
