void __init init_shmse_IRQ(void)
{
	ctrl_outw(0x0028, 0xb0a00000);	// mode set [active low].
	ctrl_outw(0x000a, INTC_ICR1);	// IRQ mode; IRQ0,1 enable.
 	/* PC_IRQ[0-3] -> IRQ0 (32) */
        make_ipr_irq( IRQ0_IRQ, IRQ0_IPR_ADDR, IRQ0_IPR_POS, 0x0f-IRQ0_IRQ);
        /* A_IRQ[0-3] -> IRQ1 (33) */
        make_ipr_irq( IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, 0x0f-IRQ1_IRQ);
}
Example #2
0
static void __init init_snapgear_IRQ(void)
{
	/* enable individual interrupt mode for externals */
	ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR);

	printk("Setup SnapGear IRQ/IPR ...\n");

	make_ipr_irq(IRL0_IRQ, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY);
	make_ipr_irq(IRL1_IRQ, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY);
	make_ipr_irq(IRL2_IRQ, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY);
	make_ipr_irq(IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY);
}
Example #3
0
static void setup_fast_timer()
{
	unsigned long interval;

#ifdef FAST_POLL_INTR
	interval = (current_cpu_data.module_clock/4 + FAST_POLL/2) / FAST_POLL;

	make_ipr_irq(FASTTIMER_IRQ, FASTTIMER_IPR_ADDR, FASTTIMER_IPR_POS,
			FASTTIMER_PRIORITY);

	printk("SnapGear: %dHz fast timer on IRQ %d\n",FAST_POLL,FASTTIMER_IRQ);

	if (request_irq(FASTTIMER_IRQ, fast_timer_irq, 0, "SnapGear fast timer",
			NULL) != 0)
		printk("%s(%d): request_irq() failed?\n", __FILE__, __LINE__);
#else
	printk("SnapGear: fast timer running\n",FAST_POLL,FASTTIMER_IRQ);
	interval = 0xffffffff;
#endif

	ctrl_outb(ctrl_inb(TMU_TSTR) & ~0x2, TMU_TSTR); /* disable timer 1 */
	ctrl_outw(TMU1_TCR_INIT, TMU1_TCR);
	ctrl_outl(interval, TMU1_TCOR);
	ctrl_outl(interval, TMU1_TCNT);
	ctrl_outb(ctrl_inb(TMU_TSTR) | 0x2, TMU_TSTR); /* enable timer 1 */

	printk("Timer count 1 = 0x%x\n", fast_timer_count());
	udelay(1000);
	printk("Timer count 2 = 0x%x\n", fast_timer_count());
}
Example #4
0
static int __init sh_dmac_init(void)
{
	struct dma_info *info = &sh_dmac_info;
	int i;

#ifdef CONFIG_CPU_SH4
	make_ipr_irq(DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY);
	i = request_irq(DMAE_IRQ, dma_err, SA_INTERRUPT, "DMAC Address Error", 0);
	if (i < 0)
		return i;
#endif

	for (i = 0; i < info->nr_channels; i++) {
		int irq = get_dmte_irq(i);

		make_ipr_irq(irq, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY);
	}

	ctrl_outl(0x8000 | DMAOR_DME, DMAOR);

	return register_dmac(info);
}
Example #5
0
static int __init sh_dmac_init(void)
{
	int i;

#ifdef CONFIG_CPU_SH4
	make_ipr_irq(DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY);
	i = request_irq(DMAE_IRQ, dma_err, SA_INTERRUPT, "DMAC Address Error", 0);
	if (i < 0)
		return i;
#endif

	for (i = 0; i < MAX_DMAC_CHANNELS; i++) {
		int irq = get_dmte_irq(i);

		make_ipr_irq(irq, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY);

		dma_info[i].ops = &sh_dmac_ops;
		dma_info[i].tei_capable = 1;
	}

	sh_dmac->dmaor |= 0x8000 | DMAOR_DME;

	return register_dmac(&sh_dmac_ops);
}
Example #6
0
/*
 * Initialize IRQ setting
 */
static void __init sh7710voipgw_init_irq(void)
{
	/* Disable all interrupts in IPR registers */
	ctrl_outw(0x0, INTC_IPRA);
	ctrl_outw(0x0, INTC_IPRB);
	ctrl_outw(0x0, INTC_IPRC);
	ctrl_outw(0x0, INTC_IPRD);
	ctrl_outw(0x0, INTC_IPRE);
	ctrl_outw(0x0, INTC_IPRF);
	ctrl_outw(0x0, INTC_IPRG);
	ctrl_outw(0x0, INTC_IPRH);
	ctrl_outw(0x0, INTC_IPRI);

	/* Ack all interrupt sources in the IRR0 register */
	ctrl_outb(0x3f, INTC_IRR0);

	/* Use IRQ0 - IRQ3 as active low interrupt lines i.e. disable
	 * IRL mode.
	 */
	ctrl_outw(0x2aa, INTC_ICR1);

	make_ipr_irq(sh7710voipgw_ipr_map, ARRAY_SIZE(sh7710voipgw_ipr_map));
}
Example #7
0
/*
 * Initialize IRQ setting
 */
void __init init_se_IRQ(void)
{
        /*
         * Super I/O (Just mimic PC):
         *  1: keyboard
         *  3: serial 0
         *  4: serial 1
         *  5: printer
         *  6: floppy
         *  8: rtc
         * 12: mouse
         * 14: ide0
         */
        make_ipr_irq(14, BCR_ILCRA, 2, 0x0f-14);
        make_ipr_irq(12, BCR_ILCRA, 1, 0x0f-12);
        make_ipr_irq( 8, BCR_ILCRB, 1, 0x0f- 8);
        make_ipr_irq( 6, BCR_ILCRC, 3, 0x0f- 6);
        make_ipr_irq( 5, BCR_ILCRC, 2, 0x0f- 5);
        make_ipr_irq( 4, BCR_ILCRC, 1, 0x0f- 4);
        make_ipr_irq( 3, BCR_ILCRC, 0, 0x0f- 3);
        make_ipr_irq( 1, BCR_ILCRD, 3, 0x0f- 1);

        make_ipr_irq(10, BCR_ILCRD, 1, 0x0f-10); /* LAN */

        make_ipr_irq( 0, BCR_ILCRE, 3, 0x0f- 0); /* PCIRQ3 */
        make_ipr_irq(11, BCR_ILCRE, 2, 0x0f-11); /* PCIRQ2 */
        make_ipr_irq( 9, BCR_ILCRE, 1, 0x0f- 9); /* PCIRQ1 */
        make_ipr_irq( 7, BCR_ILCRE, 0, 0x0f- 7); /* PCIRQ0 */

        /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */
        /* NOTE: #2 and #13 are not used on PC */
        make_ipr_irq(13, BCR_ILCRG, 1, 0x0f-13); /* SLOTIRQ2 */
        make_ipr_irq( 2, BCR_ILCRG, 0, 0x0f- 2); /* SLOTIRQ1 */
}
Example #8
0
/*
 * Initialize IRQ setting
 */
void __init init_se_IRQ(void)
{
        /*
         * Super I/O (Just mimic PC):
         *  1: keyboard
         *  3: serial 0
         *  4: serial 1
         *  5: printer
         *  6: floppy
         *  8: rtc
         * 12: mouse
         * 14: ide0
         */
#if defined(CONFIG_CPU_SUBTYPE_SH7705)
	/* Disable all interrupts */
	ctrl_outw(0, BCR_ILCRA);
	ctrl_outw(0, BCR_ILCRB);
	ctrl_outw(0, BCR_ILCRC);
	ctrl_outw(0, BCR_ILCRD);
	ctrl_outw(0, BCR_ILCRE);
	ctrl_outw(0, BCR_ILCRF);
	ctrl_outw(0, BCR_ILCRG);
	/* This is default value */
	make_ipr_irq(0xf-0x2, BCR_ILCRA, 2, 0x2);
	make_ipr_irq(0xf-0xa, BCR_ILCRA, 1, 0xa);
	make_ipr_irq(0xf-0x5, BCR_ILCRB, 0, 0x5);
	make_ipr_irq(0xf-0x8, BCR_ILCRC, 1, 0x8);
	make_ipr_irq(0xf-0xc, BCR_ILCRC, 0, 0xc);
	make_ipr_irq(0xf-0xe, BCR_ILCRD, 3, 0xe);
	make_ipr_irq(0xf-0x3, BCR_ILCRD, 1, 0x3); /* LAN */
	make_ipr_irq(0xf-0xd, BCR_ILCRE, 2, 0xd);
	make_ipr_irq(0xf-0x9, BCR_ILCRE, 1, 0x9);
	make_ipr_irq(0xf-0x1, BCR_ILCRE, 0, 0x1);
	make_ipr_irq(0xf-0xf, BCR_ILCRF, 3, 0xf);
	make_ipr_irq(0xf-0xb, BCR_ILCRF, 1, 0xb);
	make_ipr_irq(0xf-0x7, BCR_ILCRG, 3, 0x7);
	make_ipr_irq(0xf-0x6, BCR_ILCRG, 2, 0x6);
	make_ipr_irq(0xf-0x4, BCR_ILCRG, 1, 0x4);
#else
        make_ipr_irq(14, BCR_ILCRA, 2, 0x0f-14);
        make_ipr_irq(12, BCR_ILCRA, 1, 0x0f-12);
        make_ipr_irq( 8, BCR_ILCRB, 1, 0x0f- 8);
        make_ipr_irq( 6, BCR_ILCRC, 3, 0x0f- 6);
        make_ipr_irq( 5, BCR_ILCRC, 2, 0x0f- 5);
        make_ipr_irq( 4, BCR_ILCRC, 1, 0x0f- 4);
        make_ipr_irq( 3, BCR_ILCRC, 0, 0x0f- 3);
        make_ipr_irq( 1, BCR_ILCRD, 3, 0x0f- 1);

        make_ipr_irq(10, BCR_ILCRD, 1, 0x0f-10); /* LAN */

        make_ipr_irq( 0, BCR_ILCRE, 3, 0x0f- 0); /* PCIRQ3 */
        make_ipr_irq(11, BCR_ILCRE, 2, 0x0f-11); /* PCIRQ2 */
        make_ipr_irq( 9, BCR_ILCRE, 1, 0x0f- 9); /* PCIRQ1 */
        make_ipr_irq( 7, BCR_ILCRE, 0, 0x0f- 7); /* PCIRQ0 */

        /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */
        /* NOTE: #2 and #13 are not used on PC */
        make_ipr_irq(13, BCR_ILCRG, 1, 0x0f-13); /* SLOTIRQ2 */
        make_ipr_irq( 2, BCR_ILCRG, 0, 0x0f- 2); /* SLOTIRQ1 */
#endif
}
Example #9
0
/*
 * Initialize IRQ setting
 */
void __init init_7751se_IRQ(void)
{

  /* Leave old Solution Engine code in for reference. */
#if defined(CONFIG_SH_SOLUTION_ENGINE)
        /*
         * Super I/O (Just mimic PC):
         *  1: keyboard
         *  3: serial 0
         *  4: serial 1
         *  5: printer
         *  6: floppy
         *  8: rtc
         * 12: mouse
         * 14: ide0
         */
        make_ipr_irq(14, BCR_ILCRA, 2, 0x0f-14);
        make_ipr_irq(12, BCR_ILCRA, 1, 0x0f-12);
        make_ipr_irq( 8, BCR_ILCRB, 1, 0x0f- 8);
        make_ipr_irq( 6, BCR_ILCRC, 3, 0x0f- 6);
        make_ipr_irq( 5, BCR_ILCRC, 2, 0x0f- 5);
        make_ipr_irq( 4, BCR_ILCRC, 1, 0x0f- 4);
        make_ipr_irq( 3, BCR_ILCRC, 0, 0x0f- 3);
        make_ipr_irq( 1, BCR_ILCRD, 3, 0x0f- 1);

        make_ipr_irq(10, BCR_ILCRD, 1, 0x0f-10); /* LAN */

        make_ipr_irq( 0, BCR_ILCRE, 3, 0x0f- 0); /* PCIRQ3 */
        make_ipr_irq(11, BCR_ILCRE, 2, 0x0f-11); /* PCIRQ2 */
        make_ipr_irq( 9, BCR_ILCRE, 1, 0x0f- 9); /* PCIRQ1 */
        make_ipr_irq( 7, BCR_ILCRE, 0, 0x0f- 7); /* PCIRQ0 */

        /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */
        /* NOTE: #2 and #13 are not used on PC */
        make_ipr_irq(13, BCR_ILCRG, 1, 0x0f-13); /* SLOTIRQ2 */
        make_ipr_irq( 2, BCR_ILCRG, 0, 0x0f- 2); /* SLOTIRQ1 */

#elif defined(CONFIG_SH_7751_SOLUTION_ENGINE)

        make_ipr_irq(13, BCR_ILCRD, 3, 2);

        /* Add additional calls to make_ipr_irq() as drivers are added
         * and tested.
         */
#endif

}
Example #10
0
void __init init_IRQ_ipr(void)
{
	make_ipr_irq(sh7206_ipr_map, ARRAY_SIZE(sh7206_ipr_map));
}
Example #11
0
void __init init_IRQ_ipr()
{
	make_ipr_irq(sh7705_ipr_map, ARRAY_SIZE(sh7705_ipr_map));
}
Example #12
0
static void __init init_sh03_IRQ(void)
{
	ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR);
	make_ipr_irq(sh03_ipr_map, ARRAY_SIZE(sh03_ipr_map));
}