Commit 7f3be017 authored by Baruch Siach's avatar Baruch Siach Committed by Eduardo Valentin

thermal: armada: Use msleep for long delays

Use msleep for long (> 10ms) delays, instead of the busy waiting mdelay.
All delays are called from the probe routine, where scheduling is
allowed.
Signed-off-by: default avatarBaruch Siach <baruch@tkos.co.il>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@free-electrons.com>
Reviewed-by: default avatarGregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent 7ba03c25
...@@ -113,7 +113,7 @@ static void armada370_init_sensor(struct platform_device *pdev, ...@@ -113,7 +113,7 @@ static void armada370_init_sensor(struct platform_device *pdev,
reg &= ~PMU_TDC0_START_CAL_MASK; reg &= ~PMU_TDC0_START_CAL_MASK;
writel(reg, priv->control); writel(reg, priv->control);
mdelay(10); msleep(10);
} }
static void armada375_init_sensor(struct platform_device *pdev, static void armada375_init_sensor(struct platform_device *pdev,
...@@ -127,11 +127,11 @@ static void armada375_init_sensor(struct platform_device *pdev, ...@@ -127,11 +127,11 @@ static void armada375_init_sensor(struct platform_device *pdev,
reg &= ~A375_HW_RESETn; reg &= ~A375_HW_RESETn;
writel(reg, priv->control + 4); writel(reg, priv->control + 4);
mdelay(20); msleep(20);
reg |= A375_HW_RESETn; reg |= A375_HW_RESETn;
writel(reg, priv->control + 4); writel(reg, priv->control + 4);
mdelay(50); msleep(50);
} }
static void armada380_init_sensor(struct platform_device *pdev, static void armada380_init_sensor(struct platform_device *pdev,
...@@ -143,7 +143,7 @@ static void armada380_init_sensor(struct platform_device *pdev, ...@@ -143,7 +143,7 @@ static void armada380_init_sensor(struct platform_device *pdev,
if (!(reg & A380_HW_RESET)) { if (!(reg & A380_HW_RESET)) {
reg |= A380_HW_RESET; reg |= A380_HW_RESET;
writel(reg, priv->control); writel(reg, priv->control);
mdelay(10); msleep(10);
} }
} }
......
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