Signed-off-by: Matthijs Kooijman <[email protected]>
---
drivers/staging/dwc2/hcd_intr.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/dwc2/hcd_intr.c b/drivers/staging/dwc2/hcd_intr.c
index 12b5a89..281c2f4 100644
--- a/drivers/staging/dwc2/hcd_intr.c
+++ b/drivers/staging/dwc2/hcd_intr.c
@@ -245,6 +245,7 @@ static void dwc2_hprt0_enable(struct dwc2_hsotg *hsotg, u32
hprt0,
u32 usbcfg;
u32 prtspd;
u32 hcfg;
+ u32 fslspclksel;
u32 hfir;
dev_vdbg(hsotg->dev, "%s(%p)\n", __func__, hsotg);
@@ -276,6 +277,7 @@ static void dwc2_hprt0_enable(struct dwc2_hsotg *hsotg, u32
hprt0,
}
hcfg = readl(hsotg->regs + HCFG);
+ fslspclksel = hcfg & HCFG_FSLSPCLKSEL_MASK;
if (prtspd == HPRT0_SPD_LOW_SPEED &&
params->host_ls_low_power_phy_clk ==
@@ -283,8 +285,7 @@ static void dwc2_hprt0_enable(struct dwc2_hsotg *hsotg, u32
hprt0,
/* 6 MHZ */
dev_vdbg(hsotg->dev,
"FS_PHY programming HCFG to 6 MHz\n");
- if ((hcfg & HCFG_FSLSPCLKSEL_MASK) !=
- HCFG_FSLSPCLKSEL_6_MHZ) {
+ if (fslspclksel != HCFG_FSLSPCLKSEL_6_MHZ) {
hcfg &= ~HCFG_FSLSPCLKSEL_MASK;
hcfg |= HCFG_FSLSPCLKSEL_6_MHZ;
writel(hcfg, hsotg->regs + HCFG);
@@ -294,8 +295,7 @@ static void dwc2_hprt0_enable(struct dwc2_hsotg *hsotg, u32
hprt0,
/* 48 MHZ */
dev_vdbg(hsotg->dev,
"FS_PHY programming HCFG to 48 MHz\n");
- if ((hcfg & HCFG_FSLSPCLKSEL_MASK) !=
- HCFG_FSLSPCLKSEL_48_MHZ) {
+ if (fslspclksel != HCFG_FSLSPCLKSEL_48_MHZ) {
hcfg &= ~HCFG_FSLSPCLKSEL_MASK;
hcfg |= HCFG_FSLSPCLKSEL_48_MHZ;
writel(hcfg, hsotg->regs + HCFG);
--
1.8.0
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html