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

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-iop32x/irq.c

Version: ~ [ linux-5.10-rc5 ] ~ [ linux-5.9.10 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.79 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.159 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.208 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.245 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.245 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ 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-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 /*
  2  * arch/arm/mach-iop32x/irq.c
  3  *
  4  * Generic IOP32X IRQ handling functionality
  5  *
  6  * Author: Rory Bolt <rorybolt@pacbell.net>
  7  * Copyright (C) 2002 Rory Bolt
  8  *
  9  * This program is free software; you can redistribute it and/or modify
 10  * it under the terms of the GNU General Public License version 2 as
 11  * published by the Free Software Foundation.
 12  */
 13 
 14 #include <linux/init.h>
 15 #include <linux/interrupt.h>
 16 #include <linux/list.h>
 17 #include <asm/mach/irq.h>
 18 #include <asm/irq.h>
 19 #include <mach/hardware.h>
 20 #include <asm/mach-types.h>
 21 
 22 static u32 iop32x_mask;
 23 
 24 static void intctl_write(u32 val)
 25 {
 26         asm volatile("mcr p6, 0, %0, c0, c0, 0" : : "r" (val));
 27 }
 28 
 29 static void intstr_write(u32 val)
 30 {
 31         asm volatile("mcr p6, 0, %0, c4, c0, 0" : : "r" (val));
 32 }
 33 
 34 static void
 35 iop32x_irq_mask(struct irq_data *d)
 36 {
 37         iop32x_mask &= ~(1 << d->irq);
 38         intctl_write(iop32x_mask);
 39 }
 40 
 41 static void
 42 iop32x_irq_unmask(struct irq_data *d)
 43 {
 44         iop32x_mask |= 1 << d->irq;
 45         intctl_write(iop32x_mask);
 46 }
 47 
 48 struct irq_chip ext_chip = {
 49         .name           = "IOP32x",
 50         .irq_ack        = iop32x_irq_mask,
 51         .irq_mask       = iop32x_irq_mask,
 52         .irq_unmask     = iop32x_irq_unmask,
 53 };
 54 
 55 void __init iop32x_init_irq(void)
 56 {
 57         int i;
 58 
 59         iop_init_cp6_handler();
 60 
 61         intctl_write(0);
 62         intstr_write(0);
 63         if (machine_is_glantank() ||
 64             machine_is_iq80321() ||
 65             machine_is_iq31244() ||
 66             machine_is_n2100() ||
 67             machine_is_em7210())
 68                 *IOP3XX_PCIIRSR = 0x0f;
 69 
 70         for (i = 0; i < NR_IRQS; i++) {
 71                 irq_set_chip_and_handler(i, &ext_chip, handle_level_irq);
 72                 irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE);
 73         }
 74 }
 75 

~ [ 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