[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5C9EDi_Hy-8=iphr+154gyPgBLnjSVV0seLgi+HoK4zRw@mail.gmail.com>
Date: Wed, 7 Mar 2012 19:40:22 -0300
From: Fabio Estevam <festevam@...il.com>
To: Wolfram Sang <w.sang@...gutronix.de>
Cc: linux-arm-kernel@...ts.infradead.org,
Arnd Bergmann <arnd@...db.de>, Greg KH <gregkh@...e.de>,
linux-kernel@...r.kernel.org, Huang Shijie <b32955@...escale.com>,
Shawn Guo <shawn.guo@...aro.org>
Subject: Re: [PATCH 1/3] drivers: base: add support for stmp-style devices
On Wed, Mar 7, 2012 at 7:28 PM, Wolfram Sang <w.sang@...gutronix.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists