Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp959757rwb; Fri, 23 Sep 2022 06:31:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5kQUC2dyvWE74QND6FUpBIikq0s0VJ09LBnFI7eaT1+sPvok4nW9U6igRReQt7p5NJScf6 X-Received: by 2002:a17:907:744:b0:741:36b9:d2cc with SMTP id xc4-20020a170907074400b0074136b9d2ccmr6923818ejb.613.1663939918444; Fri, 23 Sep 2022 06:31:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663939918; cv=none; d=google.com; s=arc-20160816; b=lamrPsuf04ZyPHXrgmlEaBV6qZH7Zgc4AAl8N7k6pVCtLEn6CXrX+h89ujAtt6IHMt dGfdb6JMdCX90Wtb+4htV9tpVmVmxX+QBImX4r7bRnDnmyXADuqZKnL9GgMXWYnHUi35 S5eQvW/0YtoWQeCZoPn1RCQc+72uv372WmQW2fOT178MpNPLciSGBfdTbcm/uxXPFJ6i EjlULd7UhEu6rPtt5001sjTXGy4r/B7bzVCm55joYZUh1CXPxXO34vrL9fpjNyuzcJtq mcnUDf7vQu0S63GAGnQlrQaNwQihsJr1+F8f7W+pMCtFTOV5gFkp+ViionwdxvyaZVxT xY2Q== 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=Jw+93L9yl+MXHlLAu6RoSlqR4AU/qbHR2SDfI72pg8E=; b=dY9Cp9YwT2xy9z+jHbL33uV3x0uM9HBclQ6WP9AToRDrJwJJIwwd+jAa6WGUPwt5rS Gu3wuNsBVMLcWW8s40tEU52SjVa74/SoNO7I8ZwQG18WVeFwZ7D+f+EZfSpHxZy7kxKB rKxayU79u63Ks+uE2KpCn62j8enEU3N3gKDs8kyNGdrLiKGjyKFn/HWzWe3+ZRE2g4V3 N8vOCt+t56L7Fpuj5TuwONudSCrbXhPg6EP+iDW99lD5vsLg1hqEocCF0LiDG36c44wr 0yBD4Zye8Sqb36d2ShkYSxhXz+7eJN/OOxQIfJtCC0r7pSxHAeZlCyw3YKEbKMyLZ8I9 EJHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=TGwam6qL; 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 qf13-20020a1709077f0d00b007823754ecd5si6021978ejc.43.2022.09.23.06.31.27; Fri, 23 Sep 2022 06:31:58 -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=TGwam6qL; 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 S232080AbiIWNMQ (ORCPT + 99 others); Fri, 23 Sep 2022 09:12:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231402AbiIWNL4 (ORCPT ); Fri, 23 Sep 2022 09:11:56 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55CC4AB060; Fri, 23 Sep 2022 06:11:55 -0700 (PDT) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28NCrcZu005589; Fri, 23 Sep 2022 13:11:13 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=Jw+93L9yl+MXHlLAu6RoSlqR4AU/qbHR2SDfI72pg8E=; b=TGwam6qL3wVLGQ5dnMiLpQGV6vRAaqjz8YX76QdnIiTmw961c/E7Uz0EJgEs1DN1h7yr 7DUtRPhx92+O64qWAq+IWruTwpngpzjJjxvVZFKkyhHOTcng5Pv4kv30KaV8wUiV3ADj iC9P21a1RBZvqyQTX1S+TEk3+hMidcxjdwAaGpwvCIoKFjLzCqJdeZfeVpWjeIUho/hR awETdlMyyIgw4Qw2cvGLmKxwo1Tkcnyr2BH+8pPpmiH1txIXLT9NWn/yAqvp2fX/jbr/ F/ubTVpzYDqPJ1CiYukNXMyDEtNsPWuHONiTNSao8gT3XjhoMctr9MM6mIKaC6xqqFkv 2w== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jrmnf4fqa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Sep 2022 13:11:12 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 28ND6Bms022456 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Sep 2022 13:06:11 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; Fri, 23 Sep 2022 06:06:05 -0700 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , , CC: Srinivasa Rao Mandadapu Subject: [PATCH v8 2/7] remoteproc: qcom: Add flag in adsp private data structure Date: Fri, 23 Sep 2022 18:35:35 +0530 Message-ID: <1663938340-24345-3-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1663938340-24345-1-git-send-email-quic_srivasam@quicinc.com> References: <1663938340-24345-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: nasanex01a.na.qualcomm.com (10.52.223.231) 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: oGFruMLXU9QeaDM0KojdxrmmwiUDPRPS X-Proofpoint-ORIG-GUID: oGFruMLXU9QeaDM0KojdxrmmwiUDPRPS 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-23_04,2022-09-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 clxscore=1015 adultscore=0 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209230086 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