Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1001508rwb; Tue, 27 Sep 2022 07:15:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5y/8MZQfvVv/waEP9TZ5FCNOlq84/oT399kpKB3M2ScbDB6sqpnpddNL5psxzV0TJdtEBq X-Received: by 2002:a50:cdd8:0:b0:457:269a:decf with SMTP id h24-20020a50cdd8000000b00457269adecfmr13448502edj.359.1664288143279; Tue, 27 Sep 2022 07:15:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664288143; cv=none; d=google.com; s=arc-20160816; b=GCF1Tfd0KfI/7zYXWU+sLdOjmL2heYhPur33eyyAIGi5/hk+eIG360i2SFOlwFANBD ubr6m44BUQ9XGyI1w6cryP5ekygJLxKXuoGn1h+3XB+rALbukmvH8ATVr/j9vwky6C1Q FgftsvaKQAy1B+QOsOYeSH5D8uecb2Bzr4uTOf1pj1mOEXpFTrBJVrxk7KInM8NwCRpi +/PNSN/lVYxYawICb99rCn+B+JtKJilbkb80LgH/HP+Yv+nUGzH5IYG8gk3gc7yymY22 g5lh8KsH2WotQEb6yfrIn3qHje+awN7AsT5QUgh+3nC4xZliWtnf5Wva4mxxYhFwbVj2 KP3A== 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=1af6fn6KEykryDxp6Gx/9KDXQY51jQYEqhEkaZgsPSI=; b=s8Mw0OP0sBaFWeIzI/cotxVWyySLMANWlonLtHB+BrLH+HOgFO+jp+0KZnZ6YFWOWs 7y4JCjTR1HkOkgOdMRtX9h1SDtkQLkIoUjWoGczT1e0BXlJ8ecCzwedSB+8FDiN857C1 AWJ1Bo+wlXs1uYJPbzlanyV39Hrkjd2W7bjsCGcV5zfP8VqpW4pt6Bt3XAqs3xb6zhX2 iM/If5Qf69f0fT9JAuU9jAiv+n2scFT+ZQvxmxYj/njn4MpaJcXbcCFJobrG4wlW7EKM 8puUbBOS8qHXxomOi968VhSFqBoYch4K3Q6e9h4ER5I1cR15LfsZuc2Hs1trOYg8//je 2PnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=TAQzcaOS; 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 s7-20020a50ab07000000b00448375a5890si1821514edc.393.2022.09.27.07.15.17; Tue, 27 Sep 2022 07:15:43 -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=TAQzcaOS; 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 S231872AbiI0N6n (ORCPT + 99 others); Tue, 27 Sep 2022 09:58:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232941AbiI0N6M (ORCPT ); Tue, 27 Sep 2022 09:58:12 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E28D15D646; Tue, 27 Sep 2022 06:58:04 -0700 (PDT) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28RDMWl6013239; Tue, 27 Sep 2022 13:57:25 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=1af6fn6KEykryDxp6Gx/9KDXQY51jQYEqhEkaZgsPSI=; b=TAQzcaOSbIThwbQLeVQwrSjCI3CrHOvu7BtJOsEfjbsYFnZdNaGPZBWvgj2VLY++VJsC ojbaxfhKj+J+EeJew2KlENcV6E2+WI2q96p82klWhex5MlBTrXh2h0cHY+4eIkYIZQPP DfgJIhZtHofHuauh+utDwtuISMGP6FX6II9pOo8UCDdDsYskMFwijxBWmMEl6kWySSM5 QwJ0t5tbcDFnKn9k8+RlMPC4XNkU7lhWwo/2TmZajsqyWBlaYpAiZMUw543DG4FTq0MT nZviu+klUuxCo3TgHMufNCmP72nOqh6LHRIkigIXPiochHJNRA2dAqBvTNBAxTn84WtU jg== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3juvnngw32-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Sep 2022 13:57:25 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 28RDvOeg016663 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Sep 2022 13:57:24 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; Tue, 27 Sep 2022 06:57:18 -0700 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , , CC: Srinivasa Rao Mandadapu Subject: [PATCH v9 2/7] remoteproc: qcom: Add flag in adsp private data structure Date: Tue, 27 Sep 2022 19:26:38 +0530 Message-ID: <1664287003-31450-3-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1664287003-31450-1-git-send-email-quic_srivasam@quicinc.com> References: <1664287003-31450-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-ORIG-GUID: TbX9w8OrDIyRSECy4FHdnW2MWTnIPn4q X-Proofpoint-GUID: TbX9w8OrDIyRSECy4FHdnW2MWTnIPn4q 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-27_05,2022-09-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 clxscore=1015 mlxscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209270085 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 4c9a1b9..fe385e8 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; @@ -595,12 +597,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