xref: /openbmc/linux/arch/sh/boards/mach-se/7721/irq.c (revision 9726bfcd)
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * linux/arch/sh/boards/se/7721/irq.c
4  *
5  * Copyright (C) 2008  Renesas Solutions Corp.
6  */
7 #include <linux/init.h>
8 #include <linux/irq.h>
9 #include <linux/interrupt.h>
10 #include <linux/io.h>
11 #include <mach-se/mach/se7721.h>
12 
13 enum {
14 	UNUSED = 0,
15 
16 	/* board specific interrupt sources */
17 	MRSHPC,
18 };
19 
20 static struct intc_vect vectors[] __initdata = {
21 	INTC_IRQ(MRSHPC, MRSHPC_IRQ0),
22 };
23 
24 static struct intc_prio_reg prio_registers[] __initdata = {
25 	{ FPGA_ILSR6, 0, 8, 4, /* IRLMSK */
26 	  { 0, MRSHPC } },
27 };
28 
29 static DECLARE_INTC_DESC(intc_desc, "SE7721", vectors,
30 			 NULL, NULL, prio_registers, NULL);
31 
32 /*
33  * Initialize IRQ setting
34  */
35 void __init init_se7721_IRQ(void)
36 {
37 	/* PPCR */
38 	__raw_writew(__raw_readw(0xa4050118) & ~0x00ff, 0xa4050118);
39 
40 	register_intc_controller(&intc_desc);
41 	intc_set_priority(MRSHPC_IRQ0, 0xf - MRSHPC_IRQ0);
42 }
43