diff options
author | Ohad Ben-Cohen <ohad@wizery.com> | 2012-07-01 04:30:57 -0400 |
---|---|---|
committer | Ohad Ben-Cohen <ohad@wizery.com> | 2012-07-05 17:53:26 -0400 |
commit | 0e49b72c8c91f9ea65ae62ca3061f885aa06a6f6 (patch) | |
tree | 39ca2c7f4bfcac50cae1831d7f158e3349e3d27f /drivers/remoteproc | |
parent | c6b5a27628faf6657b741d828a1462d832d0dbc5 (diff) |
remoteproc: support non-iommu carveout assignment
Publish carveout addresses on non-iommu setups too.
Reported-and-acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 4a77dc1df3d8..c85db123ba0a 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c | |||
@@ -713,23 +713,27 @@ static int rproc_handle_carveout(struct rproc *rproc, | |||
713 | list_add_tail(&mapping->node, &rproc->mappings); | 713 | list_add_tail(&mapping->node, &rproc->mappings); |
714 | 714 | ||
715 | dev_dbg(dev, "carveout mapped 0x%x to 0x%x\n", rsc->da, dma); | 715 | dev_dbg(dev, "carveout mapped 0x%x to 0x%x\n", rsc->da, dma); |
716 | |||
717 | /* | ||
718 | * Some remote processors might need to know the pa | ||
719 | * even though they are behind an IOMMU. E.g., OMAP4's | ||
720 | * remote M3 processor needs this so it can control | ||
721 | * on-chip hardware accelerators that are not behind | ||
722 | * the IOMMU, and therefor must know the pa. | ||
723 | * | ||
724 | * Generally we don't want to expose physical addresses | ||
725 | * if we don't have to (remote processors are generally | ||
726 | * _not_ trusted), so we might want to do this only for | ||
727 | * remote processor that _must_ have this (e.g. OMAP4's | ||
728 | * dual M3 subsystem). | ||
729 | */ | ||
730 | rsc->pa = dma; | ||
731 | } | 716 | } |
732 | 717 | ||
718 | /* | ||
719 | * Some remote processors might need to know the pa | ||
720 | * even though they are behind an IOMMU. E.g., OMAP4's | ||
721 | * remote M3 processor needs this so it can control | ||
722 | * on-chip hardware accelerators that are not behind | ||
723 | * the IOMMU, and therefor must know the pa. | ||
724 | * | ||
725 | * Generally we don't want to expose physical addresses | ||
726 | * if we don't have to (remote processors are generally | ||
727 | * _not_ trusted), so we might want to do this only for | ||
728 | * remote processor that _must_ have this (e.g. OMAP4's | ||
729 | * dual M3 subsystem). | ||
730 | * | ||
731 | * Non-IOMMU processors might also want to have this info. | ||
732 | * In this case, the device address and the physical address | ||
733 | * are the same. | ||
734 | */ | ||
735 | rsc->pa = dma; | ||
736 | |||
733 | carveout->va = va; | 737 | carveout->va = va; |
734 | carveout->len = rsc->len; | 738 | carveout->len = rsc->len; |
735 | carveout->dma = dma; | 739 | carveout->dma = dma; |