Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce4b1cf8 authored by Patrick Daly's avatar Patrick Daly
Browse files

iommu: arm-smmu: Remove the qcom,skip-init option



Previous changes have added support for detecting which SMR registers and
context banks are initialized by the bootloader, and may already be in use
by hardware. Thus, the qcom,skip-init option is now redundant.

Change-Id: Ic89628d8d09187f007ab21ab2ee74c7f68b4ae42
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent da68882a
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -74,14 +74,6 @@ conditions.
                  address size faults are due to a fundamental programming
                  error from which we don't care about recovering anyways.

- qcom,skip-init : Disable resetting configuration for all context banks
                  during device reset.  This is useful for targets where
                  some context banks are dedicated to other execution
                  environments outside of Linux and those other EEs are
                  programming their own stream match tables, SCTLR, etc.
                  Without setting this option we will trample on their
                  configuration.

- qcom,dynamic  : Allow dynamic domains to be attached. This is only
		  useful if the upstream hardware is capable of switching
		  between multiple domains within a single context bank.
+0 −1
Original line number Diff line number Diff line
@@ -63,7 +63,6 @@
			<0x150c2000 0x20>;
		reg-names = "base", "tcu-base";
		#iommu-cells = <2>;
		qcom,skip-init;
		qcom,use-3-lvl-tables;
		#global-interrupts = <1>;
		#size-cells = <1>;
+3 −7
Original line number Diff line number Diff line
@@ -412,7 +412,6 @@ struct arm_smmu_device {

#define ARM_SMMU_OPT_SECURE_CFG_ACCESS (1 << 0)
#define ARM_SMMU_OPT_FATAL_ASF		(1 << 1)
#define ARM_SMMU_OPT_SKIP_INIT		(1 << 2)
#define ARM_SMMU_OPT_DYNAMIC		(1 << 3)
#define ARM_SMMU_OPT_3LVL_TABLES	(1 << 4)
	u32				options;
@@ -531,7 +530,6 @@ static bool using_legacy_binding, using_generic_binding;
static struct arm_smmu_option_prop arm_smmu_options[] = {
	{ ARM_SMMU_OPT_SECURE_CFG_ACCESS, "calxeda,smmu-secure-config-access" },
	{ ARM_SMMU_OPT_FATAL_ASF, "qcom,fatal-asf" },
	{ ARM_SMMU_OPT_SKIP_INIT, "qcom,skip-init" },
	{ ARM_SMMU_OPT_DYNAMIC, "qcom,dynamic" },
	{ ARM_SMMU_OPT_3LVL_TABLES, "qcom,use-3-lvl-tables" },
	{ 0, NULL},
@@ -3202,12 +3200,10 @@ static void arm_smmu_device_reset(struct arm_smmu_device *smmu)
	 * Reset stream mapping groups: Initial values mark all SMRn as
	 * invalid and all S2CRn as bypass unless overridden.
	 */
	if (!(smmu->options & ARM_SMMU_OPT_SKIP_INIT)) {
	for (i = 0; i < smmu->num_mapping_groups; ++i)
		arm_smmu_write_sme(smmu, i);

	arm_smmu_context_bank_reset(smmu);
	}

	/* Invalidate the TLB, just in case */
	writel_relaxed(0, gr0_base + ARM_SMMU_GR0_TLBIALLH);