Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp999894rwb; Tue, 27 Sep 2022 07:14:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4RAJrLA77ttLwoIVqyvej89Ra15SKtZRonzhnpIxr/euVa5mvgkn+XcGUH1MgGg/klZxNO X-Received: by 2002:a17:906:3197:b0:73d:5e1a:44ac with SMTP id 23-20020a170906319700b0073d5e1a44acmr22611055ejy.512.1664288074944; Tue, 27 Sep 2022 07:14:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664288074; cv=none; d=google.com; s=arc-20160816; b=lNF1mmbisT4nehoQLDl7FBqjbGq6JwOeX+Z8sZlQXlMYgAKr6+0M1y2mIiyVG4OYXN HCG3Loh60dwhP1VLa3wkKwX5ngxqM8+gW+beZleNiNuNUD6Q6ZvASX7CBA9zTrWn/Bss Oced0qsgkCVjqBCv5LQVtHWwkv2w0HjwXmpNR5DmztZ67XEQSIR/wbtq4gJ9x3mhb02O Mub0dDKYtvGcOOkyt5i6BdQSdwaqiBNfKDU5ejPuL2IaawDJdJiXWrl9jguFwjmouwgL PlYTX13MDnL2HbaI1kVXHQecRc6QLa2ZVsRPz53gKUOCQ3xiM+QF2MTovxbvnAzP2ZA2 j5Fg== 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=z3xS40VpnnGhnThjLzZ8BsCLJAxS5XIMjpjPRBeM03A=; b=ci//cuBSsNAhYBQIaZ7Nxe3d7hODpdx/j5MtOPk17P1f581qzytFWycMZO+JWbfhVf 47ra+wTMvM1lurb8+tlFHUlGnTm1RHbrkibc4BA7XilhIHloMNcfRWyypIi7fKo3+N8l 8heuZdHRn0tR2lRjbUsR8CVD3DLPaF2qwuvTR17MtyAfxgaQ5nmEKqAqKvPTFPcQQLGg CNuImn/tjjU3XSjpUATbjRpq+X5vN53gD0pjFAmpUi+jyyM2MAUJpe6nEepzk9bAeqZu ZeuQt5H2UMgJK15n5eT1ZAIP6kU49Sb7hiq6k3fbZdCWczeoWPkzGhLFg9FCDf5f/kmu C4Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=VWz3iZvR; 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 x16-20020a056402415000b0043a6e796231si1615751eda.544.2022.09.27.07.14.08; Tue, 27 Sep 2022 07:14:34 -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=VWz3iZvR; 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 S233027AbiI0N7R (ORCPT + 99 others); Tue, 27 Sep 2022 09:59:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232969AbiI0N62 (ORCPT ); Tue, 27 Sep 2022 09:58:28 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79C6515EF86; Tue, 27 Sep 2022 06:58:25 -0700 (PDT) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28RBi3tA024990; Tue, 27 Sep 2022 13:57:43 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=z3xS40VpnnGhnThjLzZ8BsCLJAxS5XIMjpjPRBeM03A=; b=VWz3iZvRmrJlNdU77GTrnCzp1KSfS6EWX8ClF+Pc7Jf3O1MYT22RCGYxrTQvN/NIT1OD H3HyBZs7sReEwWmZUbq7fTYyMOYTmtdSXgRzDKmjLaeJQQ5u4VyohrK8m5dkUrvJlE3H caSopB5rCZ26P1ugwAIG/HwCrbBC8qRmkiroFXuQ0UCaRHj31NgESHgeEqEZPdHjyrrs jUFfo2OZyubtlyCVGjFPldtXI5lg3DPS99kezQw0BpDg+V+6CI6vCxS/CH4fu0rgttHM 0QzElC4AGeU6Zl4ghcu2Gl2ux2aKXdP72J1U6V42CJVHn8ZER7f5xUjXIJTCGxh1f4MR og== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jupsssvk7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Sep 2022 13:57:42 +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 28RDvg7h028094 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Sep 2022 13:57:42 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:36 -0700 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , , CC: Srinivasa Rao Mandadapu Subject: [PATCH v9 5/7] remoteproc: qcom: Replace hard coded values with macros Date: Tue, 27 Sep 2022 19:26:41 +0530 Message-ID: <1664287003-31450-6-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-GUID: oyWKNZ4QD49BbdgJkp_qPUlILza-Et7I X-Proofpoint-ORIG-GUID: oyWKNZ4QD49BbdgJkp_qPUlILza-Et7I 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 clxscore=1015 priorityscore=1501 mlxscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 phishscore=0 adultscore=0 impostorscore=0 spamscore=0 suspectscore=0 lowpriorityscore=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 Replace hard coded values of QDSP6 boot control reg params with appropriate macro names. Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Reviewed-by: Sibi Sankar --- drivers/remoteproc/qcom_q6v5_adsp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index b8cbbf7..14c94af 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -54,6 +54,9 @@ #define QCOM_Q6V5_RPROC_PROXY_PD_MAX 3 +#define LPASS_BOOT_CORE_START BIT(0) +#define LPASS_BOOT_CMD_START BIT(0) + struct adsp_pil_data { int crash_reason_smem; const char *firmware_name; @@ -365,10 +368,10 @@ static int adsp_start(struct rproc *rproc) writel(adsp->mem_phys >> 4, adsp->qdsp6ss_base + RST_EVB_REG); /* De-assert QDSP6 stop core. QDSP6 will execute after out of reset */ - writel(0x1, adsp->qdsp6ss_base + CORE_START_REG); + writel(LPASS_BOOT_CORE_START, adsp->qdsp6ss_base + CORE_START_REG); /* Trigger boot FSM to start QDSP6 */ - writel(0x1, adsp->qdsp6ss_base + BOOT_CMD_REG); + writel(LPASS_BOOT_CMD_START, adsp->qdsp6ss_base + BOOT_CMD_REG); /* Wait for core to come out of reset */ ret = readl_poll_timeout(adsp->qdsp6ss_base + BOOT_STATUS_REG, -- 2.7.4