mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-15 22:24:42 +08:00
Suman Anna is adding remoteproc support for processors not behind IOMMUs.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJVNUorAAoJELLolMlTRIoMjcoP/0Zl1xVG0PWtaOvgbsim6n7P DNR+d+QLcDn4ThaDGm6FLy5JWT7X2TPmrIV+k8PmgStPJ7jXvocFijy6brvdpv77 HvM+6umOXwI1lg6RgXvmk+aAFiH2v+PQx3hPMPDROT0FhRBMBOWf99TzVZZaBlpH pcbfKv6wwB84jsN0rpghzCPuE9ErBtSEbz5EfAlNakdTeuU5n8a7IMtIn9oWldrQ HMUNeFxs2zaN4x8nwqGCoFmPwBBTiD1GXpTWnUiNsrSaj8wvmvoSS5NX4VKkxcOI mWnUa59OsoNbj1NPs+m2q+rqj0u62H0hrQMELKgiXiU5Py2lle1adfKlzuV1dzpa AemBA1N7IACwSlK5W5Y223XRTs6S7sx4Gs5shCMmF9oNwVFhw+484bOQJcicM2gQ XdZiy689K2TIYR/+vhiyHXUm7aem4V1RtYIiq48FDbCUI3MHY6qY01cJ+hpCojCU Q6SWmLte29IfCzmRZclHSQuah1L70NzD+FJ5qvmtocaQXmpjk8cTdcNkFtHCN2mx SwX8vRyaf++y33ygg1NeE58CUrkCc5LNMOzRyVl1+CQlb2yVMgADdbPbnqFiWgR7 e4LfTL8a5eoeimVOtENieknyI5r/IK4GIihuwcGU0mTajWV1yoGKn9Y2PQtup+Bn gJ+JjEyLchMYvZp26FEp =a3aV -----END PGP SIGNATURE----- Merge tag 'remoteproc-4.1-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc Pull remoteproc update from Ohad Ben-Cohen: "Suman Anna is adding remoteproc support for processors not behind IOMMUs" * tag 'remoteproc-4.1-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc: remoteproc: add IOMMU hardware capability flag
This commit is contained in:
commit
646da63172
@ -224,6 +224,7 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
|
||||
|
||||
drproc = rproc->priv;
|
||||
drproc->rproc = rproc;
|
||||
rproc->has_iommu = false;
|
||||
|
||||
platform_set_drvdata(pdev, rproc);
|
||||
|
||||
|
@ -202,6 +202,8 @@ static int omap_rproc_probe(struct platform_device *pdev)
|
||||
|
||||
oproc = rproc->priv;
|
||||
oproc->rproc = rproc;
|
||||
/* All existing OMAP IPU and DSP processors have an MMU */
|
||||
rproc->has_iommu = true;
|
||||
|
||||
platform_set_drvdata(pdev, rproc);
|
||||
|
||||
|
@ -94,19 +94,8 @@ static int rproc_enable_iommu(struct rproc *rproc)
|
||||
struct device *dev = rproc->dev.parent;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* We currently use iommu_present() to decide if an IOMMU
|
||||
* setup is needed.
|
||||
*
|
||||
* This works for simple cases, but will easily fail with
|
||||
* platforms that do have an IOMMU, but not for this specific
|
||||
* rproc.
|
||||
*
|
||||
* This will be easily solved by introducing hw capabilities
|
||||
* that will be set by the remoteproc driver.
|
||||
*/
|
||||
if (!iommu_present(dev->bus)) {
|
||||
dev_dbg(dev, "iommu not found\n");
|
||||
if (!rproc->has_iommu) {
|
||||
dev_dbg(dev, "iommu not present\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -289,6 +289,7 @@ static int sproc_probe(struct platform_device *pdev)
|
||||
sproc = rproc->priv;
|
||||
sproc->mdev = mdev;
|
||||
sproc->rproc = rproc;
|
||||
rproc->has_iommu = false;
|
||||
mdev->drv_data = sproc;
|
||||
|
||||
/* Provide callback functions to modem device */
|
||||
|
@ -404,6 +404,7 @@ enum rproc_crash_type {
|
||||
* @table_ptr: pointer to the resource table in effect
|
||||
* @cached_table: copy of the resource table
|
||||
* @table_csum: checksum of the resource table
|
||||
* @has_iommu: flag to indicate if remote processor is behind an MMU
|
||||
*/
|
||||
struct rproc {
|
||||
struct klist_node node;
|
||||
@ -435,6 +436,7 @@ struct rproc {
|
||||
struct resource_table *table_ptr;
|
||||
struct resource_table *cached_table;
|
||||
u32 table_csum;
|
||||
bool has_iommu;
|
||||
};
|
||||
|
||||
/* we currently support only two vrings per rvdev */
|
||||
|
Loading…
Reference in New Issue
Block a user