RE: [PATCH v13 10/11] OMAP: dmtimer: mark clocksource and clockevent timers reserved

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In driver probe use sys_timer_reserved to identify which all timers
have already been used for clocksource and clockevent. Mark all those
timers as reserved so that no one else can use them.

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@xxxxxx>
---
Changed CONFIG_ARCH_OMAP2 to CONFIG_ARCH_OMAP2PLUS.

 arch/arm/plat-omap/dmtimer.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index e15b3a8..14d01ec 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -554,7 +554,13 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev)
 	timer->id = pdev->id;
 	timer->irq = irq->start;
 	timer->pdev = pdev;
-	timer->reserved = 0;
+#if defined(CONFIG_ARCH_OMAP2PLUS)
+	/* Mark clocksource and clockevent timers as reserved */
+	if ((sys_timer_reserved >> (pdev->id - 1)) & 0x1)
+		timer->reserved = 1;
+	else
+#endif
+		timer->reserved = 0;
 
 	 /* Skip pm_runtime_enable for OMAP1 */
 	if (!pdata->needs_manual_reset)
-- 
1.6.0.4

Attachment: 0010-OMAP-dmtimer-mark-clocksource-and-clockevent-timer.patch
Description: 0010-OMAP-dmtimer-mark-clocksource-and-clockevent-timer.patch


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux