From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 21 Jan 2016 14:11:00 -0500 Subject: [U-Boot] [PATCH v3 1/5] lib: Add wait_for_bit In-Reply-To: <569FF62C.6000906@gmail.com> References: <1451237293-24497-1-git-send-email-mateusz.kulikowski@gmail.com> <1451237293-24497-2-git-send-email-mateusz.kulikowski@gmail.com> <569FF62C.6000906@gmail.com> Message-ID: <20160121191100.GG3359@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > 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: