diff options
Diffstat (limited to 'arch/mips/loongson/common/bonito-irq.c')
| -rw-r--r-- | arch/mips/loongson/common/bonito-irq.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/mips/loongson/common/bonito-irq.c b/arch/mips/loongson/common/bonito-irq.c index 3e31e7ad713..2dc2a4cc632 100644 --- a/arch/mips/loongson/common/bonito-irq.c +++ b/arch/mips/loongson/common/bonito-irq.c | |||
| @@ -12,18 +12,19 @@ | |||
| 12 | * option) any later version. | 12 | * option) any later version. |
| 13 | */ | 13 | */ |
| 14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
| 15 | #include <linux/compiler.h> | ||
| 15 | 16 | ||
| 16 | #include <loongson.h> | 17 | #include <loongson.h> |
| 17 | 18 | ||
| 18 | static inline void bonito_irq_enable(unsigned int irq) | 19 | static inline void bonito_irq_enable(unsigned int irq) |
| 19 | { | 20 | { |
| 20 | BONITO_INTENSET = (1 << (irq - BONITO_IRQ_BASE)); | 21 | LOONGSON_INTENSET = (1 << (irq - LOONGSON_IRQ_BASE)); |
| 21 | mmiowb(); | 22 | mmiowb(); |
| 22 | } | 23 | } |
| 23 | 24 | ||
| 24 | static inline void bonito_irq_disable(unsigned int irq) | 25 | static inline void bonito_irq_disable(unsigned int irq) |
| 25 | { | 26 | { |
| 26 | BONITO_INTENCLR = (1 << (irq - BONITO_IRQ_BASE)); | 27 | LOONGSON_INTENCLR = (1 << (irq - LOONGSON_IRQ_BASE)); |
| 27 | mmiowb(); | 28 | mmiowb(); |
| 28 | } | 29 | } |
| 29 | 30 | ||
| @@ -35,7 +36,7 @@ static struct irq_chip bonito_irq_type = { | |||
| 35 | .unmask = bonito_irq_enable, | 36 | .unmask = bonito_irq_enable, |
| 36 | }; | 37 | }; |
| 37 | 38 | ||
| 38 | static struct irqaction dma_timeout_irqaction = { | 39 | static struct irqaction __maybe_unused dma_timeout_irqaction = { |
| 39 | .handler = no_action, | 40 | .handler = no_action, |
| 40 | .name = "dma_timeout", | 41 | .name = "dma_timeout", |
| 41 | }; | 42 | }; |
| @@ -44,8 +45,10 @@ void bonito_irq_init(void) | |||
| 44 | { | 45 | { |
| 45 | u32 i; | 46 | u32 i; |
| 46 | 47 | ||
| 47 | for (i = BONITO_IRQ_BASE; i < BONITO_IRQ_BASE + 32; i++) | 48 | for (i = LOONGSON_IRQ_BASE; i < LOONGSON_IRQ_BASE + 32; i++) |
| 48 | set_irq_chip_and_handler(i, &bonito_irq_type, handle_level_irq); | 49 | set_irq_chip_and_handler(i, &bonito_irq_type, handle_level_irq); |
| 49 | 50 | ||
| 50 | setup_irq(BONITO_IRQ_BASE + 10, &dma_timeout_irqaction); | 51 | #ifdef CONFIG_CPU_LOONGSON2E |
| 52 | setup_irq(LOONGSON_IRQ_BASE + 10, &dma_timeout_irqaction); | ||
| 53 | #endif | ||
| 51 | } | 54 | } |
