[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200827131425.75998-1-paul@crapouillou.net>
Date: Thu, 27 Aug 2020 15:14:25 +0200
From: Paul Cercueil <paul@...pouillou.net>
To: Felipe Balbi <balbi@...nel.org>,
周琰杰 <zhouyanjie@...yeetech.com>,
周正 <sernia.zhou@...mail.com>,
漆鹏振 <aric.pzqi@...enic.com>
Cc: od@...c.me, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Paul Cercueil <paul@...pouillou.net>
Subject: [PATCH v2] USB: PHY: JZ4770: Fix uninitialized value written to HW register
The 'reg' value was written to a hardware register in
ingenic_usb_phy_init(), while not being initialized anywhere.
Fixes: 2a6c0b82e651 ("USB: PHY: JZ4770: Add support for new Ingenic SoCs.")
Signed-off-by: Paul Cercueil <paul@...pouillou.net>
---
drivers/usb/phy/phy-jz4770.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/phy/phy-jz4770.c b/drivers/usb/phy/phy-jz4770.c
index d4ee3cb721ea..f6d3731581eb 100644
--- a/drivers/usb/phy/phy-jz4770.c
+++ b/drivers/usb/phy/phy-jz4770.c
@@ -176,6 +176,7 @@ static int ingenic_usb_phy_init(struct usb_phy *phy)
/* Wait for PHY to reset */
usleep_range(30, 300);
+ reg = readl(priv->base + REG_USBPCR_OFFSET);
writel(reg & ~USBPCR_POR, priv->base + REG_USBPCR_OFFSET);
usleep_range(300, 1000);
--
2.28.0
Powered by blists - more mailing lists