Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1700715rdb; Mon, 8 Jan 2024 07:36:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IHCR1c3ivav42X1QxcFFGFflZ/ywEXhCOzy673Wscwm7hbjb2+YCYr2SHNW3/SQGEfslkL7 X-Received: by 2002:a50:8e12:0:b0:556:e1ef:1c10 with SMTP id 18-20020a508e12000000b00556e1ef1c10mr2257275edw.56.1704728202956; Mon, 08 Jan 2024 07:36:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704728202; cv=none; d=google.com; s=arc-20160816; b=SJxV2whwiNQmOdF8NHZ+wF+UDmTvk5lhifY2cAG5R7mp8faXuaOnHN756uJ6v9vRaa FgzLw33B65pt1Yn5ErhsVw/zUGckmwlBG9WAoX/CwdXYdozOZeHWELTPhTu072draeRj /LPvIoOJsvlj6vqVl8RqpnI/Y7IwLcDtA6wVgUPQZwsoSv2K9tXEuApN5srImK7u/2LS 8ba+6/Ial8sNKLxw0dXiC2hJ6pknJJr+q72SUtwTCHpTmdoJmAM5sErKWPn4ietIdsnE R9HtzDu+pv1kxLLG67udET/kkjDHytOHnpaRciZaU62aeQPPaLJb6BMQWEy7V7ai2oSt XW6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature; bh=CYB+yZ7CYnJ3JgARwyARaz8EHaN6Gp5CvcbnUwoEwwA=; fh=b8WfwODrJ8d7HP5UjYAVa8ubR1xRcPOgflzXQIJUp1k=; b=uwgw416Imq6U4Or/89tOiDSvwb+BfNBaiQGTbAJeibtLsvNnjkk4GnR5cbOjX6GwRs aVAF9FmkPHmDi9uUxr6xOAsldwp47Nnlh1+E3x3bgsCaJfGM1RFXKzgFKPt99zHlq6yD Kb4AsnwnFPDoArNSfV84+8ztqIhd+stfL9gvxNYOkxEKwmXdtkv4D+1+1ZGt82mF3taK 1WMTv9Jbn7H9CiLmo4d3gBER6Hu8YHtneCRq3u4s2gpDKqvwR+2cvRBI8aAGB9N3scLT g0mDqrI76y/bOMPn7vGLUuqSf5LcCPrwZHeP7Go0BBCbBDVknsgwTkqnP90rHpibibsX NuZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=MyHYK5TC; spf=pass (google.com: domain of linux-kernel+bounces-19764-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19764-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id eh7-20020a0564020f8700b0054cfc9ef6c3si3324555edb.1.2024.01.08.07.36.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 07:36:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19764-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=MyHYK5TC; spf=pass (google.com: domain of linux-kernel+bounces-19764-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19764-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 61DD51F24D3D for ; Mon, 8 Jan 2024 15:28:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 793115100D; Mon, 8 Jan 2024 15:28:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="MyHYK5TC" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2775951C21; Mon, 8 Jan 2024 15:28:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4089cFQ7008037; Mon, 8 Jan 2024 15:28:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version:content-type; s= qcppdkim1; bh=CYB+yZ7CYnJ3JgARwyARaz8EHaN6Gp5CvcbnUwoEwwA=; b=My HYK5TCDIy+Jkz2sieVdLV5IngFTKAfzSaD1kHtI1pZJu3GFqPg9c4eNbV1Q1LBx7 wJgXgnOP27JDBpKyxMSTxGlkRDCypf7g7jqB6RuT/a/kot0ViuT1Ufii7dgFTjm6 p3oYTp2mQtPl8CIvnqZg3ohKPEHPlB/ocIVcssyh8YBBb5BeJStv3ZkVc5SXdVJV ze5MYkHVLecP+HSTZGjAZjgxPls35vPfiIKE9MEf87vKMa3f7gaNU0bMeeMgS9us oIzDKOhwi47IzTwuCRS3J3Ng2LP4jBFkHNoeMkLiZfZOeHdjJ7PImHZLFCnycTQT KrF9H/Sb+jndeGiIbJCA== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vgch50yts-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 Jan 2024 15:27:59 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 408FRw80020765 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 8 Jan 2024 15:27:58 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.1118.40; Mon, 8 Jan 2024 07:27:56 -0800 From: Mukesh Ojha To: , , CC: , , , Mukesh Ojha Subject: [PATCH v11 0/4] Misc SCM driver changes Date: Mon, 8 Jan 2024 20:57:30 +0530 Message-ID: <1704727654-13999-1-git-send-email-quic_mojha@quicinc.com> X-Mailer: git-send-email 2.7.4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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-ORIG-GUID: dHtLPICOnwYmwbO7JDkSuNh2Uk8iuz1R X-Proofpoint-GUID: dHtLPICOnwYmwbO7JDkSuNh2Uk8iuz1R X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1011 lowpriorityscore=0 malwarescore=0 mlxscore=0 adultscore=0 impostorscore=0 phishscore=0 suspectscore=0 priorityscore=1501 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401080132 First two changes changes are needed to enable download mode on chipset like IPQ9574 and IPQ5332 SoCs as for these targets others bits in download mode registers are used for different purpose and earlier kernel code was mistakenly overwrite the other bits. First three changes(1/4-3/4) are SCM driver specific while 4/4 from pinctrl try to use the introduced API(1/3). Changes from v10: - Rebased on linux-next tag 20240108 Changes from v9: https://lore.kernel.org/lkml/1698648967-974-1-git-send-email-quic_mojha@quicinc.com/ - Added 3/4 new patch. - commit subject modification. Change from v8: https://lore.kernel.org/lkml/1698235506-16993-1-git-send-email-quic_mojha@quicinc.com/ - Introduce enum for dload mode constants as per suggestion from [Elliot]. - Rebased on linux-next. Changes from v7: https://lore.kernel.org/lkml/1696440338-12561-1-git-send-email-quic_mojha@quicinc.com/ - Rebased it on next-20231025. - Added reviewed-by tag and take care of comment made about commit text should be in imperative mode. - Modified the name of the API to qcom_scm_io_rmw() as per suggestion made by [Dmitry] - Moved spinlock inside qcom_scm structure. - Corrected the patch order as per subsystem SCM first then pinctrl. Change from minidump-v5(13/17-15/17):https://lore.kernel.org/lkml/1694429639-21484-1-git-send-email-quic_mojha@quicinc.com/ - Removed mistakenly added macros. https://lore.kernel.org/lkml/9da888dc-401a-4cbb-b616-b4654fa79e35@quicinc.com/ - Added Acked-by tag from Linus.w to 2/3. Change from minidump-v5(13/17-15/17):https://lore.kernel.org/lkml/1694429639-21484-1-git-send-email-quic_mojha@quicinc.com/ - Removed mistakenly added macros. https://lore.kernel.org/lkml/9da888dc-401a-4cbb-b616-b4654fa79e35@quicinc.com/ - Added Acked-by tag from Linus.w to 2/3. Changes in v6: https://lore.kernel.org/lkml/1680076012-10785-1-git-send-email-quic_mojha@quicinc.com/ - Rebased it on latest tag available on linux-next - Added missed Poovendhan sign-off on 15/17 and tested-by tag from Kathiravan. Thanks to him for testing and reminding me of missing sign-off. - Addressed comments made on dload mode patch v6 version Changes in v5: https://lore.kernel.org/lkml/1680017869-22421-1-git-send-email-quic_mojha@quicinc.com/ - Tried to fix the issue reported by kernel test robot https://lore.kernel.org/lkml/202303280535.acb66sQT-lkp@intel.com/ - Applied some of the improvement suggested by [Bjorn.andersson] . Dropped 'both' instead support full,mini or mini,full for setting download mode to collect both minidump and full dump. . logging improvement. Changes in v4: https://lore.kernel.org/lkml/1679935281-18445-1-git-send-email-quic_mojha@quicinc.com/ - val should be shifted within the function [srinivas.kandagatla] i.e new = (old & ~mask) | (val << ffs(mask) - 1); - Added Acked-by [linus.walleij] on pinctrl change. Changes in v3 : https://lore.kernel.org/lkml/1679070482-8391-1-git-send-email-quic_mojha@quicinc.com/ - Removed [1] from the series and sent as a separate patch[2], although this series should be applied on top [2]. [1] https://lore.kernel.org/lkml/1677664555-30191-2-git-send-email-quic_mojha@quicinc.com/ [2] https://lore.kernel.org/lkml/1678979666-551-1-git-send-email-quic_mojha@quicinc.com/ - Introduce new exported symbol on suggestion from [srinivas.kandagatla] - Use the symbol from drivers/pinctrl/qcom/pinctrl-msm.c. - Addressed comment given by [dmitry.baryshkov] - Converted non-standard Originally-by to Signed-off-by. Changes in v2: https://lore.kernel.org/lkml/1677664555-30191-1-git-send-email-quic_mojha@quicinc.com/ - Addressed comment made by [bjorn] - Added download mask. - Passed download mode as parameter - Accept human accepatable download mode string. - enable = !!dload_mode - Shifted module param callback to somewhere down in the file so that it no longer need to know the prototype of qcom_scm_set_download_mode() - updated commit text. Mukesh Ojha (4): firmware: qcom: scm: provide a read-modify-write function firmware: qcom: scm: Modify only the download bits in TCSR register firmware: qcom: scm: Rework dload mode availability check pinctrl: qcom: Use qcom_scm_io_rmw() function drivers/firmware/qcom/qcom_scm.c | 50 ++++++++++++++++++++++++++++------ drivers/pinctrl/qcom/pinctrl-msm.c | 10 +++---- include/linux/firmware/qcom/qcom_scm.h | 1 + 3 files changed, 47 insertions(+), 14 deletions(-) -- 2.7.4