diff options
author | Timur Tabi <timur@freescale.com> | 2009-05-26 05:21:41 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-16 14:15:44 +1000 |
commit | 9317726de42a157c377f7fe9110a63260800582f (patch) | |
tree | 14641c8adc6a56b289bdef8acc8b2cf18dbf90f7 /drivers/net/ps3_gelic_wireless.c | |
parent | 79290e4b692af8a76273bab38e41a3a385dedc7b (diff) |
powerpc: Introduce macro spin_event_timeout()
The macro spin_event_timeout() takes a condition and timeout value
(in microseconds) as parameters. It spins until either the condition is true
or the timeout expires. It returns the result of the condition when the loop
was terminated.
This primary purpose of this macro is to poll on a hardware register until a
status bit changes. The timeout ensures that the loop still terminates if the
bit doesn't change as expected. This macro makes it easier for driver
developers to perform this kind of operation properly.
Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Geoff Thorpe <Geoff.Thorpe@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/net/ps3_gelic_wireless.c')
0 files changed, 0 insertions, 0 deletions