diff options
author | Jonghun Han <jonghun.han@samsung.com> | 2011-07-21 02:46:26 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-07-21 04:28:51 -0400 |
commit | e61b170139225ccb808eb98a047dd2a8d3af830d (patch) | |
tree | aa225f29c5eb4d3c2a5195808f9e8287586535a5 /arch/arm/mach-exynos4 | |
parent | 1aee2add2179a46c93bd62137feca22b1822eda2 (diff) |
ARM: EXYNOS4: Add platform device and helper functions for FIMD
This patch adds platform device s5p_device_fimd0 for EXYNOS4 FIMD0.
EXYNOS4 has two FIMDs(FIMD0, FIMD1). FIMD1 will be added later.
Some definitions used to enable EXYNOS4 FIMD0 are added.
Signed-off-by: Jonghun Han <jonghun.han@samsung.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos4')
-rw-r--r-- | arch/arm/mach-exynos4/Kconfig | 9 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/cpu.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/setup-fimd0.c | 43 |
4 files changed, 56 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index b735705c8b47..75982b53e527 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig | |||
@@ -26,6 +26,11 @@ config EXYNOS4_DEV_AHCI | |||
26 | help | 26 | help |
27 | Compile in platform device definitions for AHCI | 27 | Compile in platform device definitions for AHCI |
28 | 28 | ||
29 | config EXYNOS4_SETUP_FIMD0 | ||
30 | bool | ||
31 | help | ||
32 | Common setup code for FIMD0. | ||
33 | |||
29 | config EXYNOS4_DEV_PD | 34 | config EXYNOS4_DEV_PD |
30 | bool | 35 | bool |
31 | help | 36 | help |
@@ -109,6 +114,7 @@ menu "EXYNOS4 Machines" | |||
109 | config MACH_SMDKC210 | 114 | config MACH_SMDKC210 |
110 | bool "SMDKC210" | 115 | bool "SMDKC210" |
111 | select CPU_EXYNOS4210 | 116 | select CPU_EXYNOS4210 |
117 | select S5P_DEV_FIMD0 | ||
112 | select S3C_DEV_RTC | 118 | select S3C_DEV_RTC |
113 | select S3C_DEV_WDT | 119 | select S3C_DEV_WDT |
114 | select S3C_DEV_I2C1 | 120 | select S3C_DEV_I2C1 |
@@ -118,6 +124,7 @@ config MACH_SMDKC210 | |||
118 | select S3C_DEV_HSMMC3 | 124 | select S3C_DEV_HSMMC3 |
119 | select EXYNOS4_DEV_PD | 125 | select EXYNOS4_DEV_PD |
120 | select EXYNOS4_DEV_SYSMMU | 126 | select EXYNOS4_DEV_SYSMMU |
127 | select EXYNOS4_SETUP_FIMD0 | ||
121 | select EXYNOS4_SETUP_I2C1 | 128 | select EXYNOS4_SETUP_I2C1 |
122 | select EXYNOS4_SETUP_SDHCI | 129 | select EXYNOS4_SETUP_SDHCI |
123 | help | 130 | help |
@@ -126,6 +133,7 @@ config MACH_SMDKC210 | |||
126 | config MACH_SMDKV310 | 133 | config MACH_SMDKV310 |
127 | bool "SMDKV310" | 134 | bool "SMDKV310" |
128 | select CPU_EXYNOS4210 | 135 | select CPU_EXYNOS4210 |
136 | select S5P_DEV_FIMD0 | ||
129 | select S3C_DEV_RTC | 137 | select S3C_DEV_RTC |
130 | select S3C_DEV_WDT | 138 | select S3C_DEV_WDT |
131 | select S3C_DEV_I2C1 | 139 | select S3C_DEV_I2C1 |
@@ -137,6 +145,7 @@ config MACH_SMDKV310 | |||
137 | select SAMSUNG_DEV_KEYPAD | 145 | select SAMSUNG_DEV_KEYPAD |
138 | select EXYNOS4_DEV_PD | 146 | select EXYNOS4_DEV_PD |
139 | select EXYNOS4_DEV_SYSMMU | 147 | select EXYNOS4_DEV_SYSMMU |
148 | select EXYNOS4_SETUP_FIMD0 | ||
140 | select EXYNOS4_SETUP_I2C1 | 149 | select EXYNOS4_SETUP_I2C1 |
141 | select EXYNOS4_SETUP_KEYPAD | 150 | select EXYNOS4_SETUP_KEYPAD |
142 | select EXYNOS4_SETUP_SDHCI | 151 | select EXYNOS4_SETUP_SDHCI |
diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile index 2a0b68220b2f..e8b33aba14d8 100644 --- a/arch/arm/mach-exynos4/Makefile +++ b/arch/arm/mach-exynos4/Makefile | |||
@@ -41,6 +41,7 @@ obj-$(CONFIG_EXYNOS4_DEV_SYSMMU) += dev-sysmmu.o | |||
41 | obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o | 41 | obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o |
42 | 42 | ||
43 | obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o | 43 | obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o |
44 | obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o | ||
44 | obj-$(CONFIG_EXYNOS4_SETUP_I2C1) += setup-i2c1.o | 45 | obj-$(CONFIG_EXYNOS4_SETUP_I2C1) += setup-i2c1.o |
45 | obj-$(CONFIG_EXYNOS4_SETUP_I2C2) += setup-i2c2.o | 46 | obj-$(CONFIG_EXYNOS4_SETUP_I2C2) += setup-i2c2.o |
46 | obj-$(CONFIG_EXYNOS4_SETUP_I2C3) += setup-i2c3.o | 47 | obj-$(CONFIG_EXYNOS4_SETUP_I2C3) += setup-i2c3.o |
diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c index b0370f79ce7e..2d8a40c9e6e5 100644 --- a/arch/arm/mach-exynos4/cpu.c +++ b/arch/arm/mach-exynos4/cpu.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <plat/adc-core.h> | 25 | #include <plat/adc-core.h> |
26 | #include <plat/sdhci.h> | 26 | #include <plat/sdhci.h> |
27 | #include <plat/devs.h> | 27 | #include <plat/devs.h> |
28 | #include <plat/fb-core.h> | ||
28 | #include <plat/fimc-core.h> | 29 | #include <plat/fimc-core.h> |
29 | #include <plat/iic-core.h> | 30 | #include <plat/iic-core.h> |
30 | 31 | ||
@@ -153,6 +154,8 @@ void __init exynos4_map_io(void) | |||
153 | s3c_i2c0_setname("s3c2440-i2c"); | 154 | s3c_i2c0_setname("s3c2440-i2c"); |
154 | s3c_i2c1_setname("s3c2440-i2c"); | 155 | s3c_i2c1_setname("s3c2440-i2c"); |
155 | s3c_i2c2_setname("s3c2440-i2c"); | 156 | s3c_i2c2_setname("s3c2440-i2c"); |
157 | |||
158 | s5p_fb_setname(0, "exynos4-fb"); | ||
156 | } | 159 | } |
157 | 160 | ||
158 | void __init exynos4_init_clocks(int xtal) | 161 | void __init exynos4_init_clocks(int xtal) |
diff --git a/arch/arm/mach-exynos4/setup-fimd0.c b/arch/arm/mach-exynos4/setup-fimd0.c new file mode 100644 index 000000000000..07a6dbeecdd0 --- /dev/null +++ b/arch/arm/mach-exynos4/setup-fimd0.c | |||
@@ -0,0 +1,43 @@ | |||
1 | /* linux/arch/arm/mach-exynos4/setup-fimd0.c | ||
2 | * | ||
3 | * Copyright (c) 2009-2011 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * Base Exynos4 FIMD 0 configuration | ||
7 | * | ||
8 | * 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 | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/fb.h> | ||
14 | #include <linux/gpio.h> | ||
15 | |||
16 | #include <plat/gpio-cfg.h> | ||
17 | #include <plat/regs-fb-v4.h> | ||
18 | |||
19 | #include <mach/map.h> | ||
20 | |||
21 | void exynos4_fimd0_gpio_setup_24bpp(void) | ||
22 | { | ||
23 | unsigned int reg; | ||
24 | |||
25 | s3c_gpio_cfgrange_nopull(EXYNOS4_GPF0(0), 8, S3C_GPIO_SFN(2)); | ||
26 | s3c_gpio_cfgrange_nopull(EXYNOS4_GPF1(0), 8, S3C_GPIO_SFN(2)); | ||
27 | s3c_gpio_cfgrange_nopull(EXYNOS4_GPF2(0), 8, S3C_GPIO_SFN(2)); | ||
28 | s3c_gpio_cfgrange_nopull(EXYNOS4_GPF3(0), 4, S3C_GPIO_SFN(2)); | ||
29 | |||
30 | /* | ||
31 | * Set DISPLAY_CONTROL register for Display path selection. | ||
32 | * | ||
33 | * DISPLAY_CONTROL[1:0] | ||
34 | * --------------------- | ||
35 | * 00 | MIE | ||
36 | * 01 | MDINE | ||
37 | * 10 | FIMD : selected | ||
38 | * 11 | FIMD | ||
39 | */ | ||
40 | reg = __raw_readl(S3C_VA_SYS + 0x0210); | ||
41 | reg |= (1 << 1); | ||
42 | __raw_writel(reg, S3C_VA_SYS + 0x0210); | ||
43 | } | ||