Skip to content

Commit

Permalink
thermal: armada: Use msleep for long delays
Browse files Browse the repository at this point in the history
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: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
  • Loading branch information
Baruch Siach authored and Eduardo Valentin committed Jan 1, 2018
1 parent 7ba03c2 commit 7f3be01
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/thermal/armada_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static void armada370_init_sensor(struct platform_device *pdev,
reg &= ~PMU_TDC0_START_CAL_MASK;
writel(reg, priv->control);

mdelay(10);
msleep(10);
}

static void armada375_init_sensor(struct platform_device *pdev,
Expand All @@ -127,11 +127,11 @@ static void armada375_init_sensor(struct platform_device *pdev,
reg &= ~A375_HW_RESETn;

writel(reg, priv->control + 4);
mdelay(20);
msleep(20);

reg |= A375_HW_RESETn;
writel(reg, priv->control + 4);
mdelay(50);
msleep(50);
}

static void armada380_init_sensor(struct platform_device *pdev,
Expand All @@ -143,7 +143,7 @@ static void armada380_init_sensor(struct platform_device *pdev,
if (!(reg & A380_HW_RESET)) {
reg |= A380_HW_RESET;
writel(reg, priv->control);
mdelay(10);
msleep(10);
}
}

Expand Down

0 comments on commit 7f3be01

Please sign in to comment.