1367b8112SChris Zankel /* 2367b8112SChris Zankel * include/asm-xtensa/irq.h 3367b8112SChris Zankel * 4367b8112SChris Zankel * This file is subject to the terms and conditions of the GNU General Public 5367b8112SChris Zankel * License. See the file "COPYING" in the main directory of this archive 6367b8112SChris Zankel * for more details. 7367b8112SChris Zankel * 8367b8112SChris Zankel * Copyright (C) 2001 - 2005 Tensilica Inc. 9367b8112SChris Zankel */ 10367b8112SChris Zankel 11367b8112SChris Zankel #ifndef _XTENSA_IRQ_H 12367b8112SChris Zankel #define _XTENSA_IRQ_H 13367b8112SChris Zankel 141beee210SDaniel Glöckner #include <linux/init.h> 158f8d5745SMax Filippov #include <asm/core.h> 16367b8112SChris Zankel 17994fa1c8SMax Filippov #ifdef CONFIG_PLATFORM_NR_IRQS 18994fa1c8SMax Filippov # define PLATFORM_NR_IRQS CONFIG_PLATFORM_NR_IRQS 19994fa1c8SMax Filippov #else 20367b8112SChris Zankel # define PLATFORM_NR_IRQS 0 21367b8112SChris Zankel #endif 22367b8112SChris Zankel #define XTENSA_NR_IRQS XCHAL_NUM_INTERRUPTS 238b5163ebSMax Filippov #define NR_IRQS (XTENSA_NR_IRQS + PLATFORM_NR_IRQS + 1) 24e5c86679SMax Filippov #define XTENSA_PIC_LINUX_IRQ(hwirq) ((hwirq) + 1) 251beee210SDaniel Glöckner irq_canonicalize(int irq)26367b8112SChris Zankelstatic __inline__ int irq_canonicalize(int irq) 27367b8112SChris Zankel { 28367b8112SChris Zankel return (irq); 29367b8112SChris Zankel } 30367b8112SChris Zankel 31367b8112SChris Zankel struct irqaction; 32cbd1de2eSMax Filippov struct irq_domain; 33cbd1de2eSMax Filippov 3449b424feSMax Filippov void migrate_irqs(void); 35cbd1de2eSMax Filippov int xtensa_irq_domain_xlate(const u32 *intspec, unsigned int intsize, 36cbd1de2eSMax Filippov unsigned long int_irq, unsigned long ext_irq, 37cbd1de2eSMax Filippov unsigned long *out_hwirq, unsigned int *out_type); 38cbd1de2eSMax Filippov int xtensa_irq_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw); 39cbd1de2eSMax Filippov unsigned xtensa_map_ext_irq(unsigned ext_irq); 4026a8e96aSMax Filippov unsigned xtensa_get_ext_irq_no(unsigned irq); 41367b8112SChris Zankel 42367b8112SChris Zankel #endif /* _XTENSA_IRQ_H */ 43