2 * Samsung's S3C64XX flattened device tree enabled machine
4 * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
11 #include <linux/of_platform.h>
13 #include <asm/mach/arch.h>
14 #include <asm/mach/map.h>
15 #include <asm/system_misc.h>
18 #include <plat/watchdog-reset.h>
25 * IO mapping for shared system controller IP.
27 * FIXME: Make remaining drivers use dynamic mapping.
29 static struct map_desc s3c64xx_dt_iodesc
[] __initdata
= {
31 .virtual = (unsigned long)S3C_VA_SYS
,
32 .pfn
= __phys_to_pfn(S3C64XX_PA_SYSCON
),
38 static void __init
s3c64xx_dt_map_io(void)
41 iotable_init(s3c64xx_dt_iodesc
, ARRAY_SIZE(s3c64xx_dt_iodesc
));
45 if (!soc_is_s3c64xx())
46 panic("SoC is not S3C64xx!");
49 static void __init
s3c64xx_dt_init_machine(void)
51 samsung_wdt_reset_of_init();
52 of_platform_populate(NULL
, of_default_bus_match_table
, NULL
, NULL
);
55 static void s3c64xx_dt_restart(enum reboot_mode mode
, const char *cmd
)
57 if (mode
!= REBOOT_SOFT
)
60 /* if all else fails, or mode was for soft, jump to 0 */
64 static char const *s3c64xx_dt_compat
[] __initdata
= {
70 DT_MACHINE_START(S3C6400_DT
, "Samsung S3C64xx (Flattened Device Tree)")
71 /* Maintainer: Tomasz Figa <tomasz.figa@gmail.com> */
72 .dt_compat
= s3c64xx_dt_compat
,
73 .map_io
= s3c64xx_dt_map_io
,
74 .init_machine
= s3c64xx_dt_init_machine
,
75 .restart
= s3c64xx_dt_restart
,