We have always allowed the user to specify a timeout in waittimestamp but we never obeyed it. Reorgaize the function to be less convoluted and support a user specified timeout (or spin forever if 0 is passed). Change-Id: Ic0dedbadbc368336d05b14d66829205631046515 Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>