Path: blob/master/arch/sh/kernel/cpu/sh4a/intc-shx3.c
17604 views
/*1* Shared support for SH-X3 interrupt controllers.2*3* Copyright (C) 2009 - 2010 Paul Mundt4*5* This file is subject to the terms and conditions of the GNU General Public6* License. See the file "COPYING" in the main directory of this archive7* for more details.8*/9#include <linux/irq.h>10#include <linux/io.h>11#include <linux/init.h>1213#define INTACK 0xfe4100b814#define INTACKCLR 0xfe4100bc15#define INTC_USERIMASK 0xfe4110001617#ifdef CONFIG_INTC_BALANCING18unsigned int irq_lookup(unsigned int irq)19{20return __raw_readl(INTACK) & 1 ? irq : NO_IRQ_IGNORE;21}2223void irq_finish(unsigned int irq)24{25__raw_writel(irq2evt(irq), INTACKCLR);26}27#endif2829static int __init shx3_irq_setup(void)30{31return register_intc_userimask(INTC_USERIMASK);32}33arch_initcall(shx3_irq_setup);343536