Пример #1
0
static void __init ddb_time_init(struct irqaction *irq)
{
	/* set the clock to 1 Hz */
	nile4_out32(NILE4_T2CTRL, 1000000);
	/* enable the General-Purpose Timer */
	nile4_out32(NILE4_T2CTRL + 4, 0x00000001);
	/* reset timer */
	nile4_out32(NILE4_T2CNTR, 0);
	/* enable interrupt */
	nile4_enable_irq(NILE4_INT_GPT);
	i8259_setup_irq(nile4_to_irq(NILE4_INT_GPT), irq);
	change_cp0_status(ST0_IM,
		          IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4);
}
Пример #2
0
void __init ddb_irq_setup(void)
{
#ifdef CONFIG_REMOTE_DEBUG
	if (remote_debug)
		set_debug_traps();
	breakpoint();		/* you may move this line to whereever you want :-) */
#endif
	request_region(0x20, 0x20, "pic1");
	request_region(0xa0, 0x20, "pic2");
	i8259_setup_irq(2, &irq2);

	nile4_irq_setup();
	m1543_irq_setup();

	set_except_vector(0, ddbIRQ);
}