1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * sh73a0 processor support
4  *
5  * Copyright (C) 2010  Takashi Yoshii
6  * Copyright (C) 2010  Magnus Damm
7  * Copyright (C) 2008  Yoshihiro Shimoda
8  */
9 #include <linux/kernel.h>
10 #include <linux/init.h>
11 #include <linux/interrupt.h>
12 #include <linux/irq.h>
13 #include <linux/delay.h>
14 #include <linux/input.h>
15 #include <linux/io.h>
16 
17 #include <asm/hardware/cache-l2x0.h>
18 #include <asm/mach/map.h>
19 #include <asm/mach/arch.h>
20 #include <asm/mach/time.h>
21 
22 #include "common.h"
23 #include "sh73a0.h"
24 
25 static struct map_desc sh73a0_io_desc[] __initdata = {
26 	/* create a 1:1 identity mapping for 0xe6xxxxxx
27 	 * used by CPGA, INTC and PFC.
28 	 */
29 	{
30 		.virtual	= 0xe6000000,
31 		.pfn		= __phys_to_pfn(0xe6000000),
32 		.length		= 256 << 20,
33 		.type		= MT_DEVICE_NONSHARED
34 	},
35 };
36 
37 static void __init sh73a0_map_io(void)
38 {
39 	debug_ll_io_init();
40 	iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc));
41 }
42 
43 static void __init sh73a0_generic_init(void)
44 {
45 #ifdef CONFIG_CACHE_L2X0
46 	/* Shared attribute override enable, 64K*8way */
47 	l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff);
48 #endif
49 }
50 
51 static const char *const sh73a0_boards_compat_dt[] __initconst = {
52 	"renesas,sh73a0",
53 	NULL,
54 };
55 
56 DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)")
57 	.smp		= smp_ops(sh73a0_smp_ops),
58 	.map_io		= sh73a0_map_io,
59 	.init_machine	= sh73a0_generic_init,
60 	.init_late	= shmobile_init_late,
61 	.dt_compat	= sh73a0_boards_compat_dt,
62 MACHINE_END
63