blob: c7ac7e61a22e55c3fd8c1fb7272562e209e7dab5 [file] [log] [blame]
Kukjin Kim8551f3f2012-03-29 08:55:48 +09001/*
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
12#ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H
13#define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__
14
Robin Holt7b6d8642013-07-08 16:01:40 -070015#include <linux/reboot.h>
16
Heiko Stuebner74883352013-02-08 10:37:13 -080017struct s3c2410_uartcfg;
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080018
Heiko Stuebner74883352013-02-08 10:37:13 -080019#ifdef CONFIG_CPU_S3C2410
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080020extern int s3c2410_init(void);
21extern int s3c2410a_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080022extern void s3c2410_map_io(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080023extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080024extern void s3c2410_init_clocks(int xtal);
Heiko Stuebnerf182aa12013-03-07 12:38:19 +090025extern void s3c2410_init_irq(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080026#else
27#define s3c2410_init_clocks NULL
28#define s3c2410_init_uarts NULL
29#define s3c2410_map_io NULL
30#define s3c2410_init NULL
31#define s3c2410a_init NULL
32#endif
33
34#ifdef CONFIG_CPU_S3C2412
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080035extern int s3c2412_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080036extern void s3c2412_map_io(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080037extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080038extern void s3c2412_init_clocks(int xtal);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080039extern int s3c2412_baseclk_add(void);
Heiko Stuebner0da09932013-02-12 10:09:18 -080040extern void s3c2412_init_irq(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080041#else
42#define s3c2412_init_clocks NULL
43#define s3c2412_init_uarts NULL
44#define s3c2412_map_io NULL
45#define s3c2412_init NULL
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080046#endif
47
48#ifdef CONFIG_CPU_S3C2416
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080049extern int s3c2416_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080050extern void s3c2416_map_io(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080051extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080052extern void s3c2416_init_clocks(int xtal);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080053extern int s3c2416_baseclk_add(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080054extern void s3c2416_init_irq(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080055
Heiko Stuebner74883352013-02-08 10:37:13 -080056extern struct syscore_ops s3c2416_irq_syscore_ops;
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080057#else
58#define s3c2416_init_clocks NULL
59#define s3c2416_init_uarts NULL
60#define s3c2416_map_io NULL
61#define s3c2416_init NULL
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080062#endif
63
64#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080065extern void s3c244x_map_io(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080066extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080067#else
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080068#define s3c244x_init_uarts NULL
69#endif
70
71#ifdef CONFIG_CPU_S3C2440
72extern int s3c2440_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080073extern void s3c2440_map_io(void);
Heiko Stuebner4659c532014-05-09 05:49:14 +090074extern void s3c2440_init_clocks(int xtal);
Heiko Stuebnerce6c1642013-02-12 09:59:20 -080075extern void s3c2440_init_irq(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080076#else
77#define s3c2440_init NULL
78#define s3c2440_map_io NULL
79#endif
80
81#ifdef CONFIG_CPU_S3C2442
82extern int s3c2442_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080083extern void s3c2442_map_io(void);
Heiko Stuebner4659c532014-05-09 05:49:14 +090084extern void s3c2442_init_clocks(int xtal);
Heiko Stuebnerce6c1642013-02-12 09:59:20 -080085extern void s3c2442_init_irq(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080086#else
87#define s3c2442_init NULL
88#define s3c2442_map_io NULL
89#endif
90
91#ifdef CONFIG_CPU_S3C2443
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080092extern int s3c2443_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080093extern void s3c2443_map_io(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080094extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080095extern void s3c2443_init_clocks(int xtal);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080096extern int s3c2443_baseclk_add(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080097extern void s3c2443_init_irq(void);
98#else
99#define s3c2443_init_clocks NULL
100#define s3c2443_init_uarts NULL
101#define s3c2443_map_io NULL
102#define s3c2443_init NULL
Heiko Stuebnere1a621d2013-02-08 10:31:28 -0800103#endif
104
Heiko Stuebnerd8fdec12013-01-29 10:25:22 -0800105extern struct syscore_ops s3c24xx_irq_syscore_ops;
106
Heiko Stuebner1fecf892013-10-21 05:32:48 +0900107extern struct platform_device s3c2410_device_dma;
Heiko Stuebnerf2dda072013-10-08 06:42:10 +0900108extern struct platform_device s3c2412_device_dma;
Heiko Stuebner1fecf892013-10-21 05:32:48 +0900109extern struct platform_device s3c2440_device_dma;
Heiko Stuebnerf2dda072013-10-08 06:42:10 +0900110extern struct platform_device s3c2443_device_dma;
111
Heiko Stuebner51cb1282014-05-09 05:48:57 +0900112extern struct platform_device s3c2410_device_dclk;
113
Heiko Stuebner4659c532014-05-09 05:49:14 +0900114#ifdef CONFIG_S3C2410_COMMON_CLK
115void __init s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f,
116 int current_soc,
117 void __iomem *reg_base);
118#endif
Heiko Stuebner3c27f312014-02-25 09:50:44 +0900119#ifdef CONFIG_S3C2412_COMMON_CLK
120void __init s3c2412_common_clk_init(struct device_node *np, unsigned long xti_f,
121 unsigned long ext_f, void __iomem *reg_base);
122#endif
Heiko Stuebnerdfc0f502014-02-19 09:26:21 +0900123#ifdef CONFIG_S3C2443_COMMON_CLK
124void __init s3c2443_common_clk_init(struct device_node *np, unsigned long xti_f,
125 int current_soc,
126 void __iomem *reg_base);
127#endif
128
Kukjin Kim8551f3f2012-03-29 08:55:48 +0900129#endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */