Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3153499rdg; Tue, 17 Oct 2023 06:20:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEfD9nIeOh2ikfZJyvxAUFpZuZ78Bimt9pyiQP+eAKurai3E9MoaEnzEX0+R8QbooOWkjCe X-Received: by 2002:a17:90a:d785:b0:27d:6b8:93be with SMTP id z5-20020a17090ad78500b0027d06b893bemr1996403pju.42.1697548858882; Tue, 17 Oct 2023 06:20:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697548858; cv=none; d=google.com; s=arc-20160816; b=WgQihjjwEuSyy8wKkE0gADo4pqOq2roxLmFc7RQIJ23L8uNkKxfkJH54jvr1fgNj9k qDM+hsG2jCYbC3uAp38UjX3pq4qvi4tL5RxhbV/QG12IBdZ1qzE+x7nFbPsSzSi6wQd3 8XvrFEBXIum/1igy48a6H2tvG+nJwiCeOc8LMIwxiUvmxh6p0wSDT9L1ySrC8yec3LDu NuzWE3nQJMT8RqU9sFVCmZCzxVDHhufiBiTpcyC4tNYlxsFAR5WSVmJ8pioitG98A4Mm RDh/8P6S9QFdokRH9UGMGkStko2tFM+VZt6bvJMJiybKfXsYCl1VFMcGgrE/siZ60bWv pc9w== 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=eH9+uGhbmzhLtgVJlATCBifzu779Fbw0JaX2vCy5JFI=; fh=KhX1GH1ey8mrB0Z/tHsni02n3erdygqKX1iJN2Rm99c=; b=ure23NfY6P3vLHic92CEnPg+Dr02MPMtEoNhCWPwkughm5cXfcTy0GUIAHZuHj98Ge SS+PHzMDEY1FsGwE7SMF0x7m77AHcrTcW6emvNUw8Aauhl2BBBumIfCbI11PSeWOqtSu Oz/9zWxi3lxG41aRP56hQb8W8Ry1ziS3g90iqL09WYeL+ctEw28z3spoFvDbWnJk4W2C hEw8q7saYOQ7ENupqIrA7X2dhO5EpILPHsM/H9uX3npRUtYu2kh7E4smHLPiNZtqoC+s 2/GQjUnMSy67wLnV72dhB4ak8EI/6zN+rTUvZOyGHuD1AW+MQbls3jizJQSfERJT26c8 Av1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=GnOv4y2O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id h17-20020a17090ac39100b00273fa934cc1si8658998pjt.167.2023.10.17.06.20.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 06:20:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=GnOv4y2O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 709E980B2895; Tue, 17 Oct 2023 06:20:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343869AbjJQNU3 (ORCPT + 99 others); Tue, 17 Oct 2023 09:20:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343926AbjJQNUJ (ORCPT ); Tue, 17 Oct 2023 09:20:09 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BB9E192; Tue, 17 Oct 2023 06:20:01 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39H7jblP025029; Tue, 17 Oct 2023 13:19:58 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=eH9+uGhbmzhLtgVJlATCBifzu779Fbw0JaX2vCy5JFI=; b=GnOv4y2OuDgfj2NP/ctliUYxZ9HwJPuEWh0puzimsCmOeMOBz7Wkc6ei8FTYVKKC/whn ry8eQFrsGbwOhC2cet0o/dq1PQXG2rOdHLDCLuJh2NIV6jLlF3+b1Xb2xHa6C5z0eGFC KoaXprj0bpiZAONMY+xhURGaaFpkfH6+S3asmB6pb/cp2wAKqAmE8nUtW2TWULdRZxKO Ds+wH03hM+y5Z3oqG9oBaReaTWuoj7bTl9EnkNBLBpTfFuOG1xepn/6Ys3JGDyaGFsC/ Bh9uw7fiRQra4dX+0Meuk8mUwNywes9kLDG7SCBBQysggLhBbTLzlTi4z0Ki4X3GTTjq kA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ts9jnt9pk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Oct 2023 13:19:58 +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 39HDJv2g016670 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Oct 2023 13:19:57 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.39; Tue, 17 Oct 2023 06:19:53 -0700 From: Krishna Kurapati To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Michael Turquette , Stephen Boyd CC: , , , , , Krishna Kurapati Subject: [RFC 4/8] clk: qcom: gcc-sm8450: Keep usb30 prim gdsc on during runtime suspend Date: Tue, 17 Oct 2023 18:49:44 +0530 Message-ID: <20231017131944.8356-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: 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-GUID: haSFvbWIW5_zdSFiQJc9enXTBRX-G3Ad X-Proofpoint-ORIG-GUID: haSFvbWIW5_zdSFiQJc9enXTBRX-G3Ad X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-17_02,2023-10-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 mlxscore=0 clxscore=1011 phishscore=0 adultscore=0 malwarescore=0 bulkscore=0 suspectscore=0 mlxlogscore=751 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310170113 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 17 Oct 2023 06:20:39 -0700 (PDT) When runtime suspend happens in host mode, if cable is removed at this instant, it triggers a resume where a xhci register access is done when gdsc is not on leading to a crash. Keep usb30 prim gdsc as on during runtime suspend to avoid this crash. Signed-off-by: Krishna Kurapati --- Note: I am not sure if this is the right way or setting GDSC flags to PWRSTS_RET_ON is the right approach. So for now made this change to keep GDSC during host mode runtime suspend. drivers/clk/qcom/gcc-sm8450.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/qcom/gcc-sm8450.c b/drivers/clk/qcom/gcc-sm8450.c index 75635d40a12d..47cde2de93a2 100644 --- a/drivers/clk/qcom/gcc-sm8450.c +++ b/drivers/clk/qcom/gcc-sm8450.c @@ -2996,6 +2996,7 @@ static struct gdsc usb30_prim_gdsc = { .gdscr = 0x49004, .pd = { .name = "usb30_prim_gdsc", + .flags = GENPD_FLAG_RPM_ALWAYS_ON, }, .pwrsts = PWRSTS_OFF_ON, }; -- 2.42.0