common.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * Defines machines for CSR SiRFprimaII
  3. *
  4. * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
  5. *
  6. * Licensed under GPLv2 or later.
  7. */
  8. #include <linux/clocksource.h>
  9. #include <linux/init.h>
  10. #include <linux/kernel.h>
  11. #include <asm/sizes.h>
  12. #include <asm/mach-types.h>
  13. #include <asm/mach/arch.h>
  14. #include <linux/of.h>
  15. #include <linux/of_platform.h>
  16. #include "common.h"
  17. void __init sirfsoc_init_late(void)
  18. {
  19. sirfsoc_pm_init();
  20. }
  21. static __init void sirfsoc_init_time(void)
  22. {
  23. /* initialize clocking early, we want to set the OS timer */
  24. sirfsoc_of_clk_init();
  25. clocksource_of_init();
  26. }
  27. static __init void sirfsoc_map_io(void)
  28. {
  29. sirfsoc_map_lluart();
  30. sirfsoc_map_scu();
  31. }
  32. #ifdef CONFIG_ARCH_ATLAS6
  33. static const char *atlas6_dt_match[] __initdata = {
  34. "sirf,atlas6",
  35. NULL
  36. };
  37. DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)")
  38. /* Maintainer: Barry Song <baohua.song@csr.com> */
  39. .nr_irqs = 128,
  40. .map_io = sirfsoc_map_io,
  41. .init_time = sirfsoc_init_time,
  42. .init_late = sirfsoc_init_late,
  43. .dt_compat = atlas6_dt_match,
  44. .restart = sirfsoc_restart,
  45. MACHINE_END
  46. #endif
  47. #ifdef CONFIG_ARCH_PRIMA2
  48. static const char *prima2_dt_match[] __initdata = {
  49. "sirf,prima2",
  50. NULL
  51. };
  52. DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
  53. /* Maintainer: Barry Song <baohua.song@csr.com> */
  54. .nr_irqs = 128,
  55. .map_io = sirfsoc_map_io,
  56. .init_time = sirfsoc_init_time,
  57. .dma_zone_size = SZ_256M,
  58. .init_late = sirfsoc_init_late,
  59. .dt_compat = prima2_dt_match,
  60. .restart = sirfsoc_restart,
  61. MACHINE_END
  62. #endif
  63. #ifdef CONFIG_ARCH_MARCO
  64. static const char *marco_dt_match[] __initdata = {
  65. "sirf,marco",
  66. NULL
  67. };
  68. DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)")
  69. /* Maintainer: Barry Song <baohua.song@csr.com> */
  70. .smp = smp_ops(sirfsoc_smp_ops),
  71. .map_io = sirfsoc_map_io,
  72. .init_time = sirfsoc_init_time,
  73. .init_late = sirfsoc_init_late,
  74. .dt_compat = marco_dt_match,
  75. .restart = sirfsoc_restart,
  76. MACHINE_END
  77. #endif