Exemplo n.º 1
0
void idetest_init(void)
{
	int			rc;

#ifdef DEBUG_FUNCS
	printk("idetest_init()\n");
#endif

	/* Register character device */
	if (register_chrdev(IDETEST_MAJOR, IDETEST_NAME, &idetest_fops) < 0) {
		printk(KERN_WARNING IDETEST_NAME": failed to allocate major %d\n",
			IDETEST_MAJOR);
		return;
	}

	idetest_isopen = 0;
#if 0
	idetest_gotint = 0;
#endif

	printk(IDETEST_NAME": Copyright (C) 2001, Lineo (www.lineo.com)\n");

#if 0
	/* Install interrupt handler */
	mcf_autovector(IDETEST_IRQ);
	rc = request_irq(IDETEST_IRQ, idetest_isr,
		SA_INTERRUPT, IDETEST_NAME, NULL);
	if (rc)
		printk(IDETEST_NAME": IRQ %d already in use\n", IDETEST_IRQ);
#endif
}
Exemplo n.º 2
0
int resetswitch_init(void)
{
	mcf_enablevector(SWITCH_IRQ);
	mcf_autovector(SWITCH_IRQ);
	request_irq(SWITCH_IRQ, resetswitch_button,
		(SA_INTERRUPT | IRQ_FLG_FAST), "Reset Button", NULL);
	return(0);
}
Exemplo n.º 3
0
static void __init nettel_smc91x_init(void)
{
	writew(0x00ec, MCF_MBAR + MCFSIM_PADDR);
	mcf_setppdata(0, 0x0080);
	writew(1, NETTEL_SMC0_ADDR + SMC91xx_BANKSELECT);
	writew(0x0067, NETTEL_SMC0_ADDR + SMC91xx_BASEADDR);
	mcf_setppdata(0x0080, 0);

	/* Set correct chip select timing for SMC9196 accesses */
	writew(0x1180, MCF_MBAR + MCFSIM_CSCR3);

	/* Set the SMC interrupts to be auto-vectored */
	mcf_autovector(NETTEL_SMC0_IRQ);
	mcf_autovector(NETTEL_SMC1_IRQ);

	/* Set MAC addresses from flash for both interfaces */
	nettel_smc91x_setmac(NETTEL_SMC0_ADDR, 0xf0006000);
	nettel_smc91x_setmac(NETTEL_SMC1_ADDR, 0xf0006006);
}
Exemplo n.º 4
0
void uclinux_ide_init(void)
{
	hw_regs_t hw;
	ide_ioreg_t base;
	int index, i;
	ide_hwif_t* hwif;

	for (i = 0; ide_defaults[i].base != (ide_ioreg_t) -1; i++) {
		base = ide_defaults[i].base;
		memset(&hw, 0, sizeof(hw));
#ifdef CONFIG_COLDFIRE
		mcf_autovector(hw.irq);
#endif
		hw.irq = ide_defaults[i].irq;
		ide_setup_ports(&hw, base, ide_offsets, 0, 0, ack_intr,
				/* ide_iops, */
				ide_defaults[i].irq);
		index = ide_register_hw(&hw, &hwif);
		if (index != -1) {
			hwif->mmio  = 1; /* not io(0) or mmio(1) */
#ifdef CONFIG_COLDFIRE
			hwif->OUTB  = OUTB;
			hwif->OUTBSYNC = OUTBSYNC;
			hwif->OUTW  = OUTW;
			hwif->OUTL  = OUTL;
			hwif->OUTSW = OUTSW;
			hwif->OUTSL = OUTSL;
			hwif->INB   = INB;
			hwif->INW   = INW;
			hwif->INL   = INL;
			hwif->INSW  = INSW;
			hwif->INSL  = INSL;

			DRIVER(&hwif->drives[0])->cleanup = uclinux_irq_remove;

#endif
		}
		disable_irq(ide_defaults[i].irq);
	}
}
Exemplo n.º 5
0
void reset_setupbutton(void)
{
	mcf_autovector(31);
	request_irq(31, reset_button, (SA_INTERRUPT | IRQ_FLG_FAST),
		"Reset Button", NULL);
}
static void __init dm9000_pre_init(void)
{
	/* Set the dm9000 interrupt to be auto-vectored */
	mcf_autovector(DM9000_IRQ);
}