spi/pl022: use cpu_relax in the busy loop
authorLinus Walleij <linus.walleij@stericsson.com>
Thu, 19 May 2011 18:01:25 +0000 (20:01 +0200)
committerGrant Likely <grant.likely@secretlab.ca>
Fri, 20 May 2011 06:43:07 +0000 (00:43 -0600)
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>
drivers/spi/amba-pl022.c

index 18667de..8a2b88a 100644 (file)
@@ -1424,6 +1424,7 @@ static void do_polling_transfer(struct pl022 *pl022)
                                message->state = STATE_ERROR;
                                goto out;
                        }
+                       cpu_relax();
                }
 
                /* Update total byte transferred */