2018-06-14 04:56:06 +03:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2013-03-21 14:01:36 +04:00
|
|
|
/*
|
|
|
|
* r8a7778 processor support
|
|
|
|
*
|
|
|
|
* Copyright (C) 2013 Renesas Solutions Corp.
|
|
|
|
* Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
|
2013-04-04 22:55:46 +04:00
|
|
|
* Copyright (C) 2013 Cogent Embedded, Inc.
|
2013-03-21 14:01:36 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/io.h>
|
|
|
|
#include <linux/irqchip.h>
|
2014-06-20 20:53:04 +04:00
|
|
|
|
2013-03-21 14:01:36 +04:00
|
|
|
#include <asm/mach/arch.h>
|
|
|
|
|
2014-06-17 11:47:37 +04:00
|
|
|
#include "common.h"
|
2013-03-21 14:01:36 +04:00
|
|
|
|
2020-11-17 13:30:16 +03:00
|
|
|
#define HPBREG_BASE 0xfe700000
|
|
|
|
|
2013-03-21 14:01:36 +04:00
|
|
|
#define INT2SMSKCR0 0x82288 /* 0xfe782288 */
|
|
|
|
#define INT2SMSKCR1 0x8228c /* 0xfe78228c */
|
|
|
|
|
|
|
|
#define INT2NTSR0 0x00018 /* 0xfe700018 */
|
|
|
|
#define INT2NTSR1 0x0002c /* 0xfe70002c */
|
2015-09-30 18:50:19 +03:00
|
|
|
|
|
|
|
static void __init r8a7778_init_irq_dt(void)
|
2013-03-21 14:01:36 +04:00
|
|
|
{
|
2020-11-17 13:30:16 +03:00
|
|
|
void __iomem *base = ioremap(HPBREG_BASE, 0x00100000);
|
2013-03-21 14:01:36 +04:00
|
|
|
|
|
|
|
BUG_ON(!base);
|
|
|
|
|
2013-07-09 12:48:34 +04:00
|
|
|
irqchip_init();
|
2015-08-14 16:51:03 +03:00
|
|
|
|
2013-03-21 14:01:36 +04:00
|
|
|
/* route all interrupts to ARM */
|
2020-11-17 17:24:47 +03:00
|
|
|
writel(0x73ffffff, base + INT2NTSR0);
|
|
|
|
writel(0xffffffff, base + INT2NTSR1);
|
2013-03-21 14:01:36 +04:00
|
|
|
|
|
|
|
/* unmask all known interrupts in INTCS2 */
|
2020-11-17 17:24:47 +03:00
|
|
|
writel(0x08330773, base + INT2SMSKCR0);
|
|
|
|
writel(0x00311110, base + INT2SMSKCR1);
|
2013-03-21 14:01:36 +04:00
|
|
|
|
|
|
|
iounmap(base);
|
|
|
|
}
|
|
|
|
|
2015-07-28 01:27:52 +03:00
|
|
|
static const char *const r8a7778_compat_dt[] __initconst = {
|
2013-03-21 14:01:36 +04:00
|
|
|
"renesas,r8a7778",
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)")
|
2014-10-17 16:24:38 +04:00
|
|
|
.init_early = shmobile_init_delay,
|
2013-03-21 14:01:36 +04:00
|
|
|
.init_irq = r8a7778_init_irq_dt,
|
2014-07-31 03:32:50 +04:00
|
|
|
.init_late = shmobile_init_late,
|
2013-03-21 14:01:36 +04:00
|
|
|
.dt_compat = r8a7778_compat_dt,
|
|
|
|
MACHINE_END
|