^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) * include/asm-xtensa/irq.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * This file is subject to the terms and conditions of the GNU General Public
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * License. See the file "COPYING" in the main directory of this archive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * Copyright (C) 2001 - 2005 Tensilica Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #ifndef _XTENSA_IRQ_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #define _XTENSA_IRQ_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include <asm/core.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #ifdef CONFIG_PLATFORM_NR_IRQS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) # define PLATFORM_NR_IRQS CONFIG_PLATFORM_NR_IRQS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) # define PLATFORM_NR_IRQS 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #define XTENSA_NR_IRQS XCHAL_NUM_INTERRUPTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #define NR_IRQS (XTENSA_NR_IRQS + PLATFORM_NR_IRQS + 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #define XTENSA_PIC_LINUX_IRQ(hwirq) ((hwirq) + 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) static __inline__ int irq_canonicalize(int irq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) return (irq);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) struct irqaction;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) struct irq_domain;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) void migrate_irqs(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) int xtensa_irq_domain_xlate(const u32 *intspec, unsigned int intsize,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) unsigned long int_irq, unsigned long ext_irq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) unsigned long *out_hwirq, unsigned int *out_type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) int xtensa_irq_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) unsigned xtensa_map_ext_irq(unsigned ext_irq);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) unsigned xtensa_get_ext_irq_no(unsigned irq);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) #endif /* _XTENSA_IRQ_H */