blob: c62a2059f2f7a94020a003f17f3560e4e11b9ac6 [file] [log] [blame]
Kuninori Morimoto6c01ba42011-11-10 18:45:52 -08001/*
2 * R8A7740 processor support
3 *
4 * Copyright (C) 2011 Renesas Solutions Corp.
5 * Copyright (C) 2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include <linux/irq.h>
22#include <linux/io.h>
23#include <asm/hardware/gic.h>
24
25#define INTA_CTRL 0xe605807c
26
27static int r8a7740_set_wake(struct irq_data *data, unsigned int on)
28{
29 return 0; /* always allow wakeup */
30}
31
32void __init r8a7740_init_irq(void)
33{
34 void __iomem *gic_dist_base = __io(0xf0001000);
35 void __iomem *gic_cpu_base = __io(0xf0000000);
36
37 /*
38 * Change INT_SEL INTCA->GIC
39 * (on GPIO)
40 */
41 __raw_writel(__raw_readl(INTA_CTRL) & ~(1 << 1), INTA_CTRL);
42
43 gic_init(0, 29, gic_dist_base, gic_cpu_base);
44 gic_arch_extn.irq_set_wake = r8a7740_set_wake;
45}