1 // SPDX-License-Identifier: GPL-2.0 2 // 3 // Samsung's S3C64XX flattened device tree enabled machine 4 // 5 // Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com> 6 7 #include <asm/mach/arch.h> 8 #include <asm/mach/map.h> 9 #include <asm/system_misc.h> 10 11 #include "cpu.h" 12 #include "map.h" 13 14 #include "s3c64xx.h" 15 16 /* 17 * IO mapping for shared system controller IP. 18 * 19 * FIXME: Make remaining drivers use dynamic mapping. 20 */ 21 static struct map_desc s3c64xx_dt_iodesc[] __initdata = { 22 { 23 .virtual = (unsigned long)S3C_VA_SYS, 24 .pfn = __phys_to_pfn(S3C64XX_PA_SYSCON), 25 .length = SZ_4K, 26 .type = MT_DEVICE, 27 }, 28 }; 29 30 static void __init s3c64xx_dt_map_io(void) 31 { 32 debug_ll_io_init(); 33 iotable_init(s3c64xx_dt_iodesc, ARRAY_SIZE(s3c64xx_dt_iodesc)); 34 35 s3c64xx_init_cpu(); 36 37 if (!soc_is_s3c64xx()) 38 panic("SoC is not S3C64xx!"); 39 } 40 41 static const char *const s3c64xx_dt_compat[] __initconst = { 42 "samsung,s3c6400", 43 "samsung,s3c6410", 44 NULL 45 }; 46 47 DT_MACHINE_START(S3C6400_DT, "Samsung S3C64xx (Flattened Device Tree)") 48 /* Maintainer: Tomasz Figa <tomasz.figa@gmail.com> */ 49 .dt_compat = s3c64xx_dt_compat, 50 .map_io = s3c64xx_dt_map_io, 51 MACHINE_END 52