[PATCH] Better timer and RTC handling for 8641HPCN.

Jon Loeliger jdl at freescale.com
Thu Mar 8 05:49:24 EST 2007


From: Zhang Wei <wei.zhang at freescale.com>

Give more IRQ numbers for MPIC IPIs and TIMERs use.
Added generic RTC support for MPC8641HPCN.

Signed-off-by: Zhang Wei <wei.zhang at freescale.com>
Signed-off-by: Jon Loeliger <jdl at freescale.com>
---
 arch/powerpc/platforms/86xx/mpc86xx_hpcn.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index f42f801..5ef6d61 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -28,7 +28,7 @@
 #include <mm/mmu_decl.h>
 #include <asm/udbg.h>
 #include <asm/i8259.h>
-
+#include <asm-generic/rtc.h>
 #include <asm/mpic.h>
 
 #include <sysdev/fsl_soc.h>
@@ -81,7 +81,7 @@ mpc86xx_hpcn_init_irq(void)
 	/* Alloc mpic structure and per isu has 16 INT entries. */
 	mpic1 = mpic_alloc(np, res.start,
 			MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
-			16, NR_IRQS - 4,
+			16, NR_IRQS - 10,
 			" MPIC     ");
 	BUG_ON(mpic1 == NULL);
 
@@ -452,4 +452,10 @@ define_machine(mpc86xx_hpcn) {
 	.time_init		= mpc86xx_time_init,
 	.calibrate_decr		= generic_calibrate_decr,
 	.progress		= udbg_progress,
+
+#ifdef CONFIG_GEN_RTC
+	/* RTC interface, using functions in include/asm-generic/rtc.h */
+	.get_rtc_time		= get_rtc_time,
+	.set_rtc_time		= set_rtc_time,
+#endif
 };
-- 
1.5.0.1.213.g509b






More information about the Linuxppc-dev mailing list