The patch titled Subject: drivers/rtc/rtc-sirfsoc.c: move hardware initilization earlier in probe has been added to the -mm tree. Its filename is drivers-rtc-rtc-sirfsocc-move-hardware-initilization-earlier-in-probe.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/drivers-rtc-rtc-sirfsocc-move-hardware-initilization-earlier-in-probe.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/drivers-rtc-rtc-sirfsocc-move-hardware-initilization-earlier-in-probe.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Guo Zeng <guo.zeng@xxxxxxx> Subject: drivers/rtc/rtc-sirfsoc.c: move hardware initilization earlier in probe Move rtc register to be later than hardware initilization. the reason is that devm_rtc_device_register() will do read_time() which is a callback accessing hardware. this sometimes causes hang in the hardware related callback. Signed-off-by: Guo Zeng <guo.zeng@xxxxxxx> Signed-off-by: Barry Song <Baohua.Song@xxxxxxx> Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/rtc-sirfsoc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff -puN drivers/rtc/rtc-sirfsoc.c~drivers-rtc-rtc-sirfsocc-move-hardware-initilization-earlier-in-probe drivers/rtc/rtc-sirfsoc.c --- a/drivers/rtc/rtc-sirfsoc.c~drivers-rtc-rtc-sirfsocc-move-hardware-initilization-earlier-in-probe +++ a/drivers/rtc/rtc-sirfsoc.c @@ -286,14 +286,6 @@ static int sirfsoc_rtc_probe(struct plat rtc_div = ((32768 / RTC_HZ) / 2) - 1; sirfsoc_rtc_iobrg_writel(rtc_div, rtcdrv->rtc_base + RTC_DIV); - rtcdrv->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, - &sirfsoc_rtc_ops, THIS_MODULE); - if (IS_ERR(rtcdrv->rtc)) { - err = PTR_ERR(rtcdrv->rtc); - dev_err(&pdev->dev, "can't register RTC device\n"); - return err; - } - /* 0x3 -> RTC_CLK */ sirfsoc_rtc_iobrg_writel(SIRFSOC_RTC_CLK, rtcdrv->rtc_base + RTC_CLOCK_SWITCH); @@ -308,6 +300,14 @@ static int sirfsoc_rtc_probe(struct plat rtcdrv->overflow_rtc = sirfsoc_rtc_iobrg_readl(rtcdrv->rtc_base + RTC_SW_VALUE); + rtcdrv->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, + &sirfsoc_rtc_ops, THIS_MODULE); + if (IS_ERR(rtcdrv->rtc)) { + err = PTR_ERR(rtcdrv->rtc); + dev_err(&pdev->dev, "can't register RTC device\n"); + return err; + } + rtcdrv->irq = platform_get_irq(pdev, 0); err = devm_request_irq( &pdev->dev, _ Patches currently in -mm which might be from guo.zeng@xxxxxxx are drivers-rtc-rtc-sirfsocc-move-hardware-initilization-earlier-in-probe.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html