This is a note to let you know that I've just added the patch titled

    drivers/rtc/rtc-sirfsoc.c: move hardware initilization earlier in probe

to the 3.18-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     
drivers-rtc-rtc-sirfsoc.c-move-hardware-initilization-earlier-in-probe.patch
and it can be found in the queue-3.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 0e95325525c4383565cea4f402f15a3113162d05 Mon Sep 17 00:00:00 2001
From: Guo Zeng <[email protected]>
Date: Wed, 10 Dec 2014 15:52:24 -0800
Subject: drivers/rtc/rtc-sirfsoc.c: move hardware initilization earlier in probe

From: Guo Zeng <[email protected]>

commit 0e95325525c4383565cea4f402f15a3113162d05 upstream.

Move rtc register to be later than hardware initialization.  The reason
is that devm_rtc_device_register() will do read_time() which is a
callback accessing hardware.  This sometimes causes a hang in the
hardware related callback.

Signed-off-by: Guo Zeng <[email protected]>
Signed-off-by: Barry Song <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/rtc/rtc-sirfsoc.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

--- a/drivers/rtc/rtc-sirfsoc.c
+++ b/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 stable-queue which might be from [email protected] are

queue-3.18/drivers-rtc-rtc-sirfsoc.c-move-hardware-initilization-earlier-in-probe.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to