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

Commit ae7c4d48 authored by Mohammed Siddiq's avatar Mohammed Siddiq
Browse files

icnss: Set iommu attribute DOMAIN_ATTR_NON_FATAL_FAULTS



This change sets DOMAIN_ATTR_NON_FATAL_FAULTS iommu attribute.

Change-Id: Ie344f85744f017115f01c7592dacc2b18b7aeab0
Signed-off-by: default avatarMohammed Siddiq <msiddiq@codeaurora.org>
parent 19ffb351
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -3857,6 +3857,7 @@ static int icnss_smmu_init(struct icnss_priv *priv)
	int s1_bypass = 1;
	int fast = 1;
	int stall_disable = 1;
	int non_fatal_faults = 1;
	int ret = 0;

	icnss_pr_dbg("Initializing SMMU\n");
@@ -3910,6 +3911,16 @@ static int icnss_smmu_init(struct icnss_priv *priv)
			goto set_attr_fail;
		}
		icnss_pr_dbg("SMMU STALL DISABLE map set\n");

		ret = iommu_domain_set_attr(mapping->domain,
					    DOMAIN_ATTR_NON_FATAL_FAULTS,
					    &non_fatal_faults);
		if (ret) {
			icnss_pr_err("Failed to set SMMU non_fatal_faults attribute, err = %d\n",
				    ret);
			goto set_attr_fail;
		}
		icnss_pr_dbg("SMMU NON FATAL map set\n");
	}

	ret = arm_iommu_attach_device(&priv->pdev->dev, mapping);