Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp6821925rwb; Wed, 10 Aug 2022 01:32:07 -0700 (PDT) X-Google-Smtp-Source: AA6agR4v0+ZeWrV7YMF+/j2ptFMa9YXfQqlSpNeqHypcUGwCwekbhqFFmpm6bR9wuE2tCnUJwqHD X-Received: by 2002:a17:903:32c9:b0:171:2846:ef16 with SMTP id i9-20020a17090332c900b001712846ef16mr5363023plr.108.1660120327629; Wed, 10 Aug 2022 01:32:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660120327; cv=none; d=google.com; s=arc-20160816; b=skTogo7mPLb58aB2fwVD+jKJFL/FhYFKRBk8xYrXg9b50bVZJ8xPIzw2IjsiurIIct 6U0eNEeomMpF8lxH0Z5Bhj0qSUsmmViQoMalR6V+FNFvzOZNKGnOPGE1o7/8BKpId9G+ rgOYM2uM9h8RIKG9kVJeChBKWlOa+TeHiSCl0/S7KwzuZvAi1x9nPA4Hk/JlwvbtBjUm 1V3ctnzUtxt/H3mLlGd77LRooGQAhD+tiBktxXMNecBCZO22Ej+wobbUg7/tDpZ7mTS/ +qn8t8M0KEBI/vbNeWy63EhQnI2vXar7EzrL3+JXQE4B1pGvs4abzUTyZcW9Gpu9oEF4 lZPw== 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=fp2qv/mUdGQqG0c0LVJ1WRpRxJUcCtj34Y6m7sNF2fQ=; b=UAcWAF4h1YGMRpQAlUN7yC0fOK0WAN2QFdF5LWMsGxrfNr/XR3umJbDaEXsrjmH7Fv hV76DXArOrZktxL62Krogze3sF1pmYZcQeFxKG0ANArtk+4PoJ12xOZpVwdMhdIs+tHN Hg5CFLS8383O0j+2qRj126lzXo47gHgloBEuuHizTR2CN2+wt2Xc1j4dfBkVahbW+ICh cqZPrbCNTRy2iCbC3u13LpQmpFSv3sENQLQy+8qxeTrEDDwGbvXg9bmfosHIEwxJshbH UxxK2QiLX83a1HJKxZpfBcPS+XLq4lyeD0/rT83INim3nNlK90/D1zWEP1/n9AXqcTiS WNVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=lkjoHg4H; 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 k3-20020a654643000000b0041aee1cc298si16510607pgr.805.2022.08.10.01.31.53; Wed, 10 Aug 2022 01:32:07 -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=lkjoHg4H; 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 S231598AbiHJHwu (ORCPT + 99 others); Wed, 10 Aug 2022 03:52:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231579AbiHJHwd (ORCPT ); Wed, 10 Aug 2022 03:52:33 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 363007644E; Wed, 10 Aug 2022 00:52:33 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27A7oYGN024726; Wed, 10 Aug 2022 07:51:52 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=fp2qv/mUdGQqG0c0LVJ1WRpRxJUcCtj34Y6m7sNF2fQ=; b=lkjoHg4HHk9fDMCAY2szco/rWV9iyFqdGcorhrvGW2aiDOtZGP1X6o/v5B1Q4chE4IYV aKBIhDFKDLlE+io2HjKnGo+g2kk+rFAdOmJK8JMkOa89HqarH/WrcFUufwtq4RX9LVhP sf7vhCPtJh8pMDa/wenuxRm92F7hSnSn5BZjQe+2Nlm2oi6OpJHhVctc/YuMuU74lrV8 dp5zArFLR1mYZ32ZLFXzJiuSLZDB1CRn+s14qXS5yOFSLVT3xDdvyiQQEg0j8LkmAQe+ ppjMgn9iPzw3ofslhDqz+F7aKERuOzjtcBBiqtkIDr4cdhp7CAGNQ/lErWagafsfWQlj Kg== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3huwqqhkub-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Aug 2022 07:51:52 +0000 Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.47.97.222]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 27A7kpGG000366 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Aug 2022 07:46:52 GMT Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 10 Aug 2022 00:46:51 -0700 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; Wed, 10 Aug 2022 00:46:46 -0700 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , CC: Srinivasa Rao Mandadapu Subject: [PATCH v3 5/8] remoteproc: qcom: Replace hard coded values with macros Date: Wed, 10 Aug 2022 13:15:55 +0530 Message-ID: <1660117558-21829-6-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1660117558-21829-1-git-send-email-quic_srivasam@quicinc.com> References: <1660117558-21829-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: YlcoSR7s6Cyo5vTLucwx1QgS08daJ6TZ X-Proofpoint-ORIG-GUID: YlcoSR7s6Cyo5vTLucwx1QgS08daJ6TZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-10_03,2022-08-09_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 impostorscore=0 mlxscore=0 bulkscore=0 phishscore=0 clxscore=1015 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208100022 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,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 15d9834..141fd339 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