aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2010-08-13 19:59:15 -0400
committerChris Metcalf <cmetcalf@tilera.com>2010-08-13 19:59:15 -0400
commit7d72e6fa56c4100b9669efe0044f77ed9eb785a1 (patch)
tree5e90bf4969809a1ab20b97432b85be20ccfaa1f4 /arch/arm/mach-s3c64xx
parentba00376b0b13f234d839541a7b36a5bf5c2a4036 (diff)
parent2be1f3a73dd02e38e181cf5abacb3d45a6a2d6b8 (diff)
Merge branch 'master' into for-linus
Diffstat (limited to 'arch/arm/mach-s3c64xx')
-rw-r--r--arch/arm/mach-s3c64xx/Kconfig15
-rw-r--r--arch/arm/mach-s3c64xx/Makefile2
-rw-r--r--arch/arm/mach-s3c64xx/clock.c24
-rw-r--r--arch/arm/mach-s3c64xx/dev-audio.c2
-rw-r--r--arch/arm/mach-s3c64xx/dev-spi.c2
-rw-r--r--arch/arm/mach-s3c64xx/gpiolib.c2
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/map.h6
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/regs-clock.h5
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/regs-fb.h20
-rw-r--r--arch/arm/mach-s3c64xx/mach-anw6410.c1
-rw-r--r--arch/arm/mach-s3c64xx/mach-hmt.c1
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq5.c3
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq7.c3
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6410.c34
-rw-r--r--arch/arm/mach-s3c64xx/s3c6410.c6
-rw-r--r--arch/arm/mach-s3c64xx/setup-fb-24bpp.c2
-rw-r--r--arch/arm/mach-s3c64xx/setup-i2c0.c2
-rw-r--r--arch/arm/mach-s3c64xx/setup-i2c1.c2
-rw-r--r--arch/arm/mach-s3c64xx/setup-ide.c46
-rw-r--r--arch/arm/mach-s3c64xx/setup-keypad.c34
-rw-r--r--arch/arm/mach-s3c64xx/setup-sdhci-gpio.c17
21 files changed, 183 insertions, 46 deletions
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index f5a59727949f..071e8a1e0765 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -57,11 +57,21 @@ config S3C64XX_SETUP_I2C1
57 help 57 help
58 Common setup code for i2c bus 1. 58 Common setup code for i2c bus 1.
59 59
60config S3C64XX_SETUP_IDE
61 bool
62 help
63 Common setup code for S3C64XX IDE.
64
60config S3C64XX_SETUP_FB_24BPP 65config S3C64XX_SETUP_FB_24BPP
61 bool 66 bool
62 help 67 help
63 Common setup code for S3C64XX with an 24bpp RGB display helper. 68 Common setup code for S3C64XX with an 24bpp RGB display helper.
64 69
70config S3C64XX_SETUP_KEYPAD
71 bool
72 help
73 Common setup code for S3C64XX KEYPAD GPIO configurations
74
65config S3C64XX_SETUP_SDHCI_GPIO 75config S3C64XX_SETUP_SDHCI_GPIO
66 bool 76 bool
67 help 77 help
@@ -95,15 +105,20 @@ config MACH_SMDK6410
95 select S3C_DEV_HSMMC 105 select S3C_DEV_HSMMC
96 select S3C_DEV_HSMMC1 106 select S3C_DEV_HSMMC1
97 select S3C_DEV_I2C1 107 select S3C_DEV_I2C1
108 select SAMSUNG_DEV_IDE
98 select S3C_DEV_FB 109 select S3C_DEV_FB
110 select S3C_DEV_RTC
99 select SAMSUNG_DEV_TS 111 select SAMSUNG_DEV_TS
100 select S3C_DEV_USB_HOST 112 select S3C_DEV_USB_HOST
101 select S3C_DEV_USB_HSOTG 113 select S3C_DEV_USB_HSOTG
102 select S3C_DEV_WDT 114 select S3C_DEV_WDT
115 select SAMSUNG_DEV_KEYPAD
103 select HAVE_S3C2410_WATCHDOG 116 select HAVE_S3C2410_WATCHDOG
104 select S3C64XX_SETUP_SDHCI 117 select S3C64XX_SETUP_SDHCI
105 select S3C64XX_SETUP_I2C1 118 select S3C64XX_SETUP_I2C1
119 select S3C64XX_SETUP_IDE
106 select S3C64XX_SETUP_FB_24BPP 120 select S3C64XX_SETUP_FB_24BPP
121 select S3C64XX_SETUP_KEYPAD
107 help 122 help
108 Machine support for the Samsung SMDK6410 123 Machine support for the Samsung SMDK6410
109 124
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile
index 9d1006938f5c..48d3dfac8dd7 100644
--- a/arch/arm/mach-s3c64xx/Makefile
+++ b/arch/arm/mach-s3c64xx/Makefile
@@ -35,6 +35,8 @@ obj-$(CONFIG_S3C64XX_DMA) += dma.o
35 35
36obj-$(CONFIG_S3C64XX_SETUP_I2C0) += setup-i2c0.o 36obj-$(CONFIG_S3C64XX_SETUP_I2C0) += setup-i2c0.o
37obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1.o 37obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1.o
38obj-$(CONFIG_S3C64XX_SETUP_IDE) += setup-ide.o
39obj-$(CONFIG_S3C64XX_SETUP_KEYPAD) += setup-keypad.o
38obj-$(CONFIG_S3C64XX_SETUP_SDHCI) += setup-sdhci.o 40obj-$(CONFIG_S3C64XX_SETUP_SDHCI) += setup-sdhci.o
39obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o 41obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o
40obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o 42obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c
index fbd85a9b7bbf..7e03f0ae2fc8 100644
--- a/arch/arm/mach-s3c64xx/clock.c
+++ b/arch/arm/mach-s3c64xx/clock.c
@@ -133,6 +133,12 @@ static struct clk init_clocks_disable[] = {
133 .id = -1, 133 .id = -1,
134 .parent = &clk_h, 134 .parent = &clk_h,
135 }, { 135 }, {
136 .name = "rtc",
137 .id = -1,
138 .parent = &clk_p,
139 .enable = s3c64xx_pclk_ctrl,
140 .ctrlbit = S3C_CLKCON_PCLK_RTC,
141 }, {
136 .name = "adc", 142 .name = "adc",
137 .id = -1, 143 .id = -1,
138 .parent = &clk_p, 144 .parent = &clk_p,
@@ -165,6 +171,12 @@ static struct clk init_clocks_disable[] = {
165 .ctrlbit = S3C6410_CLKCON_PCLK_IIS2, 171 .ctrlbit = S3C6410_CLKCON_PCLK_IIS2,
166 }, { 172 }, {
167#endif 173#endif
174 .name = "keypad",
175 .id = -1,
176 .parent = &clk_p,
177 .enable = s3c64xx_pclk_ctrl,
178 .ctrlbit = S3C_CLKCON_PCLK_KEYPAD,
179 }, {
168 .name = "spi", 180 .name = "spi",
169 .id = 0, 181 .id = 0,
170 .parent = &clk_p, 182 .parent = &clk_p,
@@ -295,12 +307,6 @@ static struct clk init_clocks[] = {
295 .enable = s3c64xx_pclk_ctrl, 307 .enable = s3c64xx_pclk_ctrl,
296 .ctrlbit = S3C_CLKCON_PCLK_UART3, 308 .ctrlbit = S3C_CLKCON_PCLK_UART3,
297 }, { 309 }, {
298 .name = "rtc",
299 .id = -1,
300 .parent = &clk_p,
301 .enable = s3c64xx_pclk_ctrl,
302 .ctrlbit = S3C_CLKCON_PCLK_RTC,
303 }, {
304 .name = "watchdog", 310 .name = "watchdog",
305 .id = -1, 311 .id = -1,
306 .parent = &clk_p, 312 .parent = &clk_p,
@@ -310,6 +316,12 @@ static struct clk init_clocks[] = {
310 .id = -1, 316 .id = -1,
311 .parent = &clk_p, 317 .parent = &clk_p,
312 .ctrlbit = S3C_CLKCON_PCLK_AC97, 318 .ctrlbit = S3C_CLKCON_PCLK_AC97,
319 }, {
320 .name = "cfcon",
321 .id = -1,
322 .parent = &clk_h,
323 .enable = s3c64xx_hclk_ctrl,
324 .ctrlbit = S3C_CLKCON_HCLK_IHOST,
313 } 325 }
314}; 326};
315 327
diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c64xx/dev-audio.c
index c3e9e73bd0f9..9648fbc36eec 100644
--- a/arch/arm/mach-s3c64xx/dev-audio.c
+++ b/arch/arm/mach-s3c64xx/dev-audio.c
@@ -12,11 +12,11 @@
12#include <linux/string.h> 12#include <linux/string.h>
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14#include <linux/dma-mapping.h> 14#include <linux/dma-mapping.h>
15#include <linux/gpio.h>
15 16
16#include <mach/irqs.h> 17#include <mach/irqs.h>
17#include <mach/map.h> 18#include <mach/map.h>
18#include <mach/dma.h> 19#include <mach/dma.h>
19#include <mach/gpio.h>
20 20
21#include <plat/devs.h> 21#include <plat/devs.h>
22#include <plat/audio.h> 22#include <plat/audio.h>
diff --git a/arch/arm/mach-s3c64xx/dev-spi.c b/arch/arm/mach-s3c64xx/dev-spi.c
index 29c32d088515..a492b982aa06 100644
--- a/arch/arm/mach-s3c64xx/dev-spi.c
+++ b/arch/arm/mach-s3c64xx/dev-spi.c
@@ -12,10 +12,10 @@
12#include <linux/string.h> 12#include <linux/string.h>
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14#include <linux/dma-mapping.h> 14#include <linux/dma-mapping.h>
15#include <linux/gpio.h>
15 16
16#include <mach/dma.h> 17#include <mach/dma.h>
17#include <mach/map.h> 18#include <mach/map.h>
18#include <mach/gpio.h>
19#include <mach/gpio-bank-c.h> 19#include <mach/gpio-bank-c.h>
20#include <mach/spi-clocks.h> 20#include <mach/spi-clocks.h>
21 21
diff --git a/arch/arm/mach-s3c64xx/gpiolib.c b/arch/arm/mach-s3c64xx/gpiolib.c
index 60c929a3cab6..300dee4a667b 100644
--- a/arch/arm/mach-s3c64xx/gpiolib.c
+++ b/arch/arm/mach-s3c64xx/gpiolib.c
@@ -15,9 +15,9 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/irq.h> 16#include <linux/irq.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/gpio.h>
18 19
19#include <mach/map.h> 20#include <mach/map.h>
20#include <mach/gpio.h>
21 21
22#include <plat/gpio-core.h> 22#include <plat/gpio-core.h>
23#include <plat/gpio-cfg.h> 23#include <plat/gpio-cfg.h>
diff --git a/arch/arm/mach-s3c64xx/include/mach/map.h b/arch/arm/mach-s3c64xx/include/mach/map.h
index e1eab3c94aea..a1f13f02c841 100644
--- a/arch/arm/mach-s3c64xx/include/mach/map.h
+++ b/arch/arm/mach-s3c64xx/include/mach/map.h
@@ -67,6 +67,7 @@
67#define S3C64XX_PA_USB_HSOTG (0x7C000000) 67#define S3C64XX_PA_USB_HSOTG (0x7C000000)
68#define S3C64XX_PA_WATCHDOG (0x7E004000) 68#define S3C64XX_PA_WATCHDOG (0x7E004000)
69#define S3C64XX_PA_RTC (0x7E005000) 69#define S3C64XX_PA_RTC (0x7E005000)
70#define S3C64XX_PA_KEYPAD (0x7E00A000)
70#define S3C64XX_PA_ADC (0x7E00B000) 71#define S3C64XX_PA_ADC (0x7E00B000)
71#define S3C64XX_PA_SYSCON (0x7E00F000) 72#define S3C64XX_PA_SYSCON (0x7E00F000)
72#define S3C64XX_PA_AC97 (0x7F001000) 73#define S3C64XX_PA_AC97 (0x7F001000)
@@ -86,6 +87,9 @@
86#define S3C64XX_SZ_GPIO SZ_4K 87#define S3C64XX_SZ_GPIO SZ_4K
87 88
88#define S3C64XX_PA_SDRAM (0x50000000) 89#define S3C64XX_PA_SDRAM (0x50000000)
90
91#define S3C64XX_PA_CFCON (0x70300000)
92
89#define S3C64XX_PA_VIC0 (0x71200000) 93#define S3C64XX_PA_VIC0 (0x71200000)
90#define S3C64XX_PA_VIC1 (0x71300000) 94#define S3C64XX_PA_VIC1 (0x71300000)
91 95
@@ -120,5 +124,7 @@
120#define S3C_PA_WDT S3C64XX_PA_WATCHDOG 124#define S3C_PA_WDT S3C64XX_PA_WATCHDOG
121 125
122#define SAMSUNG_PA_ADC S3C64XX_PA_ADC 126#define SAMSUNG_PA_ADC S3C64XX_PA_ADC
127#define SAMSUNG_PA_CFCON S3C64XX_PA_CFCON
128#define SAMSUNG_PA_KEYPAD S3C64XX_PA_KEYPAD
123 129
124#endif /* __ASM_ARCH_6400_MAP_H */ 130#endif /* __ASM_ARCH_6400_MAP_H */
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-clock.h b/arch/arm/mach-s3c64xx/include/mach/regs-clock.h
index 0114eb0c1fe7..05332b998ec0 100644
--- a/arch/arm/mach-s3c64xx/include/mach/regs-clock.h
+++ b/arch/arm/mach-s3c64xx/include/mach/regs-clock.h
@@ -34,6 +34,7 @@
34#define S3C_SCLK_GATE S3C_CLKREG(0x38) 34#define S3C_SCLK_GATE S3C_CLKREG(0x38)
35#define S3C_MEM0_GATE S3C_CLKREG(0x3C) 35#define S3C_MEM0_GATE S3C_CLKREG(0x3C)
36#define S3C6410_CLK_SRC2 S3C_CLKREG(0x10C) 36#define S3C6410_CLK_SRC2 S3C_CLKREG(0x10C)
37#define S3C_MEM_SYS_CFG S3C_CLKREG(0x120)
37 38
38/* CLKDIV0 */ 39/* CLKDIV0 */
39#define S3C6400_CLKDIV0_PCLK_MASK (0xf << 12) 40#define S3C6400_CLKDIV0_PCLK_MASK (0xf << 12)
@@ -154,4 +155,8 @@
154#define S3C6400_CLKSRC_EPLL_MOUT_SHIFT (2) 155#define S3C6400_CLKSRC_EPLL_MOUT_SHIFT (2)
155#define S3C6400_CLKSRC_MFC (1 << 4) 156#define S3C6400_CLKSRC_MFC (1 << 4)
156 157
158/* MEM_SYS_CFG */
159#define MEM_SYS_CFG_INDEP_CF 0x4000
160#define MEM_SYS_CFG_EBI_FIX_PRI_CFCON 0x30
161
157#endif /* _PLAT_REGS_CLOCK_H */ 162#endif /* _PLAT_REGS_CLOCK_H */
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-fb.h b/arch/arm/mach-s3c64xx/include/mach/regs-fb.h
index f56611526c63..a06ee0af9a4b 100644
--- a/arch/arm/mach-s3c64xx/include/mach/regs-fb.h
+++ b/arch/arm/mach-s3c64xx/include/mach/regs-fb.h
@@ -18,24 +18,4 @@
18 18
19#include <plat/regs-fb-v4.h> 19#include <plat/regs-fb-v4.h>
20 20
21/* Palette registers */
22#define WIN2_PAL(_entry) (0x300 + ((_entry) * 2))
23#define WIN3_PAL(_entry) (0x320 + ((_entry) * 2))
24#define WIN4_PAL(_entry) (0x340 + ((_entry) * 2))
25#define WIN0_PAL(_entry) (0x400 + ((_entry) * 4))
26#define WIN1_PAL(_entry) (0x800 + ((_entry) * 4))
27
28static inline unsigned int s3c_fb_pal_reg(unsigned int window, int reg)
29{
30 switch (window) {
31 case 0: return WIN0_PAL(reg);
32 case 1: return WIN1_PAL(reg);
33 case 2: return WIN2_PAL(reg);
34 case 3: return WIN3_PAL(reg);
35 case 4: return WIN4_PAL(reg);
36 }
37
38 BUG();
39}
40
41#endif /* __ASM_ARCH_MACH_REGS_FB_H */ 21#endif /* __ASM_ARCH_MACH_REGS_FB_H */
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c
index 4a0bb243d14a..742dc87bd9c1 100644
--- a/arch/arm/mach-s3c64xx/mach-anw6410.c
+++ b/arch/arm/mach-s3c64xx/mach-anw6410.c
@@ -134,7 +134,6 @@ static struct platform_device anw6410_lcd_powerdev = {
134static struct s3c_fb_pd_win anw6410_fb_win0 = { 134static struct s3c_fb_pd_win anw6410_fb_win0 = {
135 /* this is to ensure we use win0 */ 135 /* this is to ensure we use win0 */
136 .win_mode = { 136 .win_mode = {
137 .pixclock = 41094,
138 .left_margin = 8, 137 .left_margin = 8,
139 .right_margin = 13, 138 .right_margin = 13,
140 .upper_margin = 7, 139 .upper_margin = 7,
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
index 187441a78dd5..fba90229f0df 100644
--- a/arch/arm/mach-s3c64xx/mach-hmt.c
+++ b/arch/arm/mach-s3c64xx/mach-hmt.c
@@ -128,7 +128,6 @@ static struct platform_device hmt_backlight_device = {
128 128
129static struct s3c_fb_pd_win hmt_fb_win0 = { 129static struct s3c_fb_pd_win hmt_fb_win0 = {
130 .win_mode = { 130 .win_mode = {
131 .pixclock = 41094,
132 .left_margin = 8, 131 .left_margin = 8,
133 .right_margin = 13, 132 .right_margin = 13,
134 .upper_margin = 7, 133 .upper_margin = 7,
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c
index 1d0326ead90f..a065062ec2a4 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq5.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq5.c
@@ -134,8 +134,6 @@ static struct platform_device smartq5_buttons_device = {
134 134
135static struct s3c_fb_pd_win smartq5_fb_win0 = { 135static struct s3c_fb_pd_win smartq5_fb_win0 = {
136 .win_mode = { 136 .win_mode = {
137 .pixclock = 1000000000000ULL /
138 ((40+1+216+800)*(10+1+35+480)*80),
139 .left_margin = 40, 137 .left_margin = 40,
140 .right_margin = 216, 138 .right_margin = 216,
141 .upper_margin = 10, 139 .upper_margin = 10,
@@ -144,6 +142,7 @@ static struct s3c_fb_pd_win smartq5_fb_win0 = {
144 .vsync_len = 1, 142 .vsync_len = 1,
145 .xres = 800, 143 .xres = 800,
146 .yres = 480, 144 .yres = 480,
145 .refresh = 80,
147 }, 146 },
148 .max_bpp = 32, 147 .max_bpp = 32,
149 .default_bpp = 16, 148 .default_bpp = 16,
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c
index e0bc78ecb156..0ecf45137546 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq7.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq7.c
@@ -150,8 +150,6 @@ static struct platform_device smartq7_buttons_device = {
150 150
151static struct s3c_fb_pd_win smartq7_fb_win0 = { 151static struct s3c_fb_pd_win smartq7_fb_win0 = {
152 .win_mode = { 152 .win_mode = {
153 .pixclock = 1000000000000ULL /
154 ((3+10+5+800)*(1+3+20+480)*80),
155 .left_margin = 3, 153 .left_margin = 3,
156 .right_margin = 5, 154 .right_margin = 5,
157 .upper_margin = 1, 155 .upper_margin = 1,
@@ -160,6 +158,7 @@ static struct s3c_fb_pd_win smartq7_fb_win0 = {
160 .vsync_len = 3, 158 .vsync_len = 3,
161 .xres = 800, 159 .xres = 800,
162 .yres = 480, 160 .yres = 480,
161 .refresh = 80,
163 }, 162 },
164 .max_bpp = 32, 163 .max_bpp = 32,
165 .default_bpp = 16, 164 .default_bpp = 16,
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index d9a03555f88b..2d43128f939f 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -17,6 +17,7 @@
17#include <linux/list.h> 17#include <linux/list.h>
18#include <linux/timer.h> 18#include <linux/timer.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/input.h>
20#include <linux/serial_core.h> 21#include <linux/serial_core.h>
21#include <linux/platform_device.h> 22#include <linux/platform_device.h>
22#include <linux/io.h> 23#include <linux/io.h>
@@ -56,6 +57,7 @@
56#include <mach/regs-gpio.h> 57#include <mach/regs-gpio.h>
57#include <mach/regs-sys.h> 58#include <mach/regs-sys.h>
58#include <mach/regs-srom.h> 59#include <mach/regs-srom.h>
60#include <plat/ata.h>
59#include <plat/iic.h> 61#include <plat/iic.h>
60#include <plat/fb.h> 62#include <plat/fb.h>
61#include <plat/gpio-cfg.h> 63#include <plat/gpio-cfg.h>
@@ -66,6 +68,7 @@
66#include <plat/cpu.h> 68#include <plat/cpu.h>
67#include <plat/adc.h> 69#include <plat/adc.h>
68#include <plat/ts.h> 70#include <plat/ts.h>
71#include <plat/keypad.h>
69 72
70#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK 73#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
71#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB 74#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
@@ -141,7 +144,6 @@ static struct platform_device smdk6410_lcd_powerdev = {
141static struct s3c_fb_pd_win smdk6410_fb_win0 = { 144static struct s3c_fb_pd_win smdk6410_fb_win0 = {
142 /* this is to ensure we use win0 */ 145 /* this is to ensure we use win0 */
143 .win_mode = { 146 .win_mode = {
144 .pixclock = 41094,
145 .left_margin = 8, 147 .left_margin = 8,
146 .right_margin = 13, 148 .right_margin = 13,
147 .upper_margin = 7, 149 .upper_margin = 7,
@@ -242,6 +244,29 @@ static struct platform_device smdk6410_b_pwr_5v = {
242}; 244};
243#endif 245#endif
244 246
247static struct s3c_ide_platdata smdk6410_ide_pdata __initdata = {
248 .setup_gpio = s3c64xx_ide_setup_gpio,
249};
250
251static uint32_t smdk6410_keymap[] __initdata = {
252 /* KEY(row, col, keycode) */
253 KEY(0, 3, KEY_1), KEY(0, 4, KEY_2), KEY(0, 5, KEY_3),
254 KEY(0, 6, KEY_4), KEY(0, 7, KEY_5),
255 KEY(1, 3, KEY_A), KEY(1, 4, KEY_B), KEY(1, 5, KEY_C),
256 KEY(1, 6, KEY_D), KEY(1, 7, KEY_E)
257};
258
259static struct matrix_keymap_data smdk6410_keymap_data __initdata = {
260 .keymap = smdk6410_keymap,
261 .keymap_size = ARRAY_SIZE(smdk6410_keymap),
262};
263
264static struct samsung_keypad_platdata smdk6410_keypad_data __initdata = {
265 .keymap_data = &smdk6410_keymap_data,
266 .rows = 2,
267 .cols = 8,
268};
269
245static struct map_desc smdk6410_iodesc[] = {}; 270static struct map_desc smdk6410_iodesc[] = {};
246 271
247static struct platform_device *smdk6410_devices[] __initdata = { 272static struct platform_device *smdk6410_devices[] __initdata = {
@@ -257,6 +282,7 @@ static struct platform_device *smdk6410_devices[] __initdata = {
257 &s3c_device_ohci, 282 &s3c_device_ohci,
258 &s3c_device_usb_hsotg, 283 &s3c_device_usb_hsotg,
259 &s3c64xx_device_iisv4, 284 &s3c64xx_device_iisv4,
285 &samsung_device_keypad,
260 286
261#ifdef CONFIG_REGULATOR 287#ifdef CONFIG_REGULATOR
262 &smdk6410_b_pwr_5v, 288 &smdk6410_b_pwr_5v,
@@ -265,6 +291,8 @@ static struct platform_device *smdk6410_devices[] __initdata = {
265 291
266 &smdk6410_smsc911x, 292 &smdk6410_smsc911x,
267 &s3c_device_adc, 293 &s3c_device_adc,
294 &s3c_device_cfcon,
295 &s3c_device_rtc,
268 &s3c_device_ts, 296 &s3c_device_ts,
269 &s3c_device_wdt, 297 &s3c_device_wdt,
270}; 298};
@@ -636,6 +664,8 @@ static void __init smdk6410_machine_init(void)
636 s3c_i2c1_set_platdata(NULL); 664 s3c_i2c1_set_platdata(NULL);
637 s3c_fb_set_platdata(&smdk6410_lcd_pdata); 665 s3c_fb_set_platdata(&smdk6410_lcd_pdata);
638 666
667 samsung_keypad_set_platdata(&smdk6410_keypad_data);
668
639 s3c24xx_ts_set_platdata(&s3c_ts_platform); 669 s3c24xx_ts_set_platdata(&s3c_ts_platform);
640 670
641 /* configure nCS1 width to 16 bits */ 671 /* configure nCS1 width to 16 bits */
@@ -665,6 +695,8 @@ static void __init smdk6410_machine_init(void)
665 i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); 695 i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));
666 i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); 696 i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
667 697
698 s3c_ide_set_platdata(&smdk6410_ide_pdata);
699
668 platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); 700 platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices));
669} 701}
670 702
diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c
index 014401c39f36..312aa6b115e8 100644
--- a/arch/arm/mach-s3c64xx/s3c6410.c
+++ b/arch/arm/mach-s3c64xx/s3c6410.c
@@ -37,8 +37,9 @@
37#include <plat/devs.h> 37#include <plat/devs.h>
38#include <plat/clock.h> 38#include <plat/clock.h>
39#include <plat/sdhci.h> 39#include <plat/sdhci.h>
40#include <plat/ata-core.h>
41#include <plat/adc-core.h>
40#include <plat/iic-core.h> 42#include <plat/iic-core.h>
41#include <plat/adc.h>
42#include <plat/onenand-core.h> 43#include <plat/onenand-core.h>
43#include <mach/s3c6400.h> 44#include <mach/s3c6400.h>
44#include <mach/s3c6410.h> 45#include <mach/s3c6410.h>
@@ -54,10 +55,11 @@ void __init s3c6410_map_io(void)
54 s3c_i2c0_setname("s3c2440-i2c"); 55 s3c_i2c0_setname("s3c2440-i2c");
55 s3c_i2c1_setname("s3c2440-i2c"); 56 s3c_i2c1_setname("s3c2440-i2c");
56 57
57 s3c_device_adc.name = "s3c64xx-adc"; 58 s3c_adc_setname("s3c64xx-adc");
58 s3c_device_nand.name = "s3c6400-nand"; 59 s3c_device_nand.name = "s3c6400-nand";
59 s3c_onenand_setname("s3c6410-onenand"); 60 s3c_onenand_setname("s3c6410-onenand");
60 s3c64xx_onenand1_setname("s3c6410-onenand"); 61 s3c64xx_onenand1_setname("s3c6410-onenand");
62 s3c_cfcon_setname("s3c64xx-pata");
61} 63}
62 64
63void __init s3c6410_init_clocks(int xtal) 65void __init s3c6410_init_clocks(int xtal)
diff --git a/arch/arm/mach-s3c64xx/setup-fb-24bpp.c b/arch/arm/mach-s3c64xx/setup-fb-24bpp.c
index 8e28e448dd20..000736877df2 100644
--- a/arch/arm/mach-s3c64xx/setup-fb-24bpp.c
+++ b/arch/arm/mach-s3c64xx/setup-fb-24bpp.c
@@ -15,9 +15,9 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/types.h> 16#include <linux/types.h>
17#include <linux/fb.h> 17#include <linux/fb.h>
18#include <linux/gpio.h>
18 19
19#include <mach/regs-fb.h> 20#include <mach/regs-fb.h>
20#include <mach/gpio.h>
21#include <plat/fb.h> 21#include <plat/fb.h>
22#include <plat/gpio-cfg.h> 22#include <plat/gpio-cfg.h>
23 23
diff --git a/arch/arm/mach-s3c64xx/setup-i2c0.c b/arch/arm/mach-s3c64xx/setup-i2c0.c
index d1b11e6e77e8..406192a43c6e 100644
--- a/arch/arm/mach-s3c64xx/setup-i2c0.c
+++ b/arch/arm/mach-s3c64xx/setup-i2c0.c
@@ -14,10 +14,10 @@
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/types.h> 16#include <linux/types.h>
17#include <linux/gpio.h>
17 18
18struct platform_device; /* don't need the contents */ 19struct platform_device; /* don't need the contents */
19 20
20#include <mach/gpio.h>
21#include <mach/gpio-bank-b.h> 21#include <mach/gpio-bank-b.h>
22#include <plat/iic.h> 22#include <plat/iic.h>
23#include <plat/gpio-cfg.h> 23#include <plat/gpio-cfg.h>
diff --git a/arch/arm/mach-s3c64xx/setup-i2c1.c b/arch/arm/mach-s3c64xx/setup-i2c1.c
index 2dce57d8c6f8..1ee62c97cd7f 100644
--- a/arch/arm/mach-s3c64xx/setup-i2c1.c
+++ b/arch/arm/mach-s3c64xx/setup-i2c1.c
@@ -14,10 +14,10 @@
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/types.h> 16#include <linux/types.h>
17#include <linux/gpio.h>
17 18
18struct platform_device; /* don't need the contents */ 19struct platform_device; /* don't need the contents */
19 20
20#include <mach/gpio.h>
21#include <mach/gpio-bank-b.h> 21#include <mach/gpio-bank-b.h>
22#include <plat/iic.h> 22#include <plat/iic.h>
23#include <plat/gpio-cfg.h> 23#include <plat/gpio-cfg.h>
diff --git a/arch/arm/mach-s3c64xx/setup-ide.c b/arch/arm/mach-s3c64xx/setup-ide.c
new file mode 100644
index 000000000000..c12c315f33bc
--- /dev/null
+++ b/arch/arm/mach-s3c64xx/setup-ide.c
@@ -0,0 +1,46 @@
1/* linux/arch/arm/mach-s3c64xx/setup-ide.c
2 *
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
5 *
6 * S3C64XX setup information for IDE
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/kernel.h>
14#include <linux/gpio.h>
15#include <linux/io.h>
16
17#include <mach/map.h>
18#include <mach/regs-clock.h>
19#include <plat/gpio-cfg.h>
20
21void s3c64xx_ide_setup_gpio(void)
22{
23 u32 reg;
24 u32 gpio = 0;
25
26 reg = readl(S3C_MEM_SYS_CFG) & (~0x3f);
27
28 /* Independent CF interface, CF chip select configuration */
29 writel(reg | MEM_SYS_CFG_INDEP_CF |
30 MEM_SYS_CFG_EBI_FIX_PRI_CFCON, S3C_MEM_SYS_CFG);
31
32 s3c_gpio_cfgpin(S3C64XX_GPB(4), S3C_GPIO_SFN(4));
33
34 /* Set XhiDATA[15:0] pins as CF Data[15:0] */
35 for (gpio = S3C64XX_GPK(0); gpio <= S3C64XX_GPK(15); gpio++)
36 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(5));
37
38 /* Set XhiADDR[2:0] pins as CF ADDR[2:0] */
39 for (gpio = S3C64XX_GPL(0); gpio <= S3C64XX_GPL(2); gpio++)
40 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(6));
41
42 /* Set Xhi ctrl pins as CF ctrl pins(IORDY, IOWR, IORD, CE[0:1]) */
43 s3c_gpio_cfgpin(S3C64XX_GPM(5), S3C_GPIO_SFN(1));
44 for (gpio = S3C64XX_GPM(0); gpio <= S3C64XX_GPM(4); gpio++)
45 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(6));
46}
diff --git a/arch/arm/mach-s3c64xx/setup-keypad.c b/arch/arm/mach-s3c64xx/setup-keypad.c
new file mode 100644
index 000000000000..abc34e4e1a93
--- /dev/null
+++ b/arch/arm/mach-s3c64xx/setup-keypad.c
@@ -0,0 +1,34 @@
1/* linux/arch/arm/mach-s3c64xx/setup-keypad.c
2 *
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
5 *
6 * GPIO configuration for S3C64XX KeyPad device
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/gpio.h>
14#include <plat/gpio-cfg.h>
15
16void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols)
17{
18 unsigned int gpio;
19 unsigned int end;
20
21 /* Set all the necessary GPK pins to special-function 3: KP_ROW[x] */
22 end = S3C64XX_GPK(8 + rows);
23 for (gpio = S3C64XX_GPK(8); gpio < end; gpio++) {
24 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3));
25 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
26 }
27
28 /* Set all the necessary GPL pins to special-function 3: KP_COL[x] */
29 end = S3C64XX_GPL(0 + cols);
30 for (gpio = S3C64XX_GPL(0); gpio < end; gpio++) {
31 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3));
32 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
33 }
34}
diff --git a/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c b/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
index a58c0cc7ba5e..322359591374 100644
--- a/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
+++ b/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
@@ -16,12 +16,14 @@
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/gpio.h>
19 20
20#include <mach/gpio.h>
21#include <plat/gpio-cfg.h> 21#include <plat/gpio-cfg.h>
22#include <plat/sdhci.h>
22 23
23void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) 24void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
24{ 25{
26 struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
25 unsigned int gpio; 27 unsigned int gpio;
26 unsigned int end; 28 unsigned int end;
27 29
@@ -33,12 +35,15 @@ void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
33 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); 35 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
34 } 36 }
35 37
36 s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP); 38 if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) {
37 s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(2)); 39 s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP);
40 s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(2));
41 }
38} 42}
39 43
40void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) 44void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
41{ 45{
46 struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
42 unsigned int gpio; 47 unsigned int gpio;
43 unsigned int end; 48 unsigned int end;
44 49
@@ -50,8 +55,10 @@ void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
50 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); 55 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
51 } 56 }
52 57
53 s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP); 58 if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) {
54 s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(3)); 59 s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP);
60 s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(3));
61 }
55} 62}
56 63
57void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) 64void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width)