Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 //
0003 // Samsung's S3C64XX flattened device tree enabled machine
0004 //
0005 // Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
0006 
0007 #include <asm/mach/arch.h>
0008 #include <asm/mach/map.h>
0009 #include <asm/system_misc.h>
0010 
0011 #include "cpu.h"
0012 #include "map.h"
0013 
0014 #include "s3c64xx.h"
0015 
0016 /*
0017  * IO mapping for shared system controller IP.
0018  *
0019  * FIXME: Make remaining drivers use dynamic mapping.
0020  */
0021 static struct map_desc s3c64xx_dt_iodesc[] __initdata = {
0022     {
0023         .virtual    = (unsigned long)S3C_VA_SYS,
0024         .pfn        = __phys_to_pfn(S3C64XX_PA_SYSCON),
0025         .length     = SZ_4K,
0026         .type       = MT_DEVICE,
0027     },
0028 };
0029 
0030 static void __init s3c64xx_dt_map_io(void)
0031 {
0032     debug_ll_io_init();
0033     iotable_init(s3c64xx_dt_iodesc, ARRAY_SIZE(s3c64xx_dt_iodesc));
0034 
0035     s3c64xx_init_cpu();
0036 
0037     if (!soc_is_s3c64xx())
0038         panic("SoC is not S3C64xx!");
0039 }
0040 
0041 static const char *const s3c64xx_dt_compat[] __initconst = {
0042     "samsung,s3c6400",
0043     "samsung,s3c6410",
0044     NULL
0045 };
0046 
0047 DT_MACHINE_START(S3C6400_DT, "Samsung S3C64xx (Flattened Device Tree)")
0048     /* Maintainer: Tomasz Figa <tomasz.figa@gmail.com> */
0049     .dt_compat  = s3c64xx_dt_compat,
0050     .map_io     = s3c64xx_dt_map_io,
0051 MACHINE_END