File tree Expand file tree Collapse file tree 5 files changed +8
-13
lines changed Expand file tree Collapse file tree 5 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -224,6 +224,7 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
224
224
225
225
drproc = rproc -> priv ;
226
226
drproc -> rproc = rproc ;
227
+ rproc -> has_iommu = false;
227
228
228
229
platform_set_drvdata (pdev , rproc );
229
230
Original file line number Diff line number Diff line change @@ -202,6 +202,8 @@ static int omap_rproc_probe(struct platform_device *pdev)
202
202
203
203
oproc = rproc -> priv ;
204
204
oproc -> rproc = rproc ;
205
+ /* All existing OMAP IPU and DSP processors have an MMU */
206
+ rproc -> has_iommu = true;
205
207
206
208
platform_set_drvdata (pdev , rproc );
207
209
Original file line number Diff line number Diff line change @@ -94,19 +94,8 @@ static int rproc_enable_iommu(struct rproc *rproc)
94
94
struct device * dev = rproc -> dev .parent ;
95
95
int ret ;
96
96
97
- /*
98
- * We currently use iommu_present() to decide if an IOMMU
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" );
97
+ if (!rproc -> has_iommu ) {
98
+ dev_dbg (dev , "iommu not present\n" );
110
99
return 0 ;
111
100
}
112
101
Original file line number Diff line number Diff line change @@ -289,6 +289,7 @@ static int sproc_probe(struct platform_device *pdev)
289
289
sproc = rproc -> priv ;
290
290
sproc -> mdev = mdev ;
291
291
sproc -> rproc = rproc ;
292
+ rproc -> has_iommu = false;
292
293
mdev -> drv_data = sproc ;
293
294
294
295
/* Provide callback functions to modem device */
Original file line number Diff line number Diff line change @@ -404,6 +404,7 @@ enum rproc_crash_type {
404
404
* @table_ptr: pointer to the resource table in effect
405
405
* @cached_table: copy of the resource table
406
406
* @table_csum: checksum of the resource table
407
+ * @has_iommu: flag to indicate if remote processor is behind an MMU
407
408
*/
408
409
struct rproc {
409
410
struct klist_node node ;
@@ -435,6 +436,7 @@ struct rproc {
435
436
struct resource_table * table_ptr ;
436
437
struct resource_table * cached_table ;
437
438
u32 table_csum ;
439
+ bool has_iommu ;
438
440
};
439
441
440
442
/* we currently support only two vrings per rvdev */
You can’t perform that action at this time.
0 commit comments