Messages in this thread | | | Date | Wed, 7 Mar 2012 19:40:22 -0300 | Subject | Re: [PATCH 1/3] drivers: base: add support for stmp-style devices | From | Fabio Estevam <> |
| |
On Wed, Mar 7, 2012 at 7:28 PM, Wolfram Sang <w.sang@pengutronix.de> wrote: ... > +static int stmp_clear_poll_bit(void __iomem *addr, u32 mask) > +{ > + int timeout = 0x400;
Could you please add a proper timeout mechanism here?
Something like: http://patchwork.ozlabs.org/patch/137365/
,as you suggested in the first place ;-)
> + > + writel(mask, addr + STMP_OFFSET_REG_CLR); > + udelay(1); > + while ((readl(addr) & mask) && --timeout) > + /* nothing */; > + > + return !timeout; > +} > + > +int stmp_reset_block(void __iomem *reset_addr) > +{ > + int ret; > + int timeout = 0x400;
Same here.
Regards,
Fabio Estevam -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |