spear1310.c 1.5 KB

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