diff options
Diffstat (limited to 'arch/arm/mach-s3c64xx')
-rw-r--r-- | arch/arm/mach-s3c64xx/Kconfig | 15 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/clock.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/dev-audio.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/dev-spi.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/gpiolib.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/include/mach/map.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/include/mach/regs-clock.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-smdk6410.c | 33 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/s3c6410.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/setup-fb-24bpp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/setup-i2c0.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/setup-i2c1.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/setup-ide.c | 46 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/setup-keypad.c | 34 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/setup-sdhci-gpio.c | 17 |
16 files changed, 181 insertions, 19 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 | ||
60 | config S3C64XX_SETUP_IDE | ||
61 | bool | ||
62 | help | ||
63 | Common setup code for S3C64XX IDE. | ||
64 | |||
60 | config S3C64XX_SETUP_FB_24BPP | 65 | config 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 | ||
70 | config S3C64XX_SETUP_KEYPAD | ||
71 | bool | ||
72 | help | ||
73 | Common setup code for S3C64XX KEYPAD GPIO configurations | ||
74 | |||
65 | config S3C64XX_SETUP_SDHCI_GPIO | 75 | config 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 | ||
36 | obj-$(CONFIG_S3C64XX_SETUP_I2C0) += setup-i2c0.o | 36 | obj-$(CONFIG_S3C64XX_SETUP_I2C0) += setup-i2c0.o |
37 | obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1.o | 37 | obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1.o |
38 | obj-$(CONFIG_S3C64XX_SETUP_IDE) += setup-ide.o | ||
39 | obj-$(CONFIG_S3C64XX_SETUP_KEYPAD) += setup-keypad.o | ||
38 | obj-$(CONFIG_S3C64XX_SETUP_SDHCI) += setup-sdhci.o | 40 | obj-$(CONFIG_S3C64XX_SETUP_SDHCI) += setup-sdhci.o |
39 | obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o | 41 | obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o |
40 | obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o | 42 | obj-$(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/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index d9a03555f88b..b5d78616c774 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 |
@@ -242,6 +245,29 @@ static struct platform_device smdk6410_b_pwr_5v = { | |||
242 | }; | 245 | }; |
243 | #endif | 246 | #endif |
244 | 247 | ||
248 | static struct s3c_ide_platdata smdk6410_ide_pdata __initdata = { | ||
249 | .setup_gpio = s3c64xx_ide_setup_gpio, | ||
250 | }; | ||
251 | |||
252 | static uint32_t smdk6410_keymap[] __initdata = { | ||
253 | /* KEY(row, col, keycode) */ | ||
254 | KEY(0, 3, KEY_1), KEY(0, 4, KEY_2), KEY(0, 5, KEY_3), | ||
255 | KEY(0, 6, KEY_4), KEY(0, 7, KEY_5), | ||
256 | KEY(1, 3, KEY_A), KEY(1, 4, KEY_B), KEY(1, 5, KEY_C), | ||
257 | KEY(1, 6, KEY_D), KEY(1, 7, KEY_E) | ||
258 | }; | ||
259 | |||
260 | static struct matrix_keymap_data smdk6410_keymap_data __initdata = { | ||
261 | .keymap = smdk6410_keymap, | ||
262 | .keymap_size = ARRAY_SIZE(smdk6410_keymap), | ||
263 | }; | ||
264 | |||
265 | static struct samsung_keypad_platdata smdk6410_keypad_data __initdata = { | ||
266 | .keymap_data = &smdk6410_keymap_data, | ||
267 | .rows = 2, | ||
268 | .cols = 8, | ||
269 | }; | ||
270 | |||
245 | static struct map_desc smdk6410_iodesc[] = {}; | 271 | static struct map_desc smdk6410_iodesc[] = {}; |
246 | 272 | ||
247 | static struct platform_device *smdk6410_devices[] __initdata = { | 273 | static struct platform_device *smdk6410_devices[] __initdata = { |
@@ -257,6 +283,7 @@ static struct platform_device *smdk6410_devices[] __initdata = { | |||
257 | &s3c_device_ohci, | 283 | &s3c_device_ohci, |
258 | &s3c_device_usb_hsotg, | 284 | &s3c_device_usb_hsotg, |
259 | &s3c64xx_device_iisv4, | 285 | &s3c64xx_device_iisv4, |
286 | &samsung_device_keypad, | ||
260 | 287 | ||
261 | #ifdef CONFIG_REGULATOR | 288 | #ifdef CONFIG_REGULATOR |
262 | &smdk6410_b_pwr_5v, | 289 | &smdk6410_b_pwr_5v, |
@@ -265,6 +292,8 @@ static struct platform_device *smdk6410_devices[] __initdata = { | |||
265 | 292 | ||
266 | &smdk6410_smsc911x, | 293 | &smdk6410_smsc911x, |
267 | &s3c_device_adc, | 294 | &s3c_device_adc, |
295 | &s3c_device_cfcon, | ||
296 | &s3c_device_rtc, | ||
268 | &s3c_device_ts, | 297 | &s3c_device_ts, |
269 | &s3c_device_wdt, | 298 | &s3c_device_wdt, |
270 | }; | 299 | }; |
@@ -636,6 +665,8 @@ static void __init smdk6410_machine_init(void) | |||
636 | s3c_i2c1_set_platdata(NULL); | 665 | s3c_i2c1_set_platdata(NULL); |
637 | s3c_fb_set_platdata(&smdk6410_lcd_pdata); | 666 | s3c_fb_set_platdata(&smdk6410_lcd_pdata); |
638 | 667 | ||
668 | samsung_keypad_set_platdata(&smdk6410_keypad_data); | ||
669 | |||
639 | s3c24xx_ts_set_platdata(&s3c_ts_platform); | 670 | s3c24xx_ts_set_platdata(&s3c_ts_platform); |
640 | 671 | ||
641 | /* configure nCS1 width to 16 bits */ | 672 | /* configure nCS1 width to 16 bits */ |
@@ -665,6 +696,8 @@ static void __init smdk6410_machine_init(void) | |||
665 | i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); | 696 | i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); |
666 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); | 697 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); |
667 | 698 | ||
699 | s3c_ide_set_platdata(&smdk6410_ide_pdata); | ||
700 | |||
668 | platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); | 701 | platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); |
669 | } | 702 | } |
670 | 703 | ||
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 | ||
63 | void __init s3c6410_init_clocks(int xtal) | 65 | void __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 | ||
18 | struct platform_device; /* don't need the contents */ | 19 | struct 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 | ||
18 | struct platform_device; /* don't need the contents */ | 19 | struct 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 | |||
21 | void 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 | |||
16 | void 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 | ||
23 | void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) | 24 | void 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 | ||
40 | void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) | 44 | void 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 | ||
57 | void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) | 64 | void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) |