提交 d2ec147a 编写于 作者: H Hans de Goede 提交者: Tejun Heo

ahci_sunxi: Use msleep instead of mdelay

ahci_sunxi_phy_init is called from the probe and resume code paths, and
sleeping is safe in both, so use msleep instead of mdelay.
Signed-off-by: NHans de Goede <hdegoede@redhat.com>
Signed-off-by: NTejun Heo <tj@kernel.org>
上级 6ef95e87
...@@ -90,7 +90,7 @@ static int ahci_sunxi_phy_init(struct device *dev, void __iomem *reg_base) ...@@ -90,7 +90,7 @@ static int ahci_sunxi_phy_init(struct device *dev, void __iomem *reg_base)
/* This magic is from the original code */ /* This magic is from the original code */
writel(0, reg_base + AHCI_RWCR); writel(0, reg_base + AHCI_RWCR);
mdelay(5); msleep(5);
sunxi_setbits(reg_base + AHCI_PHYCS1R, BIT(19)); sunxi_setbits(reg_base + AHCI_PHYCS1R, BIT(19));
sunxi_clrsetbits(reg_base + AHCI_PHYCS0R, sunxi_clrsetbits(reg_base + AHCI_PHYCS0R,
...@@ -105,7 +105,7 @@ static int ahci_sunxi_phy_init(struct device *dev, void __iomem *reg_base) ...@@ -105,7 +105,7 @@ static int ahci_sunxi_phy_init(struct device *dev, void __iomem *reg_base)
(0x7 << 20), (0x3 << 20)); (0x7 << 20), (0x3 << 20));
sunxi_clrsetbits(reg_base + AHCI_PHYCS2R, sunxi_clrsetbits(reg_base + AHCI_PHYCS2R,
(0x1f << 5), (0x19 << 5)); (0x1f << 5), (0x19 << 5));
mdelay(5); msleep(5);
sunxi_setbits(reg_base + AHCI_PHYCS0R, (0x1 << 19)); sunxi_setbits(reg_base + AHCI_PHYCS0R, (0x1 << 19));
...@@ -137,7 +137,7 @@ static int ahci_sunxi_phy_init(struct device *dev, void __iomem *reg_base) ...@@ -137,7 +137,7 @@ static int ahci_sunxi_phy_init(struct device *dev, void __iomem *reg_base)
udelay(1); udelay(1);
} while (1); } while (1);
mdelay(15); msleep(15);
writel(0x7, reg_base + AHCI_RWCR); writel(0x7, reg_base + AHCI_RWCR);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册