diff options
author | Russell King - ARM Linux <linux@arm.linux.org.uk> | 2011-01-03 17:36:29 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-01-04 22:16:11 -0500 |
commit | 19386b3234fdbe4d33492574d83e63a8dace18d3 (patch) | |
tree | 0d362485f1dd6fc360f3b707ab2a97ff8b3f2d17 /drivers/dma | |
parent | 8c8cc2b1040f51a2f89724edbf976774128339eb (diff) |
ARM: PL08x: ensure loops use cpu_relax()
Tight loops should use cpu_relax() to allow CPUs to reduce power
consumption while waiting for events.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/amba-pl08x.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index e8967ff44fc2..78c84b3f903d 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c | |||
@@ -191,7 +191,7 @@ static void pl08x_set_cregs(struct pl08x_driver_data *pl08x, | |||
191 | { | 191 | { |
192 | /* Wait for channel inactive */ | 192 | /* Wait for channel inactive */ |
193 | while (pl08x_phy_channel_busy(ch)) | 193 | while (pl08x_phy_channel_busy(ch)) |
194 | ; | 194 | cpu_relax(); |
195 | 195 | ||
196 | dev_vdbg(&pl08x->adev->dev, | 196 | dev_vdbg(&pl08x->adev->dev, |
197 | "WRITE channel %d: csrc=0x%08x, cdst=0x%08x, " | 197 | "WRITE channel %d: csrc=0x%08x, cdst=0x%08x, " |
@@ -255,7 +255,7 @@ static void pl08x_enable_phy_chan(struct pl08x_driver_data *pl08x, | |||
255 | * Do not access config register until channel shows as disabled | 255 | * Do not access config register until channel shows as disabled |
256 | */ | 256 | */ |
257 | while (readl(pl08x->base + PL080_EN_CHAN) & (1 << ch->id)) | 257 | while (readl(pl08x->base + PL080_EN_CHAN) & (1 << ch->id)) |
258 | ; | 258 | cpu_relax(); |
259 | 259 | ||
260 | /* | 260 | /* |
261 | * Do not access config register until channel shows as inactive | 261 | * Do not access config register until channel shows as inactive |
@@ -288,7 +288,7 @@ static void pl08x_pause_phy_chan(struct pl08x_phy_chan *ch) | |||
288 | 288 | ||
289 | /* Wait for channel inactive */ | 289 | /* Wait for channel inactive */ |
290 | while (pl08x_phy_channel_busy(ch)) | 290 | while (pl08x_phy_channel_busy(ch)) |
291 | ; | 291 | cpu_relax(); |
292 | } | 292 | } |
293 | 293 | ||
294 | static void pl08x_resume_phy_chan(struct pl08x_phy_chan *ch) | 294 | static void pl08x_resume_phy_chan(struct pl08x_phy_chan *ch) |