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: 506547 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp1096017jai; Fri, 3 Sep 2021 08:26:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTwykiG7VwjHPdQs/Q/Bn1fRm+cj+FeHkU8SpwDwccRwoocgJAzE8i03YF/23aDcOb5Xah X-Received: by 2002:a2e:9cc2:: with SMTP id g2mr3326178ljj.491.1630682769570; Fri, 03 Sep 2021 08:26:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630682769; cv=none; d=google.com; s=arc-20160816; b=F/TFaue+KIV5di+kKHNycyt1ahEGKU/3Pnbo3EMDaVoi79uALN5n3k1XbMQKUIxYId XkJLsH0aJvSXeWwt3Fe34jbWJuWQQZsUHObNpYD0ZLiBDyZ2NfrWMj6G/Cw7N/0j15Ym 99+UfNsc7iUSyFWbF5ugVTjE92iqWewKLkrgRv4FbvylPXuFpkxSsRfXIsV4Zjl1BN8K F1hO67mHBE8ApTbmvuUkX8nSgJ4ZEJoeZYwd4j/fCTv2kvXnwaSP6tK+PBe0jWzZBgKL DgFsjKTV7531kFaOPG0gMfi9p/Pg185VTL2BpmDGrY3Vwc8jeMa01rOckHHcYj7YVOyD tBJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=YqRU3Ycxd3Ww6WoruAXhcv/J7s2d9ydvNe6WdXZAX+Q=; b=p1aZxzbA2ejcZKYYKga0VwpB1cXTymTkVpHe6DeIJ96tjDFBw//LABd7JLndf2OPAv UgbMch+EmyW8AsYfVswPszpP92VKwStwgdknsA9x6V6VYiEkQ05VvLrziRFucBxH0wew vzRsnimwLNrDvCB9ibxB/3DOxfVaqpDiK8SASelyBJNvNjGjDeIOXJB44Sxm66jpalHm p94ah7ZN1O5QUnW1RGBhNqSZgKSevFYwzeBTDqmmnWni1wxk6DLDk5GdVdYSSNw/VOfc 7aHMJkI0ullUlThCB+Gyfrg/6hnSzg6Md1cFUEeJYzjQ+tNYNQVTwts5MwPyqyVUKoEY /c8A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id gt43si5489435ejc.459.2021.09.03.08.26.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 08:26:09 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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(-) -- 2.30.2 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));