blob: d087b20e8857432b32f88711e375a2be838ddcad [file] [log] [blame]
Krzysztof Kozlowski84b21702017-12-25 20:54:32 +01001/* SPDX-License-Identifier: GPL-2.0 */
Kukjin Kim8551f3f2012-03-29 08:55:48 +09002/*
3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * Common Header for S3C24XX SoCs
Kukjin Kim8551f3f2012-03-29 08:55:48 +09007 */
8
9#ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H
10#define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__
11
Robin Holt7b6d8642013-07-08 16:01:40 -070012#include <linux/reboot.h>
13
Heiko Stuebner74883352013-02-08 10:37:13 -080014struct s3c2410_uartcfg;
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080015
Heiko Stuebner74883352013-02-08 10:37:13 -080016#ifdef CONFIG_CPU_S3C2410
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080017extern int s3c2410_init(void);
18extern int s3c2410a_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080019extern void s3c2410_map_io(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080020extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080021extern void s3c2410_init_clocks(int xtal);
Heiko Stuebnerf182aa12013-03-07 12:38:19 +090022extern void s3c2410_init_irq(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080023#else
24#define s3c2410_init_clocks NULL
25#define s3c2410_init_uarts NULL
26#define s3c2410_map_io NULL
27#define s3c2410_init NULL
28#define s3c2410a_init NULL
29#endif
30
31#ifdef CONFIG_CPU_S3C2412
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080032extern int s3c2412_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080033extern void s3c2412_map_io(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080034extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080035extern void s3c2412_init_clocks(int xtal);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080036extern int s3c2412_baseclk_add(void);
Heiko Stuebner0da09932013-02-12 10:09:18 -080037extern void s3c2412_init_irq(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080038#else
39#define s3c2412_init_clocks NULL
40#define s3c2412_init_uarts NULL
41#define s3c2412_map_io NULL
42#define s3c2412_init NULL
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080043#endif
44
45#ifdef CONFIG_CPU_S3C2416
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080046extern int s3c2416_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080047extern void s3c2416_map_io(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080048extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080049extern void s3c2416_init_clocks(int xtal);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080050extern int s3c2416_baseclk_add(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080051extern void s3c2416_init_irq(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080052
Heiko Stuebner74883352013-02-08 10:37:13 -080053extern struct syscore_ops s3c2416_irq_syscore_ops;
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080054#else
55#define s3c2416_init_clocks NULL
56#define s3c2416_init_uarts NULL
57#define s3c2416_map_io NULL
58#define s3c2416_init NULL
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080059#endif
60
61#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080062extern void s3c244x_map_io(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080063extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080064#else
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080065#define s3c244x_init_uarts NULL
66#endif
67
68#ifdef CONFIG_CPU_S3C2440
69extern int s3c2440_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080070extern void s3c2440_map_io(void);
Heiko Stuebner4659c532014-05-09 05:49:14 +090071extern void s3c2440_init_clocks(int xtal);
Heiko Stuebnerce6c1642013-02-12 09:59:20 -080072extern void s3c2440_init_irq(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080073#else
74#define s3c2440_init NULL
75#define s3c2440_map_io NULL
76#endif
77
78#ifdef CONFIG_CPU_S3C2442
79extern int s3c2442_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080080extern void s3c2442_map_io(void);
Heiko Stuebner4659c532014-05-09 05:49:14 +090081extern void s3c2442_init_clocks(int xtal);
Heiko Stuebnerce6c1642013-02-12 09:59:20 -080082extern void s3c2442_init_irq(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080083#else
84#define s3c2442_init NULL
85#define s3c2442_map_io NULL
86#endif
87
88#ifdef CONFIG_CPU_S3C2443
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080089extern int s3c2443_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080090extern void s3c2443_map_io(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080091extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080092extern void s3c2443_init_clocks(int xtal);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080093extern int s3c2443_baseclk_add(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080094extern void s3c2443_init_irq(void);
95#else
96#define s3c2443_init_clocks NULL
97#define s3c2443_init_uarts NULL
98#define s3c2443_map_io NULL
99#define s3c2443_init NULL
Heiko Stuebnere1a621d2013-02-08 10:31:28 -0800100#endif
101
Heiko Stuebnerd8fdec12013-01-29 10:25:22 -0800102extern struct syscore_ops s3c24xx_irq_syscore_ops;
103
Heiko Stuebner1fecf892013-10-21 05:32:48 +0900104extern struct platform_device s3c2410_device_dma;
Heiko Stuebnerf2dda072013-10-08 06:42:10 +0900105extern struct platform_device s3c2412_device_dma;
Heiko Stuebner1fecf892013-10-21 05:32:48 +0900106extern struct platform_device s3c2440_device_dma;
Heiko Stuebnerf2dda072013-10-08 06:42:10 +0900107extern struct platform_device s3c2443_device_dma;
108
Heiko Stuebner51cb1282014-05-09 05:48:57 +0900109extern struct platform_device s3c2410_device_dclk;
110
Heiko Stuebner4659c532014-05-09 05:49:14 +0900111#ifdef CONFIG_S3C2410_COMMON_CLK
112void __init s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f,
113 int current_soc,
114 void __iomem *reg_base);
115#endif
Heiko Stuebner3c27f312014-02-25 09:50:44 +0900116#ifdef CONFIG_S3C2412_COMMON_CLK
117void __init s3c2412_common_clk_init(struct device_node *np, unsigned long xti_f,
118 unsigned long ext_f, void __iomem *reg_base);
119#endif
Heiko Stuebnerdfc0f502014-02-19 09:26:21 +0900120#ifdef CONFIG_S3C2443_COMMON_CLK
121void __init s3c2443_common_clk_init(struct device_node *np, unsigned long xti_f,
122 int current_soc,
123 void __iomem *reg_base);
124#endif
125
Kukjin Kim8551f3f2012-03-29 08:55:48 +0900126#endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */