aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung/include
diff options
context:
space:
mode:
authorKukjin Kim <kgene.kim@samsung.com>2011-10-04 07:14:11 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-10-04 07:14:11 -0400
commitc9477f38cba225870862fd9e08868ae3d4abdfe0 (patch)
tree01c7575a1e8e3197d072890f48944f1232a885c6 /arch/arm/plat-samsung/include
parentc37b25046289e857918d25fd96aa441ea7929ad5 (diff)
parent2520123382e97271e932377c83bca010c265be55 (diff)
Merge branch 'next-samsung-board' into next-samsung-devel-2
Diffstat (limited to 'arch/arm/plat-samsung/include')
-rw-r--r--arch/arm/plat-samsung/include/plat/cpu.h105
1 files changed, 104 insertions, 1 deletions
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index c0a5741b23e6..1bbbbb420be7 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -1,9 +1,12 @@
1/* linux/arch/arm/plat-samsung/include/plat/cpu.h 1/* linux/arch/arm/plat-samsung/include/plat/cpu.h
2 * 2 *
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
5 *
3 * Copyright (c) 2004-2005 Simtec Electronics 6 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 7 * Ben Dooks <ben@simtec.co.uk>
5 * 8 *
6 * Header file for S3C24XX CPU support 9 * Header file for Samsung CPU support
7 * 10 *
8 * This program is free software; you can redistribute it and/or modify 11 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 12 * it under the terms of the GNU General Public License version 2 as
@@ -15,6 +18,100 @@
15#ifndef __SAMSUNG_PLAT_CPU_H 18#ifndef __SAMSUNG_PLAT_CPU_H
16#define __SAMSUNG_PLAT_CPU_H 19#define __SAMSUNG_PLAT_CPU_H
17 20
21extern unsigned long samsung_cpu_id;
22
23#define S3C24XX_CPU_ID 0x32400000
24#define S3C24XX_CPU_MASK 0xFFF00000
25
26#define S3C6400_CPU_ID 0x36400000
27#define S3C6410_CPU_ID 0x36410000
28#define S3C64XX_CPU_ID (S3C6400_CPU_ID & S3C6410_CPU_ID)
29#define S3C64XX_CPU_MASK 0xFFFFF000
30
31#define S5P6440_CPU_ID 0x56440000
32#define S5P6450_CPU_ID 0x36450000
33#define S5P64XX_CPU_MASK 0xFFFFF000
34
35#define S5PC100_CPU_ID 0x43100000
36#define S5PC100_CPU_MASK 0xFFFFF000
37
38#define S5PV210_CPU_ID 0x43110000
39#define S5PV210_CPU_MASK 0xFFFFF000
40
41#define EXYNOS4210_CPU_ID 0x43210000
42#define EXYNOS4212_CPU_ID 0x43220000
43#define EXYNOS4_CPU_MASK 0xFFFE0000
44
45#define IS_SAMSUNG_CPU(name, id, mask) \
46static inline int is_samsung_##name(void) \
47{ \
48 return ((samsung_cpu_id & mask) == (id & mask)); \
49}
50
51IS_SAMSUNG_CPU(s3c24xx, S3C24XX_CPU_ID, S3C24XX_CPU_MASK)
52IS_SAMSUNG_CPU(s3c64xx, S3C64XX_CPU_ID, S3C64XX_CPU_MASK)
53IS_SAMSUNG_CPU(s5p6440, S5P6440_CPU_ID, S5P64XX_CPU_MASK)
54IS_SAMSUNG_CPU(s5p6450, S5P6450_CPU_ID, S5P64XX_CPU_MASK)
55IS_SAMSUNG_CPU(s5pc100, S5PC100_CPU_ID, S5PC100_CPU_MASK)
56IS_SAMSUNG_CPU(s5pv210, S5PV210_CPU_ID, S5PV210_CPU_MASK)
57IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK)
58IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK)
59
60#if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \
61 defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \
62 defined(CONFIG_CPU_S3C2442) || defined(CONFIG_CPU_S3C244X) || \
63 defined(CONFIG_CPU_S3C2443)
64# define soc_is_s3c24xx() is_samsung_s3c24xx()
65#else
66# define soc_is_s3c24xx() 0
67#endif
68
69#if defined(CONFIG_CPU_S3C6400) || defined(CONFIG_CPU_S3C6410)
70# define soc_is_s3c64xx() is_samsung_s3c64xx()
71#else
72# define soc_is_s3c64xx() 0
73#endif
74
75#if defined(CONFIG_CPU_S5P6440)
76# define soc_is_s5p6440() is_samsung_s5p6440()
77#else
78# define soc_is_s5p6440() 0
79#endif
80
81#if defined(CONFIG_CPU_S5P6450)
82# define soc_is_s5p6450() is_samsung_s5p6450()
83#else
84# define soc_is_s5p6450() 0
85#endif
86
87#if defined(CONFIG_CPU_S5PC100)
88# define soc_is_s5pc100() is_samsung_s5pc100()
89#else
90# define soc_is_s5pc100() 0
91#endif
92
93#if defined(CONFIG_CPU_S5PV210)
94# define soc_is_s5pv210() is_samsung_s5pv210()
95#else
96# define soc_is_s5pv210() 0
97#endif
98
99#if defined(CONFIG_CPU_EXYNOS4210)
100# define soc_is_exynos4210() is_samsung_exynos4210()
101#else
102# define soc_is_exynos4210() 0
103#endif
104
105#if defined(CONFIG_SOC_EXYNOS4212)
106# define soc_is_exynos4212() is_samsung_exynos4212()
107#else
108# define soc_is_exynos4212() 0
109#endif
110
111#define EXYNOS4210_REV_0 (0x0)
112#define EXYNOS4210_REV_1_0 (0x10)
113#define EXYNOS4210_REV_1_1 (0x11)
114
18#define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } 115#define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }
19 116
20#ifndef MHZ 117#ifndef MHZ
@@ -55,6 +152,12 @@ extern void s3c64xx_init_io(struct map_desc *mach_desc, int size);
55extern void s5p_init_io(struct map_desc *mach_desc, 152extern void s5p_init_io(struct map_desc *mach_desc,
56 int size, void __iomem *cpuid_addr); 153 int size, void __iomem *cpuid_addr);
57 154
155extern void s3c24xx_init_cpu(void);
156extern void s3c64xx_init_cpu(void);
157extern void s5p_init_cpu(void __iomem *cpuid_addr);
158
159extern unsigned int samsung_rev(void);
160
58extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no); 161extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
59 162
60extern void s3c24xx_init_clocks(int xtal); 163extern void s3c24xx_init_clocks(int xtal);