Title: [6494] branches/2009R1/arch/blackfin: Port commit 6491,6492,6493 to branche 2009R1

Diff

Modified: branches/2009R1/arch/blackfin/Kconfig (6493 => 6494)


--- branches/2009R1/arch/blackfin/Kconfig	2009-05-27 09:58:35 UTC (rev 6493)
+++ branches/2009R1/arch/blackfin/Kconfig	2009-05-27 10:05:27 UTC (rev 6494)
@@ -223,6 +223,7 @@
 
 config SMP
 	depends on BF561
+	select GENERIC_TIME
 	bool "Symmetric multi-processing support"
 	---help---
 	  This enables support for systems with more than one CPU,
@@ -601,6 +602,7 @@
 
 config GENERIC_TIME
 	bool "Generic time"
+	depends on !IPIPE
 	default y
 
 config GENERIC_CLOCKEVENTS

Modified: branches/2009R1/arch/blackfin/kernel/time-ts.c (6493 => 6494)


--- branches/2009R1/arch/blackfin/kernel/time-ts.c	2009-05-27 09:58:35 UTC (rev 6493)
+++ branches/2009R1/arch/blackfin/kernel/time-ts.c	2009-05-27 10:05:27 UTC (rev 6494)
@@ -150,7 +150,7 @@
 		struct clock_event_device *);
 
 static struct clock_event_device clockevent_bfin = {
-#if defined(CONFIG_TICKSOURCE_GPTMR0) || defined(CONFIG_IPIPE)
+#if defined(CONFIG_TICKSOURCE_GPTMR0)
 	.name		= "bfin_gptimer0",
 	.rating		= 300,
 	.irq		= IRQ_TIMER0,
@@ -167,7 +167,7 @@
 };
 
 static struct irqaction bfin_timer_irq = {
-#if defined(CONFIG_TICKSOURCE_GPTMR0) || defined(CONFIG_IPIPE)
+#if defined(CONFIG_TICKSOURCE_GPTMR0)
 	.name		= "Blackfin GPTimer0",
 #else
 	.name		= "Blackfin CoreTimer",
@@ -178,7 +178,7 @@
 	.dev_id		= &clockevent_bfin,
 };
 
-#if defined(CONFIG_TICKSOURCE_GPTMR0) || defined(CONFIG_IPIPE)
+#if defined(CONFIG_TICKSOURCE_GPTMR0)
 static int bfin_timer_set_next_event(unsigned long cycles,
                                      struct clock_event_device *evt)
 {
@@ -310,7 +310,7 @@
 	bfin_timer_init();
 	bfin_timer_set_mode(CLOCK_EVT_MODE_PERIODIC, NULL);
 }
-#endif /* CONFIG_TICKSOURCE_GPTMR0 || CONFIG_IPIPE */
+#endif /* CONFIG_TICKSOURCE_GPTMR0 */
 
 /*
  * timer_interrupt() needs to keep up the real-time clock,

Modified: branches/2009R1/arch/blackfin/kernel/time.c (6493 => 6494)


--- branches/2009R1/arch/blackfin/kernel/time.c	2009-05-27 09:58:35 UTC (rev 6493)
+++ branches/2009R1/arch/blackfin/kernel/time.c	2009-05-27 10:05:27 UTC (rev 6494)
@@ -24,14 +24,10 @@
 
 static struct irqaction bfin_timer_irq = {
 	.name = "Blackfin Timer Tick",
-#ifdef CONFIG_IRQ_PER_CPU
-	.flags = IRQF_DISABLED | IRQF_PERCPU,
-#else
 	.flags = IRQF_DISABLED
-#endif
 };
 
-#if defined(CONFIG_TICKSOURCE_GPTMR0) || defined(CONFIG_IPIPE)
+#if defined(CONFIG_IPIPE)
 void __init setup_system_timer0(void)
 {
 	/* Power down the core timer, just to play safe. */
@@ -74,7 +70,7 @@
 static void __init
 time_sched_init(irqreturn_t(*timer_routine) (int, void *))
 {
-#if defined(CONFIG_TICKSOURCE_GPTMR0) || defined(CONFIG_IPIPE)
+#if defined(CONFIG_IPIPE)
 	setup_system_timer0();
 	bfin_timer_irq.handler = timer_routine;
 	setup_irq(IRQ_TIMER0, &bfin_timer_irq);
@@ -94,7 +90,7 @@
 	unsigned long offset;
 	unsigned long clocks_per_jiffy;
 
-#if defined(CONFIG_TICKSOURCE_GPTMR0) || defined(CONFIG_IPIPE)
+#if defined(CONFIG_IPIPE)
 	clocks_per_jiffy = bfin_read_TIMER0_PERIOD();
 	offset = bfin_read_TIMER0_COUNTER() / \
 		(((clocks_per_jiffy + 1) * HZ) / USEC_PER_SEC);
@@ -133,36 +129,25 @@
 	static long last_rtc_update;
 
 	write_seqlock(&xtime_lock);
-#if defined(CONFIG_TICKSOURCE_GPTMR0) && !defined(CONFIG_IPIPE)
+	do_timer(1);
+
 	/*
-	 * TIMIL0 is latched in __ipipe_grab_irq() when the I-Pipe is
-	 * enabled.
+	 * If we have an externally synchronized Linux clock, then update
+	 * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
+	 * called as close as possible to 500 ms before the new second starts.
 	 */
-	if (get_gptimer_status(0) & TIMER_STATUS_TIMIL0) {
-#endif
-		do_timer(1);
-
-		/*
-		 * If we have an externally synchronized Linux clock, then update
-		 * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
-		 * called as close as possible to 500 ms before the new second starts.
-		 */
-		if (ntp_synced() &&
-		    xtime.tv_sec > last_rtc_update + 660 &&
-		    (xtime.tv_nsec / NSEC_PER_USEC) >=
-		    500000 - ((unsigned)TICK_SIZE) / 2
-		    && (xtime.tv_nsec / NSEC_PER_USEC) <=
-		    500000 + ((unsigned)TICK_SIZE) / 2) {
-			if (set_rtc_mmss(xtime.tv_sec) == 0)
-				last_rtc_update = xtime.tv_sec;
-			else
-				/* Do it again in 60s. */
-				last_rtc_update = xtime.tv_sec - 600;
-		}
-#if defined(CONFIG_TICKSOURCE_GPTMR0) && !defined(CONFIG_IPIPE)
-		set_gptimer_status(0, TIMER_STATUS_TIMIL0);
+	if (ntp_synced() &&
+	    xtime.tv_sec > last_rtc_update + 660 &&
+	    (xtime.tv_nsec / NSEC_PER_USEC) >=
+	    500000 - ((unsigned)TICK_SIZE) / 2
+	    && (xtime.tv_nsec / NSEC_PER_USEC) <=
+	    500000 + ((unsigned)TICK_SIZE) / 2) {
+		if (set_rtc_mmss(xtime.tv_sec) == 0)
+			last_rtc_update = xtime.tv_sec;
+		else
+			/* Do it again in 60s. */
+			last_rtc_update = xtime.tv_sec - 600;
 	}
-#endif
 	write_sequnlock(&xtime_lock);
 
 #ifdef CONFIG_IPIPE

Modified: branches/2009R1/arch/blackfin/mach-common/ints-priority.c (6493 => 6494)


--- branches/2009R1/arch/blackfin/mach-common/ints-priority.c	2009-05-27 09:58:35 UTC (rev 6493)
+++ branches/2009R1/arch/blackfin/mach-common/ints-priority.c	2009-05-27 10:05:27 UTC (rev 6494)
@@ -1052,7 +1052,7 @@
 			set_irq_chained_handler(irq, bfin_demux_error_irq);
 			break;
 #endif
-#if defined(CONFIG_TICK_SOURCE_SYSTMR0) || defined(CONFIG_IPIPE)
+#if defined(CONFIG_TICKSOURCE_GPTMR0)
 		case IRQ_TIMER0:
 			set_irq_handler(irq, handle_percpu_irq);
 			break;

Modified: branches/2009R1/arch/blackfin/mach-common/smp.c (6493 => 6494)


--- branches/2009R1/arch/blackfin/mach-common/smp.c	2009-05-27 09:58:35 UTC (rev 6493)
+++ branches/2009R1/arch/blackfin/mach-common/smp.c	2009-05-27 10:05:27 UTC (rev 6494)
@@ -357,7 +357,7 @@
 
 static void __cpuinit setup_secondary(unsigned int cpu)
 {
-#if !(defined(CONFIG_TICKSOURCE_GPTMR0) || defined(CONFIG_IPIPE))
+#if !(defined(CONFIG_TICKSOURCE_GPTMR0))
 	struct irq_desc *timer_desc;
 #endif
 	unsigned long ilat;
@@ -375,7 +375,7 @@
 	    IMASK_IVG14 | IMASK_IVG13 | IMASK_IVG12 | IMASK_IVG11 |
 	    IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | IMASK_IVGHW;
 
-#if defined(CONFIG_TICKSOURCE_GPTMR0) || defined(CONFIG_IPIPE)
+#if defined(CONFIG_TICKSOURCE_GPTMR0)
 	/* Power down the core timer, just to play safe. */
 	bfin_write_TCNTL(0);
 
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to