common.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 <linux/irqchip.h>
  12. #include <asm/sizes.h>
  13. #include <asm/mach-types.h>
  14. #include <asm/mach/arch.h>
  15. #include <linux/of.h>
  16. #include <linux/of_platform.h>
  17. #include "common.h"
  18. void __init sirfsoc_init_late(void)
  19. {
  20. sirfsoc_pm_init();
  21. }
  22. static __init void sirfsoc_init_time(void)
  23. {
  24. /* initialize clocking early, we want to set the OS timer */
  25. sirfsoc_of_clk_init();
  26. clocksource_of_init();
  27. }
  28. static __init void sirfsoc_map_io(void)
  29. {
  30. sirfsoc_map_lluart();
  31. sirfsoc_map_scu();
  32. }
  33. #ifdef CONFIG_ARCH_ATLAS6
  34. static const char *atlas6_dt_match[] __initdata = {
  35. "sirf,atlas6",
  36. NULL
  37. };
  38. DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)")
  39. /* Maintainer: Barry Song <baohua.song@csr.com> */
  40. .nr_irqs = 128,
  41. .map_io = sirfsoc_map_io,
  42. .init_irq = irqchip_init,
  43. .init_time = sirfsoc_init_time,
  44. .init_late = sirfsoc_init_late,
  45. .dt_compat = atlas6_dt_match,
  46. .restart = sirfsoc_restart,
  47. MACHINE_END
  48. #endif
  49. #ifdef CONFIG_ARCH_PRIMA2
  50. static const char *prima2_dt_match[] __initdata = {
  51. "sirf,prima2",
  52. NULL
  53. };
  54. DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
  55. /* Maintainer: Barry Song <baohua.song@csr.com> */
  56. .nr_irqs = 128,
  57. .map_io = sirfsoc_map_io,
  58. .init_irq = irqchip_init,
  59. .init_time = sirfsoc_init_time,
  60. .dma_zone_size = SZ_256M,
  61. .init_late = sirfsoc_init_late,
  62. .dt_compat = prima2_dt_match,
  63. .restart = sirfsoc_restart,
  64. MACHINE_END
  65. #endif
  66. #ifdef CONFIG_ARCH_MARCO
  67. static const char *marco_dt_match[] __initdata = {
  68. "sirf,marco",
  69. NULL
  70. };
  71. DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)")
  72. /* Maintainer: Barry Song <baohua.song@csr.com> */
  73. .smp = smp_ops(sirfsoc_smp_ops),
  74. .map_io = sirfsoc_map_io,
  75. .init_irq = irqchip_init,
  76. .init_time = sirfsoc_init_time,
  77. .init_late = sirfsoc_init_late,
  78. .dt_compat = marco_dt_match,
  79. .restart = sirfsoc_restart,
  80. MACHINE_END
  81. #endif