rk29: support oprofile
author黄涛 <huangtao@rock-chips.com>
Mon, 10 Jan 2011 11:27:00 +0000 (19:27 +0800)
committer黄涛 <huangtao@rock-chips.com>
Mon, 10 Jan 2011 11:27:00 +0000 (19:27 +0800)
arch/arm/common/gic.c
arch/arm/oprofile/op_model_v7.c

index 337741f734ac08d7f438e5d6240293adf3c5c366..458a9ea676fcee29e85820c314017904e1f1f934 100755 (executable)
@@ -192,11 +192,16 @@ void __init gic_dist_init(unsigned int gic_nr, void __iomem *base,
 
        writel(0, base + GIC_DIST_CTRL);
 
+#ifdef CONFIG_ARCH_RK29
+       /* rk29 read GIC_DIST_CTR is 2, why? */
+       max_irq = NR_AIC_IRQS;
+#else
        /*
         * Find out how many interrupts are supported.
         */
        max_irq = readl(base + GIC_DIST_CTR) & 0x1f;
        max_irq = (max_irq + 1) * 32;
+#endif
 
        /*
         * The GIC only supports up to 1020 interrupt sources.
index f20295f14adbdd49ec3751c693120fd15339dbc1..50fa78fa227f4fc7cf15582949d3985ad50a6de8 100644 (file)
@@ -368,6 +368,9 @@ static void armv7_pmnc_dump_regs(void)
 
 
 static int irqs[] = {
+#ifdef CONFIG_ARCH_RK29
+       IRQ_A8IRQ3,
+#endif
 #ifdef CONFIG_ARCH_OMAP3
        INT_34XX_BENCH_MPU_EMUL,
 #endif