spear1310.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * arch/arm/mach-spear13xx/spear1310.c
  3. *
  4. * SPEAr1310 machine source file
  5. *
  6. * Copyright (C) 2012 ST Microelectronics
  7. * Viresh Kumar <vireshk@kernel.org>
  8. *
  9. * This file is licensed under the terms of the GNU General Public
  10. * License version 2. This program is licensed "as is" without any
  11. * warranty of any kind, whether express or implied.
  12. */
  13. #define pr_fmt(fmt) "SPEAr1310: " fmt
  14. #include <linux/amba/pl022.h>
  15. #include <linux/pata_arasan_cf_data.h>
  16. #include <asm/mach/arch.h>
  17. #include <asm/mach/map.h>
  18. #include "generic.h"
  19. #include <mach/spear.h>
  20. /* Base addresses */
  21. #define SPEAR1310_RAS_GRP1_BASE UL(0xD8000000)
  22. #define VA_SPEAR1310_RAS_GRP1_BASE UL(0xFA000000)
  23. static void __init spear1310_dt_init(void)
  24. {
  25. platform_device_register_simple("spear-cpufreq", -1, NULL, 0);
  26. }
  27. static const char * const spear1310_dt_board_compat[] = {
  28. "st,spear1310",
  29. "st,spear1310-evb",
  30. NULL,
  31. };
  32. /*
  33. * Following will create 16MB static virtual/physical mappings
  34. * PHYSICAL VIRTUAL
  35. * 0xD8000000 0xFA000000
  36. */
  37. static struct map_desc spear1310_io_desc[] __initdata = {
  38. {
  39. .virtual = VA_SPEAR1310_RAS_GRP1_BASE,
  40. .pfn = __phys_to_pfn(SPEAR1310_RAS_GRP1_BASE),
  41. .length = SZ_16M,
  42. .type = MT_DEVICE
  43. },
  44. };
  45. static void __init spear1310_map_io(void)
  46. {
  47. iotable_init(spear1310_io_desc, ARRAY_SIZE(spear1310_io_desc));
  48. spear13xx_map_io();
  49. }
  50. DT_MACHINE_START(SPEAR1310_DT, "ST SPEAr1310 SoC with Flattened Device Tree")
  51. .smp = smp_ops(spear13xx_smp_ops),
  52. .map_io = spear1310_map_io,
  53. .init_time = spear13xx_timer_init,
  54. .init_machine = spear1310_dt_init,
  55. .restart = spear_restart,
  56. .dt_compat = spear1310_dt_board_compat,
  57. MACHINE_END