Skip to content

Commit

Permalink
spi/pl022: use cpu_relax in the busy loop
Browse files Browse the repository at this point in the history
This relaxes the cpu in the polling busy-wait loop.

Reported-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Linus Walleij authored and Grant Likely committed May 20, 2011
1 parent 7f9a4b9 commit 521999b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/spi/amba-pl022.c
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,7 @@ static void do_polling_transfer(struct pl022 *pl022)
message->state = STATE_ERROR;
goto out;
}
cpu_relax();
}

/* Update total byte transferred */
Expand Down

0 comments on commit 521999b

Please sign in to comment.