2005-06-24 13:01:26 +08:00
|
|
|
/*
|
|
|
|
* include/asm-xtensa/irq.h
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
|
|
* for more details.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2001 - 2005 Tensilica Inc.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _XTENSA_IRQ_H
|
|
|
|
#define _XTENSA_IRQ_H
|
|
|
|
|
2009-05-05 23:03:21 +08:00
|
|
|
#include <linux/init.h>
|
2008-11-06 22:40:46 +08:00
|
|
|
#include <platform/hardware.h>
|
|
|
|
#include <variant/core.h>
|
2005-06-24 13:01:26 +08:00
|
|
|
|
2009-03-04 23:21:31 +08:00
|
|
|
#ifdef CONFIG_VARIANT_IRQ_SWITCH
|
|
|
|
#include <variant/irq.h>
|
|
|
|
#else
|
|
|
|
static inline void variant_irq_enable(unsigned int irq) { }
|
|
|
|
static inline void variant_irq_disable(unsigned int irq) { }
|
|
|
|
#endif
|
|
|
|
|
2009-05-05 23:03:21 +08:00
|
|
|
#ifndef VARIANT_NR_IRQS
|
|
|
|
# define VARIANT_NR_IRQS 0
|
|
|
|
#endif
|
2005-06-24 13:01:26 +08:00
|
|
|
#ifndef PLATFORM_NR_IRQS
|
|
|
|
# define PLATFORM_NR_IRQS 0
|
|
|
|
#endif
|
|
|
|
#define XTENSA_NR_IRQS XCHAL_NUM_INTERRUPTS
|
2017-06-05 17:43:51 +08:00
|
|
|
#define NR_IRQS (XTENSA_NR_IRQS + VARIANT_NR_IRQS + PLATFORM_NR_IRQS + 1)
|
|
|
|
#define XTENSA_PIC_LINUX_IRQ(hwirq) ((hwirq) + 1)
|
2009-05-05 23:03:21 +08:00
|
|
|
|
|
|
|
#if VARIANT_NR_IRQS == 0
|
|
|
|
static inline void variant_init_irq(void) { }
|
|
|
|
#else
|
|
|
|
void variant_init_irq(void) __init;
|
|
|
|
#endif
|
2005-06-24 13:01:26 +08:00
|
|
|
|
|
|
|
static __inline__ int irq_canonicalize(int irq)
|
|
|
|
{
|
|
|
|
return (irq);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct irqaction;
|
2013-12-01 16:59:49 +08:00
|
|
|
struct irq_domain;
|
|
|
|
|
2013-10-17 06:42:28 +08:00
|
|
|
void migrate_irqs(void);
|
2013-12-01 16:59:49 +08:00
|
|
|
int xtensa_irq_domain_xlate(const u32 *intspec, unsigned int intsize,
|
|
|
|
unsigned long int_irq, unsigned long ext_irq,
|
|
|
|
unsigned long *out_hwirq, unsigned int *out_type);
|
|
|
|
int xtensa_irq_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw);
|
|
|
|
unsigned xtensa_map_ext_irq(unsigned ext_irq);
|
2013-12-01 16:04:57 +08:00
|
|
|
unsigned xtensa_get_ext_irq_no(unsigned irq);
|
2005-06-24 13:01:26 +08:00
|
|
|
|
|
|
|
#endif /* _XTENSA_IRQ_H */
|