Kukjin Kim | 8551f3f | 2012-03-29 08:55:48 +0900 | [diff] [blame] | 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 | |
| 12 | #ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H |
| 13 | #define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__ |
| 14 | |
Heiko Stuebner | 7488335 | 2013-02-08 10:37:13 -0800 | [diff] [blame] | 15 | struct s3c2410_uartcfg; |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 16 | |
Heiko Stuebner | 7488335 | 2013-02-08 10:37:13 -0800 | [diff] [blame] | 17 | #ifdef CONFIG_CPU_S3C2410 |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 18 | extern int s3c2410_init(void); |
| 19 | extern int s3c2410a_init(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 20 | extern void s3c2410_map_io(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 21 | extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 22 | extern void s3c2410_init_clocks(int xtal); |
Heiko Stuebner | 7488335 | 2013-02-08 10:37:13 -0800 | [diff] [blame] | 23 | extern void s3c2410_restart(char mode, const char *cmd); |
Heiko Stuebner | f182aa1 | 2013-03-07 12:38:19 +0900 | [diff] [blame^] | 24 | extern void s3c2410_init_irq(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 25 | #else |
| 26 | #define s3c2410_init_clocks NULL |
| 27 | #define s3c2410_init_uarts NULL |
| 28 | #define s3c2410_map_io NULL |
| 29 | #define s3c2410_init NULL |
| 30 | #define s3c2410a_init NULL |
| 31 | #endif |
| 32 | |
| 33 | #ifdef CONFIG_CPU_S3C2412 |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 34 | extern int s3c2412_init(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 35 | extern void s3c2412_map_io(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 36 | extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 37 | extern void s3c2412_init_clocks(int xtal); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 38 | extern int s3c2412_baseclk_add(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 39 | extern void s3c2412_restart(char mode, const char *cmd); |
Heiko Stuebner | 0da0993 | 2013-02-12 10:09:18 -0800 | [diff] [blame] | 40 | extern void s3c2412_init_irq(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 41 | #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 Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 46 | #endif |
| 47 | |
| 48 | #ifdef CONFIG_CPU_S3C2416 |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 49 | extern int s3c2416_init(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 50 | extern void s3c2416_map_io(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 51 | extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 52 | extern void s3c2416_init_clocks(int xtal); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 53 | extern int s3c2416_baseclk_add(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 54 | extern void s3c2416_restart(char mode, const char *cmd); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 55 | extern void s3c2416_init_irq(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 56 | |
Heiko Stuebner | 7488335 | 2013-02-08 10:37:13 -0800 | [diff] [blame] | 57 | extern struct syscore_ops s3c2416_irq_syscore_ops; |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 58 | #else |
| 59 | #define s3c2416_init_clocks NULL |
| 60 | #define s3c2416_init_uarts NULL |
| 61 | #define s3c2416_map_io NULL |
| 62 | #define s3c2416_init NULL |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 63 | #endif |
| 64 | |
| 65 | #if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 66 | extern void s3c244x_map_io(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 67 | extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 68 | extern void s3c244x_init_clocks(int xtal); |
Heiko Stuebner | 7488335 | 2013-02-08 10:37:13 -0800 | [diff] [blame] | 69 | extern void s3c244x_restart(char mode, const char *cmd); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 70 | #else |
| 71 | #define s3c244x_init_clocks NULL |
| 72 | #define s3c244x_init_uarts NULL |
| 73 | #endif |
| 74 | |
| 75 | #ifdef CONFIG_CPU_S3C2440 |
| 76 | extern int s3c2440_init(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 77 | extern void s3c2440_map_io(void); |
Heiko Stuebner | ce6c164 | 2013-02-12 09:59:20 -0800 | [diff] [blame] | 78 | extern void s3c2440_init_irq(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 79 | #else |
| 80 | #define s3c2440_init NULL |
| 81 | #define s3c2440_map_io NULL |
| 82 | #endif |
| 83 | |
| 84 | #ifdef CONFIG_CPU_S3C2442 |
| 85 | extern int s3c2442_init(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 86 | extern void s3c2442_map_io(void); |
Heiko Stuebner | ce6c164 | 2013-02-12 09:59:20 -0800 | [diff] [blame] | 87 | extern void s3c2442_init_irq(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 88 | #else |
| 89 | #define s3c2442_init NULL |
| 90 | #define s3c2442_map_io NULL |
| 91 | #endif |
| 92 | |
| 93 | #ifdef CONFIG_CPU_S3C2443 |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 94 | extern int s3c2443_init(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 95 | extern void s3c2443_map_io(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 96 | extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 97 | extern void s3c2443_init_clocks(int xtal); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 98 | extern int s3c2443_baseclk_add(void); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 99 | extern void s3c2443_restart(char mode, const char *cmd); |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 100 | extern void s3c2443_init_irq(void); |
| 101 | #else |
| 102 | #define s3c2443_init_clocks NULL |
| 103 | #define s3c2443_init_uarts NULL |
| 104 | #define s3c2443_map_io NULL |
| 105 | #define s3c2443_init NULL |
Heiko Stuebner | e1a621d | 2013-02-08 10:31:28 -0800 | [diff] [blame] | 106 | #endif |
| 107 | |
Heiko Stuebner | d8fdec1 | 2013-01-29 10:25:22 -0800 | [diff] [blame] | 108 | extern struct syscore_ops s3c24xx_irq_syscore_ops; |
| 109 | |
Kukjin Kim | 8551f3f | 2012-03-29 08:55:48 +0900 | [diff] [blame] | 110 | #endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */ |