From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D5468266F15; Tue, 20 May 2025 14:20:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747750850; cv=none; b=otdyNkqW3h9He9RiznXEkh+cQBXqAcIjTBe+rk+ydqrmgAYka2FJ6CEodMgs6IuYqvdRpwIivNNpKBf6sdeDfjulRxj5xOgBy9Xy8AykTFic7MaDm3Kao1vdtvLb+sRen6cLjgtM7g3SSBHYNdm8ObGfHH2178q2MIQIQgiqY4E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747750850; c=relaxed/simple; bh=Vs9obrTYzGtWnK7pEXlINDi7h9exO5BkC9tYYprZkHo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R5c3aQxco5ZVUXiqBOr+yM4imhlT0qdIYh6+BATWOuDcTyAv3b0NDdlY/v1KszzyXlQaGSgPplVjADxZA+sWwqX5O7Yee2N7KRiWwHv3wSM3W5bUju8yKl9ofPXZhiSlzFfZNM1Re0H7p2EOq7Wr1LZtXDSZw9VIxM0AMFeUioY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SoY2e7XQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="SoY2e7XQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65E1FC4CEE9; Tue, 20 May 2025 14:20:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1747750850; bh=Vs9obrTYzGtWnK7pEXlINDi7h9exO5BkC9tYYprZkHo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SoY2e7XQHAX5xHfr82CJF3pAXzHuJKzE8J0VGZnU3rHtZ5Nbw56Qh0DoeztZR36uV 1KEJLdSONgv7hAEUHm75FkV53tkT9PY4QaKI6OmtsWwGpo6B5Wpg7NTxNgwIwSwnUR j6NDZpoUZd1+06m2jL65EIqklmx05pfZ3H8R1/gk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yoshihiro Shimoda , Lad Prabhakar , Claudiu Beznea , Vinod Koul Subject: [PATCH 6.14 112/145] phy: renesas: rcar-gen3-usb2: Set timing registers only once Date: Tue, 20 May 2025 15:51:22 +0200 Message-ID: <20250520125814.940437068@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250520125810.535475500@linuxfoundation.org> References: <20250520125810.535475500@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Claudiu Beznea commit 86e70849f4b2b4597ac9f7c7931f2a363774be25 upstream. phy-rcar-gen3-usb2 driver exports 4 PHYs. The timing registers are common to all PHYs. There is no need to set them every time a PHY is initialized. Set timing register only when the 1st PHY is initialized. Fixes: f3b5a8d9b50d ("phy: rcar-gen3-usb2: Add R-Car Gen3 USB2 PHY driver") Cc: stable@vger.kernel.org Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Reviewed-by: Lad Prabhakar Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20250507125032.565017-6-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -463,8 +463,11 @@ static int rcar_gen3_phy_usb2_init(struc val = readl(usb2_base + USB2_INT_ENABLE); val |= USB2_INT_ENABLE_UCOM_INTEN | rphy->int_enable_bits; writel(val, usb2_base + USB2_INT_ENABLE); - writel(USB2_SPD_RSM_TIMSET_INIT, usb2_base + USB2_SPD_RSM_TIMSET); - writel(USB2_OC_TIMSET_INIT, usb2_base + USB2_OC_TIMSET); + + if (!rcar_gen3_is_any_rphy_initialized(channel)) { + writel(USB2_SPD_RSM_TIMSET_INIT, usb2_base + USB2_SPD_RSM_TIMSET); + writel(USB2_OC_TIMSET_INIT, usb2_base + USB2_OC_TIMSET); + } /* Initialize otg part (only if we initialize a PHY with IRQs). */ if (rphy->int_enable_bits)