mach-s3c64xx-dt.c 1.1 KB

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