diff options
author | JeongHyeon Kim <jhkim@insignal.co.kr> | 2011-07-21 03:19:19 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-07-21 04:31:05 -0400 |
commit | 699efdd2d34c535f415516e06d3d9f0bed131664 (patch) | |
tree | 2ddeef8186dcdafb6b883e9ebecc852369c40032 /arch | |
parent | 89e1c3d0fffa0d610fa7292bbfafb5e87dc6be34 (diff) |
ARM: EXYNOS4: Add support for ORIGEN board
Insignal's ORIGEN board is based Samsung EXYNOS4210 SoC.
Signed-off-by: JeongHyeon Kim <jhkim@insignal.co.kr>
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
[kgene.kim@samsung.com: Fixed SoC name to EXYNOS4210]
[kgene.kim@samsung.com: Selected MACH_ORIGEN in exynos4_defconfig]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/configs/exynos4_defconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/Kconfig | 10 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/mach-origen.c | 108 |
4 files changed, 120 insertions, 0 deletions
diff --git a/arch/arm/configs/exynos4_defconfig b/arch/arm/configs/exynos4_defconfig index da53ff3b4d70..cd40bb56e568 100644 --- a/arch/arm/configs/exynos4_defconfig +++ b/arch/arm/configs/exynos4_defconfig | |||
@@ -11,6 +11,7 @@ CONFIG_MACH_SMDKV310=y | |||
11 | CONFIG_MACH_ARMLEX4210=y | 11 | CONFIG_MACH_ARMLEX4210=y |
12 | CONFIG_MACH_UNIVERSAL_C210=y | 12 | CONFIG_MACH_UNIVERSAL_C210=y |
13 | CONFIG_MACH_NURI=y | 13 | CONFIG_MACH_NURI=y |
14 | CONFIG_MACH_ORIGEN=y | ||
14 | CONFIG_NO_HZ=y | 15 | CONFIG_NO_HZ=y |
15 | CONFIG_HIGH_RES_TIMERS=y | 16 | CONFIG_HIGH_RES_TIMERS=y |
16 | CONFIG_SMP=y | 17 | CONFIG_SMP=y |
diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index 1435fc31c4b2..3ab0f18c52a4 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig | |||
@@ -186,6 +186,16 @@ config MACH_NURI | |||
186 | help | 186 | help |
187 | Machine support for Samsung Mobile NURI Board. | 187 | Machine support for Samsung Mobile NURI Board. |
188 | 188 | ||
189 | config MACH_ORIGEN | ||
190 | bool "ORIGEN" | ||
191 | select CPU_EXYNOS4210 | ||
192 | select S3C_DEV_RTC | ||
193 | select S3C_DEV_WDT | ||
194 | select S3C_DEV_HSMMC2 | ||
195 | select EXYNOS4_SETUP_SDHCI | ||
196 | help | ||
197 | Machine support for ORIGEN based on Samsung EXYNOS4210 | ||
198 | |||
189 | endmenu | 199 | endmenu |
190 | 200 | ||
191 | comment "Configuration for HSMMC bus width" | 201 | comment "Configuration for HSMMC bus width" |
diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile index 60fe5ecf3599..4b22dc531219 100644 --- a/arch/arm/mach-exynos4/Makefile +++ b/arch/arm/mach-exynos4/Makefile | |||
@@ -36,6 +36,7 @@ obj-$(CONFIG_MACH_SMDKV310) += mach-smdkv310.o | |||
36 | obj-$(CONFIG_MACH_ARMLEX4210) += mach-armlex4210.o | 36 | obj-$(CONFIG_MACH_ARMLEX4210) += mach-armlex4210.o |
37 | obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o | 37 | obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o |
38 | obj-$(CONFIG_MACH_NURI) += mach-nuri.o | 38 | obj-$(CONFIG_MACH_NURI) += mach-nuri.o |
39 | obj-$(CONFIG_MACH_ORIGEN) += mach-origen.o | ||
39 | 40 | ||
40 | # device support | 41 | # device support |
41 | 42 | ||
diff --git a/arch/arm/mach-exynos4/mach-origen.c b/arch/arm/mach-exynos4/mach-origen.c new file mode 100644 index 000000000000..ed59f86001ac --- /dev/null +++ b/arch/arm/mach-exynos4/mach-origen.c | |||
@@ -0,0 +1,108 @@ | |||
1 | /* linux/arch/arm/mach-exynos4/mach-origen.c | ||
2 | * | ||
3 | * Copyright (c) 2011 Insignal Co., Ltd. | ||
4 | * http://www.insignal.co.kr/ | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/serial_core.h> | ||
12 | #include <linux/gpio.h> | ||
13 | #include <linux/mmc/host.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/input.h> | ||
17 | |||
18 | #include <asm/mach/arch.h> | ||
19 | #include <asm/mach-types.h> | ||
20 | |||
21 | #include <plat/regs-serial.h> | ||
22 | #include <plat/exynos4.h> | ||
23 | #include <plat/cpu.h> | ||
24 | #include <plat/devs.h> | ||
25 | #include <plat/sdhci.h> | ||
26 | #include <plat/iic.h> | ||
27 | |||
28 | #include <mach/map.h> | ||
29 | |||
30 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | ||
31 | #define ORIGEN_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | ||
32 | S3C2410_UCON_RXILEVEL | \ | ||
33 | S3C2410_UCON_TXIRQMODE | \ | ||
34 | S3C2410_UCON_RXIRQMODE | \ | ||
35 | S3C2410_UCON_RXFIFO_TOI | \ | ||
36 | S3C2443_UCON_RXERR_IRQEN) | ||
37 | |||
38 | #define ORIGEN_ULCON_DEFAULT S3C2410_LCON_CS8 | ||
39 | |||
40 | #define ORIGEN_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ | ||
41 | S5PV210_UFCON_TXTRIG4 | \ | ||
42 | S5PV210_UFCON_RXTRIG4) | ||
43 | |||
44 | static struct s3c2410_uartcfg origen_uartcfgs[] __initdata = { | ||
45 | [0] = { | ||
46 | .hwport = 0, | ||
47 | .flags = 0, | ||
48 | .ucon = ORIGEN_UCON_DEFAULT, | ||
49 | .ulcon = ORIGEN_ULCON_DEFAULT, | ||
50 | .ufcon = ORIGEN_UFCON_DEFAULT, | ||
51 | }, | ||
52 | [1] = { | ||
53 | .hwport = 1, | ||
54 | .flags = 0, | ||
55 | .ucon = ORIGEN_UCON_DEFAULT, | ||
56 | .ulcon = ORIGEN_ULCON_DEFAULT, | ||
57 | .ufcon = ORIGEN_UFCON_DEFAULT, | ||
58 | }, | ||
59 | [2] = { | ||
60 | .hwport = 2, | ||
61 | .flags = 0, | ||
62 | .ucon = ORIGEN_UCON_DEFAULT, | ||
63 | .ulcon = ORIGEN_ULCON_DEFAULT, | ||
64 | .ufcon = ORIGEN_UFCON_DEFAULT, | ||
65 | }, | ||
66 | [3] = { | ||
67 | .hwport = 3, | ||
68 | .flags = 0, | ||
69 | .ucon = ORIGEN_UCON_DEFAULT, | ||
70 | .ulcon = ORIGEN_ULCON_DEFAULT, | ||
71 | .ufcon = ORIGEN_UFCON_DEFAULT, | ||
72 | }, | ||
73 | }; | ||
74 | |||
75 | static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = { | ||
76 | .cd_type = S3C_SDHCI_CD_GPIO, | ||
77 | .ext_cd_gpio = EXYNOS4_GPK2(2), | ||
78 | .ext_cd_gpio_invert = 1, | ||
79 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
80 | }; | ||
81 | |||
82 | static struct platform_device *origen_devices[] __initdata = { | ||
83 | &s3c_device_hsmmc2, | ||
84 | &s3c_device_rtc, | ||
85 | &s3c_device_wdt, | ||
86 | }; | ||
87 | |||
88 | static void __init origen_map_io(void) | ||
89 | { | ||
90 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | ||
91 | s3c24xx_init_clocks(24000000); | ||
92 | s3c24xx_init_uarts(origen_uartcfgs, ARRAY_SIZE(origen_uartcfgs)); | ||
93 | } | ||
94 | |||
95 | static void __init origen_machine_init(void) | ||
96 | { | ||
97 | s3c_sdhci2_set_platdata(&origen_hsmmc2_pdata); | ||
98 | platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices)); | ||
99 | } | ||
100 | |||
101 | MACHINE_START(ORIGEN, "ORIGEN") | ||
102 | /* Maintainer: JeongHyeon Kim <jhkim@insignal.co.kr> */ | ||
103 | .boot_params = S5P_PA_SDRAM + 0x100, | ||
104 | .init_irq = exynos4_init_irq, | ||
105 | .map_io = origen_map_io, | ||
106 | .init_machine = origen_machine_init, | ||
107 | .timer = &exynos4_timer, | ||
108 | MACHINE_END | ||