hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// SPDX-License-Identifier: GPL-2.0
/*
 * r8a7778 processor support
 *
 * Copyright (C) 2013  Renesas Solutions Corp.
 * Copyright (C) 2013  Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
 * Copyright (C) 2013  Cogent Embedded, Inc.
 */
 
#include <linux/io.h>
#include <linux/irqchip.h>
 
#include <asm/mach/arch.h>
 
#include "common.h"
 
#define INT2SMSKCR0    0x82288 /* 0xfe782288 */
#define INT2SMSKCR1    0x8228c /* 0xfe78228c */
 
#define INT2NTSR0    0x00018 /* 0xfe700018 */
#define INT2NTSR1    0x0002c /* 0xfe70002c */
 
static void __init r8a7778_init_irq_dt(void)
{
   void __iomem *base = ioremap(0xfe700000, 0x00100000);
 
   BUG_ON(!base);
 
   irqchip_init();
 
   /* route all interrupts to ARM */
   __raw_writel(0x73ffffff, base + INT2NTSR0);
   __raw_writel(0xffffffff, base + INT2NTSR1);
 
   /* unmask all known interrupts in INTCS2 */
   __raw_writel(0x08330773, base + INT2SMSKCR0);
   __raw_writel(0x00311110, base + INT2SMSKCR1);
 
   iounmap(base);
}
 
static const char *const r8a7778_compat_dt[] __initconst = {
   "renesas,r8a7778",
   NULL,
};
 
DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)")
   .init_early    = shmobile_init_delay,
   .init_irq    = r8a7778_init_irq_dt,
   .init_late    = shmobile_init_late,
   .dt_compat    = r8a7778_compat_dt,
MACHINE_END