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

Commit 85f6db25 authored by Pratham Pratap's avatar Pratham Pratap
Browse files

usb_bam: Add check to enable SPS_BAM_SMMU_EN with BAM device



This change add checks to see if iommus property is
present in the DT then only it enables SPS_BAM_SMMU_EN.

Change-Id: Ib30db63e5dd7d45877243a6495c98293072d624b
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 4867091e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2018, 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
@@ -3139,7 +3139,8 @@ static int usb_bam_init(struct platform_device *pdev)
	}

	dev = &ctx->usb_bam_pdev->dev;
	if (dev && dev->parent && !device_property_present(dev->parent,
	if (dev && dev->parent && device_property_present(dev->parent, "iommus")
		&& !device_property_present(dev->parent,
						"qcom,smmu-s1-bypass")) {
		pr_info("%s: setting SPS_BAM_SMMU_EN flag with (%s)\n",
						__func__, dev_name(dev));