[PATCH] rtc: rtc-mv: Add support for clk to avoid lockups

Jason Gunthorpe jgunthorpe at obsidianresearch.com
Mon Feb 4 01:24:26 EST 2013


On Sun, Feb 03, 2013 at 12:14:15PM +0100, Andrew Lunn wrote:
> > > +	pdata->clk = devm_clk_get(&pdev->dev, NULL);
> > > +	/* Not all SoCs require a clock.*/
> > > +	if (!IS_ERR(pdata->clk))
> > > +		clk_prepare_enable(pdata->clk);
> > > +
> > 
> > There are already I/O accesses to the RTC above this. Thus, you
> > probably need to move this up.
> 
> Doh!
> 
> I was trying to keep the cleanup on error simple....

Why is this stuff in the drivers anyhow? All the other kernel power
management seems to be done by the device core prior to probing the
device, why is clk different?

Jason



More information about the linux-arm-kernel mailing list