Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp510155rwb; Wed, 28 Sep 2022 05:53:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM60bJeNzflqfvPz+vQqtDtfqu9MfossGlPuZEZHPzLLnxmQZixXDpTAKma9rJS3Z1U8G0mq X-Received: by 2002:a05:6a00:10c4:b0:542:a69c:fe9a with SMTP id d4-20020a056a0010c400b00542a69cfe9amr34909683pfu.6.1664369585077; Wed, 28 Sep 2022 05:53:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664369585; cv=none; d=google.com; s=arc-20160816; b=WCx+iW1BzHowMBh4kmh5+rtqIe71Km/gKY3zEXo/fWQIeVE5R4ju6iWg0cNPHh+mHy 4INHTMBfM8NdvnKr2vRpFDLQlJOZ0hH8UN83r/pm3PZWFkicaD5cleUc2xfGUsJvFtv1 mQtd8h9MRdPK8QdHBONbCily9nELCctcA1FPeft4gFH+yVGDHxAtwL55ckkjaglQRD3N gbmqF9Ghslk2DemCjazgkNTPdz3GrGkHY7S0pf6ZTqPINvg/gKczCQE68+1inPQxWkAb IkE1MdceQeZp1x5Eqg/SpidkQtAhtNNMH6PUlLIyG3TCcRgR3aICN3ngEa+4iRO8BQRA wBWA== 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=a755HZOIfeboF9IdgcrCgzTkIjNp8UfCu37qszQ4gDmszuy4V+F7uuNEAVMHwhFjz9 GO+i4MFZpNKWHpQZug/5CfTuRwrYY7buKo3oTivB3M8BL8qw01mpL8YmwN3xeu/doO85 +lWIUPPK9itUsXSjAWU8bBSWDEPoeLv5olRxnqXXvXN03LkzDyF+HjohdAuSV1wU4+tY HCmHBboW5fDo7UR0+DKoi4+s/gLJmUSuT2jNxHfRFcrlIN5DgIodWDZu75DwXpF8BSr7 lZS9+neL6zggeOQRcT+mtJS3IGwxhk3UJbBJHWP5Eld730NIEU04wmkOB0C8VOWnHJe6 9cXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=E7BtKpGz; 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 a4-20020a170902ecc400b0017154ae6268si5903617plh.484.2022.09.28.05.52.53; Wed, 28 Sep 2022 05:53:05 -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=E7BtKpGz; 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 S233820AbiI1M3p (ORCPT + 99 others); Wed, 28 Sep 2022 08:29:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233550AbiI1M3a (ORCPT ); Wed, 28 Sep 2022 08:29:30 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4789D91D85; Wed, 28 Sep 2022 05:29:29 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28SCQlYx019409; Wed, 28 Sep 2022 12:28:49 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=E7BtKpGzdSDgcH3pst+NaebqQVw+QwBciVl70tmAj7TYVSeacWP+JvVs0+WF2tgaa5K2 X8C1HKMbyHWryM3oOJeulaaAaQFdhf1v//7ns5A3Z+09ZsHxeZT5vghlHULWOEbR1tdl mEmpvGchQR2NjAPUzHg2QpyhjkigM7QZbfnVoZ9B/VqgLa+5F+FdQO1U/pvi2nxuZgOh cbiqkYw5T0xvwbX43GPfFxioW/KxyRimJ6Ob3HKRCjKYGj9nCKOcYRPt1rsFdWslJPHc Mzj9jeN3/Pb0/k9Pu5fa/x6bdS47bLDf/wLjAlRaPz2KAIX5qfuO9gxbPPEJ8OnrpL+x Aw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jvja2ggtq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Sep 2022 12:28:49 +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 28SCSmeD020430 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Sep 2022 12:28:48 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; Wed, 28 Sep 2022 05:28:42 -0700 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , , CC: Srinivasa Rao Mandadapu Subject: [PATCH v10 5/7] remoteproc: qcom: Replace hard coded values with macros Date: Wed, 28 Sep 2022 17:57:51 +0530 Message-ID: <1664368073-13659-6-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1664368073-13659-1-git-send-email-quic_srivasam@quicinc.com> References: <1664368073-13659-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: TpFgo_cSIcHPuK5IpnOcN4EFfLU4TUF6 X-Proofpoint-GUID: TpFgo_cSIcHPuK5IpnOcN4EFfLU4TUF6 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-28_05,2022-09-28_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 malwarescore=0 spamscore=0 priorityscore=1501 mlxscore=0 adultscore=0 clxscore=1015 phishscore=0 mlxlogscore=999 suspectscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209280077 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