It is sometimes necessary to poll a memory-mapped register until its value satisfies some condition. Introduce a family of convenience macros that do this. Tight-loop and sleeping versions are provided with and without timeouts. Signed-off-by: Matt Wagantall <mattw@codeaurora.org> Change-Id: Ia7db00cbe60ded8b0ed9bbff264aaea0841da92a (cherry picked from commit b3ed9c113825d4d55d24a77d006fa2cd21a361ef)