aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-01 23:25:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-01 23:25:36 -0400
commitf906fb1d70e016726fccfb0d978c5d425503db9d (patch)
treeb2bac5fbe7d2eb81dd7fe6cc88e27dddd0189c84 /arch/arm/plat-samsung/include
parent510597e26e2a072e2d46ea5bc57feaf385e37f70 (diff)
parenta7fadac10ffbfd16cc7ccf951eab1ecf85e1abdf (diff)
Merge branch 'next/board' of git://git.linaro.org/people/arnd/arm-soc
* 'next/board' of git://git.linaro.org/people/arnd/arm-soc: (34 commits) ep93xx: add support Vision EP9307 SoM ARM: mxs: Add initial support for DENX MX28 ARM: EXYNOS4: Add support SMDK4412 Board ARM: EXYNOS4: Add MCT support for EXYNOS4412 ARM: EXYNOS4: Add functions for gic interrupt handling ARM: EXYNOS4: Add support clock for EXYNOS4412 ARM: EXYNOS4: Add support new EXYNOS4412 SoC ARM: EXYNOS4: Add support MCT PPI for EXYNOS4212 ARM: EXYNOS4: Add support PPI in external GIC ARM: EXYNOS4: convert boot_params to atag_offset ixp4xx: support omicron ixp425 based boards ARM: EXYNOS4: Add support SMDK4212 Board ARM: EXYNOS4: Add support PM for EXYNOS4212 ARM: EXYNOS4: Add support clock for EXYNOS4212 ARM: EXYNOS4: Add support new EXYNOS4212 SoC at91: USB-A9G20 C01 & C11 board support at91: merge board USB-A9260 and USB-A9263 together at91: add support for RSIs EWS board ARM: SAMSUNG: Fix mask value for S5P64X0 CPU IDs ARM: SAMSUNG: Fix mask for S3C64xx CPU IDs ...
Diffstat (limited to 'arch/arm/plat-samsung/include')
-rw-r--r--arch/arm/plat-samsung/include/plat/cpu.h113
1 files changed, 112 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..54f370f0fc07 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,108 @@
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 EXYNOS4412_CPU_ID 0xE4412200
44#define EXYNOS4_CPU_MASK 0xFFFE0000
45
46#define IS_SAMSUNG_CPU(name, id, mask) \
47static inline int is_samsung_##name(void) \
48{ \
49 return ((samsung_cpu_id & mask) == (id & mask)); \
50}
51
52IS_SAMSUNG_CPU(s3c24xx, S3C24XX_CPU_ID, S3C24XX_CPU_MASK)
53IS_SAMSUNG_CPU(s3c64xx, S3C64XX_CPU_ID, S3C64XX_CPU_MASK)
54IS_SAMSUNG_CPU(s5p6440, S5P6440_CPU_ID, S5P64XX_CPU_MASK)
55IS_SAMSUNG_CPU(s5p6450, S5P6450_CPU_ID, S5P64XX_CPU_MASK)
56IS_SAMSUNG_CPU(s5pc100, S5PC100_CPU_ID, S5PC100_CPU_MASK)
57IS_SAMSUNG_CPU(s5pv210, S5PV210_CPU_ID, S5PV210_CPU_MASK)
58IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK)
59IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK)
60IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK)
61
62#if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \
63 defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \
64 defined(CONFIG_CPU_S3C2442) || defined(CONFIG_CPU_S3C244X) || \
65 defined(CONFIG_CPU_S3C2443)
66# define soc_is_s3c24xx() is_samsung_s3c24xx()
67#else
68# define soc_is_s3c24xx() 0
69#endif
70
71#if defined(CONFIG_CPU_S3C6400) || defined(CONFIG_CPU_S3C6410)
72# define soc_is_s3c64xx() is_samsung_s3c64xx()
73#else
74# define soc_is_s3c64xx() 0
75#endif
76
77#if defined(CONFIG_CPU_S5P6440)
78# define soc_is_s5p6440() is_samsung_s5p6440()
79#else
80# define soc_is_s5p6440() 0
81#endif
82
83#if defined(CONFIG_CPU_S5P6450)
84# define soc_is_s5p6450() is_samsung_s5p6450()
85#else
86# define soc_is_s5p6450() 0
87#endif
88
89#if defined(CONFIG_CPU_S5PC100)
90# define soc_is_s5pc100() is_samsung_s5pc100()
91#else
92# define soc_is_s5pc100() 0
93#endif
94
95#if defined(CONFIG_CPU_S5PV210)
96# define soc_is_s5pv210() is_samsung_s5pv210()
97#else
98# define soc_is_s5pv210() 0
99#endif
100
101#if defined(CONFIG_CPU_EXYNOS4210)
102# define soc_is_exynos4210() is_samsung_exynos4210()
103#else
104# define soc_is_exynos4210() 0
105#endif
106
107#if defined(CONFIG_SOC_EXYNOS4212)
108# define soc_is_exynos4212() is_samsung_exynos4212()
109#else
110# define soc_is_exynos4212() 0
111#endif
112
113#if defined(CONFIG_SOC_EXYNOS4412)
114# define soc_is_exynos4412() is_samsung_exynos4412()
115#else
116# define soc_is_exynos4412() 0
117#endif
118
119#define EXYNOS4210_REV_0 (0x0)
120#define EXYNOS4210_REV_1_0 (0x10)
121#define EXYNOS4210_REV_1_1 (0x11)
122
18#define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } 123#define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }
19 124
20#ifndef MHZ 125#ifndef MHZ
@@ -55,6 +160,12 @@ extern void s3c64xx_init_io(struct map_desc *mach_desc, int size);
55extern void s5p_init_io(struct map_desc *mach_desc, 160extern void s5p_init_io(struct map_desc *mach_desc,
56 int size, void __iomem *cpuid_addr); 161 int size, void __iomem *cpuid_addr);
57 162
163extern void s3c24xx_init_cpu(void);
164extern void s3c64xx_init_cpu(void);
165extern void s5p_init_cpu(void __iomem *cpuid_addr);
166
167extern unsigned int samsung_rev(void);
168
58extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no); 169extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
59 170
60extern void s3c24xx_init_clocks(int xtal); 171extern void s3c24xx_init_clocks(int xtal);