Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp991365rwb; Fri, 23 Sep 2022 06:57:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6+lmTh5PLLklbolYGIuKd3A9FKtaOhhwi6vgQrYfA0XdWUAkc49YUdRuI5lQeHFs+Mu6NE X-Received: by 2002:a17:902:d4c6:b0:177:ff9b:35d0 with SMTP id o6-20020a170902d4c600b00177ff9b35d0mr8694635plg.69.1663941449015; Fri, 23 Sep 2022 06:57:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663941449; cv=none; d=google.com; s=arc-20160816; b=tQj8xog3ZwdX1iRZYhpSwtLenTHvK0PImJBREU3xS6U/7FFQ7XpBjhk6EIF1GJpY4p qjaiSNvirNyfyevDJ/v9dqzd0RfmVL+3WeDYRXn+CVf9O1NeoOcI1RNOvxk5C4je98/f cj6vW7XrgQ2mUOw8UDhaTP9gx14ai+G5yaHl5kxBpVHfi0rzqRY4Bn0BKCz+lXWynmsv ITbwa/t3ccp4gSdMvmObflL6a0hM930v2YpO/6bZ8cmjOaIxvmYd+8yzw9GvCnC2urDo snApntqZ7E5D89IivTvTxQ8PjkjKoZvS7eWIUZl4Qv2S/EWsTh63hmFAaCzqXxqvx5J2 J/Ig== 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=0GHBlCazCW2LLwokKCWDIfYw/0NFoDBpSIMTrIDPjD4=; b=er/jxtaa+bS6x+B1nIG+HyJ8GWjLw25mDS11iPdYlX0EIyRxT5+Ut3HOHdgnufUmqN QyTtp1goTuAM0OnxRJWzP5ChFN0veewNSEx5NCY9vl6laBxsO6DHfpusmANI2Eh5rt0i jfRp5szeS9qfrUcItoczJCosUDRSjToZIhySJZvrShO0cTMTRTzXY3ClxSC/jDTCgL/I InUzpwBT5tEV9KAMgdMPV/2zeWdF0hZBf/zV7eFv5+ynXZJgCm3lOX7aXOIdJKvc7OdP VWMO92qqymkpdD1E6WX4aVVPZCzPEhUyiQIhNLiwlMoN1JI08sCIj7pdiSdLKmw48Rvb kovg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=NpYKVtg8; 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 141-20020a630093000000b00434c99c5359si9854628pga.754.2022.09.23.06.57.16; Fri, 23 Sep 2022 06:57:28 -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=NpYKVtg8; 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 S232185AbiIWNH1 (ORCPT + 99 others); Fri, 23 Sep 2022 09:07:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231965AbiIWNHN (ORCPT ); Fri, 23 Sep 2022 09:07:13 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C496213AF0E; Fri, 23 Sep 2022 06:07:10 -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 28NAKjv8022122; Fri, 23 Sep 2022 13:06:29 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=0GHBlCazCW2LLwokKCWDIfYw/0NFoDBpSIMTrIDPjD4=; b=NpYKVtg8kSgYvOwn4NmjMq1IPFMi5ARZwcz/CTgV8UCnVlIlcBZ/daPCKu3kd/7JLdYp Qz2SHExhO98hM4HinmY8KXrMpb3BzkMu/qhAzOE7YHX3il27hbr5JbJtpvHxHkAh/hJ3 QY09BiqWjhp20U9bzWykfIq8MlThhvGVh6OHY0bMZ7383LpHQma1B8dsIm5lvoWXvZTA ii696pSQEOcwRvP1pbJX3fmHeBBE8UygVXuDaA+LmjDuO+4oYI+jWTnJFLkyYT8k8yg3 ADTddJ8CAkcFv8nQLWnRLE2s8oQif8tLLZ8RtuTvdUDf9ONcN7Z+2l87xbsgMeoKm1B/ sA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3js67nhm55-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Sep 2022 13:06:29 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 28ND6TbS010828 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Sep 2022 13:06:29 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; Fri, 23 Sep 2022 06:06:23 -0700 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , , CC: Srinivasa Rao Mandadapu Subject: [PATCH v8 5/7] remoteproc: qcom: Replace hard coded values with macros Date: Fri, 23 Sep 2022 18:35:38 +0530 Message-ID: <1663938340-24345-6-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1663938340-24345-1-git-send-email-quic_srivasam@quicinc.com> References: <1663938340-24345-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: aqVaswNPrnNH7U1GhDjwXPeHSNN8RlRU X-Proofpoint-GUID: aqVaswNPrnNH7U1GhDjwXPeHSNN8RlRU 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-23_04,2022-09-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209230085 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 9ea10b7..80c8169 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