Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp132586rdd; Wed, 22 Nov 2023 11:14:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IGUmKxeCmpOz6rpq8TDY0sKVBQ5Xlhy9eDi+654IoCVkAbE3jlQNGV18oMvM0cJYIJV+F2k X-Received: by 2002:a05:6a20:244b:b0:18a:4895:8721 with SMTP id t11-20020a056a20244b00b0018a48958721mr3197892pzc.18.1700680482457; Wed, 22 Nov 2023 11:14:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700680482; cv=none; d=google.com; s=arc-20160816; b=UZSm6ttikb6ciCKDs7DQZMLmm9VhtV49G2bjqCs34nJ5dnhdHpyA5GE9Lb97YegymE 55j8VCE1yDS1lK3/P4X06yEcFKoefmXm25QSgxl2aVdCWIuSuGK5UBDsXaA8+rMSV6+v G8TaiHdoxI2Kmi5TEW8dXDRFuFuKRZxKrrz1jTvE69fmIQu4zvTNaHEcrYB49l/JTnTu 0n6kDyZgf3qc1c/zfar2QDlP6pS0Zh2pD+aKCPwusyYZpFRIkx9+Ai4RUflKJR+zjDvO 2kvDeMK6Q1GcA3FQzA6NnyxOmmQG8Wo9bpdu76xnSKUd5uXwx7OKYzo2m1iRlPwk4Qeb Qsrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/tZNbBJRcR14VoBJO8pRBORmDeuMBzs1JSkfpqU+k/U=; fh=EtXJBMIHeO+qqwqGVNUePQVI5zLYvhCe51LCcxlruSs=; b=QV6+7I73f/DySQ6rob58rkrUtsLWTTpchpFZRD2633PgIiPqO5BDrKpv69sM3Co63V vNCclnvJ8/xOfHAAXzdepeSN2S2skqG2Tpc9teczyCNlK77NDOaLjXPaGe8MmW+/fm60 FPlArXjo9i+WmAfF/OsmJCWgv11Zi2jS0yyzO1DGcRZEdH29GX3U3BXwwIfIxg3a4Mh9 RRVRH8vUtZO4dZmcfUmsr6+X8dJJmOqcnHo6X3DQEF1mVqmcok+ARjylp9h4D0wv89dd /gHGjnUJClibTxBktJqfpAZJ6SgALOjwj4PgfNovt0phKVKQH5B952vmkBwCV6tYP4Zy tztQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=AkrhsjM3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id fa35-20020a056a002d2300b0068a85532963si135479pfb.160.2023.11.22.11.14.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 11:14:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=AkrhsjM3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B55AB81ED043; Wed, 22 Nov 2023 11:14:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232064AbjKVTOc (ORCPT + 99 others); Wed, 22 Nov 2023 14:14:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232747AbjKVTOa (ORCPT ); Wed, 22 Nov 2023 14:14:30 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C9611B5; Wed, 22 Nov 2023 11:14:26 -0800 (PST) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AMHmAMQ001340; Wed, 22 Nov 2023 19:14:20 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-transfer-encoding : content-type; s=qcppdkim1; bh=/tZNbBJRcR14VoBJO8pRBORmDeuMBzs1JSkfpqU+k/U=; b=AkrhsjM33d+w5VMSZrza72/ts0OGPRcio7maV9HEL9MVLHNAilxf6/KJRlS00PIABXgm QtI5D3HHFiWMVsfCnAXkhL2qqFvMZy3Eg2b8+4S6un32TNggQ73L8AVKfmgyPdWlbQGv MNYY530a8Stbq0idnGReGxJ5y4UPJO7EBD/AvK+Z02wJuI0kqOqLHYqfEQ8+gOgTuYoz RDcMmHDD9gBXattG34k44BIFtLednl6U/j8O7ADUnvr5aexHwQG/KBVohXdB1mCAs/44 q9WucIltchWUV61g8fDRs6odA3mUZHaJu8OZPUN2gYDP+XhAwXIM3rdg4iG80Ph5qfaZ jQ== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uhf669cqu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Nov 2023 19:14:20 +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 3AMJEJ8C032063 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Nov 2023 19:14:19 GMT Received: from hu-kriskura-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.1118.40; Wed, 22 Nov 2023 11:14:15 -0800 From: Krishna Kurapati To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Greg Kroah-Hartman , Thinh Nguyen CC: , , , , , , Krishna Kurapati Subject: [PATCH 2/6] usb: dwc3: qcom: Rename hs_phy_irq to qusb2_phy_irq Date: Thu, 23 Nov 2023 00:44:06 +0530 Message-ID: <20231122191406.3094-1-quic_kriskura@quicinc.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: TljbVr7lju51nwyMlphrj4sssPRfjgKW X-Proofpoint-GUID: TljbVr7lju51nwyMlphrj4sssPRfjgKW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-22_13,2023-11-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 clxscore=1015 bulkscore=0 mlxlogscore=551 lowpriorityscore=0 priorityscore=1501 malwarescore=0 spamscore=0 suspectscore=0 impostorscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311220139 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 22 Nov 2023 11:14:37 -0800 (PST) For wakeup to work, driver needs to enable interrupts that depict what is happening on th DP/DM lines. On QUSB targets, this is identified by qusb2_phy whereas on SoCs using Femto PHY, separate {dp,dm}_hs_phy_irq's are used instead. The implementation incorrectly names qusb2_phy interrupts as "hs_phy_irq". Clean this up so that driver would be using only qusb2/(dp & dm) for wakeup purposes. Signed-off-by: Krishna Kurapati --- drivers/usb/dwc3/dwc3-qcom.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c index 3de43df6bbe8..11be8faf5f58 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c @@ -57,7 +57,7 @@ struct dwc3_acpi_pdata { u32 qscratch_base_offset; u32 qscratch_base_size; u32 dwc3_core_base_size; - int hs_phy_irq_index; + int qusb2_phy_irq_index; int dp_hs_phy_irq_index; int dm_hs_phy_irq_index; int ss_phy_irq_index; @@ -73,7 +73,7 @@ struct dwc3_qcom { int num_clocks; struct reset_control *resets; - int hs_phy_irq; + int qusb2_phy_irq; int dp_hs_phy_irq; int dm_hs_phy_irq; int ss_phy_irq; @@ -372,7 +372,7 @@ static void dwc3_qcom_disable_wakeup_irq(int irq) static void dwc3_qcom_disable_interrupts(struct dwc3_qcom *qcom) { - dwc3_qcom_disable_wakeup_irq(qcom->hs_phy_irq); + dwc3_qcom_disable_wakeup_irq(qcom->qusb2_phy_irq); if (qcom->usb2_speed == USB_SPEED_LOW) { dwc3_qcom_disable_wakeup_irq(qcom->dm_hs_phy_irq); @@ -389,7 +389,7 @@ static void dwc3_qcom_disable_interrupts(struct dwc3_qcom *qcom) static void dwc3_qcom_enable_interrupts(struct dwc3_qcom *qcom) { - dwc3_qcom_enable_wakeup_irq(qcom->hs_phy_irq, 0); + dwc3_qcom_enable_wakeup_irq(qcom->qusb2_phy_irq, 0); /* * Configure DP/DM line interrupts based on the USB2 device attached to @@ -542,20 +542,20 @@ static int dwc3_qcom_setup_irq(struct platform_device *pdev) int irq; int ret; - irq = dwc3_qcom_get_irq(pdev, "hs_phy_irq", - pdata ? pdata->hs_phy_irq_index : -1); + irq = dwc3_qcom_get_irq(pdev, "qusb2_phy", + pdata ? pdata->qusb2_phy_irq_index : -1); if (irq > 0) { /* Keep wakeup interrupts disabled until suspend */ irq_set_status_flags(irq, IRQ_NOAUTOEN); ret = devm_request_threaded_irq(qcom->dev, irq, NULL, qcom_dwc3_resume_irq, IRQF_TRIGGER_HIGH | IRQF_ONESHOT, - "qcom_dwc3 HS", qcom); + "qcom_dwc3 QUSB2_HS", qcom); if (ret) { - dev_err(qcom->dev, "hs_phy_irq failed: %d\n", ret); + dev_err(qcom->dev, "qusb2_phy failed: %d\n", ret); return ret; } - qcom->hs_phy_irq = irq; + qcom->qusb2_phy_irq = irq; } irq = dwc3_qcom_get_irq(pdev, "dp_hs_phy_irq", @@ -1033,7 +1033,7 @@ static const struct dwc3_acpi_pdata sdm845_acpi_pdata = { .qscratch_base_offset = SDM845_QSCRATCH_BASE_OFFSET, .qscratch_base_size = SDM845_QSCRATCH_SIZE, .dwc3_core_base_size = SDM845_DWC3_CORE_SIZE, - .hs_phy_irq_index = 1, + .qusb2_phy_irq_index = 1, .dp_hs_phy_irq_index = 4, .dm_hs_phy_irq_index = 3, .ss_phy_irq_index = 2 @@ -1043,7 +1043,7 @@ static const struct dwc3_acpi_pdata sdm845_acpi_urs_pdata = { .qscratch_base_offset = SDM845_QSCRATCH_BASE_OFFSET, .qscratch_base_size = SDM845_QSCRATCH_SIZE, .dwc3_core_base_size = SDM845_DWC3_CORE_SIZE, - .hs_phy_irq_index = 1, + .qusb2_phy_irq_index = 1, .dp_hs_phy_irq_index = 4, .dm_hs_phy_irq_index = 3, .ss_phy_irq_index = 2, -- 2.42.0