Title: [4111] trunk: Fix bug[#3820] Only RTC interrupt can wake up deeper sleep core.
Revision
4111
Author
sonicz
Date
2008-01-17 00:38:24 -0600 (Thu, 17 Jan 2008)

Log Message

Fix bug[#3820] Only RTC interrupt can wake up deeper sleep core.

Diffstat

 arch/blackfin/Kconfig  |    8 ++++----
 drivers/rtc/rtc-bfin.c |   28 ++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 4 deletions(-)

Modified Paths

Diff

Modified: trunk/arch/blackfin/Kconfig (4110 => 4111)


--- trunk/arch/blackfin/Kconfig	2008-01-17 01:12:58 UTC (rev 4110)
+++ trunk/arch/blackfin/Kconfig	2008-01-17 06:38:24 UTC (rev 4111)
@@ -919,10 +919,10 @@
 config PM_WAKEUP_SIC_IWR
 	hex "Wakeup Events (SIC_IWR)"
 	depends on PM_WAKEUP_GPIO_BY_SIC_IWR
-	default 0x80000000 if (BF537 || BF536 || BF534)
-	default 0x100000 if (BF533 || BF532 || BF531)
-	default 0x800000 if (BF54x)
-	default 0x800000 if (BF52x)
+	default 0x8 if (BF537 || BF536 || BF534)
+	default 0x80 if (BF533 || BF532 || BF531)
+	default 0x80 if (BF54x)
+	default 0x80 if (BF52x)
 
 config PM_WAKEUP_GPIO_NUMBER
 	int "Wakeup GPIO number"

Modified: trunk/drivers/rtc/rtc-bfin.c (4110 => 4111)


--- trunk/drivers/rtc/rtc-bfin.c	2008-01-17 01:12:58 UTC (rev 4110)
+++ trunk/drivers/rtc/rtc-bfin.c	2008-01-17 06:38:24 UTC (rev 4111)
@@ -430,6 +430,30 @@
 	return 0;
 }
 
+#ifdef CONFIG_PM
+static int bfin_rtc_suspend(struct platform_device *pdev, pm_message_t state)
+{
+#ifdef PM_WAKEUP_SIC_IWR
+	struct bfin_rtc *rtc = dev_get_drvdata(&pdev->dev);
+#endif
+	bfin_rtc_reset(&pdev->dev);
+#ifdef PM_WAKEUP_SIC_IWR
+	bfin_write_RTC_SWCNT(10);
+	bfin_rtc_int_set(rtc, RTC_ISTAT_STOPWATCH);
+#endif
+	return 0;
+}
+
+static int bfin_rtc_resume(struct platform_device *pdev)
+{
+#ifdef PM_WAKEUP_SIC_IWR
+	struct bfin_rtc *rtc = dev_get_drvdata(&pdev->dev);
+	bfin_rtc_int_clear(rtc, RTC_ISTAT_STOPWATCH);
+#endif
+	return 0;
+}
+#endif
+
 static struct platform_driver bfin_rtc_driver = {
 	.driver		= {
 		.name	= "rtc-bfin",
@@ -437,6 +461,10 @@
 	},
 	.probe		= bfin_rtc_probe,
 	.remove		= __devexit_p(bfin_rtc_remove),
+#ifdef CONFIG_PM
+	.suspend	= bfin_rtc_suspend,
+	.resume		= bfin_rtc_resume,
+#endif
 };
 
 static int __init bfin_rtc_init(void)
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to