Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp279474lqr; Wed, 5 Jun 2024 06:05:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVIUGImOrp9wPuqh3RT6P7VRuTCE2CmAbf+zXXJcrcfQg5zpCGp9luxNjDkbR69DaW5ckovp+b+YtqJ+p3BLkusVwx7HJXXOYkOJmoofg== X-Google-Smtp-Source: AGHT+IFRGRRRZVbx+ygiT7h/vA5vLHNk0WFdZ9OzQeaWNzjT0C+dXW2+VPWIXZRxdDKcPUlmpQyY X-Received: by 2002:a05:6808:2917:b0:3d1:d35c:778b with SMTP id 5614622812f47-3d204261cd3mr2352433b6e.5.1717592702037; Wed, 05 Jun 2024 06:05:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717592702; cv=pass; d=google.com; s=arc-20160816; b=pn7AMI9MKY5H6qh6P8/hPBy6ixYQplg7TQxuMShbfQc9FEstvt43wH3xyv9+knjIdO 1lmNPZPEieVK6AuKrnVA42aTJZ9auBf8BtL6KKdRP3gH9soNRn44uZyvD1t1wEXT1dH5 zQSpmpnumtBtxQnqdGwLTiFJRLtarspJzxfhpgcUklva8bB2yhpIAj2vD6Fl+LyJN0Yc mTpxUx4sZ0yyOe9BXaAtjyhNS3osKaoBfbDZgYJ0u1zhYYFp2O8NBYxR0qh+4No+xkne F5KUmE7WPP6OPW9F+qOD8nyzi9dvcgBLJNhBGivfB4G32WYSHJJ+8PWz1jxn8CzCVDun GCzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=6gTuD659RBNpe4VbArDAG26UrZnRn8ECIH/vQ20wfOg=; fh=lyLSCFSK6l9RW63ZDfr8yvsE4SO7J1cWsNA4C19DeNI=; b=TFBaEduQvfRBI9jkdhRfztr/pkB1qvhTOmNB5Vdh3sHPOyahORR2lMuM0D6UEC/Uzb yOdFysPfHVTjNNk4s5qOPYQVCbDU0tRuaK6Fvamro0Pdi5LEAqPE4C3K6vEDt55Ogo5W qv8lHuh6RA6G93+I66CxSCDKbqUPEEIkJsWEvvdwUMtC8ZiJbfJ4iWh61wT857RzhtEH S/OhKDddbJ4qPO0jzoz9DIbh1HbFu225RhcqK8wjg1kIGULW4zx051NUpXQPmFTuUi0o 7jNySl8kZpKFEQY0UAM6K1/syKuQlkI5HxvWLclQeT6pJJPTz4JANGmkQMmS9jmvm1O2 yDFA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cDn1ci8s; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-202581-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202581-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a1e0cc1a2514c-80adeeb8e0csi1820651241.196.2024.06.05.06.05.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 06:05:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202581-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cDn1ci8s; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-202581-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202581-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3DA781C231E0 for ; Wed, 5 Jun 2024 13:04:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2BA7C1BA872; Wed, 5 Jun 2024 12:18:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="cDn1ci8s" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0AEF01B4C5C; Wed, 5 Jun 2024 12:18:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717589937; cv=none; b=WtSNJKTL+qDMF6fKodse8AVaDEUefhWT7JY+fYMSB4XzEqdjLuhB4QuzdA/5uFvvu7yltMLhFiKUCWRKTKG/bVIYUgx7TP7Bu8zgrE8m6b5x0c294xl3OZxJdtlk3bEEh6SSyseMwCgIUADCZ0y29Vis/hkbiSfxUJwVaB/Nbj8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717589937; c=relaxed/simple; bh=VYASND7DkjxIdSKvksdElZNKwr1G8BS4C2AWVcyC9ZM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=t8muzDCuppsNC4TZYbtPhFIY3fl6Sbq6FR1NU0j3rdm4AZpPh/7qG5xiXCpWeV1dKEjGbV3LoTQ/+VZdEHYT3qgcOEH5c6tX4M3xXFucPfQg2w+ci2BICY2oGeW9xgmqL/bDa4oh/GjEpZ0eZcAOiAIB7+IJqgnmp3u/1SM54iM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=cDn1ci8s; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 455B1R1V014610; Wed, 5 Jun 2024 12:18:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 6gTuD659RBNpe4VbArDAG26UrZnRn8ECIH/vQ20wfOg=; b=cDn1ci8sLIClZJoA Jh4+U5cUon+rmOs302TZoMZgulqPfQl28Ru7x7JSdzq4x/Wh4MBkFIht6bN4vAda XcOo6UX6c/Nzy+sGHogi5fSTlpxGAPBpQ0R/qBxS5ZJTcsafbeWm6lN/fNiKVd5c qOnmB0uZkqxksaI8/N++UoVKx7m343QP3xkGOfOjrDk/7yl61f1k1rqa9OmHTs95 I8GjvSDRGCw9z35HFSv29tFy+H7hWlV4zIK4RyhyyfGh4izt9B8nHSBAVoIcE+eh eO3/Ai3DoFvAOxS6SmxATf/dV1q3a8zLFOQPDCjvtyYjGczqOEtcZCPIdIIu9KAB ezsBPw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yj83021ab-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jun 2024 12:18:41 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 455CIeOc003525 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 5 Jun 2024 12:18:40 GMT Received: from hu-bibekkum-hyd.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 5 Jun 2024 05:18:35 -0700 From: Bibek Kumar Patro To: , , , , , , , , , , CC: , , , , "Bibek Kumar Patro" Subject: [PATCH v11 5/6] iommu/arm-smmu: add ACTLR data and support for SC7280 Date: Wed, 5 Jun 2024 17:47:12 +0530 Message-ID: <20240605121713.3596499-6-quic_bibekkum@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605121713.3596499-1-quic_bibekkum@quicinc.com> References: <20240605121713.3596499-1-quic_bibekkum@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 9zMrBBYAWopiT1BgbQobIbLAdT3DGXda X-Proofpoint-ORIG-GUID: 9zMrBBYAWopiT1BgbQobIbLAdT3DGXda X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-05_02,2024-06-05_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 suspectscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406050093 Add ACTLR data table for SC7280 along with support for same including SC7280 specific implementation operations. Signed-off-by: Bibek Kumar Patro --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 35 +++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c index b4521471ffe9..8dabc26fa10e 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c @@ -29,6 +29,32 @@ #define PREFETCH_MODERATE (2 << PREFETCH_SHIFT) #define PREFETCH_DEEP (3 << PREFETCH_SHIFT) +static const struct actlr_config sc7280_apps_actlr_cfg[] = { + { 0x0800, 0x24e1, PREFETCH_DEFAULT | CMTLB }, + { 0x2000, 0x0163, PREFETCH_DEFAULT | CMTLB }, + { 0x2080, 0x0461, PREFETCH_DEFAULT | CMTLB }, + { 0x2100, 0x0161, PREFETCH_DEFAULT | CMTLB }, + { 0x0900, 0x0407, PREFETCH_SHALLOW | CPRE | CMTLB }, + { 0x2180, 0x0027, PREFETCH_SHALLOW | CPRE | CMTLB }, + { 0x1000, 0x07ff, PREFETCH_DEEP | CPRE | CMTLB }, +}; + +static const struct actlr_config sc7280_gfx_actlr_cfg[] = { + { 0x0000, 0x07ff, PREFETCH_DEEP | CPRE | CMTLB }, +}; + +static const struct actlr_variant sc7280_actlr[] = { + { + .io_start = 0x15000000, + .actlrcfg = sc7280_apps_actlr_cfg, + .num_actlrcfg = ARRAY_SIZE(sc7280_apps_actlr_cfg) + }, { + .io_start = 0x03da0000, + .actlrcfg = sc7280_gfx_actlr_cfg, + .num_actlrcfg = ARRAY_SIZE(sc7280_gfx_actlr_cfg) + }, +}; + static const struct actlr_config sm8550_apps_actlr_cfg[] = { { 0x18a0, 0x0000, PREFETCH_SHALLOW | CPRE | CMTLB }, { 0x18e0, 0x0000, PREFETCH_SHALLOW | CPRE | CMTLB }, @@ -685,6 +711,13 @@ static const struct qcom_smmu_match_data sdm845_smmu_500_data = { /* Also no debug configuration. */ }; +static const struct qcom_smmu_match_data sc7280_smmu_500_impl0_data = { + .impl = &qcom_smmu_500_impl, + .adreno_impl = &qcom_adreno_smmu_500_impl, + .cfg = &qcom_smmu_impl0_cfg, + .actlrvar = sc7280_actlr, + .num_smmu = ARRAY_SIZE(sc7280_actlr), +}; static const struct qcom_smmu_match_data sm8550_smmu_500_impl0_data = { .impl = &qcom_smmu_500_impl, @@ -711,7 +744,7 @@ static const struct of_device_id __maybe_unused qcom_smmu_impl_of_match[] = { { .compatible = "qcom,qdu1000-smmu-500", .data = &qcom_smmu_500_impl0_data }, { .compatible = "qcom,sc7180-smmu-500", .data = &qcom_smmu_500_impl0_data }, { .compatible = "qcom,sc7180-smmu-v2", .data = &qcom_smmu_v2_data }, - { .compatible = "qcom,sc7280-smmu-500", .data = &qcom_smmu_500_impl0_data }, + { .compatible = "qcom,sc7280-smmu-500", .data = &sc7280_smmu_500_impl0_data }, { .compatible = "qcom,sc8180x-smmu-500", .data = &qcom_smmu_500_impl0_data }, { .compatible = "qcom,sc8280xp-smmu-500", .data = &qcom_smmu_500_impl0_data }, { .compatible = "qcom,sdm630-smmu-v2", .data = &qcom_smmu_v2_data }, -- 2.34.1