~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/m68k/apollo/dn_ints.c

Version: ~ [ linux-5.1.2 ] ~ [ linux-5.0.16 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.43 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.119 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.176 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.179 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.139 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.67 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #include <linux/types.h>
  2 #include <linux/kernel.h>
  3 #include <linux/jiffies.h>
  4 #include <linux/kernel_stat.h>
  5 #include <linux/timer.h>
  6 
  7 #include <asm/system.h>
  8 #include <asm/irq.h>
  9 #include <asm/traps.h>
 10 #include <asm/page.h>
 11 #include <asm/machdep.h>
 12 #include <asm/apollohw.h>
 13 #include <asm/errno.h>
 14 
 15 static irq_handler_t dn_irqs[16];
 16 
 17 irqreturn_t dn_process_int(int irq, struct pt_regs *fp)
 18 {
 19   irqreturn_t res = IRQ_NONE;
 20 
 21   if(dn_irqs[irq-160].handler) {
 22     res = dn_irqs[irq-160].handler(irq,dn_irqs[irq-160].dev_id,fp);
 23   } else {
 24     printk("spurious irq %d occurred\n",irq);
 25   }
 26 
 27   *(volatile unsigned char *)(pica)=0x20;
 28   *(volatile unsigned char *)(picb)=0x20;
 29 
 30   return res;
 31 }
 32 
 33 void dn_init_IRQ(void) {
 34 
 35   int i;
 36 
 37   for(i=0;i<16;i++) {
 38     dn_irqs[i].handler=NULL;
 39     dn_irqs[i].flags=IRQ_FLG_STD;
 40     dn_irqs[i].dev_id=NULL;
 41     dn_irqs[i].devname=NULL;
 42   }
 43   
 44 }
 45 
 46 int dn_request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id) {
 47 
 48   if((irq<0) || (irq>15)) {
 49     printk("Trying to request invalid IRQ\n");
 50     return -ENXIO;
 51   }
 52 
 53   if(!dn_irqs[irq].handler) {
 54     dn_irqs[irq].handler=handler;
 55     dn_irqs[irq].flags=IRQ_FLG_STD;
 56     dn_irqs[irq].dev_id=dev_id;
 57     dn_irqs[irq].devname=devname;
 58     if(irq<8)
 59       *(volatile unsigned char *)(pica+1)&=~(1<<irq);
 60     else
 61       *(volatile unsigned char *)(picb+1)&=~(1<<(irq-8));
 62 
 63     return 0;
 64   }
 65   else {
 66     printk("Trying to request already assigned irq %d\n",irq);
 67     return -ENXIO;
 68   }
 69 
 70 }
 71 
 72 void dn_free_irq(unsigned int irq, void *dev_id) {
 73 
 74   if((irq<0) || (irq>15)) {
 75     printk("Trying to free invalid IRQ\n");
 76     return ;
 77   }
 78 
 79   if(irq<8)
 80     *(volatile unsigned char *)(pica+1)|=(1<<irq);
 81   else
 82     *(volatile unsigned char *)(picb+1)|=(1<<(irq-8));  
 83 
 84   dn_irqs[irq].handler=NULL;
 85   dn_irqs[irq].flags=IRQ_FLG_STD;
 86   dn_irqs[irq].dev_id=NULL;
 87   dn_irqs[irq].devname=NULL;
 88 
 89   return ;
 90 
 91 }
 92 
 93 void dn_enable_irq(unsigned int irq) {
 94 
 95   printk("dn enable irq\n");
 96 
 97 }
 98 
 99 void dn_disable_irq(unsigned int irq) {
100 
101   printk("dn disable irq\n");
102 
103 }
104 
105 int show_dn_interrupts(struct seq_file *p, void *v) {
106 
107   printk("dn get irq list\n");
108 
109   return 0;
110 
111 }
112 
113 struct fb_info *dn_dummy_fb_init(long *mem_start) {
114 
115   printk("fb init\n");
116 
117   return NULL;
118 
119 }
120 
121 void dn_dummy_video_setup(char *options,int *ints) {
122 
123   printk("no video yet\n");
124 
125 }
126 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp