Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3118567rdh; Mon, 27 Nov 2023 06:56:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IF1jSXc6Uf6RN++KimoyH785vzVq8v9GSVInRnobaaz2NgmDCcn1sEyWsskebkcao+FJNtt X-Received: by 2002:a17:902:d4c1:b0:1cf:c329:6204 with SMTP id o1-20020a170902d4c100b001cfc3296204mr4505843plg.14.1701096985061; Mon, 27 Nov 2023 06:56:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701096985; cv=none; d=google.com; s=arc-20160816; b=Vb9EqDT/fdXMCkz26sFPH30QKU+Sx7+dEKJk4R90SWjFc+xaT7/Ph91rv5P7664147 9mucwlKq0gw80WEJnRqQehi1vIW+cziixIPUTmsCPZ553/BUAUBrBx8ihmy2KArpXbEs VUfX7humOsbY5+jox/Rzyd59QxiX25aLZD+ImrbpTFCi3xWiXD3q8SWEASkMekASs208 bAxcHMV1sAUWxFrPkaz3yhfU75H4bI5KH5Xx1q3CEEckJpJiXjdOpJSkwaEK6eMQlZ3w jfWwlKbJYc+FUTaG3OUzttqJ3Y4w2VJwlQHKLjkvCYJGuEJ7H8QsMhjWpgoynD7Hq8To bhUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=jBd0K4Td0OSX89YVp+m9j2DPTDfN3ScCBSlHrciESn0=; fh=9Sx/iPMpOkBL6I/W3pWVvXA2h5a4HkJEiZWEztvTp5I=; b=KQJjOAFZnLBVQnTdJSKG8pJLNWNTnCxPByM3of9IfrKpWjUkMliK1zD5YJi9KvSpOz QtQJdxZGRKOCTD1Fx7DrqpWMjteUbvx7EtT8cOXj2fOA9AOphoNO1qoUXvc9IH8TvxJ3 fTGbxeoU696lHtn856fq0tWods2VoIij0Vtc9bmXHROVAyPZyJdWijMYZCmbJkA/vJCu xAkBM+qqyDSISlAFxCrppR01xk0yXq49Uj3DWyVPQKJY0it36gXgJHNYYnA1UZ2indhY 052QPMBpDOD2K7H0qbktUNk9hxUTX8OTEX6yZI02AqJrD010dNhWfp5hAV9CJ5ssRAVS oFUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Aaum8u3x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id n13-20020a170902d2cd00b001cfcd32bbb3si2659716plc.350.2023.11.27.06.56.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:56:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Aaum8u3x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id E5FCB8076481; Mon, 27 Nov 2023 06:55:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233714AbjK0Oz0 (ORCPT + 99 others); Mon, 27 Nov 2023 09:55:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233736AbjK0OzT (ORCPT ); Mon, 27 Nov 2023 09:55:19 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2845186; Mon, 27 Nov 2023 06:55:18 -0800 (PST) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3ARCTnXM031930; Mon, 27 Nov 2023 14:54:58 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=jBd0K4Td0OSX89YVp+m9j2DPTDfN3ScCBSlHrciESn0=; b=Aaum8u3xytqPdMZtygJAPreBa0tbYQqJteRGT+a/UAjZA8Jw6FR4IyYOV1upRKhWyy28 66HEL8r9nNMDmzJECb+cLhRiTA2TTtT0cPykiUsXC6+uFQu8nc/SkC8ur77NxWVubj/W +MBWSN40qVt4REW0iAudYp7/xw4Tgdeiu1jA1z2IrAB/vBSSYbe/DYbS/aVPtvK09IdV rTM3f4WEJHCrBuCDXE+Ordnwcg1HLhPTDCijecJ6Tv5pzVft4FyjQxHkV0rig9HSR7eT I8Wr1FghwGP5pCHojXjLinCiditiwc+A5n9f4mRWu0Q/NOoHVQ+V6K/KVbSpUNGUqukg ag== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3umsvagk81-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Nov 2023 14:54:58 +0000 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 3AREsv66009607 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Nov 2023 14:54:57 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; Mon, 27 Nov 2023 06:54:51 -0800 From: Bibek Kumar Patro To: , , , , , , , , , , , , , , CC: , , , , , Bibek Kumar Patro Subject: [PATCH v3 3/4] iommu/arm-smmu: add ACTLR data and support for SC7280 Date: Mon, 27 Nov 2023 20:24:11 +0530 Message-ID: <20231127145412.3981-4-quic_bibekkum@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231127145412.3981-1-quic_bibekkum@quicinc.com> References: <20231127145412.3981-1-quic_bibekkum@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] 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-ORIG-GUID: Jw29jJx5-2zuOgo1PTbLG343_QOz5A4l X-Proofpoint-GUID: Jw29jJx5-2zuOgo1PTbLG343_QOz5A4l X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-27_13,2023-11-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 bulkscore=0 malwarescore=0 suspectscore=0 spamscore=0 priorityscore=1501 impostorscore=0 mlxlogscore=999 phishscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311270102 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 27 Nov 2023 06:55:47 -0800 (PST) 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 247eaa194129..f0ad09f9a974 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c @@ -27,6 +27,20 @@ struct actlr_config { #define CPRE BIT(1) /* Enable context caching in the prefetch buffer */ #define CMTLB BIT(0) /* Enable context caching in the macro TLB */ +static const struct actlr_config sc7280_apps_actlr_cfg[] = { + { 0x0800, 0x24E1, PREFETCH_DISABLE | CMTLB }, + { 0x2000, 0x0163, PREFETCH_DISABLE | CMTLB }, + { 0x2080, 0x0461, PREFETCH_DISABLE | CMTLB }, + { 0x2100, 0x0161, PREFETCH_DISABLE | 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_GFX | CPRE | CMTLB }, +}; + static const struct actlr_config sm8550_apps_actlr_cfg[] = { { 0x18a0, 0x0000, PREFETCH_SHALLOW | CPRE | CMTLB }, { 0x18e0, 0x0000, PREFETCH_SHALLOW | CPRE | CMTLB }, @@ -626,6 +640,15 @@ 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_size = ARRAY_SIZE(sc7280_apps_actlr_cfg), + .actlrcfg_gfx = sc7280_gfx_actlr_cfg, + .actlrcfg_gfx_size = ARRAY_SIZE(sc7280_gfx_actlr_cfg), +}; static const struct qcom_smmu_match_data sm8550_smmu_500_impl0_data = { .impl = &qcom_smmu_500_impl, @@ -654,7 +677,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