Merge tag 'usb-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux/fpc-iii.git] / arch / arm / mach-s3c / s3c24xx.h
blob5848bef5bb49b1a7bf536f0bef91815cc165e025
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
6 * Common Header for S3C24XX SoCs
7 */
9 #ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H
10 #define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__
12 #include <linux/reboot.h>
13 #include <mach/irqs.h>
15 struct s3c2410_uartcfg;
17 #ifdef CONFIG_CPU_S3C2410
18 extern int s3c2410_init(void);
19 extern int s3c2410a_init(void);
20 extern void s3c2410_map_io(void);
21 extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
22 extern void s3c2410_init_clocks(int xtal);
23 extern void s3c2410_init_irq(void);
24 #else
25 #define s3c2410_init_clocks NULL
26 #define s3c2410_init_uarts NULL
27 #define s3c2410_map_io NULL
28 #define s3c2410_init NULL
29 #define s3c2410a_init NULL
30 #endif
32 #ifdef CONFIG_CPU_S3C2412
33 extern int s3c2412_init(void);
34 extern void s3c2412_map_io(void);
35 extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
36 extern void s3c2412_init_clocks(int xtal);
37 extern int s3c2412_baseclk_add(void);
38 extern void s3c2412_init_irq(void);
39 #else
40 #define s3c2412_init_clocks NULL
41 #define s3c2412_init_uarts NULL
42 #define s3c2412_map_io NULL
43 #define s3c2412_init NULL
44 #endif
46 #ifdef CONFIG_CPU_S3C2416
47 extern int s3c2416_init(void);
48 extern void s3c2416_map_io(void);
49 extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no);
50 extern void s3c2416_init_clocks(int xtal);
51 extern int s3c2416_baseclk_add(void);
52 extern void s3c2416_init_irq(void);
54 extern struct syscore_ops s3c2416_irq_syscore_ops;
55 #else
56 #define s3c2416_init_clocks NULL
57 #define s3c2416_init_uarts NULL
58 #define s3c2416_map_io NULL
59 #define s3c2416_init NULL
60 #endif
62 #if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
63 extern void s3c244x_map_io(void);
64 extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no);
65 #else
66 #define s3c244x_init_uarts NULL
67 #endif
69 #ifdef CONFIG_CPU_S3C2440
70 extern int s3c2440_init(void);
71 extern void s3c2440_map_io(void);
72 extern void s3c2440_init_clocks(int xtal);
73 extern void s3c2440_init_irq(void);
74 #else
75 #define s3c2440_init NULL
76 #define s3c2440_map_io NULL
77 #endif
79 #ifdef CONFIG_CPU_S3C2442
80 extern int s3c2442_init(void);
81 extern void s3c2442_map_io(void);
82 extern void s3c2442_init_clocks(int xtal);
83 extern void s3c2442_init_irq(void);
84 #else
85 #define s3c2442_init NULL
86 #define s3c2442_map_io NULL
87 #endif
89 #ifdef CONFIG_CPU_S3C2443
90 extern int s3c2443_init(void);
91 extern void s3c2443_map_io(void);
92 extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no);
93 extern void s3c2443_init_clocks(int xtal);
94 extern int s3c2443_baseclk_add(void);
95 extern void s3c2443_init_irq(void);
96 #else
97 #define s3c2443_init_clocks NULL
98 #define s3c2443_init_uarts NULL
99 #define s3c2443_map_io NULL
100 #define s3c2443_init NULL
101 #endif
103 extern struct syscore_ops s3c24xx_irq_syscore_ops;
105 extern struct platform_device s3c2410_device_dma;
106 extern struct platform_device s3c2412_device_dma;
107 extern struct platform_device s3c2440_device_dma;
108 extern struct platform_device s3c2443_device_dma;
110 extern struct platform_device s3c2410_device_dclk;
112 enum s3c24xx_timer_mode {
113 S3C24XX_PWM0,
114 S3C24XX_PWM1,
115 S3C24XX_PWM2,
116 S3C24XX_PWM3,
117 S3C24XX_PWM4,
120 extern void __init s3c24xx_set_timer_source(enum s3c24xx_timer_mode event,
121 enum s3c24xx_timer_mode source);
122 extern void __init s3c24xx_timer_init(void);
124 #endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */