common.c 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. .map_io = sirfsoc_map_io,
  40. .init_time = sirfsoc_init_time,
  41. .init_late = sirfsoc_init_late,
  42. .dt_compat = atlas6_dt_match,
  43. .restart = sirfsoc_restart,
  44. MACHINE_END
  45. #endif
  46. #ifdef CONFIG_ARCH_PRIMA2
  47. static const char *prima2_dt_match[] __initdata = {
  48. "sirf,prima2",
  49. NULL
  50. };
  51. DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
  52. /* Maintainer: Barry Song <baohua.song@csr.com> */
  53. .map_io = sirfsoc_map_io,
  54. .init_time = sirfsoc_init_time,
  55. .dma_zone_size = SZ_256M,
  56. .init_late = sirfsoc_init_late,
  57. .dt_compat = prima2_dt_match,
  58. .restart = sirfsoc_restart,
  59. MACHINE_END
  60. #endif
  61. #ifdef CONFIG_ARCH_MARCO
  62. static const char *marco_dt_match[] __initdata = {
  63. "sirf,marco",
  64. NULL
  65. };
  66. DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)")
  67. /* Maintainer: Barry Song <baohua.song@csr.com> */
  68. .smp = smp_ops(sirfsoc_smp_ops),
  69. .map_io = sirfsoc_map_io,
  70. .init_time = sirfsoc_init_time,
  71. .init_late = sirfsoc_init_late,
  72. .dt_compat = marco_dt_match,
  73. .restart = sirfsoc_restart,
  74. MACHINE_END
  75. #endif