Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp245898rwl; Wed, 29 Mar 2023 00:49:54 -0700 (PDT) X-Google-Smtp-Source: AKy350bvma3+z/qu1+05nObuatyk6OBT9WrdBTPj4/+C1BhRIDRFDKhlVr+Ju1zFVPBsU8DymMYj X-Received: by 2002:a17:90b:4b8b:b0:23f:c096:7129 with SMTP id lr11-20020a17090b4b8b00b0023fc0967129mr20673177pjb.26.1680076194266; Wed, 29 Mar 2023 00:49:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680076194; cv=none; d=google.com; s=arc-20160816; b=bL2TNMx/eLDJFRxLbbwxU99euIVrZv2YjlKTxGhFjy6WzVlbXzYmtmfGJ96NdazDRU T1w0Q1ZLGtg2HHaVIlymfNTR2DwXdBmPZuAWX079J55DeNo+IXnZ5XN9ASf8kl9kN/59 6/e8wV3rIq9/f5jr3UExCyXtbkZhr/KHggZpKyNnEVfnFE3WcOqU0WJ7xFVk0Lu45p61 obC+GEIB0XGNw7HSmP2ZBhKDcAOqbp/NV0ckEsjzzu3pYOtJrg3KOQYdzfW7zJaRY/kg HNtrUwaOdHKYFnw5NiBapDndCooIVfiFz6gRp+W2Rf3YEUG0G26qVhw9elMSbgicSev7 EhqA== 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=KcmvK3x2l/sjuj0B2Rs4nb0BSROUfiFMyCxxKIHcBv0=; b=rYYqZQSs7pax+2vFbX0gFZ2l35JwyLVzSy/AAYri1JGhPljbUDpZ94VhztxBs7+rkd JYNLhM/yVBDOoqpg2/R0zkOQqYdBxJgkX2ddCTwQmeWtQZIqrb1/laNdWC8Iz30reuua 5T7g3s91JZUklc1vwMs7TsNDtwyqS8z7l8ZlgYoWfuJXZdGd+L4uzsLRvPaRgmm40ean eNG57ye0o9AiH88Xy0abM4H6hIJmlx19r/Q47OoDXUGvSho+2qBWxdewhaZ/UrTJ8aUc b9mxl/nn+GB8YsrNFVJeZylB4CftT50jmLWiKTomE6nMB4DTODS9vWlOMR1fthZTeL5G fPqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=b6N0RbVe; 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 f9-20020a170902ce8900b0019cf49415dcsi15631450plg.632.2023.03.29.00.49.43; Wed, 29 Mar 2023 00:49:54 -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=b6N0RbVe; 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 S230175AbjC2Hrd (ORCPT + 99 others); Wed, 29 Mar 2023 03:47:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230095AbjC2HrV (ORCPT ); Wed, 29 Mar 2023 03:47:21 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58C9E40D7; Wed, 29 Mar 2023 00:47:20 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32T5YfBN015459; Wed, 29 Mar 2023 07:47:16 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=KcmvK3x2l/sjuj0B2Rs4nb0BSROUfiFMyCxxKIHcBv0=; b=b6N0RbVejV89EXq1AmhLHb2S8LYjWjlMWq++E9ldOeC0Aphc6IGwaLIoDCCynv2uxFDk hlkYsXQNmD7rj2H63MBjSxQMwvGGj79gHrhMX85ybTdP2RhbL9UA6B+v/I9+5Y8rS1EV g/vaxwR3u3WVFWS2KMr+Z61CI7sq0RVo+NPMKrKc09WTVN2WW15srA+ctbox3leDnlPW BBRuyhwAFqUX7+Td/zbYr8EmWOLodcAQsuInX6SpXrfRP4zcPMSiCL9sjTHgV3Qt1yAY aB/8P7kgoQqUQdvdWdZsYgm47tGWYzh7kGBcWXgTFgGQjIf8OsIxF14njYWwh4kHZhk9 fA== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pmawsgs17-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Mar 2023 07:47:16 +0000 Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 32T7lFIM013483 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Mar 2023 07:47:15 GMT Received: from hu-mojha-hyd.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Wed, 29 Mar 2023 00:47:12 -0700 From: Mukesh Ojha To: , , , CC: , , , Mukesh Ojha , Poovendhan Selvaraj Subject: [PATCH v6 3/5] firmware: scm: Modify only the download bits in TCSR register Date: Wed, 29 Mar 2023 13:16:50 +0530 Message-ID: <1680076012-10785-4-git-send-email-quic_mojha@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1680076012-10785-1-git-send-email-quic_mojha@quicinc.com> References: <1680076012-10785-1-git-send-email-quic_mojha@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 nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: tEIs343Wi4OzvcZ1pAuaAxqCHa3g2Eve X-Proofpoint-ORIG-GUID: tEIs343Wi4OzvcZ1pAuaAxqCHa3g2Eve X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-29_02,2023-03-28_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 bulkscore=0 priorityscore=1501 suspectscore=0 phishscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 impostorscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2303290063 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 CrashDump collection is based on the DLOAD bit of TCSR register. To retain other bits, we read the register and modify only the DLOAD bit as the other bits have their own significance. Signed-off-by: Poovendhan Selvaraj Signed-off-by: Mukesh Ojha --- drivers/firmware/qcom_scm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c index cb0bc32..8e39b97 100644 --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c @@ -30,6 +30,9 @@ module_param(download_mode, bool, 0); #define SCM_HAS_IFACE_CLK BIT(1) #define SCM_HAS_BUS_CLK BIT(2) +#define QCOM_DOWNLOAD_MODE_MASK 0x30 +#define QCOM_DOWNLOAD_FULLDUMP 0x1 + struct qcom_scm { struct device *dev; struct clk *core_clk; @@ -448,8 +451,9 @@ static void qcom_scm_set_download_mode(bool enable) if (avail) { ret = __qcom_scm_set_dload_mode(__scm->dev, enable); } else if (__scm->dload_mode_addr) { - ret = qcom_scm_io_writel(__scm->dload_mode_addr, - enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0); + ret = qcom_scm_io_update_field(__scm->dload_mode_addr, + QCOM_DOWNLOAD_MODE_MASK, + enable ? QCOM_DOWNLOAD_FULLDUMP : 0); } else { dev_err(__scm->dev, "No available mechanism for setting download mode\n"); -- 2.7.4