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