-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'for-joerg/arm-smmu/updates' of git://git.kernel.org/pub…
…/scm/linux/kernel/git/will/linux into arm/smmu
- Loading branch information
Showing
17 changed files
with
439 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// SPDX-License-Identifier: GPL-2.0-only | ||
/* | ||
* Copyright (c) 2019, The Linux Foundation. All rights reserved. | ||
*/ | ||
|
||
#include <linux/qcom_scm.h> | ||
|
||
#include "arm-smmu.h" | ||
|
||
struct qcom_smmu { | ||
struct arm_smmu_device smmu; | ||
}; | ||
|
||
static int qcom_sdm845_smmu500_reset(struct arm_smmu_device *smmu) | ||
{ | ||
int ret; | ||
|
||
arm_mmu500_reset(smmu); | ||
|
||
/* | ||
* To address performance degradation in non-real time clients, | ||
* such as USB and UFS, turn off wait-for-safe on sdm845 based boards, | ||
* such as MTP and db845, whose firmwares implement secure monitor | ||
* call handlers to turn on/off the wait-for-safe logic. | ||
*/ | ||
ret = qcom_scm_qsmmu500_wait_safe_toggle(0); | ||
if (ret) | ||
dev_warn(smmu->dev, "Failed to turn off SAFE logic\n"); | ||
|
||
return ret; | ||
} | ||
|
||
static const struct arm_smmu_impl qcom_smmu_impl = { | ||
.reset = qcom_sdm845_smmu500_reset, | ||
}; | ||
|
||
struct arm_smmu_device *qcom_smmu_impl_init(struct arm_smmu_device *smmu) | ||
{ | ||
struct qcom_smmu *qsmmu; | ||
|
||
qsmmu = devm_kzalloc(smmu->dev, sizeof(*qsmmu), GFP_KERNEL); | ||
if (!qsmmu) | ||
return ERR_PTR(-ENOMEM); | ||
|
||
qsmmu->smmu = *smmu; | ||
|
||
qsmmu->smmu.impl = &qcom_smmu_impl; | ||
devm_kfree(smmu->dev, smmu); | ||
|
||
return &qsmmu->smmu; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.