2005-04-17 05:20:36 +07:00
|
|
|
/*
|
2008-08-02 16:55:55 +07:00
|
|
|
* arch/arm/include/asm/mach/irq.h
|
2005-04-17 05:20:36 +07:00
|
|
|
*
|
|
|
|
* Copyright (C) 1995-2000 Russell King.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
#ifndef __ASM_ARM_MACH_IRQ_H
|
|
|
|
#define __ASM_ARM_MACH_IRQ_H
|
|
|
|
|
2006-07-02 04:30:09 +07:00
|
|
|
#include <linux/irq.h>
|
2005-04-17 05:20:36 +07:00
|
|
|
|
2006-07-02 04:30:09 +07:00
|
|
|
struct seq_file;
|
2005-09-05 01:45:00 +07:00
|
|
|
|
2005-04-17 05:20:36 +07:00
|
|
|
/*
|
|
|
|
* This is internal. Do not use it.
|
|
|
|
*/
|
|
|
|
extern void init_FIQ(void);
|
2010-11-15 21:33:51 +07:00
|
|
|
extern int show_fiq_list(struct seq_file *, int);
|
2005-04-17 05:20:36 +07:00
|
|
|
|
2010-12-13 15:42:34 +07:00
|
|
|
#ifdef CONFIG_MULTI_IRQ_HANDLER
|
|
|
|
extern void (*handle_arch_irq)(struct pt_regs *);
|
|
|
|
#endif
|
|
|
|
|
2005-04-17 05:20:36 +07:00
|
|
|
/*
|
2006-07-02 04:30:09 +07:00
|
|
|
* This is for easy migration, but should be changed in the source
|
2005-04-17 05:20:36 +07:00
|
|
|
*/
|
2006-10-07 00:53:39 +07:00
|
|
|
#define do_bad_IRQ(irq,desc) \
|
2006-07-02 04:30:09 +07:00
|
|
|
do { \
|
2009-11-17 22:46:45 +07:00
|
|
|
raw_spin_lock(&desc->lock); \
|
2006-10-07 00:53:39 +07:00
|
|
|
handle_bad_irq(irq, desc); \
|
2009-11-17 22:46:45 +07:00
|
|
|
raw_spin_unlock(&desc->lock); \
|
2006-07-02 04:30:09 +07:00
|
|
|
} while(0)
|
|
|
|
|
2011-03-14 20:00:30 +07:00
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
/*
|
|
|
|
* Entry/exit functions for chained handlers where the primary IRQ chip
|
|
|
|
* may implement either fasteoi or level-trigger flow control.
|
|
|
|
*/
|
|
|
|
static inline void chained_irq_enter(struct irq_chip *chip,
|
|
|
|
struct irq_desc *desc)
|
|
|
|
{
|
|
|
|
/* FastEOI controllers require no action on entry. */
|
|
|
|
if (chip->irq_eoi)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (chip->irq_mask_ack) {
|
|
|
|
chip->irq_mask_ack(&desc->irq_data);
|
|
|
|
} else {
|
|
|
|
chip->irq_mask(&desc->irq_data);
|
|
|
|
if (chip->irq_ack)
|
|
|
|
chip->irq_ack(&desc->irq_data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void chained_irq_exit(struct irq_chip *chip,
|
|
|
|
struct irq_desc *desc)
|
|
|
|
{
|
|
|
|
if (chip->irq_eoi)
|
|
|
|
chip->irq_eoi(&desc->irq_data);
|
|
|
|
else
|
|
|
|
chip->irq_unmask(&desc->irq_data);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-04-17 05:20:36 +07:00
|
|
|
#endif
|