xref: /linux/arch/sh/boards/mach-se/7721/irq.c (revision 9d56dd3b083a3bec56e9da35ce07baca81030b03)
1da2014a2SPaul Mundt /*
2da2014a2SPaul Mundt  * linux/arch/sh/boards/se/7721/irq.c
3da2014a2SPaul Mundt  *
4da2014a2SPaul Mundt  * Copyright (C) 2008  Renesas Solutions Corp.
5da2014a2SPaul Mundt  *
6da2014a2SPaul Mundt  * This file is subject to the terms and conditions of the GNU General Public
7da2014a2SPaul Mundt  * License.  See the file "COPYING" in the main directory of this archive
8da2014a2SPaul Mundt  * for more details.
9da2014a2SPaul Mundt  */
10da2014a2SPaul Mundt #include <linux/init.h>
11da2014a2SPaul Mundt #include <linux/irq.h>
12da2014a2SPaul Mundt #include <linux/interrupt.h>
13da2014a2SPaul Mundt #include <linux/io.h>
14939a24a6SPaul Mundt #include <mach-se/mach/se7721.h>
15da2014a2SPaul Mundt 
16da2014a2SPaul Mundt enum {
17da2014a2SPaul Mundt 	UNUSED = 0,
18da2014a2SPaul Mundt 
19da2014a2SPaul Mundt 	/* board specific interrupt sources */
20da2014a2SPaul Mundt 	MRSHPC,
21da2014a2SPaul Mundt };
22da2014a2SPaul Mundt 
23da2014a2SPaul Mundt static struct intc_vect vectors[] __initdata = {
24da2014a2SPaul Mundt 	INTC_IRQ(MRSHPC, MRSHPC_IRQ0),
25da2014a2SPaul Mundt };
26da2014a2SPaul Mundt 
27da2014a2SPaul Mundt static struct intc_prio_reg prio_registers[] __initdata = {
28da2014a2SPaul Mundt 	{ FPGA_ILSR6, 0, 8, 4, /* IRLMSK */
29da2014a2SPaul Mundt 	  { 0, MRSHPC } },
30da2014a2SPaul Mundt };
31da2014a2SPaul Mundt 
32da2014a2SPaul Mundt static DECLARE_INTC_DESC(intc_desc, "SE7721", vectors,
33da2014a2SPaul Mundt 			 NULL, NULL, prio_registers, NULL);
34da2014a2SPaul Mundt 
35da2014a2SPaul Mundt /*
36da2014a2SPaul Mundt  * Initialize IRQ setting
37da2014a2SPaul Mundt  */
38da2014a2SPaul Mundt void __init init_se7721_IRQ(void)
39da2014a2SPaul Mundt {
40da2014a2SPaul Mundt 	/* PPCR */
41*9d56dd3bSPaul Mundt 	__raw_writew(__raw_readw(0xa4050118) & ~0x00ff, 0xa4050118);
42da2014a2SPaul Mundt 
43da2014a2SPaul Mundt 	register_intc_controller(&intc_desc);
44da2014a2SPaul Mundt 	intc_set_priority(MRSHPC_IRQ0, 0xf - MRSHPC_IRQ0);
45da2014a2SPaul Mundt }
46