Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp515085rdh; Tue, 19 Dec 2023 06:02:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHVEVslqHlTcLzvf+MvLAFVmQv1omNp37272XtCY0Yb7tdiQN4XmRh6YqB2lxgxJotm+Rsp X-Received: by 2002:a17:902:e543:b0:1d3:da07:5741 with SMTP id n3-20020a170902e54300b001d3da075741mr1042325plf.91.1702994544535; Tue, 19 Dec 2023 06:02:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702994544; cv=none; d=google.com; s=arc-20160816; b=PWWDuU133t5v3xG3i5NcRk+ZV862YVMDYhQI6DnJmxa/fEsUOHUq9Hr5hTRhE6Ng22 elvBuO/Yl3k0+iiRYwASyhat+IUjHVBSNIeZ3PDhzC2jcLye9XNDIs4e+7MeUDgiZ/cO DhhRpjO9w2ox9qg65zKv2qQMl99Mrin1q4tuDUgpEWaFl1UctO52oBFdU+pKyxvL7nam 5sEUVaCeIjG3VMSdV20i5KWWv8wZlyK7ieVkkv4kP5s16xD2nBCE5HrhndWg2Lndry4m YS9Qt8PoPMkPdaG+HXtO42V9UpjCprFEVDFcbxz+1f+Km98YELzxYNTUH36D0Wb6ScoQ cJbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5zS5pm5BSO8AkKnZkZZX08NMYc9g3EX8dtx7BC1OcvU=; fh=mFC8nmckJLq19l2a2JACcOVBANdLlvDzOiUZ3OvRdps=; b=lUu7VEkL23ZI/HrlcYKZRN3zyO8vieE2o3aZEaNsSGl0BUuGxiqWtgvuci5DWZQgEs OdU6z/m5OD9YMkJsDsj+4WgdCLzmZ0xmd3rlMUhdbfNq5xVeFGdrVCLHSfNhgmiG8pim DoNdscx8wZC/1PNSN4K6PJoAtLlekZnHIWiAyTUcKqeKLEHhO3+FPwkA/zJ0GWPUJzh3 kh9N39X6qPiRkQ0qInJwprAnZEtikCelHp8bXLUFqkJ93+i0eMvcYVvJsQFv+DagiOnl 3ksYrRAz7nwi08UzTGXRsAxS/9cedvRrPJMUtNdaDJ+GDZNoUACB0fLtptukNnPAFzbV JSCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ouhpnBTA; spf=pass (google.com: domain of linux-kernel+bounces-5304-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5304-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u2-20020a170902e5c200b001c383a64ebesi1767658plf.319.2023.12.19.06.02.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 06:02:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5304-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ouhpnBTA; spf=pass (google.com: domain of linux-kernel+bounces-5304-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5304-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 904E1B24528 for ; Tue, 19 Dec 2023 14:02:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 637CF1CFA0; Tue, 19 Dec 2023 14:01:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="ouhpnBTA" X-Original-To: linux-kernel@vger.kernel.org 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 3FCE31CA8E; Tue, 19 Dec 2023 14:01:05 +0000 (UTC) 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 (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BJDFXaE009385; Tue, 19 Dec 2023 14:00:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=5zS5pm5BSO8AkKnZkZZX 08NMYc9g3EX8dtx7BC1OcvU=; b=ouhpnBTA1jfe5Ru38DDDgopNFPe6TMKVDiXP OC2YckKEryjALV9V4ZIglT74wDSpRVccKXuYaQA81bL0INeFuEASlYDeYU08u3Qh gJSE7zOpkZtX/lFFTP67kW7HY9PUtb3MkL0MXoiLapiZ0bn1vA1BQm34+OfTfA59 ukCDAuRE7Hi62CE4fGbEFahKOZbwzqQujtwTpN0S3wVg51vAxys0mCgyoPEphF66 xMsUWxFyD6D0+91v9Yy3EcgyqQ/lBDMMbjHDXdjS4VxfmMHXplBGk2LTtux6oIgj LHzOEjbjJXkPVDgkFpzzlUkoW1cs1GDKjk+vZTLD/lbcUO2O0g== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3v34bj9bj2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Dec 2023 14:00:45 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BJE0iDD002705 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Dec 2023 14:00:44 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.1118.40; Tue, 19 Dec 2023 06:00:38 -0800 From: Bibek Kumar Patro To: , , , , , , , , , , , , , , CC: , , , , , Bibek Kumar Patro Subject: [PATCH v5 5/5] iommu/arm-smmu: add ACTLR data and support for SC7280 Date: Tue, 19 Dec 2023 19:29:47 +0530 Message-ID: <20231219135947.1623-6-quic_bibekkum@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231219135947.1623-1-quic_bibekkum@quicinc.com> References: <20231219135947.1623-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-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: eejQ3dH-mddZXx5FQE7rq1O0TdHQwVvg X-Proofpoint-ORIG-GUID: eejQ3dH-mddZXx5FQE7rq1O0TdHQwVvg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 mlxlogscore=999 impostorscore=0 priorityscore=1501 clxscore=1015 spamscore=0 phishscore=0 suspectscore=0 mlxscore=0 lowpriorityscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312190104 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 | 25 +++++++++++++++++++++- 1 file changed, 24 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 e1819dfa1311..fcf8d1abd8d9 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c @@ -36,6 +36,22 @@ struct actlr_config { u32 actlr; }; +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_SWITCH_GFX | PREFETCH_DEEP | CPRE | CMTLB }, + {}, +}; + static const struct actlr_config sm8550_apps_actlr_cfg[] = { { 0x18a0, 0x0000, PREFETCH_SHALLOW | CPRE | CMTLB }, { 0x18e0, 0x0000, PREFETCH_SHALLOW | CPRE | CMTLB }, @@ -646,6 +662,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, + .actlrcfg = sc7280_apps_actlr_cfg, + .actlrcfg_gfx = sc7280_gfx_actlr_cfg, +}; static const struct qcom_smmu_match_data sm8550_smmu_500_impl0_data = { .impl = &qcom_smmu_500_impl, @@ -672,7 +695,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.17.1