/* * linux/arch/sh/edosk7760/setup.c * * Copyright (C) 2000 Kazumoto Kojima * * * Modified for EDOSK7760 by * Richard Bister * * SPES port to 2.6 by * Luca Santini */ #include #include #include #include #include #include //SPES #include #include #include #include #include #include //#include //SPES DEBUG #define SpesPrint printk //SPES DEBUG /* * Initialize the board */ void __init setup_edosk7760(void) { SpesPrint("SPES setup_edosk7760\n"); /* Setup CS4 area for access to Epson graphics card */ ctrl_outl(0x424A0400, BSC_CS4BCR); ctrl_outl(0x00040981, BSC_CS4WCR); // TODO: Add any setup code here SpesPrint("SPES setup_edosk7760 fatto\n"); } void __init init_edosk7760(void) { SpesPrint("\tSPES init_edosk7760\n"); /* This is the Ethernet interrupt */ make_imask_irq(0x09); /* This is the IntelStrata Flash interrupt */ make_imask_irq(0x0A); SpesPrint("\t\tSPES init_edosk7760 -> setup scif2 irq\n"); /* Setup scif2 interrupts */ sh7760_make_intc2_irq(SCIF2_ERI_IRQ, INTC2_BASE0, SCIF2_INTPRI_GROUP, SCIF2_ERI_INTMSK_POS, SCIF2_PRIORITY, SCIF2_INTMSK_OFFSET, SCIF2_INTPRI_OFFSET); sh7760_make_intc2_irq(SCIF2_RXI_IRQ, INTC2_BASE0, SCIF2_INTPRI_GROUP, SCIF2_RXI_INTMSK_POS, SCIF2_PRIORITY, SCIF2_INTMSK_OFFSET, SCIF2_INTPRI_OFFSET); sh7760_make_intc2_irq(SCIF2_BRI_IRQ, INTC2_BASE0, SCIF2_INTPRI_GROUP, SCIF2_BRI_INTMSK_POS, SCIF2_PRIORITY, SCIF2_INTMSK_OFFSET, SCIF2_INTPRI_OFFSET); sh7760_make_intc2_irq(SCIF2_TXI_IRQ, INTC2_BASE0, SCIF2_INTPRI_GROUP, SCIF2_TXI_INTMSK_POS, SCIF2_PRIORITY, SCIF2_INTMSK_OFFSET, SCIF2_INTPRI_OFFSET); SpesPrint("\t\tSPES init_edosk7760 -> setup usbhi irq\n"); sh7760_make_intc2_irq(USBHI_IRQ, INTC2_BASE0, USBHI_INTPRI_GROUP, USBHI_INTMSK_POS, USBHI_PRIORITY, USBHI_INTMSK_OFFSET, USBHI_INTPRI_OFFSET); /* Setup dmabrg interrupts */ SpesPrint("\t\tSPES init_edosk7760 -> setup dmabrg irq\n"); sh7760_make_intc2_irq(DMABRGI0_IRQ, INTC2_BASE0, DMABRG_INTPRI_GROUP, DMABRGI0_INTMSK_POS, DMA_PRIORITY, DMABRG_INTMSK_OFFSET, DMABRG_INTPRI_OFFSET); sh7760_make_intc2_irq(DMABRGI1_IRQ, INTC2_BASE0, DMABRG_INTPRI_GROUP, DMABRGI1_INTMSK_POS, DMA_PRIORITY, DMABRG_INTMSK_OFFSET, DMABRG_INTPRI_OFFSET); SpesPrint("\tSPES init_edosk7760 uscita\n"); } //static void edosk7760_dummy_IRQ(int irq, void * dev_id, struct pt_regs * regs) static irqreturn_t edosk7760_dummy_IRQ(int irq, void * dev_id) //SPES { /* The edosk7760 board has the IntelStrata flash STS interrupt on 0x0A. We don't need this so ignore it here */ SpesPrint("SPES edosk7760_dummy_IRQ\n"); udelay(1000); return IRQ_HANDLED; } //static void init_edosk7760_flash(void) //SPES static int __init init_edosk7760_flash(void) //SPES { SpesPrint("SPES init_edosk7760_flash\n"); request_irq(0x0A, edosk7760_dummy_IRQ, SA_INTERRUPT, "flash", NULL); //SPES COMMENTO SpesPrint("SPES init_edosk7760_flash fatto DUMMY\n"); return 0; } static void exit_edosk7760_flash(void) { SpesPrint("SPES exit_edosk7760_flash\n"); free_irq(0x0A, NULL); } module_init(init_edosk7760_flash); module_exit(exit_edosk7760_flash);