diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-28 07:27:34 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-28 07:27:34 -0400 |
commit | f9cef506815386df4bd7e463b59e0a0984ce0355 (patch) | |
tree | b26a202b2f0472e3ebe889012312b115917717f9 /arch/arm/mach-s5p6442 | |
parent | 9ae21ca362679757786f5abe556c7943e9001426 (diff) | |
parent | cbff3eb3e6e3c618583a7435f87c1548aa12b0ad (diff) |
Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable
Conflicts:
arch/arm/mach-s3c64xx/dev-audio.c
Diffstat (limited to 'arch/arm/mach-s5p6442')
-rw-r--r-- | arch/arm/mach-s5p6442/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-s5p6442/clock.c | 28 | ||||
-rw-r--r-- | arch/arm/mach-s5p6442/dev-audio.c | 30 | ||||
-rw-r--r-- | arch/arm/mach-s5p6442/dev-spi.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-s5p6442/dma.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s5p6442/include/mach/regs-clock.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-s5p6442/include/mach/vmalloc.h | 2 |
7 files changed, 43 insertions, 27 deletions
diff --git a/arch/arm/mach-s5p6442/Kconfig b/arch/arm/mach-s5p6442/Kconfig index 0fda0a5df968..33569e4007c4 100644 --- a/arch/arm/mach-s5p6442/Kconfig +++ b/arch/arm/mach-s5p6442/Kconfig | |||
@@ -11,7 +11,6 @@ if ARCH_S5P6442 | |||
11 | 11 | ||
12 | config CPU_S5P6442 | 12 | config CPU_S5P6442 |
13 | bool | 13 | bool |
14 | select PLAT_S5P | ||
15 | select S3C_PL330_DMA | 14 | select S3C_PL330_DMA |
16 | help | 15 | help |
17 | Enable S5P6442 CPU support | 16 | Enable S5P6442 CPU support |
diff --git a/arch/arm/mach-s5p6442/clock.c b/arch/arm/mach-s5p6442/clock.c index dcd20f17212a..16d6e7e61b50 100644 --- a/arch/arm/mach-s5p6442/clock.c +++ b/arch/arm/mach-s5p6442/clock.c | |||
@@ -192,6 +192,11 @@ static struct clk clk_pclkd1 = { | |||
192 | .parent = &clk_hclkd1, | 192 | .parent = &clk_hclkd1, |
193 | }; | 193 | }; |
194 | 194 | ||
195 | int s5p6442_clk_ip0_ctrl(struct clk *clk, int enable) | ||
196 | { | ||
197 | return s5p_gatectrl(S5P_CLKGATE_IP0, clk, enable); | ||
198 | } | ||
199 | |||
195 | int s5p6442_clk_ip3_ctrl(struct clk *clk, int enable) | 200 | int s5p6442_clk_ip3_ctrl(struct clk *clk, int enable) |
196 | { | 201 | { |
197 | return s5p_gatectrl(S5P_CLKGATE_IP3, clk, enable); | 202 | return s5p_gatectrl(S5P_CLKGATE_IP3, clk, enable); |
@@ -335,6 +340,16 @@ void __init_or_cpufreq s5p6442_setup_clocks(void) | |||
335 | clk_pclkd1.rate = pclkd1; | 340 | clk_pclkd1.rate = pclkd1; |
336 | } | 341 | } |
337 | 342 | ||
343 | static struct clk init_clocks_disable[] = { | ||
344 | { | ||
345 | .name = "pdma", | ||
346 | .id = -1, | ||
347 | .parent = &clk_pclkd1, | ||
348 | .enable = s5p6442_clk_ip0_ctrl, | ||
349 | .ctrlbit = (1 << 3), | ||
350 | }, | ||
351 | }; | ||
352 | |||
338 | static struct clk init_clocks[] = { | 353 | static struct clk init_clocks[] = { |
339 | { | 354 | { |
340 | .name = "systimer", | 355 | .name = "systimer", |
@@ -393,10 +408,23 @@ static struct clk *clks[] __initdata = { | |||
393 | 408 | ||
394 | void __init s5p6442_register_clocks(void) | 409 | void __init s5p6442_register_clocks(void) |
395 | { | 410 | { |
411 | struct clk *clkptr; | ||
412 | int i, ret; | ||
413 | |||
396 | s3c24xx_register_clocks(clks, ARRAY_SIZE(clks)); | 414 | s3c24xx_register_clocks(clks, ARRAY_SIZE(clks)); |
397 | 415 | ||
398 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | 416 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
399 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | 417 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); |
400 | 418 | ||
419 | clkptr = init_clocks_disable; | ||
420 | for (i = 0; i < ARRAY_SIZE(init_clocks_disable); i++, clkptr++) { | ||
421 | ret = s3c24xx_register_clock(clkptr); | ||
422 | if (ret < 0) { | ||
423 | printk(KERN_ERR "Fail to register clock %s (%d)\n", | ||
424 | clkptr->name, ret); | ||
425 | } else | ||
426 | (clkptr->enable)(clkptr, 0); | ||
427 | } | ||
428 | |||
401 | s3c_pwmclk_init(); | 429 | s3c_pwmclk_init(); |
402 | } | 430 | } |
diff --git a/arch/arm/mach-s5p6442/dev-audio.c b/arch/arm/mach-s5p6442/dev-audio.c index 7a4e34720b7b..3462197ff352 100644 --- a/arch/arm/mach-s5p6442/dev-audio.c +++ b/arch/arm/mach-s5p6442/dev-audio.c | |||
@@ -21,22 +21,16 @@ | |||
21 | 21 | ||
22 | static int s5p6442_cfg_i2s(struct platform_device *pdev) | 22 | static int s5p6442_cfg_i2s(struct platform_device *pdev) |
23 | { | 23 | { |
24 | unsigned int base; | ||
25 | |||
24 | /* configure GPIO for i2s port */ | 26 | /* configure GPIO for i2s port */ |
25 | switch (pdev->id) { | 27 | switch (pdev->id) { |
26 | case 1: | 28 | case 1: |
27 | s3c_gpio_cfgpin(S5P6442_GPC1(0), S3C_GPIO_SFN(2)); | 29 | base = S5P6442_GPC1(0); |
28 | s3c_gpio_cfgpin(S5P6442_GPC1(1), S3C_GPIO_SFN(2)); | ||
29 | s3c_gpio_cfgpin(S5P6442_GPC1(2), S3C_GPIO_SFN(2)); | ||
30 | s3c_gpio_cfgpin(S5P6442_GPC1(3), S3C_GPIO_SFN(2)); | ||
31 | s3c_gpio_cfgpin(S5P6442_GPC1(4), S3C_GPIO_SFN(2)); | ||
32 | break; | 30 | break; |
33 | 31 | ||
34 | case -1: | 32 | case -1: |
35 | s3c_gpio_cfgpin(S5P6442_GPC0(0), S3C_GPIO_SFN(2)); | 33 | base = S5P6442_GPC0(0); |
36 | s3c_gpio_cfgpin(S5P6442_GPC0(1), S3C_GPIO_SFN(2)); | ||
37 | s3c_gpio_cfgpin(S5P6442_GPC0(2), S3C_GPIO_SFN(2)); | ||
38 | s3c_gpio_cfgpin(S5P6442_GPC0(3), S3C_GPIO_SFN(2)); | ||
39 | s3c_gpio_cfgpin(S5P6442_GPC0(4), S3C_GPIO_SFN(2)); | ||
40 | break; | 34 | break; |
41 | 35 | ||
42 | default: | 36 | default: |
@@ -44,6 +38,7 @@ static int s5p6442_cfg_i2s(struct platform_device *pdev) | |||
44 | return -EINVAL; | 38 | return -EINVAL; |
45 | } | 39 | } |
46 | 40 | ||
41 | s3c_gpio_cfgpin_range(base, 5, S3C_GPIO_SFN(2)); | ||
47 | return 0; | 42 | return 0; |
48 | } | 43 | } |
49 | 44 | ||
@@ -111,21 +106,15 @@ struct platform_device s5p6442_device_iis1 = { | |||
111 | 106 | ||
112 | static int s5p6442_pcm_cfg_gpio(struct platform_device *pdev) | 107 | static int s5p6442_pcm_cfg_gpio(struct platform_device *pdev) |
113 | { | 108 | { |
109 | unsigned int base; | ||
110 | |||
114 | switch (pdev->id) { | 111 | switch (pdev->id) { |
115 | case 0: | 112 | case 0: |
116 | s3c_gpio_cfgpin(S5P6442_GPC0(0), S3C_GPIO_SFN(3)); | 113 | base = S5P6442_GPC0(0); |
117 | s3c_gpio_cfgpin(S5P6442_GPC0(1), S3C_GPIO_SFN(3)); | ||
118 | s3c_gpio_cfgpin(S5P6442_GPC0(2), S3C_GPIO_SFN(3)); | ||
119 | s3c_gpio_cfgpin(S5P6442_GPC0(3), S3C_GPIO_SFN(3)); | ||
120 | s3c_gpio_cfgpin(S5P6442_GPC0(4), S3C_GPIO_SFN(3)); | ||
121 | break; | 114 | break; |
122 | 115 | ||
123 | case 1: | 116 | case 1: |
124 | s3c_gpio_cfgpin(S5P6442_GPC1(0), S3C_GPIO_SFN(3)); | 117 | base = S5P6442_GPC1(0); |
125 | s3c_gpio_cfgpin(S5P6442_GPC1(1), S3C_GPIO_SFN(3)); | ||
126 | s3c_gpio_cfgpin(S5P6442_GPC1(2), S3C_GPIO_SFN(3)); | ||
127 | s3c_gpio_cfgpin(S5P6442_GPC1(3), S3C_GPIO_SFN(3)); | ||
128 | s3c_gpio_cfgpin(S5P6442_GPC1(4), S3C_GPIO_SFN(3)); | ||
129 | break; | 118 | break; |
130 | 119 | ||
131 | default: | 120 | default: |
@@ -133,6 +122,7 @@ static int s5p6442_pcm_cfg_gpio(struct platform_device *pdev) | |||
133 | return -EINVAL; | 122 | return -EINVAL; |
134 | } | 123 | } |
135 | 124 | ||
125 | s3c_gpio_cfgpin_range(base, 5, S3C_GPIO_SFN(3)); | ||
136 | return 0; | 126 | return 0; |
137 | } | 127 | } |
138 | 128 | ||
diff --git a/arch/arm/mach-s5p6442/dev-spi.c b/arch/arm/mach-s5p6442/dev-spi.c index e894651a88bd..cce8c2470709 100644 --- a/arch/arm/mach-s5p6442/dev-spi.c +++ b/arch/arm/mach-s5p6442/dev-spi.c | |||
@@ -38,11 +38,9 @@ static int s5p6442_spi_cfg_gpio(struct platform_device *pdev) | |||
38 | switch (pdev->id) { | 38 | switch (pdev->id) { |
39 | case 0: | 39 | case 0: |
40 | s3c_gpio_cfgpin(S5P6442_GPB(0), S3C_GPIO_SFN(2)); | 40 | s3c_gpio_cfgpin(S5P6442_GPB(0), S3C_GPIO_SFN(2)); |
41 | s3c_gpio_cfgpin(S5P6442_GPB(2), S3C_GPIO_SFN(2)); | ||
42 | s3c_gpio_cfgpin(S5P6442_GPB(3), S3C_GPIO_SFN(2)); | ||
43 | s3c_gpio_setpull(S5P6442_GPB(0), S3C_GPIO_PULL_UP); | 41 | s3c_gpio_setpull(S5P6442_GPB(0), S3C_GPIO_PULL_UP); |
44 | s3c_gpio_setpull(S5P6442_GPB(2), S3C_GPIO_PULL_UP); | 42 | s3c_gpio_cfgall_range(S5P6442_GPB(2), 2, |
45 | s3c_gpio_setpull(S5P6442_GPB(3), S3C_GPIO_PULL_UP); | 43 | S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); |
46 | break; | 44 | break; |
47 | 45 | ||
48 | default: | 46 | default: |
diff --git a/arch/arm/mach-s5p6442/dma.c b/arch/arm/mach-s5p6442/dma.c index ad4f8704b93d..7dfb13654f8a 100644 --- a/arch/arm/mach-s5p6442/dma.c +++ b/arch/arm/mach-s5p6442/dma.c | |||
@@ -82,7 +82,7 @@ static struct s3c_pl330_platdata s5p6442_pdma_pdata = { | |||
82 | 82 | ||
83 | static struct platform_device s5p6442_device_pdma = { | 83 | static struct platform_device s5p6442_device_pdma = { |
84 | .name = "s3c-pl330", | 84 | .name = "s3c-pl330", |
85 | .id = 1, | 85 | .id = -1, |
86 | .num_resources = ARRAY_SIZE(s5p6442_pdma_resource), | 86 | .num_resources = ARRAY_SIZE(s5p6442_pdma_resource), |
87 | .resource = s5p6442_pdma_resource, | 87 | .resource = s5p6442_pdma_resource, |
88 | .dev = { | 88 | .dev = { |
diff --git a/arch/arm/mach-s5p6442/include/mach/regs-clock.h b/arch/arm/mach-s5p6442/include/mach/regs-clock.h index d8360b5d4ece..00828a336991 100644 --- a/arch/arm/mach-s5p6442/include/mach/regs-clock.h +++ b/arch/arm/mach-s5p6442/include/mach/regs-clock.h | |||
@@ -46,6 +46,7 @@ | |||
46 | #define S5P_CLK_DIV5 S5P_CLKREG(0x314) | 46 | #define S5P_CLK_DIV5 S5P_CLKREG(0x314) |
47 | #define S5P_CLK_DIV6 S5P_CLKREG(0x318) | 47 | #define S5P_CLK_DIV6 S5P_CLKREG(0x318) |
48 | 48 | ||
49 | #define S5P_CLKGATE_IP0 S5P_CLKREG(0x460) | ||
49 | #define S5P_CLKGATE_IP3 S5P_CLKREG(0x46C) | 50 | #define S5P_CLKGATE_IP3 S5P_CLKREG(0x46C) |
50 | 51 | ||
51 | /* CLK_OUT */ | 52 | /* CLK_OUT */ |
diff --git a/arch/arm/mach-s5p6442/include/mach/vmalloc.h b/arch/arm/mach-s5p6442/include/mach/vmalloc.h index f5c83f02c18e..4aa55e55ac47 100644 --- a/arch/arm/mach-s5p6442/include/mach/vmalloc.h +++ b/arch/arm/mach-s5p6442/include/mach/vmalloc.h | |||
@@ -12,6 +12,6 @@ | |||
12 | #ifndef __ASM_ARCH_VMALLOC_H | 12 | #ifndef __ASM_ARCH_VMALLOC_H |
13 | #define __ASM_ARCH_VMALLOC_H | 13 | #define __ASM_ARCH_VMALLOC_H |
14 | 14 | ||
15 | #define VMALLOC_END 0xE0000000UL | 15 | #define VMALLOC_END 0xF6000000UL |
16 | 16 | ||
17 | #endif /* __ASM_ARCH_VMALLOC_H */ | 17 | #endif /* __ASM_ARCH_VMALLOC_H */ |