irq.c 15.2 KB
Newer Older
1 2
/* linux/arch/arm/plat-s3c24xx/irq.c
 *
3
 * Copyright (c) 2003-2004 Simtec Electronics
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 *	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>
K
Kay Sievers 已提交
25
#include <linux/device.h>
26
#include <linux/syscore_ops.h>
27 28 29 30

#include <asm/irq.h>
#include <asm/mach/irq.h>

31
#include <plat/regs-irqtype.h>
32

33 34 35
#include <plat/cpu.h>
#include <plat/pm.h>
#include <plat/irq.h>
36 37

static void
38
s3c_irq_mask(struct irq_data *data)
39
{
40
	unsigned int irqno = data->irq - IRQ_EINT0;
41 42 43 44 45 46 47 48
	unsigned long mask;

	mask = __raw_readl(S3C2410_INTMSK);
	mask |= 1UL << irqno;
	__raw_writel(mask, S3C2410_INTMSK);
}

static inline void
49
s3c_irq_ack(struct irq_data *data)
50
{
51
	unsigned long bitval = 1UL << (data->irq - IRQ_EINT0);
52 53 54 55 56 57

	__raw_writel(bitval, S3C2410_SRCPND);
	__raw_writel(bitval, S3C2410_INTPND);
}

static inline void
58
s3c_irq_maskack(struct irq_data *data)
59
{
60
	unsigned long bitval = 1UL << (data->irq - IRQ_EINT0);
61 62 63 64 65 66 67 68 69 70 71
	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
72
s3c_irq_unmask(struct irq_data *data)
73
{
74
	unsigned int irqno = data->irq;
75 76 77 78 79 80 81 82 83 84 85 86 87 88
	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",
89 90 91 92
	.irq_ack	= s3c_irq_maskack,
	.irq_mask	= s3c_irq_mask,
	.irq_unmask	= s3c_irq_unmask,
	.irq_set_wake	= s3c_irq_wake
93 94
};

95
struct irq_chip s3c_irq_chip = {
96
	.name		= "s3c",
97 98 99 100
	.irq_ack	= s3c_irq_ack,
	.irq_mask	= s3c_irq_mask,
	.irq_unmask	= s3c_irq_unmask,
	.irq_set_wake	= s3c_irq_wake
101 102 103
};

static void
104
s3c_irqext_mask(struct irq_data *data)
105
{
106
	unsigned int irqno = data->irq - EXTINT_OFF;
107 108 109 110 111 112 113 114
	unsigned long mask;

	mask = __raw_readl(S3C24XX_EINTMASK);
	mask |= ( 1UL << irqno);
	__raw_writel(mask, S3C24XX_EINTMASK);
}

static void
115
s3c_irqext_ack(struct irq_data *data)
116 117 118 119 120
{
	unsigned long req;
	unsigned long bit;
	unsigned long mask;

121
	bit = 1UL << (data->irq - EXTINT_OFF);
122 123 124 125 126 127 128 129 130 131

	mask = __raw_readl(S3C24XX_EINTMASK);

	__raw_writel(bit, S3C24XX_EINTPEND);

	req = __raw_readl(S3C24XX_EINTPEND);
	req &= ~mask;

	/* not sure if we should be acking the parent irq... */

132
	if (data->irq <= IRQ_EINT7) {
133
		if ((req & 0xf0) == 0)
134
			s3c_irq_ack(irq_get_irq_data(IRQ_EINT4t7));
135 136
	} else {
		if ((req >> 8) == 0)
137
			s3c_irq_ack(irq_get_irq_data(IRQ_EINT8t23));
138 139 140 141
	}
}

static void
142
s3c_irqext_unmask(struct irq_data *data)
143
{
144
	unsigned int irqno = data->irq - EXTINT_OFF;
145 146 147
	unsigned long mask;

	mask = __raw_readl(S3C24XX_EINTMASK);
148
	mask &= ~(1UL << irqno);
149 150 151 152
	__raw_writel(mask, S3C24XX_EINTMASK);
}

int
153
s3c_irqext_type(struct irq_data *data, unsigned int type)
154 155 156 157 158 159
{
	void __iomem *extint_reg;
	void __iomem *gpcon_reg;
	unsigned long gpcon_offset, extint_offset;
	unsigned long newvalue = 0, value;

160
	if ((data->irq >= IRQ_EINT0) && (data->irq <= IRQ_EINT3)) {
161 162
		gpcon_reg = S3C2410_GPFCON;
		extint_reg = S3C24XX_EXTINT0;
163 164 165
		gpcon_offset = (data->irq - IRQ_EINT0) * 2;
		extint_offset = (data->irq - IRQ_EINT0) * 4;
	} else if ((data->irq >= IRQ_EINT4) && (data->irq <= IRQ_EINT7)) {
166 167
		gpcon_reg = S3C2410_GPFCON;
		extint_reg = S3C24XX_EXTINT0;
168 169 170
		gpcon_offset = (data->irq - (EXTINT_OFF)) * 2;
		extint_offset = (data->irq - (EXTINT_OFF)) * 4;
	} else if ((data->irq >= IRQ_EINT8) && (data->irq <= IRQ_EINT15)) {
171 172
		gpcon_reg = S3C2410_GPGCON;
		extint_reg = S3C24XX_EXTINT1;
173 174 175
		gpcon_offset = (data->irq - IRQ_EINT8) * 2;
		extint_offset = (data->irq - IRQ_EINT8) * 4;
	} else if ((data->irq >= IRQ_EINT16) && (data->irq <= IRQ_EINT23)) {
176 177
		gpcon_reg = S3C2410_GPGCON;
		extint_reg = S3C24XX_EXTINT2;
178 179 180
		gpcon_offset = (data->irq - IRQ_EINT8) * 2;
		extint_offset = (data->irq - IRQ_EINT16) * 4;
	} else {
181
		return -1;
182
	}
183 184 185 186 187 188 189 190 191

	/* Set the GPIO to external interrupt mode */
	value = __raw_readl(gpcon_reg);
	value = (value & ~(3 << gpcon_offset)) | (0x02 << gpcon_offset);
	__raw_writel(value, gpcon_reg);

	/* Set the external interrupt to pointed trigger type */
	switch (type)
	{
192
		case IRQ_TYPE_NONE:
193 194 195
			printk(KERN_WARNING "No edge setting!\n");
			break;

196
		case IRQ_TYPE_EDGE_RISING:
197 198 199
			newvalue = S3C2410_EXTINT_RISEEDGE;
			break;

200
		case IRQ_TYPE_EDGE_FALLING:
201 202 203
			newvalue = S3C2410_EXTINT_FALLEDGE;
			break;

204
		case IRQ_TYPE_EDGE_BOTH:
205 206 207
			newvalue = S3C2410_EXTINT_BOTHEDGE;
			break;

208
		case IRQ_TYPE_LEVEL_LOW:
209 210 211
			newvalue = S3C2410_EXTINT_LOWLEV;
			break;

212
		case IRQ_TYPE_LEVEL_HIGH:
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
			newvalue = S3C2410_EXTINT_HILEV;
			break;

		default:
			printk(KERN_ERR "No such irq type %d", type);
			return -1;
	}

	value = __raw_readl(extint_reg);
	value = (value & ~(7 << extint_offset)) | (newvalue << extint_offset);
	__raw_writel(value, extint_reg);

	return 0;
}

static struct irq_chip s3c_irqext_chip = {
	.name		= "s3c-ext",
230 231 232 233
	.irq_mask	= s3c_irqext_mask,
	.irq_unmask	= s3c_irqext_unmask,
	.irq_ack	= s3c_irqext_ack,
	.irq_set_type	= s3c_irqext_type,
234
	.irq_set_wake	= s3c_irqext_wake
235 236 237 238
};

static struct irq_chip s3c_irq_eint0t4 = {
	.name		= "s3c-ext0",
239 240 241 242 243
	.irq_ack	= s3c_irq_ack,
	.irq_mask	= s3c_irq_mask,
	.irq_unmask	= s3c_irq_unmask,
	.irq_set_wake	= s3c_irq_wake,
	.irq_set_type	= s3c_irqext_type,
244 245 246 247 248 249 250 251 252 253 254 255 256
};

/* mask values for the parent registers for each of the interrupt types */

#define INTMSK_UART0	 (1UL << (IRQ_UART0 - IRQ_EINT0))
#define INTMSK_UART1	 (1UL << (IRQ_UART1 - IRQ_EINT0))
#define INTMSK_UART2	 (1UL << (IRQ_UART2 - IRQ_EINT0))
#define INTMSK_ADCPARENT (1UL << (IRQ_ADCPARENT - IRQ_EINT0))


/* UART0 */

static void
257
s3c_irq_uart0_mask(struct irq_data *data)
258
{
259
	s3c_irqsub_mask(data->irq, INTMSK_UART0, 7);
260 261 262
}

static void
263
s3c_irq_uart0_unmask(struct irq_data *data)
264
{
265
	s3c_irqsub_unmask(data->irq, INTMSK_UART0);
266 267 268
}

static void
269
s3c_irq_uart0_ack(struct irq_data *data)
270
{
271
	s3c_irqsub_maskack(data->irq, INTMSK_UART0, 7);
272 273 274 275
}

static struct irq_chip s3c_irq_uart0 = {
	.name		= "s3c-uart0",
276 277 278
	.irq_mask	= s3c_irq_uart0_mask,
	.irq_unmask	= s3c_irq_uart0_unmask,
	.irq_ack	= s3c_irq_uart0_ack,
279 280 281 282 283
};

/* UART1 */

static void
284
s3c_irq_uart1_mask(struct irq_data *data)
285
{
286
	s3c_irqsub_mask(data->irq, INTMSK_UART1, 7 << 3);
287 288 289
}

static void
290
s3c_irq_uart1_unmask(struct irq_data *data)
291
{
292
	s3c_irqsub_unmask(data->irq, INTMSK_UART1);
293 294 295
}

static void
296
s3c_irq_uart1_ack(struct irq_data *data)
297
{
298
	s3c_irqsub_maskack(data->irq, INTMSK_UART1, 7 << 3);
299 300 301 302
}

static struct irq_chip s3c_irq_uart1 = {
	.name		= "s3c-uart1",
303 304 305
	.irq_mask	= s3c_irq_uart1_mask,
	.irq_unmask	= s3c_irq_uart1_unmask,
	.irq_ack	= s3c_irq_uart1_ack,
306 307 308 309 310
};

/* UART2 */

static void
311
s3c_irq_uart2_mask(struct irq_data *data)
312
{
313
	s3c_irqsub_mask(data->irq, INTMSK_UART2, 7 << 6);
314 315 316
}

static void
317
s3c_irq_uart2_unmask(struct irq_data *data)
318
{
319
	s3c_irqsub_unmask(data->irq, INTMSK_UART2);
320 321 322
}

static void
323
s3c_irq_uart2_ack(struct irq_data *data)
324
{
325
	s3c_irqsub_maskack(data->irq, INTMSK_UART2, 7 << 6);
326 327 328 329
}

static struct irq_chip s3c_irq_uart2 = {
	.name		= "s3c-uart2",
330 331 332
	.irq_mask	= s3c_irq_uart2_mask,
	.irq_unmask	= s3c_irq_uart2_unmask,
	.irq_ack	= s3c_irq_uart2_ack,
333 334 335 336 337
};

/* ADC and Touchscreen */

static void
338
s3c_irq_adc_mask(struct irq_data *d)
339
{
340
	s3c_irqsub_mask(d->irq, INTMSK_ADCPARENT, 3 << 9);
341 342 343
}

static void
344
s3c_irq_adc_unmask(struct irq_data *d)
345
{
346
	s3c_irqsub_unmask(d->irq, INTMSK_ADCPARENT);
347 348 349
}

static void
350
s3c_irq_adc_ack(struct irq_data *d)
351
{
352
	s3c_irqsub_ack(d->irq, INTMSK_ADCPARENT, 3 << 9);
353 354 355 356
}

static struct irq_chip s3c_irq_adc = {
	.name		= "s3c-adc",
357 358 359
	.irq_mask	= s3c_irq_adc_mask,
	.irq_unmask	= s3c_irq_adc_unmask,
	.irq_ack	= s3c_irq_adc_ack,
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380
};

/* irq demux for adc */
static void s3c_irq_demux_adc(unsigned int irq,
			      struct irq_desc *desc)
{
	unsigned int subsrc, submsk;
	unsigned int offset = 9;

	/* read the current pending interrupts, and the mask
	 * for what it is available */

	subsrc = __raw_readl(S3C2410_SUBSRCPND);
	submsk = __raw_readl(S3C2410_INTSUBMSK);

	subsrc &= ~submsk;
	subsrc >>= offset;
	subsrc &= 3;

	if (subsrc != 0) {
		if (subsrc & 1) {
381
			generic_handle_irq(IRQ_TC);
382 383
		}
		if (subsrc & 2) {
384
			generic_handle_irq(IRQ_ADC);
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408
		}
	}
}

static void s3c_irq_demux_uart(unsigned int start)
{
	unsigned int subsrc, submsk;
	unsigned int offset = start - IRQ_S3CUART_RX0;

	/* read the current pending interrupts, and the mask
	 * for what it is available */

	subsrc = __raw_readl(S3C2410_SUBSRCPND);
	submsk = __raw_readl(S3C2410_INTSUBMSK);

	irqdbf2("s3c_irq_demux_uart: start=%d (%d), subsrc=0x%08x,0x%08x\n",
		start, offset, subsrc, submsk);

	subsrc &= ~submsk;
	subsrc >>= offset;
	subsrc &= 7;

	if (subsrc != 0) {
		if (subsrc & 1)
409
			generic_handle_irq(start);
410 411

		if (subsrc & 2)
412
			generic_handle_irq(start+1);
413 414

		if (subsrc & 4)
415
			generic_handle_irq(start+2);
416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461
	}
}

/* uart demux entry points */

static void
s3c_irq_demux_uart0(unsigned int irq,
		    struct irq_desc *desc)
{
	irq = irq;
	s3c_irq_demux_uart(IRQ_S3CUART_RX0);
}

static void
s3c_irq_demux_uart1(unsigned int irq,
		    struct irq_desc *desc)
{
	irq = irq;
	s3c_irq_demux_uart(IRQ_S3CUART_RX1);
}

static void
s3c_irq_demux_uart2(unsigned int irq,
		    struct irq_desc *desc)
{
	irq = irq;
	s3c_irq_demux_uart(IRQ_S3CUART_RX2);
}

static void
s3c_irq_demux_extint8(unsigned int irq,
		      struct irq_desc *desc)
{
	unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND);
	unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK);

	eintpnd &= ~eintmsk;
	eintpnd &= ~0xff;	/* ignore lower irqs */

	/* we may as well handle all the pending IRQs here */

	while (eintpnd) {
		irq = __ffs(eintpnd);
		eintpnd &= ~(1<<irq);

		irq += (IRQ_EINT4 - 4);
462
		generic_handle_irq(irq);
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484
	}

}

static void
s3c_irq_demux_extint4t7(unsigned int irq,
			struct irq_desc *desc)
{
	unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND);
	unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK);

	eintpnd &= ~eintmsk;
	eintpnd &= 0xff;	/* only lower irqs */

	/* we may as well handle all the pending IRQs here */

	while (eintpnd) {
		irq = __ffs(eintpnd);
		eintpnd &= ~(1<<irq);

		irq += (IRQ_EINT4 - 4);

485
		generic_handle_irq(irq);
486 487 488
	}
}

489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517
#ifdef CONFIG_FIQ
/**
 * s3c24xx_set_fiq - set the FIQ routing
 * @irq: IRQ number to route to FIQ on processor.
 * @on: Whether to route @irq to the FIQ, or to remove the FIQ routing.
 *
 * Change the state of the IRQ to FIQ routing depending on @irq and @on. If
 * @on is true, the @irq is checked to see if it can be routed and the
 * interrupt controller updated to route the IRQ. If @on is false, the FIQ
 * routing is cleared, regardless of which @irq is specified.
 */
int s3c24xx_set_fiq(unsigned int irq, bool on)
{
	u32 intmod;
	unsigned offs;

	if (on) {
		offs = irq - FIQ_START;
		if (offs > 31)
			return -EINVAL;

		intmod = 1 << offs;
	} else {
		intmod = 0;
	}

	__raw_writel(intmod, S3C2410_INTMOD);
	return 0;
}
518 519

EXPORT_SYMBOL_GPL(s3c24xx_set_fiq);
520 521 522
#endif


523 524 525 526 527 528 529 530 531 532 533 534
/* s3c24xx_init_irq
 *
 * Initialise S3C2410 IRQ system
*/

void __init s3c24xx_init_irq(void)
{
	unsigned long pend;
	unsigned long last;
	int irqno;
	int i;

535
#ifdef CONFIG_FIQ
536
	init_FIQ(FIQ_START);
537 538
#endif

539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595
	irqdbf("s3c2410_init_irq: clearing interrupt status flags\n");

	/* first, clear all interrupts pending... */

	last = 0;
	for (i = 0; i < 4; i++) {
		pend = __raw_readl(S3C24XX_EINTPEND);

		if (pend == 0 || pend == last)
			break;

		__raw_writel(pend, S3C24XX_EINTPEND);
		printk("irq: clearing pending ext status %08x\n", (int)pend);
		last = pend;
	}

	last = 0;
	for (i = 0; i < 4; i++) {
		pend = __raw_readl(S3C2410_INTPND);

		if (pend == 0 || pend == last)
			break;

		__raw_writel(pend, S3C2410_SRCPND);
		__raw_writel(pend, S3C2410_INTPND);
		printk("irq: clearing pending status %08x\n", (int)pend);
		last = pend;
	}

	last = 0;
	for (i = 0; i < 4; i++) {
		pend = __raw_readl(S3C2410_SUBSRCPND);

		if (pend == 0 || pend == last)
			break;

		printk("irq: clearing subpending status %08x\n", (int)pend);
		__raw_writel(pend, S3C2410_SUBSRCPND);
		last = pend;
	}

	/* register the main interrupts */

	irqdbf("s3c2410_init_irq: registering s3c2410 interrupt handlers\n");

	for (irqno = IRQ_EINT4t7; irqno <= IRQ_ADCPARENT; irqno++) {
		/* set all the s3c2410 internal irqs */

		switch (irqno) {
			/* deal with the special IRQs (cascaded) */

		case IRQ_EINT4t7:
		case IRQ_EINT8t23:
		case IRQ_UART0:
		case IRQ_UART1:
		case IRQ_UART2:
		case IRQ_ADCPARENT:
596 597
			irq_set_chip_and_handler(irqno, &s3c_irq_level_chip,
						 handle_level_irq);
598 599 600 601 602 603 604 605 606
			break;

		case IRQ_RESERVED6:
		case IRQ_RESERVED24:
			/* no IRQ here */
			break;

		default:
			//irqdbf("registering irq %d (s3c irq)\n", irqno);
607 608
			irq_set_chip_and_handler(irqno, &s3c_irq_chip,
						 handle_edge_irq);
609 610 611 612 613 614
			set_irq_flags(irqno, IRQF_VALID);
		}
	}

	/* setup the cascade irq handlers */

T
Thomas Gleixner 已提交
615 616
	irq_set_chained_handler(IRQ_EINT4t7, s3c_irq_demux_extint4t7);
	irq_set_chained_handler(IRQ_EINT8t23, s3c_irq_demux_extint8);
617

T
Thomas Gleixner 已提交
618 619 620 621
	irq_set_chained_handler(IRQ_UART0, s3c_irq_demux_uart0);
	irq_set_chained_handler(IRQ_UART1, s3c_irq_demux_uart1);
	irq_set_chained_handler(IRQ_UART2, s3c_irq_demux_uart2);
	irq_set_chained_handler(IRQ_ADCPARENT, s3c_irq_demux_adc);
622 623 624 625 626

	/* external interrupts */

	for (irqno = IRQ_EINT0; irqno <= IRQ_EINT3; irqno++) {
		irqdbf("registering irq %d (ext int)\n", irqno);
627 628
		irq_set_chip_and_handler(irqno, &s3c_irq_eint0t4,
					 handle_edge_irq);
629 630 631 632 633
		set_irq_flags(irqno, IRQF_VALID);
	}

	for (irqno = IRQ_EINT4; irqno <= IRQ_EINT23; irqno++) {
		irqdbf("registering irq %d (extended s3c irq)\n", irqno);
634 635
		irq_set_chip_and_handler(irqno, &s3c_irqext_chip,
					 handle_edge_irq);
636 637 638 639 640 641 642 643 644
		set_irq_flags(irqno, IRQF_VALID);
	}

	/* register the uart interrupts */

	irqdbf("s3c2410: registering external interrupts\n");

	for (irqno = IRQ_S3CUART_RX0; irqno <= IRQ_S3CUART_ERR0; irqno++) {
		irqdbf("registering irq %d (s3c uart0 irq)\n", irqno);
645 646
		irq_set_chip_and_handler(irqno, &s3c_irq_uart0,
					 handle_level_irq);
647 648 649 650 651
		set_irq_flags(irqno, IRQF_VALID);
	}

	for (irqno = IRQ_S3CUART_RX1; irqno <= IRQ_S3CUART_ERR1; irqno++) {
		irqdbf("registering irq %d (s3c uart1 irq)\n", irqno);
652 653
		irq_set_chip_and_handler(irqno, &s3c_irq_uart1,
					 handle_level_irq);
654 655 656 657 658
		set_irq_flags(irqno, IRQF_VALID);
	}

	for (irqno = IRQ_S3CUART_RX2; irqno <= IRQ_S3CUART_ERR2; irqno++) {
		irqdbf("registering irq %d (s3c uart2 irq)\n", irqno);
659 660
		irq_set_chip_and_handler(irqno, &s3c_irq_uart2,
					 handle_level_irq);
661 662 663 664 665
		set_irq_flags(irqno, IRQF_VALID);
	}

	for (irqno = IRQ_TC; irqno <= IRQ_ADC; irqno++) {
		irqdbf("registering irq %d (s3c adc irq)\n", irqno);
666
		irq_set_chip_and_handler(irqno, &s3c_irq_adc, handle_edge_irq);
667 668 669 670 671
		set_irq_flags(irqno, IRQF_VALID);
	}

	irqdbf("s3c2410: registered interrupt handlers\n");
}
672 673 674 675 676

struct syscore_ops s3c24xx_irq_syscore_ops = {
	.suspend	= s3c24xx_irq_suspend,
	.resume		= s3c24xx_irq_resume,
};