Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2079931rwa; Mon, 22 Aug 2022 01:29:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR6uhNjd3/TaHQ/HO/5zqAgYj5+ziXd357atGChSUFZYOeU2/Tk1ef62FcVp+qE3UK5QiQEc X-Received: by 2002:a05:6402:128e:b0:446:1816:5c80 with SMTP id w14-20020a056402128e00b0044618165c80mr14574751edv.29.1661156982030; Mon, 22 Aug 2022 01:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661156982; cv=none; d=google.com; s=arc-20160816; b=t76/32kwBSUD64GYGXeZO4+nMPrNb3RvuP6IoFgeLFitNoMBQ/A+KYDQZ55XiO35wc GNFUwoWiluFcqvKhocxmuPZSZisikLiQ8qYL6YzfKpQ+r6UurVOcGjVw4ZgAGuy9HVcF HMfdgowOWt/3tBKO868cFoRSjEFKNoQjQRP1Yky/Zhf1nHcEwC98ylbJwC5Brps8lzxV 9/ZpItTZkyghgI7D3+EvAkcrJIXEFcTyRwfKQ6+5mHyQc6FdvhRraq+KzAm2ua5af6je uTHPMDx/K+/okvSd77T8J23ASHDrQOeYacIBq2o0fOUqt7Sva+M03zsnu5Q44qcnR3kv vfvw== 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=Xf+IX2U66sCC6/J8Rap0DTZgRqGVjsxKf4X6I9mo4M0=; b=uep0OzqBzmm8PgOvM+z36zdvSTp/pto+fgTiH6yqRy/6euYz5iBXWrYV3bNMmhjbQB tKLmVU++UUu9weIjJJJRxl7xiQ2Xrfkt3OxJE8jBY69KzZukoqj5a2KciY/kg3WrawpY poXv9DQYbcG57HrJsYC/UIpRdHuoacRMAfPUPBJHcykksgMEjGOwcoDgrPMzQkynbHDL 2ceiZCikPWFLrujguobzSYHMGFp7HrtKlBeRY+0P0dqCCDAJjQ6VhVuCIT1eScdQdmhe tjCU1bOVi4B4lA5WZUM7oQ/WcdvsrM35cpOalbI5L5W5MfJkmb6XOnuusFWrS65Mkafy xpqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=J1czoEJw; 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 dm16-20020a170907949000b00734b2821879si8719802ejc.898.2022.08.22.01.29.15; Mon, 22 Aug 2022 01:29:42 -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=J1czoEJw; 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 S232048AbiHVIXs (ORCPT + 99 others); Mon, 22 Aug 2022 04:23:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233915AbiHVIXf (ORCPT ); Mon, 22 Aug 2022 04:23:35 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF02E63EC; Mon, 22 Aug 2022 01:23:30 -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 27M5UOOp019702; Mon, 22 Aug 2022 08:22:50 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=Xf+IX2U66sCC6/J8Rap0DTZgRqGVjsxKf4X6I9mo4M0=; b=J1czoEJwHDIF7DDCYkRCBXNLTRHGRVSvhQrdEHvJgr8n+pDNspA1nuM5zQ2d4kO4kK6x 1BTKAs5SQstLforhnnU46s0TWyNiOZQO53Xu8zShFGzYbgC6rq3kmaE70dMTVnVqptO4 A9Y5C8U0fX2vyLpr2qu6E33sEZ9gqjmIpb7kbB9Aag24nHDA299MiWkdWyi1uAqlPj77 BHD0EV5jpdCShEAzeo4gWqp4yyQWXOU18LMftg4lR+2GXWuce7bpLRKCunJxcQF0gNHX 5U8u9OA/axoY76J3kMXwm3A7tSrO9Ln5VGq6fGgPjYnyybQzYHCZuAUhnEkIEcH0lTpe jA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3j2vwrkm1m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Aug 2022 08:22:50 +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 27M8MmX1011801 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Aug 2022 08:22:49 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.22; Mon, 22 Aug 2022 01:22:43 -0700 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , CC: Srinivasa Rao Mandadapu Subject: [RESEND v5 4/7] remoteproc: qcom: Replace hard coded values with macros Date: Mon, 22 Aug 2022 13:52:00 +0530 Message-ID: <1661156523-22611-5-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1661156523-22611-1-git-send-email-quic_srivasam@quicinc.com> References: <1661156523-22611-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-ORIG-GUID: ViFSqu8k4dnBp11RsS90GtISwaNtt71A X-Proofpoint-GUID: ViFSqu8k4dnBp11RsS90GtISwaNtt71A X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-22_04,2022-08-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 spamscore=0 mlxscore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 priorityscore=1501 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208220035 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 --- 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 6d409ca..701a615 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; @@ -366,10 +369,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