Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2005888rbb; Tue, 27 Feb 2024 07:55:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXCfuVBS5iVdDsXGWlTpe9Bw5hM6OiBEllNAA5bqBaoxPPuRKeB2vqmbtAuiIc7Sbx6Lh0DCVh9x8XdeU3Q4fFbUOW9m6DQ6P4/QBiQ+Q== X-Google-Smtp-Source: AGHT+IG9wJazRpw4CIlAqPMSJQklOXHtOGcd0wSFUjOTdv+bx9VB2YSW65lU3CXJtOHBEAcMQHGo X-Received: by 2002:a05:6a20:c78e:b0:19e:a45e:3b7e with SMTP id hk14-20020a056a20c78e00b0019ea45e3b7emr2920750pzb.53.1709049304367; Tue, 27 Feb 2024 07:55:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709049304; cv=pass; d=google.com; s=arc-20160816; b=0iGE/Kxp1JX0206FPWuIJJMLEz77NsqBtb1XloPPsj4VJ61WaDVQjntSuks6GFjGqE asBRPmE1xsRMray+/s2CyvmZ1El4w60z3ab+Td6IR4oB/iymVlXOt3wpo7prcdXZWvCC FajgOyxIJCy/95RHR775m9/CLiz3HyrQCa/C96sTEE10WBe3apf1fDpSUkf+J/xYJUYz HT9teQhQAenapNjfcguOdtsYoSMVHNh1kdRgwsfVfNCLE4ZAknMEMZLjEG9NpU6TNTMs olYjC42i7IXm4lDs9L2BgzbkM85CAtaAflMjmYF4wkzkFNhFX1DELpzOEeW8A0KjsI/r l+wA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=iK+5IGZCTHYf95YGpbHUD4YjDMRJdiTM0LY+A4KnU0Q=; fh=v/J7FZ7kroLF8arNv1lU638DioI58lxpdVQAXxWjgAc=; b=MUaRH9Z+0J14NCBYK72zpQ4NMHNuZ434p0IEQjaJI3euR9ZiOuwYqo8FZIYMx7Sf6P 1IVSEE+0N6Yo3YeigypWMDWRRe0zRqNtABuQxedSq65XRaDfoIgT5vRMna1oiXlNrb+z 5ulrkhF95R5dLk/8HZ3Pa8ePW15zCGs78ZQD7ftY7F5+l/xpFQ7jHa4PBzKWEC+EiZ6e 79yvOAVq0tF6qbeiwZzq/FODxF5N/RZRVAzjcYJoLlxOaTtBrzzWkqbowVe7b8I7aeJc tHoTOPmzYUu0FFB/BeQfejX9BGQ46lPConq+2Uhq0neDKqI8lgGcWOvWmBg1cdburuW3 qfYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=NAUqpgdK; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-83551-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83551-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id r9-20020a63fc49000000b005dcd29510e5si5578333pgk.349.2024.02.27.07.55.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 07:55:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83551-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=NAUqpgdK; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-83551-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83551-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 185682810DC for ; Tue, 27 Feb 2024 15:55:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 512BE1474AB; Tue, 27 Feb 2024 15:53:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="NAUqpgdK" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 EE17B1487E2; Tue, 27 Feb 2024 15:53:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709049229; cv=none; b=FLi3yWXYWvQFk7+7wIK7wVhivCji/llgtgOyLERd7iNysBdaMC+gcvRYASHKk095nhW6Bs21qQEn/0ai+iTQRjuTStCtcmIc1BEAwhT8i1H8F8j5GgJ8cjxMWJ8K8FPXpB1Iog96wiTpJLZCrByIrLMWfqjMZZhBsje4766YLhI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709049229; c=relaxed/simple; bh=cMCWwOFDDzkP/opZ4OZblcKhabLUYOPklY3q66jnb6A=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Gj6dLA5Vyd8/CzybLOxqJXCmlWmzNODV7Rwrl9VKBJ6VfdhIW7mIDSDJBhgJJjABTpldghaT7cp8X37dc09tJoVS3vPQV6fbd1fxESNwB7ClMx3izsYKpQfSOwRvEU58DX05rVeFBKfuQOuvu8rTzBgjEbISQH8Oj5WXf7L1LVk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=NAUqpgdK; arc=none smtp.client-ip=205.220.180.131 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 (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41REac2u021570; Tue, 27 Feb 2024 15:53:44 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-transfer-encoding:content-type; s= qcppdkim1; bh=iK+5IGZCTHYf95YGpbHUD4YjDMRJdiTM0LY+A4KnU0Q=; b=NA UqpgdKbzq7NOxihfjQK3XdK5fREzSOpfiWt/WcZc1JM56r2xktAIV8CQRDM9tLWo KKHwhtb8RSaT63nht4Yt4Q7+JYfhRUh1kyfXGG7RgzAmdxHnu4X9CSagV8X7UK3M 5IqR6FfekDy5evAsquS4+Aa1fkKS4JbQJl7yX5XboioQVeqg6eIx3KiDEABjSFUO WWvleFW/CwthFpRtPlpuO9TVrFJ0UogxKIXNvsPLl92fuy88KfepL3EMyU2BJn1O K0OaOaeJdblMWPNjjZNF7x416sRWvZcyd3VZ0BdsYpbfiYSCV/dr7GJtcpcfSH3b N4Wz/6gGeeqipP2lE/OA== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wha079bjr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Feb 2024 15:53:44 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41RFrhjS028712 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Feb 2024 15:53:43 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; Tue, 27 Feb 2024 07:53:41 -0800 From: Mukesh Ojha To: , CC: , , , , Mukesh Ojha Subject: [PATCH v12 5/9] pinctrl: qcom: Use qcom_scm_io_rmw() function Date: Tue, 27 Feb 2024 21:23:04 +0530 Message-ID: <20240227155308.18395-6-quic_mojha@quicinc.com> X-Mailer: git-send-email 2.43.0.254.ga26002b62827 In-Reply-To: <20240227155308.18395-1-quic_mojha@quicinc.com> References: <20240227155308.18395-1-quic_mojha@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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-ORIG-GUID: kBVG0DAQQiBnusn7Yhm6ROiLjrCfJjI4 X-Proofpoint-GUID: kBVG0DAQQiBnusn7Yhm6ROiLjrCfJjI4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-27_01,2024-02-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 mlxlogscore=719 clxscore=1015 suspectscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 spamscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402270123 Use qcom_scm_io_rmw() exported function in pinctrl-msm driver. Signed-off-by: Mukesh Ojha --- @Linus.Walleij, I have removed your Ack on this patch after your comment on https://lore.kernel.org/lkml/CACRpkdbnj3W3k=snTx3iadHWU+RNv9GY4B3O4K0hu8TY+DrK=Q@mail.gmail.com/ If you agree on the current solution, please ack this again. drivers/pinctrl/qcom/pinctrl-msm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index aeaf0d1958f5..1bd5c8c43fcd 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -1082,22 +1082,20 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type) if (g->intr_target_width) intr_target_mask = GENMASK(g->intr_target_width - 1, 0); + intr_target_mask <<= g->intr_target_bit; if (pctrl->intr_target_use_scm) { u32 addr = pctrl->phys_base[0] + g->intr_target_reg; int ret; - qcom_scm_io_readl(addr, &val); - val &= ~(intr_target_mask << g->intr_target_bit); - val |= g->intr_target_kpss_val << g->intr_target_bit; - - ret = qcom_scm_io_writel(addr, val); + val = g->intr_target_kpss_val << g->intr_target_bit; + ret = qcom_scm_io_rmw(addr, intr_target_mask, val); if (ret) dev_err(pctrl->dev, "Failed routing %lu interrupt to Apps proc", d->hwirq); } else { val = msm_readl_intr_target(pctrl, g); - val &= ~(intr_target_mask << g->intr_target_bit); + val &= ~intr_target_mask; val |= g->intr_target_kpss_val << g->intr_target_bit; msm_writel_intr_target(val, pctrl, g); } -- 2.43.0.254.ga26002b62827