blob: e46c1041721669e3503555cadff0c6bbbcaaf3df [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);
Robin Holt7b6d8642013-07-08 16:01:40 -070025extern void s3c2410_restart(enum reboot_mode mode, const char *cmd);
Heiko Stuebnerf182aa12013-03-07 12:38:19 +090026extern void s3c2410_init_irq(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080027#else
28#define s3c2410_init_clocks NULL
29#define s3c2410_init_uarts NULL
30#define s3c2410_map_io NULL
31#define s3c2410_init NULL
32#define s3c2410a_init NULL
33#endif
34
35#ifdef CONFIG_CPU_S3C2412
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080036extern int s3c2412_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080037extern void s3c2412_map_io(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080038extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080039extern void s3c2412_init_clocks(int xtal);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080040extern int s3c2412_baseclk_add(void);
Robin Holt7b6d8642013-07-08 16:01:40 -070041extern void s3c2412_restart(enum reboot_mode mode, const char *cmd);
Heiko Stuebner0da09932013-02-12 10:09:18 -080042extern void s3c2412_init_irq(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080043#else
44#define s3c2412_init_clocks NULL
45#define s3c2412_init_uarts NULL
46#define s3c2412_map_io NULL
47#define s3c2412_init NULL
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080048#endif
49
50#ifdef CONFIG_CPU_S3C2416
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080051extern int s3c2416_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080052extern void s3c2416_map_io(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080053extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080054extern void s3c2416_init_clocks(int xtal);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080055extern int s3c2416_baseclk_add(void);
Robin Holt7b6d8642013-07-08 16:01:40 -070056extern void s3c2416_restart(enum reboot_mode mode, const char *cmd);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080057extern void s3c2416_init_irq(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080058
Heiko Stuebner74883352013-02-08 10:37:13 -080059extern struct syscore_ops s3c2416_irq_syscore_ops;
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080060#else
61#define s3c2416_init_clocks NULL
62#define s3c2416_init_uarts NULL
63#define s3c2416_map_io NULL
64#define s3c2416_init NULL
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080065#endif
66
67#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080068extern void s3c244x_map_io(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080069extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080070extern void s3c244x_init_clocks(int xtal);
Robin Holt7b6d8642013-07-08 16:01:40 -070071extern void s3c244x_restart(enum reboot_mode mode, const char *cmd);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080072#else
73#define s3c244x_init_clocks NULL
74#define s3c244x_init_uarts NULL
75#endif
76
77#ifdef CONFIG_CPU_S3C2440
78extern int s3c2440_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080079extern void s3c2440_map_io(void);
Heiko Stuebnerce6c1642013-02-12 09:59:20 -080080extern void s3c2440_init_irq(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080081#else
82#define s3c2440_init NULL
83#define s3c2440_map_io NULL
84#endif
85
86#ifdef CONFIG_CPU_S3C2442
87extern int s3c2442_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080088extern void s3c2442_map_io(void);
Heiko Stuebnerce6c1642013-02-12 09:59:20 -080089extern void s3c2442_init_irq(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080090#else
91#define s3c2442_init NULL
92#define s3c2442_map_io NULL
93#endif
94
95#ifdef CONFIG_CPU_S3C2443
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080096extern int s3c2443_init(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080097extern void s3c2443_map_io(void);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080098extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -080099extern void s3c2443_init_clocks(int xtal);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -0800100extern int s3c2443_baseclk_add(void);
Robin Holt7b6d8642013-07-08 16:01:40 -0700101extern void s3c2443_restart(enum reboot_mode mode, const char *cmd);
Heiko Stuebnere1a621d2013-02-08 10:31:28 -0800102extern void s3c2443_init_irq(void);
103#else
104#define s3c2443_init_clocks NULL
105#define s3c2443_init_uarts NULL
106#define s3c2443_map_io NULL
107#define s3c2443_init NULL
Heiko Stuebnere1a621d2013-02-08 10:31:28 -0800108#endif
109
Heiko Stuebnerd8fdec12013-01-29 10:25:22 -0800110extern struct syscore_ops s3c24xx_irq_syscore_ops;
111
Heiko Stuebner1fecf892013-10-21 05:32:48 +0900112extern struct platform_device s3c2410_device_dma;
Heiko Stuebnerf2dda072013-10-08 06:42:10 +0900113extern struct platform_device s3c2412_device_dma;
Heiko Stuebner1fecf892013-10-21 05:32:48 +0900114extern struct platform_device s3c2440_device_dma;
Heiko Stuebnerf2dda072013-10-08 06:42:10 +0900115extern struct platform_device s3c2443_device_dma;
116
Kukjin Kim8551f3f2012-03-29 08:55:48 +0900117#endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */