treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / sh / kernel / cpu / sh4a / intc-shx3.c
blobeea87d25efbb3fd9c09066a34aeac45b49ce7968
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Shared support for SH-X3 interrupt controllers.
5 * Copyright (C) 2009 - 2010 Paul Mundt
6 */
7 #include <linux/irq.h>
8 #include <linux/io.h>
9 #include <linux/init.h>
11 #define INTACK 0xfe4100b8
12 #define INTACKCLR 0xfe4100bc
13 #define INTC_USERIMASK 0xfe411000
15 #ifdef CONFIG_INTC_BALANCING
16 unsigned int irq_lookup(unsigned int irq)
18 return __raw_readl(INTACK) & 1 ? irq : NO_IRQ_IGNORE;
21 void irq_finish(unsigned int irq)
23 __raw_writel(irq2evt(irq), INTACKCLR);
25 #endif
27 static int __init shx3_irq_setup(void)
29 return register_intc_userimask(INTC_USERIMASK);
31 arch_initcall(shx3_irq_setup);