| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 | 
							- /* linux/arch/arm/plat-s3c24xx/irq.c
 
-  *
 
-  * Copyright (c) 2003-2004 Simtec Electronics
 
-  *	Ben Dooks <ben@simtec.co.uk>
 
-  *
 
-  * This program is free software; you can redistribute it and/or modify
 
-  * it under the terms of the GNU General Public License as published by
 
-  * the Free Software Foundation; either version 2 of the License, or
 
-  * (at your option) any later version.
 
-  *
 
-  * This program is distributed in the hope that it will be useful,
 
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
-  * GNU General Public License for more details.
 
-  *
 
-  * You should have received a copy of the GNU General Public License
 
-  * along with this program; if not, write to the Free Software
 
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
- */
 
- #include <linux/init.h>
 
- #include <linux/module.h>
 
- #include <linux/interrupt.h>
 
- #include <linux/ioport.h>
 
- #include <linux/device.h>
 
- #include <linux/syscore_ops.h>
 
- #include <asm/irq.h>
 
- #include <asm/mach/irq.h>
 
- #include <plat/regs-irqtype.h>
 
- #include <plat/cpu.h>
 
- #include <plat/pm.h>
 
- #include <plat/irq.h>
 
- static void
 
- s3c_irq_mask(struct irq_data *data)
 
- {
 
- 	unsigned int irqno = data->irq - IRQ_EINT0;
 
- 	unsigned long mask;
 
- 	mask = __raw_readl(S3C2410_INTMSK);
 
- 	mask |= 1UL << irqno;
 
- 	__raw_writel(mask, S3C2410_INTMSK);
 
- }
 
- static inline void
 
- s3c_irq_ack(struct irq_data *data)
 
- {
 
- 	unsigned long bitval = 1UL << (data->irq - IRQ_EINT0);
 
- 	__raw_writel(bitval, S3C2410_SRCPND);
 
- 	__raw_writel(bitval, S3C2410_INTPND);
 
- }
 
- static inline void
 
- s3c_irq_maskack(struct irq_data *data)
 
- {
 
- 	unsigned long bitval = 1UL << (data->irq - IRQ_EINT0);
 
- 	unsigned long mask;
 
- 	mask = __raw_readl(S3C2410_INTMSK);
 
- 	__raw_writel(mask|bitval, S3C2410_INTMSK);
 
- 	__raw_writel(bitval, S3C2410_SRCPND);
 
- 	__raw_writel(bitval, S3C2410_INTPND);
 
- }
 
- static void
 
- s3c_irq_unmask(struct irq_data *data)
 
- {
 
- 	unsigned int irqno = data->irq;
 
- 	unsigned long mask;
 
- 	if (irqno != IRQ_TIMER4 && irqno != IRQ_EINT8t23)
 
- 		irqdbf2("s3c_irq_unmask %d\n", irqno);
 
- 	irqno -= IRQ_EINT0;
 
- 	mask = __raw_readl(S3C2410_INTMSK);
 
- 	mask &= ~(1UL << irqno);
 
- 	__raw_writel(mask, S3C2410_INTMSK);
 
- }
 
- struct irq_chip s3c_irq_level_chip = {
 
- 	.name		= "s3c-level",
 
- 	.irq_ack	= s3c_irq_maskack,
 
- 	.irq_mask	= s3c_irq_mask,
 
- 	.irq_unmask	= s3c_irq_unmask,
 
- 	.irq_set_wake	= s3c_irq_wake
 
- };
 
- struct irq_chip s3c_irq_chip = {
 
- 	.name		= "s3c",
 
- 	.irq_ack	= s3c_irq_ack,
 
- 	.irq_mask	= s3c_irq_mask,
 
- 	.irq_unmask	= s3c_irq_unmask,
 
- 	.irq_set_wake	= s3c_irq_wake
 
- };
 
- static void
 
- s3c_irqext_mask(struct irq_data *data)
 
- {
 
- 	unsigned int irqno = data->irq - EXTINT_OFF;
 
- 	unsigned long mask;
 
- 	mask = __raw_readl(S3C24XX_EINTMASK);
 
 
  |