[U-Boot] [PATCH v3 1/5] lib: Add wait_for_bit

Tom Rini
2016-01-21T19:11:00Z

On Wed, Jan 20, 2016 at 10:03:40PM +0100, Mateusz Kulikowski wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Hi,
>
> On 20.01.2016 05:34, Simon Glass wrote:
> [...]
> > On 27 December 2015 at 10:28, Mateusz Kulikowski
> > <mateusz.kulikowski@gmail.com> wrote:
> >> Add function to poll register waiting for specific bit(s).
> >> Similar functions are implemented in few drivers - they are almost
> >> identical and can be generalized.
> [...]
> >
> > Sorry I only just saw this, but thought I'd make a few comments.
>
> Nooo, I was expecting at least this to be merged during this merge window :)
>
> [...]
> >> + *
> >> + * @param prefix Prefix added to timeout messagge (message visible only
> >> + * with debug enabled)
> >> + * @param reg Register that will be read (using readl())
> >> + * @param mask Bit(s) of register that must be active
> >> + * @param set Selects wait condition (bit set or clear)
> >> + * @param timeout Timeout (in miliseconds)
> >> + * @param breakable Enables CTRL-C interruption
> >> + * @return 0 on success, -ETIMEDOUT or -EINTR on failure
> >> + */
> >> +static inline int wait_for_bit(const char *prefix, const u32 *reg,
> >> + const u32 mask, const bool set,
> >> + const unsigned int timeout,
> >
> > timeout_ms would be more obvious
>
> This may be a good idea to make it more foolproof -
>
> @trini: Will v4 with small change like that delay merging this series into mainline?

Nope, just get it posted soon please :)

--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160121/f6b26df9/attachment.sig>