Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1568036
| From | Gerd Hoffmann <kraxel@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 01/13] mmc: bcm2835: add bcm2835_read_wait_sdcmd |
| Date | 2017-01-27 11:50 +0100 |
| Message-ID | <t4cgq-2YU-5@gated-at.bofh.it> (permalink) |
| References | <t41O1-5cG-3@gated-at.bofh.it> <t41O2-5cG-15@gated-at.bofh.it> <t449b-6GZ-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hi,
> > + for (;;) {
> > + value = readl(host->ioaddr + SDCMD);
> > + if (!(value & SDCMD_NEW_FLAG))
> > + break;
> > + if (check_fail && (value & SDCMD_FAIL_FLAG))
> > + break;
> > + if (time_after(jiffies, end)) {
> > + dev_err(dev, "%s: timeout (%d us)\n",
> > + __func__, timeout);
> > + break;
> > + }
> > +
> > + /* if it takes longer reduce poll interval */
> > + if (time_after(jiffies, fastpoll))
> > + udelay(10);
> > + else
> > + cpu_relax();
> > + }
>
> Use readl_poll_timeout intead of open-coding them..
Cool. Didn't know this exists. Incremental fixup attached.
thanks,
Gerd
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 01/13] mmc: bcm2835: add bcm2835_read_wait_sdcmd Gerd Hoffmann <kraxel@redhat.com> - 2017-01-27 00:40 +0100
Re: [PATCH 01/13] mmc: bcm2835: add bcm2835_read_wait_sdcmd Florian Fainelli <f.fainelli@gmail.com> - 2017-01-27 01:00 +0100
Re: [PATCH 01/13] mmc: bcm2835: add bcm2835_read_wait_sdcmd Gerd Hoffmann <kraxel@redhat.com> - 2017-01-27 09:10 +0100
Re: [PATCH 01/13] mmc: bcm2835: add bcm2835_read_wait_sdcmd Florian Fainelli <f.fainelli@gmail.com> - 2017-01-27 19:30 +0100
Re: [PATCH 01/13] mmc: bcm2835: add bcm2835_read_wait_sdcmd Shawn Lin <shawn.lin@rock-chips.com> - 2017-01-27 03:10 +0100
Re: [PATCH 01/13] mmc: bcm2835: add bcm2835_read_wait_sdcmd Gerd Hoffmann <kraxel@redhat.com> - 2017-01-27 11:50 +0100
csiph-web