1 // SPDX-License-Identifier: GPL-2.0
3 * Shared support for SH-X3 interrupt controllers.
5 * Copyright (C) 2009 - 2010 Paul Mundt
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
);
27 static int __init
shx3_irq_setup(void)
29 return register_intc_userimask(INTC_USERIMASK
);
31 arch_initcall(shx3_irq_setup
);