common.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /*
  2. * Copyright (c) 2012 Samsung Electronics Co., Ltd.
  3. * http://www.samsung.com
  4. *
  5. * Common Header for S3C24XX SoCs
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H
  12. #define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__
  13. #include <linux/reboot.h>
  14. struct s3c2410_uartcfg;
  15. #ifdef CONFIG_CPU_S3C2410
  16. extern int s3c2410_init(void);
  17. extern int s3c2410a_init(void);
  18. extern void s3c2410_map_io(void);
  19. extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
  20. extern void s3c2410_init_clocks(int xtal);
  21. extern void s3c2410_init_irq(void);
  22. #else
  23. #define s3c2410_init_clocks NULL
  24. #define s3c2410_init_uarts NULL
  25. #define s3c2410_map_io NULL
  26. #define s3c2410_init NULL
  27. #define s3c2410a_init NULL
  28. #endif
  29. #ifdef CONFIG_CPU_S3C2412
  30. extern int s3c2412_init(void);
  31. extern void s3c2412_map_io(void);
  32. extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
  33. extern void s3c2412_init_clocks(int xtal);
  34. extern int s3c2412_baseclk_add(void);
  35. extern void s3c2412_init_irq(void);
  36. #else
  37. #define s3c2412_init_clocks NULL
  38. #define s3c2412_init_uarts NULL
  39. #define s3c2412_map_io NULL
  40. #define s3c2412_init NULL
  41. #endif
  42. #ifdef CONFIG_CPU_S3C2416
  43. extern int s3c2416_init(void);
  44. extern void s3c2416_map_io(void);
  45. extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no);
  46. extern void s3c2416_init_clocks(int xtal);
  47. extern int s3c2416_baseclk_add(void);
  48. extern void s3c2416_init_irq(void);
  49. extern struct syscore_ops s3c2416_irq_syscore_ops;
  50. #else
  51. #define s3c2416_init_clocks NULL
  52. #define s3c2416_init_uarts NULL
  53. #define s3c2416_map_io NULL
  54. #define s3c2416_init NULL
  55. #endif
  56. #if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
  57. extern void s3c244x_map_io(void);
  58. extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no);
  59. #else
  60. #define s3c244x_init_uarts NULL
  61. #endif
  62. #ifdef CONFIG_CPU_S3C2440
  63. extern int s3c2440_init(void);
  64. extern void s3c2440_map_io(void);
  65. extern void s3c2440_init_clocks(int xtal);
  66. extern void s3c2440_init_irq(void);
  67. #else
  68. #define s3c2440_init NULL
  69. #define s3c2440_map_io NULL
  70. #endif
  71. #ifdef CONFIG_CPU_S3C2442
  72. extern int s3c2442_init(void);
  73. extern void s3c2442_map_io(void);
  74. extern void s3c2442_init_clocks(int xtal);
  75. extern void s3c2442_init_irq(void);
  76. #else
  77. #define s3c2442_init NULL
  78. #define s3c2442_map_io NULL
  79. #endif
  80. #ifdef CONFIG_CPU_S3C2443
  81. extern int s3c2443_init(void);
  82. extern void s3c2443_map_io(void);
  83. extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no);
  84. extern void s3c2443_init_clocks(int xtal);
  85. extern int s3c2443_baseclk_add(void);
  86. extern void s3c2443_init_irq(void);
  87. #else
  88. #define s3c2443_init_clocks NULL
  89. #define s3c2443_init_uarts NULL
  90. #define s3c2443_map_io NULL
  91. #define s3c2443_init NULL
  92. #endif
  93. extern struct syscore_ops s3c24xx_irq_syscore_ops;
  94. extern struct platform_device s3c2410_device_dma;
  95. extern struct platform_device s3c2412_device_dma;
  96. extern struct platform_device s3c2440_device_dma;
  97. extern struct platform_device s3c2443_device_dma;
  98. extern struct platform_device s3c2410_device_dclk;
  99. #ifdef CONFIG_S3C2410_COMMON_CLK
  100. void __init s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f,
  101. int current_soc,
  102. void __iomem *reg_base);
  103. #endif
  104. #ifdef CONFIG_S3C2412_COMMON_CLK
  105. void __init s3c2412_common_clk_init(struct device_node *np, unsigned long xti_f,
  106. unsigned long ext_f, void __iomem *reg_base);
  107. #endif
  108. #ifdef CONFIG_S3C2443_COMMON_CLK
  109. void __init s3c2443_common_clk_init(struct device_node *np, unsigned long xti_f,
  110. int current_soc,
  111. void __iomem *reg_base);
  112. #endif
  113. #endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */