blob: 0f71a51dab2524647599092dc28bf4782a5ee541 [file] [log] [blame]
Chris Zankel9a8fd552005-06-23 22:01:26 -07001/*
2 * include/asm-xtensa/irq.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_IRQ_H
12#define _XTENSA_IRQ_H
13
Daniel Glöckner1beee212009-05-05 15:03:21 +000014#include <linux/init.h>
Max Filippov8f8d5742019-01-01 19:41:55 -080015#include <asm/core.h>
Chris Zankel9a8fd552005-06-23 22:01:26 -070016
Max Filippov994fa1c2018-08-13 18:11:38 -070017#ifdef CONFIG_PLATFORM_NR_IRQS
18# define PLATFORM_NR_IRQS CONFIG_PLATFORM_NR_IRQS
19#else
Chris Zankel9a8fd552005-06-23 22:01:26 -070020# define PLATFORM_NR_IRQS 0
21#endif
22#define XTENSA_NR_IRQS XCHAL_NUM_INTERRUPTS
Max Filippov8b5163e2018-08-13 18:21:08 -070023#define NR_IRQS (XTENSA_NR_IRQS + PLATFORM_NR_IRQS + 1)
Max Filippove5c86672017-06-05 02:43:51 -070024#define XTENSA_PIC_LINUX_IRQ(hwirq) ((hwirq) + 1)
Daniel Glöckner1beee212009-05-05 15:03:21 +000025
Chris Zankel9a8fd552005-06-23 22:01:26 -070026static __inline__ int irq_canonicalize(int irq)
27{
28 return (irq);
29}
30
31struct irqaction;
Max Filippovcbd1de22013-12-01 12:59:49 +040032struct irq_domain;
33
Max Filippov49b424f2013-10-17 02:42:28 +040034void migrate_irqs(void);
Max Filippovcbd1de22013-12-01 12:59:49 +040035int xtensa_irq_domain_xlate(const u32 *intspec, unsigned int intsize,
36 unsigned long int_irq, unsigned long ext_irq,
37 unsigned long *out_hwirq, unsigned int *out_type);
38int xtensa_irq_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw);
39unsigned xtensa_map_ext_irq(unsigned ext_irq);
Max Filippov26a8e962013-12-01 12:04:57 +040040unsigned xtensa_get_ext_irq_no(unsigned irq);
Chris Zankel9a8fd552005-06-23 22:01:26 -070041
42#endif /* _XTENSA_IRQ_H */