diff options
| author | Suman Anna <s-anna@ti.com> | 2015-01-09 16:21:58 -0500 |
|---|---|---|
| committer | Ohad Ben-Cohen <ohad@wizery.com> | 2015-03-12 04:43:26 -0400 |
| commit | 315491e5d6ee66838a18a8ca0c14e6ffb376e48c (patch) | |
| tree | 308f7c9d3cef5ff6d0cd2508714fe7406dd9718c /include/linux | |
| parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) | |
remoteproc: add IOMMU hardware capability flag
The remoteproc framework currently relies on iommu_present() on
the bus the device is on, to perform MMU management. However, this
logic doesn't scale for multi-arch, especially for processors that
do not have an IOMMU. Replace this logic instead by using a h/w
capability flag for the presence of IOMMU in the rproc structure.
This issue is seen on OMAP platforms when trying to add a remoteproc
driver for a small Cortex M3 called the WkupM3 used for suspend /
resume management on TI AM335/AM437x SoCs. This processor does not
have an MMU. Same is the case with another processor subsystem
PRU-ICSS on AM335/AM437x. All these are platform devices, and the
current iommu_present check will not scale for the same kernel image
to support OMAP4/OMAP5 and AM335/AM437x.
The existing platform implementation drivers - OMAP remoteproc, STE
Modem remoteproc and DA8xx remoteproc, are updated as well to properly
configure the newly added rproc field.
Cc: Robert Tivy <rtivy@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Suman Anna <s-anna@ti.com>
[small change in the commit title and in a single comment]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/remoteproc.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 */ |
