Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3488712rwb; Mon, 19 Sep 2022 23:44:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7r9QvW/H426aLs2g1fTh0ud5cKePwm+3VziHddfrmpQo7Dyw27qkpC8w4hD53f5QxLiO1D X-Received: by 2002:a05:6402:5489:b0:43b:b935:db37 with SMTP id fg9-20020a056402548900b0043bb935db37mr19443386edb.347.1663656273975; Mon, 19 Sep 2022 23:44:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663656273; cv=none; d=google.com; s=arc-20160816; b=v8XfK4wZjHEfv7L2wLlQQ18fK6WdMcofiit4YPrJYPIf79bnUYy8n8zUJc5+IKr5Kk OUD46et+K2nE6WAy851neSi5RmUFqkhTVZlOJoTqz4cfEDX6yng8ujRlBsDkl45mpDMb bVdktNyZXgSr8udX+0lID/28ylTl7QDVss+MrEhBACsvUMpuZLlhI1JdnSjDNahIqr3W SpJYg/hN078jBlRDfCWC2d1x2haBmPxa+OUfe4xJkFJlB4PGXUzosCAU/RY67NA+31hN xg6oxnBUiY3ReooeZiNCY58qYrDj0Fu4ovJLkHc7N0B3XP4YTzl/mRgEGAn4wOAi3KVV HhIA== 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=xRxYEf21rNrL1h0C4XgqNH36ZQtU47+uavi9UY1D7qk=; b=p3LMI9+3WNiTJXnTj28gkR3hM5w3+OmpDzkB4OVD+Hp6XxPiJPBVkO0Dm6GfoEbHvb +Dayzhd9JuGDFPXoDYq2EICrEfFNWqK/MlLMRIJ5FR/YAaerwBR5RCw1BQmH1DTQqWL2 SwtPbSRX8TXgzIrSy2hX3uEop56zbEBn9j/T54LHG0/6VH9NHzPIWb2Y8E8t69yv+3oI M6pivqCaty+izvWVk8kMKmi0CJKWSlbYWlIdHUFZGUs8CIDhhi4s3tuLCgIxo6+Emfg+ BVJt7WLaYGzVVsW95kJ0nrmBYFZu0lOsXnTHvieCBAysQtRZ3YgG74OcQwQDUcJfkaaZ uY3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=citTlXwJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hu9-20020a170907a08900b0073c12a7e89esi487016ejc.940.2022.09.19.23.44.08; Mon, 19 Sep 2022 23:44:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=citTlXwJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229582AbiITGbZ (ORCPT + 99 others); Tue, 20 Sep 2022 02:31:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230404AbiITGat (ORCPT ); Tue, 20 Sep 2022 02:30:49 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6520032DAC; Mon, 19 Sep 2022 23:30:33 -0700 (PDT) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28K6Ealx008133; Tue, 20 Sep 2022 06:29:54 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=xRxYEf21rNrL1h0C4XgqNH36ZQtU47+uavi9UY1D7qk=; b=citTlXwJgYAP2ky6vSyVNcO1aFmZ9TDfW+231SSbDYiH74H4tWHP3u9Dsu2vmcHkJAvq e9uodAd6h9e9PPH5WT56dekntHKwgGU0D7KArhluyCSz1GwWlW6aIQh0eJ+jvsEyG4Zz xBksEkzfVBqjMgGApFmG+NJmVP0XTfV3JWKhQMBjaOfsKkH8NfE+0CUp9K3mbfQp4CYV KZJ8Podf5HzKnEz/gGypBHx6lrLstQTI0BL8bLW1SW41wk+dgM9/X92k3nZx7fojscF6 FRo9k16aLbnGQNfclJfneYq81gXIOaOzY4Ys2mxV38ubvC+aL3Mdpw7PsoYWvW8f7PIV kQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jprv7tj85-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Sep 2022 06:29:53 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 28K6TqH6015878 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Sep 2022 06:29:52 GMT Received: from hu-srivasam-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 19 Sep 2022 23:29:47 -0700 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , CC: Srinivasa Rao Mandadapu Subject: [PATCH v7 2/8] remoteproc: qcom: Add flag in adsp private data structure Date: Tue, 20 Sep 2022 11:59:13 +0530 Message-ID: <1663655359-1402-3-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1663655359-1402-1-git-send-email-quic_srivasam@quicinc.com> References: <1663655359-1402-1-git-send-email-quic_srivasam@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 nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: z9WELLWusTqcuF5ieIuim8LCiydimYJU X-Proofpoint-ORIG-GUID: z9WELLWusTqcuF5ieIuim8LCiydimYJU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-20_02,2022-09-16_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 mlxlogscore=999 spamscore=0 clxscore=1015 malwarescore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209200038 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add flag in qcom_adsp private data structure and initialize it to distinguish ADSP modules, which has iommu requirement, for using iommu selectively. Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Stephen Boyd Reviewed-by: Sibi Sankar --- Changes since V6: -- Update commit message. Changes since V5: -- Rename adsp_sandbox_needed to has_iommu. Changes since V3: -- Rename is_adsp_sb_needed to adsp_sandbox_needed. Changes since V2: -- Add is_adsp_sb_needed flag instead of is_wpss. drivers/remoteproc/qcom_q6v5_adsp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index 2f3b9f5..fa2ccac 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -62,6 +62,7 @@ struct adsp_pil_data { const char *sysmon_name; int ssctl_id; bool is_wpss; + bool has_iommu; bool auto_boot; const char **clk_ids; @@ -99,6 +100,7 @@ struct qcom_adsp { phys_addr_t mem_reloc; void *mem_region; size_t mem_size; + bool has_iommu; struct device *proxy_pds[QCOM_Q6V5_RPROC_PROXY_PD_MAX]; size_t proxy_pd_count; @@ -596,12 +598,15 @@ static int adsp_probe(struct platform_device *pdev) } rproc->auto_boot = desc->auto_boot; + rproc->has_iommu = desc->has_iommu; rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE); adsp = (struct qcom_adsp *)rproc->priv; adsp->dev = &pdev->dev; adsp->rproc = rproc; adsp->info_name = desc->sysmon_name; + adsp->has_iommu = desc->has_iommu; + platform_set_drvdata(pdev, adsp); if (desc->is_wpss) -- 2.7.4