diff options
Diffstat (limited to 'arch/arm/mach-s3c64xx')
-rw-r--r-- | arch/arm/mach-s3c64xx/Kconfig | 9 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/clock.c | 121 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/common.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/cpuidle.c | 91 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/include/mach/entry-macro.S | 19 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/include/mach/system.h | 19 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/irq-pm.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-crag6410-module.c | 32 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-crag6410.c | 71 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-smartq.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-smdk6410.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/setup-usb-phy.c | 90 |
13 files changed, 412 insertions, 53 deletions
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig index dd20c66cd700..82c0915729ee 100644 --- a/arch/arm/mach-s3c64xx/Kconfig +++ b/arch/arm/mach-s3c64xx/Kconfig | |||
@@ -83,6 +83,11 @@ config S3C64XX_SETUP_SPI | |||
83 | help | 83 | help |
84 | Common setup code for SPI GPIO configurations | 84 | Common setup code for SPI GPIO configurations |
85 | 85 | ||
86 | config S3C64XX_SETUP_USB_PHY | ||
87 | bool | ||
88 | help | ||
89 | Common setup code for USB PHY controller | ||
90 | |||
86 | # S36400 Macchine support | 91 | # S36400 Macchine support |
87 | 92 | ||
88 | config MACH_SMDK6400 | 93 | config MACH_SMDK6400 |
@@ -157,6 +162,7 @@ config MACH_SMDK6410 | |||
157 | select S3C64XX_SETUP_IDE | 162 | select S3C64XX_SETUP_IDE |
158 | select S3C64XX_SETUP_FB_24BPP | 163 | select S3C64XX_SETUP_FB_24BPP |
159 | select S3C64XX_SETUP_KEYPAD | 164 | select S3C64XX_SETUP_KEYPAD |
165 | select S3C64XX_SETUP_USB_PHY | ||
160 | help | 166 | help |
161 | Machine support for the Samsung SMDK6410 | 167 | Machine support for the Samsung SMDK6410 |
162 | 168 | ||
@@ -256,6 +262,7 @@ config MACH_SMARTQ | |||
256 | select S3C_DEV_USB_HOST | 262 | select S3C_DEV_USB_HOST |
257 | select S3C64XX_SETUP_SDHCI | 263 | select S3C64XX_SETUP_SDHCI |
258 | select S3C64XX_SETUP_FB_24BPP | 264 | select S3C64XX_SETUP_FB_24BPP |
265 | select S3C64XX_SETUP_USB_PHY | ||
259 | select SAMSUNG_DEV_ADC | 266 | select SAMSUNG_DEV_ADC |
260 | select SAMSUNG_DEV_PWM | 267 | select SAMSUNG_DEV_PWM |
261 | select SAMSUNG_DEV_TS | 268 | select SAMSUNG_DEV_TS |
@@ -283,6 +290,7 @@ config MACH_WLF_CRAGG_6410 | |||
283 | select S3C64XX_SETUP_FB_24BPP | 290 | select S3C64XX_SETUP_FB_24BPP |
284 | select S3C64XX_SETUP_KEYPAD | 291 | select S3C64XX_SETUP_KEYPAD |
285 | select S3C64XX_SETUP_SPI | 292 | select S3C64XX_SETUP_SPI |
293 | select S3C64XX_SETUP_USB_PHY | ||
286 | select SAMSUNG_DEV_ADC | 294 | select SAMSUNG_DEV_ADC |
287 | select SAMSUNG_DEV_KEYPAD | 295 | select SAMSUNG_DEV_KEYPAD |
288 | select S3C_DEV_USB_HOST | 296 | select S3C_DEV_USB_HOST |
@@ -296,5 +304,6 @@ config MACH_WLF_CRAGG_6410 | |||
296 | select S3C64XX_DEV_SPI0 | 304 | select S3C64XX_DEV_SPI0 |
297 | select SAMSUNG_GPIO_EXTRA128 | 305 | select SAMSUNG_GPIO_EXTRA128 |
298 | select I2C | 306 | select I2C |
307 | select LEDS_GPIO_REGISTER | ||
299 | help | 308 | help |
300 | Machine support for the Wolfson Cragganmore S3C6410 variant. | 309 | Machine support for the Wolfson Cragganmore S3C6410 variant. |
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile index 1822ac2eba31..f9ce1dc28ce4 100644 --- a/arch/arm/mach-s3c64xx/Makefile +++ b/arch/arm/mach-s3c64xx/Makefile | |||
@@ -22,6 +22,7 @@ obj-$(CONFIG_CPU_S3C6410) += s3c6410.o | |||
22 | # PM | 22 | # PM |
23 | 23 | ||
24 | obj-$(CONFIG_PM) += pm.o irq-pm.o sleep.o | 24 | obj-$(CONFIG_PM) += pm.o irq-pm.o sleep.o |
25 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | ||
25 | 26 | ||
26 | # DMA support | 27 | # DMA support |
27 | 28 | ||
@@ -42,6 +43,7 @@ obj-$(CONFIG_S3C64XX_SETUP_IDE) += setup-ide.o | |||
42 | obj-$(CONFIG_S3C64XX_SETUP_KEYPAD) += setup-keypad.o | 43 | obj-$(CONFIG_S3C64XX_SETUP_KEYPAD) += setup-keypad.o |
43 | obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o | 44 | obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o |
44 | obj-$(CONFIG_S3C64XX_SETUP_SPI) += setup-spi.o | 45 | obj-$(CONFIG_S3C64XX_SETUP_SPI) += setup-spi.o |
46 | obj-$(CONFIG_S3C64XX_SETUP_USB_PHY) += setup-usb-phy.o | ||
45 | 47 | ||
46 | # Machine support | 48 | # Machine support |
47 | 49 | ||
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c index aebbcc291b4e..52f079a691cb 100644 --- a/arch/arm/mach-s3c64xx/clock.c +++ b/arch/arm/mach-s3c64xx/clock.c | |||
@@ -207,6 +207,15 @@ static struct clk init_clocks_off[] = { | |||
207 | .enable = s3c64xx_sclk_ctrl, | 207 | .enable = s3c64xx_sclk_ctrl, |
208 | .ctrlbit = S3C_CLKCON_SCLK_MMC2_48, | 208 | .ctrlbit = S3C_CLKCON_SCLK_MMC2_48, |
209 | }, { | 209 | }, { |
210 | .name = "ac97", | ||
211 | .parent = &clk_p, | ||
212 | .ctrlbit = S3C_CLKCON_PCLK_AC97, | ||
213 | }, { | ||
214 | .name = "cfcon", | ||
215 | .parent = &clk_h, | ||
216 | .enable = s3c64xx_hclk_ctrl, | ||
217 | .ctrlbit = S3C_CLKCON_HCLK_IHOST, | ||
218 | }, { | ||
210 | .name = "dma0", | 219 | .name = "dma0", |
211 | .parent = &clk_h, | 220 | .parent = &clk_h, |
212 | .enable = s3c64xx_hclk_ctrl, | 221 | .enable = s3c64xx_hclk_ctrl, |
@@ -216,6 +225,107 @@ static struct clk init_clocks_off[] = { | |||
216 | .parent = &clk_h, | 225 | .parent = &clk_h, |
217 | .enable = s3c64xx_hclk_ctrl, | 226 | .enable = s3c64xx_hclk_ctrl, |
218 | .ctrlbit = S3C_CLKCON_HCLK_DMA1, | 227 | .ctrlbit = S3C_CLKCON_HCLK_DMA1, |
228 | }, { | ||
229 | .name = "3dse", | ||
230 | .parent = &clk_h, | ||
231 | .enable = s3c64xx_hclk_ctrl, | ||
232 | .ctrlbit = S3C_CLKCON_HCLK_3DSE, | ||
233 | }, { | ||
234 | .name = "hclk_secur", | ||
235 | .parent = &clk_h, | ||
236 | .enable = s3c64xx_hclk_ctrl, | ||
237 | .ctrlbit = S3C_CLKCON_HCLK_SECUR, | ||
238 | }, { | ||
239 | .name = "sdma1", | ||
240 | .parent = &clk_h, | ||
241 | .enable = s3c64xx_hclk_ctrl, | ||
242 | .ctrlbit = S3C_CLKCON_HCLK_SDMA1, | ||
243 | }, { | ||
244 | .name = "sdma0", | ||
245 | .parent = &clk_h, | ||
246 | .enable = s3c64xx_hclk_ctrl, | ||
247 | .ctrlbit = S3C_CLKCON_HCLK_SDMA0, | ||
248 | }, { | ||
249 | .name = "hclk_jpeg", | ||
250 | .parent = &clk_h, | ||
251 | .enable = s3c64xx_hclk_ctrl, | ||
252 | .ctrlbit = S3C_CLKCON_HCLK_JPEG, | ||
253 | }, { | ||
254 | .name = "camif", | ||
255 | .parent = &clk_h, | ||
256 | .enable = s3c64xx_hclk_ctrl, | ||
257 | .ctrlbit = S3C_CLKCON_HCLK_CAMIF, | ||
258 | }, { | ||
259 | .name = "hclk_scaler", | ||
260 | .parent = &clk_h, | ||
261 | .enable = s3c64xx_hclk_ctrl, | ||
262 | .ctrlbit = S3C_CLKCON_HCLK_SCALER, | ||
263 | }, { | ||
264 | .name = "2d", | ||
265 | .parent = &clk_h, | ||
266 | .enable = s3c64xx_hclk_ctrl, | ||
267 | .ctrlbit = S3C_CLKCON_HCLK_2D, | ||
268 | }, { | ||
269 | .name = "tv", | ||
270 | .parent = &clk_h, | ||
271 | .enable = s3c64xx_hclk_ctrl, | ||
272 | .ctrlbit = S3C_CLKCON_HCLK_TV, | ||
273 | }, { | ||
274 | .name = "post0", | ||
275 | .parent = &clk_h, | ||
276 | .enable = s3c64xx_hclk_ctrl, | ||
277 | .ctrlbit = S3C_CLKCON_HCLK_POST0, | ||
278 | }, { | ||
279 | .name = "rot", | ||
280 | .parent = &clk_h, | ||
281 | .enable = s3c64xx_hclk_ctrl, | ||
282 | .ctrlbit = S3C_CLKCON_HCLK_ROT, | ||
283 | }, { | ||
284 | .name = "hclk_mfc", | ||
285 | .parent = &clk_h, | ||
286 | .enable = s3c64xx_hclk_ctrl, | ||
287 | .ctrlbit = S3C_CLKCON_HCLK_MFC, | ||
288 | }, { | ||
289 | .name = "pclk_mfc", | ||
290 | .parent = &clk_p, | ||
291 | .enable = s3c64xx_pclk_ctrl, | ||
292 | .ctrlbit = S3C_CLKCON_PCLK_MFC, | ||
293 | }, { | ||
294 | .name = "dac27", | ||
295 | .enable = s3c64xx_sclk_ctrl, | ||
296 | .ctrlbit = S3C_CLKCON_SCLK_DAC27, | ||
297 | }, { | ||
298 | .name = "tv27", | ||
299 | .enable = s3c64xx_sclk_ctrl, | ||
300 | .ctrlbit = S3C_CLKCON_SCLK_TV27, | ||
301 | }, { | ||
302 | .name = "scaler27", | ||
303 | .enable = s3c64xx_sclk_ctrl, | ||
304 | .ctrlbit = S3C_CLKCON_SCLK_SCALER27, | ||
305 | }, { | ||
306 | .name = "sclk_scaler", | ||
307 | .enable = s3c64xx_sclk_ctrl, | ||
308 | .ctrlbit = S3C_CLKCON_SCLK_SCALER, | ||
309 | }, { | ||
310 | .name = "post0_27", | ||
311 | .enable = s3c64xx_sclk_ctrl, | ||
312 | .ctrlbit = S3C_CLKCON_SCLK_POST0_27, | ||
313 | }, { | ||
314 | .name = "secur", | ||
315 | .enable = s3c64xx_sclk_ctrl, | ||
316 | .ctrlbit = S3C_CLKCON_SCLK_SECUR, | ||
317 | }, { | ||
318 | .name = "sclk_mfc", | ||
319 | .enable = s3c64xx_sclk_ctrl, | ||
320 | .ctrlbit = S3C_CLKCON_SCLK_MFC, | ||
321 | }, { | ||
322 | .name = "cam", | ||
323 | .enable = s3c64xx_sclk_ctrl, | ||
324 | .ctrlbit = S3C_CLKCON_SCLK_CAM, | ||
325 | }, { | ||
326 | .name = "sclk_jpeg", | ||
327 | .enable = s3c64xx_sclk_ctrl, | ||
328 | .ctrlbit = S3C_CLKCON_SCLK_JPEG, | ||
219 | }, | 329 | }, |
220 | }; | 330 | }; |
221 | 331 | ||
@@ -289,16 +399,7 @@ static struct clk init_clocks[] = { | |||
289 | .name = "watchdog", | 399 | .name = "watchdog", |
290 | .parent = &clk_p, | 400 | .parent = &clk_p, |
291 | .ctrlbit = S3C_CLKCON_PCLK_WDT, | 401 | .ctrlbit = S3C_CLKCON_PCLK_WDT, |
292 | }, { | 402 | }, |
293 | .name = "ac97", | ||
294 | .parent = &clk_p, | ||
295 | .ctrlbit = S3C_CLKCON_PCLK_AC97, | ||
296 | }, { | ||
297 | .name = "cfcon", | ||
298 | .parent = &clk_h, | ||
299 | .enable = s3c64xx_hclk_ctrl, | ||
300 | .ctrlbit = S3C_CLKCON_HCLK_IHOST, | ||
301 | } | ||
302 | }; | 403 | }; |
303 | 404 | ||
304 | static struct clk clk_hsmmc0 = { | 405 | static struct clk clk_hsmmc0 = { |
diff --git a/arch/arm/mach-s3c64xx/common.h b/arch/arm/mach-s3c64xx/common.h index 5eb9c9a7d73b..7a10be629aba 100644 --- a/arch/arm/mach-s3c64xx/common.h +++ b/arch/arm/mach-s3c64xx/common.h | |||
@@ -25,8 +25,6 @@ void s3c64xx_setup_clocks(void); | |||
25 | 25 | ||
26 | void s3c64xx_restart(char mode, const char *cmd); | 26 | void s3c64xx_restart(char mode, const char *cmd); |
27 | 27 | ||
28 | extern struct syscore_ops s3c64xx_irq_syscore_ops; | ||
29 | |||
30 | #ifdef CONFIG_CPU_S3C6400 | 28 | #ifdef CONFIG_CPU_S3C6400 |
31 | 29 | ||
32 | extern int s3c6400_init(void); | 30 | extern int s3c6400_init(void); |
diff --git a/arch/arm/mach-s3c64xx/cpuidle.c b/arch/arm/mach-s3c64xx/cpuidle.c new file mode 100644 index 000000000000..179460f38db7 --- /dev/null +++ b/arch/arm/mach-s3c64xx/cpuidle.c | |||
@@ -0,0 +1,91 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/cpuidle.c | ||
2 | * | ||
3 | * Copyright (c) 2011 Wolfson Microelectronics, plc | ||
4 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | ||
5 | * http://www.samsung.com | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/cpuidle.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/export.h> | ||
17 | #include <linux/time.h> | ||
18 | |||
19 | #include <asm/proc-fns.h> | ||
20 | |||
21 | #include <mach/map.h> | ||
22 | |||
23 | #include <mach/regs-sys.h> | ||
24 | #include <mach/regs-syscon-power.h> | ||
25 | |||
26 | static int s3c64xx_enter_idle(struct cpuidle_device *dev, | ||
27 | struct cpuidle_driver *drv, | ||
28 | int index) | ||
29 | { | ||
30 | struct timeval before, after; | ||
31 | unsigned long tmp; | ||
32 | int idle_time; | ||
33 | |||
34 | local_irq_disable(); | ||
35 | do_gettimeofday(&before); | ||
36 | |||
37 | /* Setup PWRCFG to enter idle mode */ | ||
38 | tmp = __raw_readl(S3C64XX_PWR_CFG); | ||
39 | tmp &= ~S3C64XX_PWRCFG_CFG_WFI_MASK; | ||
40 | tmp |= S3C64XX_PWRCFG_CFG_WFI_IDLE; | ||
41 | __raw_writel(tmp, S3C64XX_PWR_CFG); | ||
42 | |||
43 | cpu_do_idle(); | ||
44 | |||
45 | do_gettimeofday(&after); | ||
46 | local_irq_enable(); | ||
47 | idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC + | ||
48 | (after.tv_usec - before.tv_usec); | ||
49 | |||
50 | dev->last_residency = idle_time; | ||
51 | return index; | ||
52 | } | ||
53 | |||
54 | static struct cpuidle_state s3c64xx_cpuidle_set[] = { | ||
55 | [0] = { | ||
56 | .enter = s3c64xx_enter_idle, | ||
57 | .exit_latency = 1, | ||
58 | .target_residency = 1, | ||
59 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
60 | .name = "IDLE", | ||
61 | .desc = "System active, ARM gated", | ||
62 | }, | ||
63 | }; | ||
64 | |||
65 | static struct cpuidle_driver s3c64xx_cpuidle_driver = { | ||
66 | .name = "s3c64xx_cpuidle", | ||
67 | .owner = THIS_MODULE, | ||
68 | .state_count = ARRAY_SIZE(s3c64xx_cpuidle_set), | ||
69 | }; | ||
70 | |||
71 | static struct cpuidle_device s3c64xx_cpuidle_device = { | ||
72 | .state_count = ARRAY_SIZE(s3c64xx_cpuidle_set), | ||
73 | }; | ||
74 | |||
75 | static int __init s3c64xx_init_cpuidle(void) | ||
76 | { | ||
77 | int ret; | ||
78 | |||
79 | memcpy(s3c64xx_cpuidle_driver.states, s3c64xx_cpuidle_set, | ||
80 | sizeof(s3c64xx_cpuidle_set)); | ||
81 | cpuidle_register_driver(&s3c64xx_cpuidle_driver); | ||
82 | |||
83 | ret = cpuidle_register_device(&s3c64xx_cpuidle_device); | ||
84 | if (ret) { | ||
85 | pr_err("Failed to register cpuidle device: %d\n", ret); | ||
86 | return ret; | ||
87 | } | ||
88 | |||
89 | return 0; | ||
90 | } | ||
91 | device_initcall(s3c64xx_init_cpuidle); | ||
diff --git a/arch/arm/mach-s3c64xx/include/mach/entry-macro.S b/arch/arm/mach-s3c64xx/include/mach/entry-macro.S deleted file mode 100644 index dc2bc15142ce..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* arch/arm/mach-s3c6400/include/mach/entry-macro.S | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * Low-level IRQ helper macros for the Samsung S3C64XX series | ||
9 | * | ||
10 | * This file is licensed under the terms of the GNU General Public | ||
11 | * License version 2. This program is licensed "as is" without any | ||
12 | * warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | |||
15 | .macro disable_fiq | ||
16 | .endm | ||
17 | |||
18 | .macro arch_ret_to_user, tmp1, tmp2 | ||
19 | .endm | ||
diff --git a/arch/arm/mach-s3c64xx/include/mach/system.h b/arch/arm/mach-s3c64xx/include/mach/system.h deleted file mode 100644 index 353ed4389ae7..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/system.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s3c6400/include/mach/system.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C6400 - system implementation | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_SYSTEM_H | ||
12 | #define __ASM_ARCH_SYSTEM_H __FILE__ | ||
13 | |||
14 | static void arch_idle(void) | ||
15 | { | ||
16 | /* nothing here yet */ | ||
17 | } | ||
18 | |||
19 | #endif /* __ASM_ARCH_IRQ_H */ | ||
diff --git a/arch/arm/mach-s3c64xx/irq-pm.c b/arch/arm/mach-s3c64xx/irq-pm.c index 8bec61e242c7..0c7e1d960ca4 100644 --- a/arch/arm/mach-s3c64xx/irq-pm.c +++ b/arch/arm/mach-s3c64xx/irq-pm.c | |||
@@ -96,7 +96,7 @@ static void s3c64xx_irq_pm_resume(void) | |||
96 | S3C_PMDBG("%s: IRQ configuration restored\n", __func__); | 96 | S3C_PMDBG("%s: IRQ configuration restored\n", __func__); |
97 | } | 97 | } |
98 | 98 | ||
99 | struct syscore_ops s3c64xx_irq_syscore_ops = { | 99 | static struct syscore_ops s3c64xx_irq_syscore_ops = { |
100 | .suspend = s3c64xx_irq_pm_suspend, | 100 | .suspend = s3c64xx_irq_pm_suspend, |
101 | .resume = s3c64xx_irq_pm_resume, | 101 | .resume = s3c64xx_irq_pm_resume, |
102 | }; | 102 | }; |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c index d4a231d666d2..0ace108c3e3d 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/export.h> | 11 | #include <linux/export.h> |
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
14 | #include <linux/spi/spi.h> | ||
14 | 15 | ||
15 | #include <linux/mfd/wm831x/irq.h> | 16 | #include <linux/mfd/wm831x/irq.h> |
16 | #include <linux/mfd/wm831x/gpio.h> | 17 | #include <linux/mfd/wm831x/gpio.h> |
@@ -23,8 +24,25 @@ | |||
23 | #include <sound/wm8962.h> | 24 | #include <sound/wm8962.h> |
24 | #include <sound/wm9081.h> | 25 | #include <sound/wm9081.h> |
25 | 26 | ||
27 | #include <plat/s3c64xx-spi.h> | ||
28 | |||
26 | #include <mach/crag6410.h> | 29 | #include <mach/crag6410.h> |
27 | 30 | ||
31 | static struct s3c64xx_spi_csinfo wm0010_spi_csinfo = { | ||
32 | .set_level = gpio_set_value, | ||
33 | .line = S3C64XX_GPC(3), | ||
34 | }; | ||
35 | |||
36 | static struct spi_board_info wm1253_devs[] = { | ||
37 | [0] = { | ||
38 | .modalias = "wm0010", | ||
39 | .bus_num = 0, | ||
40 | .chip_select = 0, | ||
41 | .mode = SPI_MODE_0, | ||
42 | .controller_data = &wm0010_spi_csinfo, | ||
43 | }, | ||
44 | }; | ||
45 | |||
28 | static struct wm5100_pdata wm5100_pdata = { | 46 | static struct wm5100_pdata wm5100_pdata = { |
29 | .ldo_ena = S3C64XX_GPN(7), | 47 | .ldo_ena = S3C64XX_GPN(7), |
30 | .irq_flags = IRQF_TRIGGER_HIGH, | 48 | .irq_flags = IRQF_TRIGGER_HIGH, |
@@ -104,6 +122,7 @@ static struct wm8962_pdata wm8962_pdata __initdata = { | |||
104 | 0x8000 | WM8962_GPIO_FN_DMICDAT, | 122 | 0x8000 | WM8962_GPIO_FN_DMICDAT, |
105 | WM8962_GPIO_FN_IRQ, /* Open drain mode */ | 123 | WM8962_GPIO_FN_IRQ, /* Open drain mode */ |
106 | }, | 124 | }, |
125 | .in4_dc_measure = true, | ||
107 | }; | 126 | }; |
108 | 127 | ||
109 | static struct wm9081_pdata wm9081_pdata __initdata = { | 128 | static struct wm9081_pdata wm9081_pdata __initdata = { |
@@ -168,14 +187,21 @@ static __devinitdata const struct { | |||
168 | const char *name; | 187 | const char *name; |
169 | const struct i2c_board_info *i2c_devs; | 188 | const struct i2c_board_info *i2c_devs; |
170 | int num_i2c_devs; | 189 | int num_i2c_devs; |
190 | const struct spi_board_info *spi_devs; | ||
191 | int num_spi_devs; | ||
171 | } gf_mods[] = { | 192 | } gf_mods[] = { |
172 | { .id = 0x01, .name = "1250-EV1 Springbank" }, | 193 | { .id = 0x01, .name = "1250-EV1 Springbank" }, |
173 | { .id = 0x02, .name = "1251-EV1 Jura" }, | 194 | { .id = 0x02, .name = "1251-EV1 Jura" }, |
174 | { .id = 0x03, .name = "1252-EV1 Glenlivet" }, | 195 | { .id = 0x03, .name = "1252-EV1 Glenlivet" }, |
175 | { .id = 0x11, .name = "6249-EV2 Glenfarclas", }, | 196 | { .id = 0x11, .name = "6249-EV2 Glenfarclas", }, |
197 | { .id = 0x14, .name = "6271-EV1 Lochnagar" }, | ||
198 | { .id = 0x15, .name = "XXXX-EV1 Bells" }, | ||
176 | { .id = 0x21, .name = "1275-EV1 Mortlach" }, | 199 | { .id = 0x21, .name = "1275-EV1 Mortlach" }, |
177 | { .id = 0x25, .name = "1274-EV1 Glencadam" }, | 200 | { .id = 0x25, .name = "1274-EV1 Glencadam" }, |
178 | { .id = 0x31, .name = "1253-EV1 Tomatin", }, | 201 | { .id = 0x31, .name = "1253-EV1 Tomatin", |
202 | .spi_devs = wm1253_devs, .num_spi_devs = ARRAY_SIZE(wm1253_devs) }, | ||
203 | { .id = 0x32, .name = "XXXX-EV1 Caol Illa" }, | ||
204 | { .id = 0x33, .name = "XXXX-EV1 Oban" }, | ||
179 | { .id = 0x39, .name = "1254-EV1 Dallas Dhu", | 205 | { .id = 0x39, .name = "1254-EV1 Dallas Dhu", |
180 | .i2c_devs = wm1254_devs, .num_i2c_devs = ARRAY_SIZE(wm1254_devs) }, | 206 | .i2c_devs = wm1254_devs, .num_i2c_devs = ARRAY_SIZE(wm1254_devs) }, |
181 | { .id = 0x3a, .name = "1259-EV1 Tobermory", | 207 | { .id = 0x3a, .name = "1259-EV1 Tobermory", |
@@ -207,12 +233,16 @@ static __devinit int wlf_gf_module_probe(struct i2c_client *i2c, | |||
207 | if (i < ARRAY_SIZE(gf_mods)) { | 233 | if (i < ARRAY_SIZE(gf_mods)) { |
208 | dev_info(&i2c->dev, "%s revision %d\n", | 234 | dev_info(&i2c->dev, "%s revision %d\n", |
209 | gf_mods[i].name, rev + 1); | 235 | gf_mods[i].name, rev + 1); |
236 | |||
210 | for (j = 0; j < gf_mods[i].num_i2c_devs; j++) { | 237 | for (j = 0; j < gf_mods[i].num_i2c_devs; j++) { |
211 | if (!i2c_new_device(i2c->adapter, | 238 | if (!i2c_new_device(i2c->adapter, |
212 | &(gf_mods[i].i2c_devs[j]))) | 239 | &(gf_mods[i].i2c_devs[j]))) |
213 | dev_err(&i2c->dev, | 240 | dev_err(&i2c->dev, |
214 | "Failed to register dev: %d\n", ret); | 241 | "Failed to register dev: %d\n", ret); |
215 | } | 242 | } |
243 | |||
244 | spi_register_board_info(gf_mods[i].spi_devs, | ||
245 | gf_mods[i].num_spi_devs); | ||
216 | } else { | 246 | } else { |
217 | dev_warn(&i2c->dev, "Unknown module ID 0x%x revision %d\n", | 247 | dev_warn(&i2c->dev, "Unknown module ID 0x%x revision %d\n", |
218 | id, rev + 1); | 248 | id, rev + 1); |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index 8077f650eb0e..e20bf5835365 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c | |||
@@ -19,7 +19,9 @@ | |||
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <linux/leds.h> | ||
22 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/mmc/host.h> | ||
23 | #include <linux/regulator/machine.h> | 25 | #include <linux/regulator/machine.h> |
24 | #include <linux/regulator/fixed.h> | 26 | #include <linux/regulator/fixed.h> |
25 | #include <linux/pwm_backlight.h> | 27 | #include <linux/pwm_backlight.h> |
@@ -59,6 +61,7 @@ | |||
59 | #include <plat/sdhci.h> | 61 | #include <plat/sdhci.h> |
60 | #include <plat/gpio-cfg.h> | 62 | #include <plat/gpio-cfg.h> |
61 | #include <plat/s3c64xx-spi.h> | 63 | #include <plat/s3c64xx-spi.h> |
64 | #include <plat/udc-hs.h> | ||
62 | 65 | ||
63 | #include <plat/keypad.h> | 66 | #include <plat/keypad.h> |
64 | #include <plat/clock.h> | 67 | #include <plat/clock.h> |
@@ -298,6 +301,7 @@ static struct platform_device littlemill_device = { | |||
298 | }; | 301 | }; |
299 | 302 | ||
300 | static struct regulator_consumer_supply wallvdd_consumers[] = { | 303 | static struct regulator_consumer_supply wallvdd_consumers[] = { |
304 | REGULATOR_SUPPLY("SPKVDD", "1-001a"), | ||
301 | REGULATOR_SUPPLY("SPKVDD1", "1-001a"), | 305 | REGULATOR_SUPPLY("SPKVDD1", "1-001a"), |
302 | REGULATOR_SUPPLY("SPKVDD2", "1-001a"), | 306 | REGULATOR_SUPPLY("SPKVDD2", "1-001a"), |
303 | REGULATOR_SUPPLY("SPKVDDL", "1-001a"), | 307 | REGULATOR_SUPPLY("SPKVDDL", "1-001a"), |
@@ -574,11 +578,19 @@ static struct s3c2410_platform_i2c i2c0_pdata = { | |||
574 | .frequency = 400000, | 578 | .frequency = 400000, |
575 | }; | 579 | }; |
576 | 580 | ||
581 | static struct regulator_consumer_supply pvdd_1v2_consumers[] __initdata = { | ||
582 | REGULATOR_SUPPLY("DCVDD", "spi0.0"), | ||
583 | REGULATOR_SUPPLY("AVDD", "spi0.0"), | ||
584 | }; | ||
585 | |||
577 | static struct regulator_init_data pvdd_1v2 __initdata = { | 586 | static struct regulator_init_data pvdd_1v2 __initdata = { |
578 | .constraints = { | 587 | .constraints = { |
579 | .name = "PVDD_1V2", | 588 | .name = "PVDD_1V2", |
580 | .always_on = 1, | 589 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
581 | }, | 590 | }, |
591 | |||
592 | .consumer_supplies = pvdd_1v2_consumers, | ||
593 | .num_consumer_supplies = ARRAY_SIZE(pvdd_1v2_consumers), | ||
582 | }; | 594 | }; |
583 | 595 | ||
584 | static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = { | 596 | static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = { |
@@ -592,6 +604,7 @@ static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = { | |||
592 | REGULATOR_SUPPLY("AVDD2", "1-001a"), | 604 | REGULATOR_SUPPLY("AVDD2", "1-001a"), |
593 | REGULATOR_SUPPLY("DCVDD", "1-001a"), | 605 | REGULATOR_SUPPLY("DCVDD", "1-001a"), |
594 | REGULATOR_SUPPLY("AVDD", "1-001a"), | 606 | REGULATOR_SUPPLY("AVDD", "1-001a"), |
607 | REGULATOR_SUPPLY("DBVDD", "spi0.0"), | ||
595 | }; | 608 | }; |
596 | 609 | ||
597 | static struct regulator_init_data pvdd_1v8 __initdata = { | 610 | static struct regulator_init_data pvdd_1v8 __initdata = { |
@@ -681,6 +694,7 @@ static void __init crag6410_map_io(void) | |||
681 | static struct s3c_sdhci_platdata crag6410_hsmmc2_pdata = { | 694 | static struct s3c_sdhci_platdata crag6410_hsmmc2_pdata = { |
682 | .max_width = 4, | 695 | .max_width = 4, |
683 | .cd_type = S3C_SDHCI_CD_PERMANENT, | 696 | .cd_type = S3C_SDHCI_CD_PERMANENT, |
697 | .host_caps = MMC_CAP_POWER_OFF_CARD, | ||
684 | }; | 698 | }; |
685 | 699 | ||
686 | static void crag6410_cfg_sdhci0(struct platform_device *dev, int width) | 700 | static void crag6410_cfg_sdhci0(struct platform_device *dev, int width) |
@@ -696,8 +710,59 @@ static struct s3c_sdhci_platdata crag6410_hsmmc0_pdata = { | |||
696 | .max_width = 4, | 710 | .max_width = 4, |
697 | .cd_type = S3C_SDHCI_CD_INTERNAL, | 711 | .cd_type = S3C_SDHCI_CD_INTERNAL, |
698 | .cfg_gpio = crag6410_cfg_sdhci0, | 712 | .cfg_gpio = crag6410_cfg_sdhci0, |
713 | .host_caps = MMC_CAP_POWER_OFF_CARD, | ||
714 | }; | ||
715 | |||
716 | static const struct gpio_led gpio_leds[] = { | ||
717 | { | ||
718 | .name = "d13:green:", | ||
719 | .gpio = MMGPIO_GPIO_BASE + 0, | ||
720 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
721 | }, | ||
722 | { | ||
723 | .name = "d14:green:", | ||
724 | .gpio = MMGPIO_GPIO_BASE + 1, | ||
725 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
726 | }, | ||
727 | { | ||
728 | .name = "d15:green:", | ||
729 | .gpio = MMGPIO_GPIO_BASE + 2, | ||
730 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
731 | }, | ||
732 | { | ||
733 | .name = "d16:green:", | ||
734 | .gpio = MMGPIO_GPIO_BASE + 3, | ||
735 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
736 | }, | ||
737 | { | ||
738 | .name = "d17:green:", | ||
739 | .gpio = MMGPIO_GPIO_BASE + 4, | ||
740 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
741 | }, | ||
742 | { | ||
743 | .name = "d18:green:", | ||
744 | .gpio = MMGPIO_GPIO_BASE + 5, | ||
745 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
746 | }, | ||
747 | { | ||
748 | .name = "d19:green:", | ||
749 | .gpio = MMGPIO_GPIO_BASE + 6, | ||
750 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
751 | }, | ||
752 | { | ||
753 | .name = "d20:green:", | ||
754 | .gpio = MMGPIO_GPIO_BASE + 7, | ||
755 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
756 | }, | ||
699 | }; | 757 | }; |
700 | 758 | ||
759 | static const struct gpio_led_platform_data gpio_leds_pdata = { | ||
760 | .leds = gpio_leds, | ||
761 | .num_leds = ARRAY_SIZE(gpio_leds), | ||
762 | }; | ||
763 | |||
764 | static struct s3c_hsotg_plat crag6410_hsotg_pdata; | ||
765 | |||
701 | static void __init crag6410_machine_init(void) | 766 | static void __init crag6410_machine_init(void) |
702 | { | 767 | { |
703 | /* Open drain IRQs need pullups */ | 768 | /* Open drain IRQs need pullups */ |
@@ -722,14 +787,18 @@ static void __init crag6410_machine_init(void) | |||
722 | s3c_i2c0_set_platdata(&i2c0_pdata); | 787 | s3c_i2c0_set_platdata(&i2c0_pdata); |
723 | s3c_i2c1_set_platdata(&i2c1_pdata); | 788 | s3c_i2c1_set_platdata(&i2c1_pdata); |
724 | s3c_fb_set_platdata(&crag6410_lcd_pdata); | 789 | s3c_fb_set_platdata(&crag6410_lcd_pdata); |
790 | s3c_hsotg_set_platdata(&crag6410_hsotg_pdata); | ||
725 | 791 | ||
726 | i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); | 792 | i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); |
727 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); | 793 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); |
728 | 794 | ||
729 | samsung_keypad_set_platdata(&crag6410_keypad_data); | 795 | samsung_keypad_set_platdata(&crag6410_keypad_data); |
796 | s3c64xx_spi0_set_platdata(&s3c64xx_spi0_pdata, 0, 1); | ||
730 | 797 | ||
731 | platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices)); | 798 | platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices)); |
732 | 799 | ||
800 | gpio_led_register_device(-1, &gpio_leds_pdata); | ||
801 | |||
733 | regulator_has_full_constraints(); | 802 | regulator_has_full_constraints(); |
734 | 803 | ||
735 | s3c64xx_pm_init(); | 804 | s3c64xx_pm_init(); |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c64xx/mach-smartq.c index ce31db136231..ce745e19aa27 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq.c +++ b/arch/arm/mach-s3c64xx/mach-smartq.c | |||
@@ -187,6 +187,8 @@ static struct s3c_hwmon_pdata smartq_hwmon_pdata __initdata = { | |||
187 | }, | 187 | }, |
188 | }; | 188 | }; |
189 | 189 | ||
190 | static struct s3c_hsotg_plat smartq_hsotg_pdata; | ||
191 | |||
190 | static int __init smartq_lcd_setup_gpio(void) | 192 | static int __init smartq_lcd_setup_gpio(void) |
191 | { | 193 | { |
192 | int ret; | 194 | int ret; |
@@ -383,6 +385,7 @@ void __init smartq_map_io(void) | |||
383 | void __init smartq_machine_init(void) | 385 | void __init smartq_machine_init(void) |
384 | { | 386 | { |
385 | s3c_i2c0_set_platdata(NULL); | 387 | s3c_i2c0_set_platdata(NULL); |
388 | s3c_hsotg_set_platdata(&smartq_hsotg_pdata); | ||
386 | s3c_hwmon_set_platdata(&smartq_hwmon_pdata); | 389 | s3c_hwmon_set_platdata(&smartq_hwmon_pdata); |
387 | s3c_sdhci1_set_platdata(&smartq_internal_hsmmc_pdata); | 390 | s3c_sdhci1_set_platdata(&smartq_internal_hsmmc_pdata); |
388 | s3c_sdhci2_set_platdata(&smartq_internal_hsmmc_pdata); | 391 | s3c_sdhci2_set_platdata(&smartq_internal_hsmmc_pdata); |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index ca6fc204f0ea..d55bc96d9582 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -72,6 +72,7 @@ | |||
72 | #include <plat/keypad.h> | 72 | #include <plat/keypad.h> |
73 | #include <plat/backlight.h> | 73 | #include <plat/backlight.h> |
74 | #include <plat/regs-fb-v4.h> | 74 | #include <plat/regs-fb-v4.h> |
75 | #include <plat/udc-hs.h> | ||
75 | 76 | ||
76 | #include "common.h" | 77 | #include "common.h" |
77 | 78 | ||
@@ -631,6 +632,8 @@ static struct platform_pwm_backlight_data smdk6410_bl_data = { | |||
631 | .pwm_id = 1, | 632 | .pwm_id = 1, |
632 | }; | 633 | }; |
633 | 634 | ||
635 | static struct s3c_hsotg_plat smdk6410_hsotg_pdata; | ||
636 | |||
634 | static void __init smdk6410_map_io(void) | 637 | static void __init smdk6410_map_io(void) |
635 | { | 638 | { |
636 | u32 tmp; | 639 | u32 tmp; |
@@ -659,6 +662,7 @@ static void __init smdk6410_machine_init(void) | |||
659 | s3c_i2c0_set_platdata(NULL); | 662 | s3c_i2c0_set_platdata(NULL); |
660 | s3c_i2c1_set_platdata(NULL); | 663 | s3c_i2c1_set_platdata(NULL); |
661 | s3c_fb_set_platdata(&smdk6410_lcd_pdata); | 664 | s3c_fb_set_platdata(&smdk6410_lcd_pdata); |
665 | s3c_hsotg_set_platdata(&smdk6410_hsotg_pdata); | ||
662 | 666 | ||
663 | samsung_keypad_set_platdata(&smdk6410_keypad_data); | 667 | samsung_keypad_set_platdata(&smdk6410_keypad_data); |
664 | 668 | ||
diff --git a/arch/arm/mach-s3c64xx/setup-usb-phy.c b/arch/arm/mach-s3c64xx/setup-usb-phy.c new file mode 100644 index 000000000000..f6757e02d7db --- /dev/null +++ b/arch/arm/mach-s3c64xx/setup-usb-phy.c | |||
@@ -0,0 +1,90 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Samsung Electronics Co.Ltd | ||
3 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License as published by the | ||
7 | * Free Software Foundation; either version 2 of the License, or (at your | ||
8 | * option) any later version. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #include <linux/clk.h> | ||
13 | #include <linux/delay.h> | ||
14 | #include <linux/err.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <mach/map.h> | ||
18 | #include <mach/regs-sys.h> | ||
19 | #include <plat/cpu.h> | ||
20 | #include <plat/regs-usb-hsotg-phy.h> | ||
21 | #include <plat/usb-phy.h> | ||
22 | |||
23 | static int s3c_usb_otgphy_init(struct platform_device *pdev) | ||
24 | { | ||
25 | struct clk *xusbxti; | ||
26 | u32 phyclk; | ||
27 | |||
28 | writel(readl(S3C64XX_OTHERS) | S3C64XX_OTHERS_USBMASK, S3C64XX_OTHERS); | ||
29 | |||
30 | /* set clock frequency for PLL */ | ||
31 | phyclk = readl(S3C_PHYCLK) & ~S3C_PHYCLK_CLKSEL_MASK; | ||
32 | |||
33 | xusbxti = clk_get(&pdev->dev, "xusbxti"); | ||
34 | if (xusbxti && !IS_ERR(xusbxti)) { | ||
35 | switch (clk_get_rate(xusbxti)) { | ||
36 | case 12 * MHZ: | ||
37 | phyclk |= S3C_PHYCLK_CLKSEL_12M; | ||
38 | break; | ||
39 | case 24 * MHZ: | ||
40 | phyclk |= S3C_PHYCLK_CLKSEL_24M; | ||
41 | break; | ||
42 | default: | ||
43 | case 48 * MHZ: | ||
44 | /* default reference clock */ | ||
45 | break; | ||
46 | } | ||
47 | clk_put(xusbxti); | ||
48 | } | ||
49 | |||
50 | /* TODO: select external clock/oscillator */ | ||
51 | writel(phyclk | S3C_PHYCLK_CLK_FORCE, S3C_PHYCLK); | ||
52 | |||
53 | /* set to normal OTG PHY */ | ||
54 | writel((readl(S3C_PHYPWR) & ~S3C_PHYPWR_NORMAL_MASK), S3C_PHYPWR); | ||
55 | mdelay(1); | ||
56 | |||
57 | /* reset OTG PHY and Link */ | ||
58 | writel(S3C_RSTCON_PHY | S3C_RSTCON_HCLK | S3C_RSTCON_PHYCLK, | ||
59 | S3C_RSTCON); | ||
60 | udelay(20); /* at-least 10uS */ | ||
61 | writel(0, S3C_RSTCON); | ||
62 | |||
63 | return 0; | ||
64 | } | ||
65 | |||
66 | static int s3c_usb_otgphy_exit(struct platform_device *pdev) | ||
67 | { | ||
68 | writel((readl(S3C_PHYPWR) | S3C_PHYPWR_ANALOG_POWERDOWN | | ||
69 | S3C_PHYPWR_OTG_DISABLE), S3C_PHYPWR); | ||
70 | |||
71 | writel(readl(S3C64XX_OTHERS) & ~S3C64XX_OTHERS_USBMASK, S3C64XX_OTHERS); | ||
72 | |||
73 | return 0; | ||
74 | } | ||
75 | |||
76 | int s5p_usb_phy_init(struct platform_device *pdev, int type) | ||
77 | { | ||
78 | if (type == S5P_USB_PHY_DEVICE) | ||
79 | return s3c_usb_otgphy_init(pdev); | ||
80 | |||
81 | return -EINVAL; | ||
82 | } | ||
83 | |||
84 | int s5p_usb_phy_exit(struct platform_device *pdev, int type) | ||
85 | { | ||
86 | if (type == S5P_USB_PHY_DEVICE) | ||
87 | return s3c_usb_otgphy_exit(pdev); | ||
88 | |||
89 | return -EINVAL; | ||
90 | } | ||