2011-11-11 02:45:52 +00:00
|
|
|
/*
|
|
|
|
* R8A7740 processor support
|
|
|
|
*
|
|
|
|
* Copyright (C) 2011 Renesas Solutions Corp.
|
|
|
|
* Copyright (C) 2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
2011-11-11 02:46:35 +00:00
|
|
|
#include <linux/init.h>
|
2011-11-11 02:45:52 +00:00
|
|
|
#include <linux/io.h>
|
2013-04-17 10:34:04 +00:00
|
|
|
#include <linux/irqchip.h>
|
2013-03-27 13:54:04 +00:00
|
|
|
#include <linux/irqchip/arm-gic.h>
|
2011-11-11 02:45:52 +00:00
|
|
|
|
2013-08-02 06:39:13 +00:00
|
|
|
void __init r8a7740_init_irq_of(void)
|
2011-11-11 02:45:52 +00:00
|
|
|
{
|
2013-03-27 13:54:04 +00:00
|
|
|
void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10);
|
|
|
|
void __iomem *intc_msk_base = ioremap_nocache(0xe6900040, 0x10);
|
|
|
|
void __iomem *pfc_inta_ctrl = ioremap_nocache(0xe605807c, 0x4);
|
|
|
|
|
2013-08-02 06:39:13 +00:00
|
|
|
irqchip_init();
|
|
|
|
|
2013-03-27 13:54:04 +00:00
|
|
|
/* route signals to GIC */
|
|
|
|
iowrite32(0x0, pfc_inta_ctrl);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* To mask the shared interrupt to SPI 149 we must ensure to set
|
|
|
|
* PRIO *and* MASK. Else we run into IRQ floods when registering
|
|
|
|
* the intc_irqpin devices
|
|
|
|
*/
|
|
|
|
iowrite32(0x0, intc_prio_base + 0x0);
|
|
|
|
iowrite32(0x0, intc_prio_base + 0x4);
|
|
|
|
iowrite32(0x0, intc_prio_base + 0x8);
|
|
|
|
iowrite32(0x0, intc_prio_base + 0xc);
|
|
|
|
iowrite8(0xff, intc_msk_base + 0x0);
|
|
|
|
iowrite8(0xff, intc_msk_base + 0x4);
|
|
|
|
iowrite8(0xff, intc_msk_base + 0x8);
|
|
|
|
iowrite8(0xff, intc_msk_base + 0xc);
|
|
|
|
|
|
|
|
iounmap(intc_prio_base);
|
|
|
|
iounmap(intc_msk_base);
|
|
|
|
iounmap(pfc_inta_ctrl);
|
2011-11-11 02:45:52 +00:00
|
|
|
}
|