Commit f1f0c751 authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Greg Kroah-Hartman

usb: phy: tegra: Keep CPU interrupts enabled

There is no good reason for disabling of CPU interrupts in order to
protect the utmip_pad_count modification.
Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20200106013416.9604-17-digetx@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 92bd2ef2
...@@ -310,7 +310,6 @@ static int utmip_pad_power_on(struct tegra_usb_phy *phy) ...@@ -310,7 +310,6 @@ static int utmip_pad_power_on(struct tegra_usb_phy *phy)
{ {
struct tegra_utmip_config *config = phy->config; struct tegra_utmip_config *config = phy->config;
void __iomem *base = phy->pad_regs; void __iomem *base = phy->pad_regs;
unsigned long flags;
u32 val; u32 val;
int err; int err;
...@@ -318,7 +317,7 @@ static int utmip_pad_power_on(struct tegra_usb_phy *phy) ...@@ -318,7 +317,7 @@ static int utmip_pad_power_on(struct tegra_usb_phy *phy)
if (err) if (err)
return err; return err;
spin_lock_irqsave(&utmip_pad_lock, flags); spin_lock(&utmip_pad_lock);
if (utmip_pad_count++ == 0) { if (utmip_pad_count++ == 0) {
val = readl_relaxed(base + UTMIP_BIAS_CFG0); val = readl_relaxed(base + UTMIP_BIAS_CFG0);
...@@ -336,7 +335,7 @@ static int utmip_pad_power_on(struct tegra_usb_phy *phy) ...@@ -336,7 +335,7 @@ static int utmip_pad_power_on(struct tegra_usb_phy *phy)
writel_relaxed(val, base + UTMIP_BIAS_CFG0); writel_relaxed(val, base + UTMIP_BIAS_CFG0);
} }
spin_unlock_irqrestore(&utmip_pad_lock, flags); spin_unlock(&utmip_pad_lock);
clk_disable_unprepare(phy->pad_clk); clk_disable_unprepare(phy->pad_clk);
...@@ -346,7 +345,6 @@ static int utmip_pad_power_on(struct tegra_usb_phy *phy) ...@@ -346,7 +345,6 @@ static int utmip_pad_power_on(struct tegra_usb_phy *phy)
static int utmip_pad_power_off(struct tegra_usb_phy *phy) static int utmip_pad_power_off(struct tegra_usb_phy *phy)
{ {
void __iomem *base = phy->pad_regs; void __iomem *base = phy->pad_regs;
unsigned long flags;
u32 val; u32 val;
int ret; int ret;
...@@ -354,7 +352,7 @@ static int utmip_pad_power_off(struct tegra_usb_phy *phy) ...@@ -354,7 +352,7 @@ static int utmip_pad_power_off(struct tegra_usb_phy *phy)
if (ret) if (ret)
return ret; return ret;
spin_lock_irqsave(&utmip_pad_lock, flags); spin_lock(&utmip_pad_lock);
if (!utmip_pad_count) { if (!utmip_pad_count) {
dev_err(phy->u_phy.dev, "UTMIP pad already powered off\n"); dev_err(phy->u_phy.dev, "UTMIP pad already powered off\n");
...@@ -368,7 +366,7 @@ static int utmip_pad_power_off(struct tegra_usb_phy *phy) ...@@ -368,7 +366,7 @@ static int utmip_pad_power_off(struct tegra_usb_phy *phy)
writel_relaxed(val, base + UTMIP_BIAS_CFG0); writel_relaxed(val, base + UTMIP_BIAS_CFG0);
} }
ulock: ulock:
spin_unlock_irqrestore(&utmip_pad_lock, flags); spin_unlock(&utmip_pad_lock);
clk_disable_unprepare(phy->pad_clk); clk_disable_unprepare(phy->pad_clk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment