From patchwork Fri Sep 3 15:24:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Vincent_Stehl=C3=A9?= X-Patchwork-Id: 1524385 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H1M832G59z9sX3 for ; Sat, 4 Sep 2021 01:26:10 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CEA7C83562; Fri, 3 Sep 2021 17:26:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 24F2783551; Fri, 3 Sep 2021 17:26:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 358528357C for ; Fri, 3 Sep 2021 17:25:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=vincent.stehle@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 62939D6E; Fri, 3 Sep 2021 08:25:58 -0700 (PDT) Received: from localhost.localdomain (unknown [10.57.45.196]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AD18E3F766; Fri, 3 Sep 2021 08:25:55 -0700 (PDT) From: =?utf-8?q?Vincent_Stehl=C3=A9?= To: u-boot@lists.denx.de Cc: =?utf-8?q?Vincent_Stehl=C3=A9?= , Simon Glass , Philipp Tomsich , Kever Yang , Lukasz Majewski Subject: [PATCH WORKAROUND] clk: rk3399: do not disable the USB2PHY clk Date: Fri, 3 Sep 2021 17:24:39 +0200 Message-Id: <20210903152439.5778-2-vincent.stehle@arm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903152439.5778-1-vincent.stehle@arm.com> References: <20210903152439.5778-1-vincent.stehle@arm.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean When booting from USB with UEFI on the ROCKPro64, the Linux kernel EFI stub will hang in efi_exit_boot_services due to OHCI hc_reset accessing the hardware registers after the USB2PHY clocks have been disabled. As a workaround, prevent the USB2PHY clocks from being disabled to repair the boot. Signed-off-by: Vincent Stehlé --- THIS IS A WORKAROUND PLEASE DO NOT APPLY! drivers/clk/rockchip/clk_rk3399.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c index f8cbda44551..9cf7d26a026 100644 --- a/drivers/clk/rockchip/clk_rk3399.c +++ b/drivers/clk/rockchip/clk_rk3399.c @@ -1213,10 +1213,10 @@ static int rk3399_clk_disable(struct clk *clk) rk_setreg(&priv->cru->clkgate_con[5], BIT(6)); break; case SCLK_USB2PHY0_REF: - rk_setreg(&priv->cru->clkgate_con[6], BIT(5)); + /* WORKAROUND: leave enabled */ break; case SCLK_USB2PHY1_REF: - rk_setreg(&priv->cru->clkgate_con[6], BIT(6)); + /* WORKAROUND: leave enabled */ break; case ACLK_GMAC: rk_setreg(&priv->cru->clkgate_con[32], BIT(0));