xref: /linux/arch/arm/mach-s3c/mach-s3c64xx-dt.c (revision cbecf716ca618fd44feda6bd9a64a8179d031fc5)
171b9114dSArnd Bergmann // SPDX-License-Identifier: GPL-2.0
271b9114dSArnd Bergmann //
371b9114dSArnd Bergmann // Samsung's S3C64XX flattened device tree enabled machine
471b9114dSArnd Bergmann //
571b9114dSArnd Bergmann // Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
671b9114dSArnd Bergmann 
771b9114dSArnd Bergmann #include <asm/mach/arch.h>
871b9114dSArnd Bergmann #include <asm/mach/map.h>
971b9114dSArnd Bergmann #include <asm/system_misc.h>
1071b9114dSArnd Bergmann 
11*c6ff132dSArnd Bergmann #include "cpu.h"
12*c6ff132dSArnd Bergmann #include "map.h"
1371b9114dSArnd Bergmann 
1471b9114dSArnd Bergmann #include "s3c64xx.h"
1571b9114dSArnd Bergmann 
1671b9114dSArnd Bergmann /*
1771b9114dSArnd Bergmann  * IO mapping for shared system controller IP.
1871b9114dSArnd Bergmann  *
1971b9114dSArnd Bergmann  * FIXME: Make remaining drivers use dynamic mapping.
2071b9114dSArnd Bergmann  */
2171b9114dSArnd Bergmann static struct map_desc s3c64xx_dt_iodesc[] __initdata = {
2271b9114dSArnd Bergmann 	{
2371b9114dSArnd Bergmann 		.virtual	= (unsigned long)S3C_VA_SYS,
2471b9114dSArnd Bergmann 		.pfn		= __phys_to_pfn(S3C64XX_PA_SYSCON),
2571b9114dSArnd Bergmann 		.length		= SZ_4K,
2671b9114dSArnd Bergmann 		.type		= MT_DEVICE,
2771b9114dSArnd Bergmann 	},
2871b9114dSArnd Bergmann };
2971b9114dSArnd Bergmann 
s3c64xx_dt_map_io(void)3071b9114dSArnd Bergmann static void __init s3c64xx_dt_map_io(void)
3171b9114dSArnd Bergmann {
3271b9114dSArnd Bergmann 	debug_ll_io_init();
3371b9114dSArnd Bergmann 	iotable_init(s3c64xx_dt_iodesc, ARRAY_SIZE(s3c64xx_dt_iodesc));
3471b9114dSArnd Bergmann 
3571b9114dSArnd Bergmann 	s3c64xx_init_cpu();
3671b9114dSArnd Bergmann 
3771b9114dSArnd Bergmann 	if (!soc_is_s3c64xx())
3871b9114dSArnd Bergmann 		panic("SoC is not S3C64xx!");
3971b9114dSArnd Bergmann }
4071b9114dSArnd Bergmann 
4171b9114dSArnd Bergmann static const char *const s3c64xx_dt_compat[] __initconst = {
4271b9114dSArnd Bergmann 	"samsung,s3c6400",
4371b9114dSArnd Bergmann 	"samsung,s3c6410",
4471b9114dSArnd Bergmann 	NULL
4571b9114dSArnd Bergmann };
4671b9114dSArnd Bergmann 
4771b9114dSArnd Bergmann DT_MACHINE_START(S3C6400_DT, "Samsung S3C64xx (Flattened Device Tree)")
4871b9114dSArnd Bergmann 	/* Maintainer: Tomasz Figa <tomasz.figa@gmail.com> */
4971b9114dSArnd Bergmann 	.dt_compat	= s3c64xx_dt_compat,
5071b9114dSArnd Bergmann 	.map_io		= s3c64xx_dt_map_io,
5171b9114dSArnd Bergmann MACHINE_END
52