Пример #1
0
static void h8300h_enable_irq(struct irq_data *data)
{
	int bit;
	int irq = data->irq - 12;

	bit = ipr_bit[irq];
	if (bit >= 0) {
		if (bit < 8)
			ctrl_bset(bit & 7, IPR);
		else
			ctrl_bset(bit & 7, (IPR+1));
	}
}
Пример #2
0
void __init h8300_timer_setup(void)
{
	unsigned int div;
	unsigned int cnt;

	calc_param(cnt, div, divide_rate, 0x10000);

	setup_irq(_16IRQ, &timer16_irq);

	/* initalize timer */
	ctrl_outb(0, TSTR);
	ctrl_outb(CCLR0 | div, _16BASE + TCR);
	ctrl_outw(cnt, _16BASE + GRA);
	ctrl_bset(4 + CONFIG_H8300_TIMER16_CH, TISRA);
	ctrl_bset(CONFIG_H8300_TIMER16_CH, TSTR);
}
Пример #3
0
void __init h8300_timer_setup(void)
{
	unsigned int div;
	unsigned int cnt;

	calc_param(cnt, div, divide_rate, 0x10000);

	setup_irq(ITUIRQ, &itu_irq);

	/* initalize timer */
	ctrl_outb(0, TSTR);
	ctrl_outb(CCLR0 | div, ITUBASE + TCR);
	ctrl_outb(0x01, ITUBASE + TIER);
	ctrl_outw(cnt, ITUBASE + GRA);
	ctrl_bset(CONFIG_H8300_ITU_CH, TSTR);
}
Пример #4
0
void __init h8300_timer_setup(void)
{
	unsigned int cnt;
	unsigned int div;

	calc_param(cnt, div, divide_rate, 0x10000);

	setup_irq(TPUIRQ, &tpu_irq);

	/* TPU module enabled */
	ctrl_bclr(3, MSTPCRH);

	ctrl_outb(0, TSTR);
	ctrl_outb(CCLR0 | div, TPUBASE + _TCR);
	ctrl_outb(0, TPUBASE + _TMDR);
	ctrl_outw(0, TPUBASE + _TIOR);
	ctrl_outb(0x01, TPUBASE + _TIER);
	ctrl_outw(cnt, TPUBASE + _GRA);
	ctrl_bset(CONFIG_H8300_TPU_CH, TSTR);
}