diff options
Diffstat (limited to 'arch/arm/mach-s5pv210')
-rw-r--r-- | arch/arm/mach-s5pv210/clock.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/dev-audio.c | 56 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/mach-smdkc110.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/mach-smdkv210.c | 1 |
4 files changed, 49 insertions, 19 deletions
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c index 2f9372fb2286..dab6ef3b6ca9 100644 --- a/arch/arm/mach-s5pv210/clock.c +++ b/arch/arm/mach-s5pv210/clock.c | |||
@@ -467,20 +467,20 @@ static struct clk init_clocks_disable[] = { | |||
467 | .enable = s5pv210_clk_ip3_ctrl, | 467 | .enable = s5pv210_clk_ip3_ctrl, |
468 | .ctrlbit = (1<<21), | 468 | .ctrlbit = (1<<21), |
469 | }, { | 469 | }, { |
470 | .name = "i2s_v50", | 470 | .name = "iis", |
471 | .id = 0, | 471 | .id = 0, |
472 | .parent = &clk_p, | 472 | .parent = &clk_p, |
473 | .enable = s5pv210_clk_ip3_ctrl, | 473 | .enable = s5pv210_clk_ip3_ctrl, |
474 | .ctrlbit = (1<<4), | 474 | .ctrlbit = (1<<4), |
475 | }, { | 475 | }, { |
476 | .name = "i2s_v32", | 476 | .name = "iis", |
477 | .id = 0, | 477 | .id = 1, |
478 | .parent = &clk_p, | 478 | .parent = &clk_p, |
479 | .enable = s5pv210_clk_ip3_ctrl, | 479 | .enable = s5pv210_clk_ip3_ctrl, |
480 | .ctrlbit = (1 << 5), | 480 | .ctrlbit = (1 << 5), |
481 | }, { | 481 | }, { |
482 | .name = "i2s_v32", | 482 | .name = "iis", |
483 | .id = 1, | 483 | .id = 2, |
484 | .parent = &clk_p, | 484 | .parent = &clk_p, |
485 | .enable = s5pv210_clk_ip3_ctrl, | 485 | .enable = s5pv210_clk_ip3_ctrl, |
486 | .ctrlbit = (1 << 6), | 486 | .ctrlbit = (1 << 6), |
diff --git a/arch/arm/mach-s5pv210/dev-audio.c b/arch/arm/mach-s5pv210/dev-audio.c index 1303fcb12b51..ddd2704b3467 100644 --- a/arch/arm/mach-s5pv210/dev-audio.c +++ b/arch/arm/mach-s5pv210/dev-audio.c | |||
@@ -19,22 +19,24 @@ | |||
19 | #include <mach/dma.h> | 19 | #include <mach/dma.h> |
20 | #include <mach/irqs.h> | 20 | #include <mach/irqs.h> |
21 | 21 | ||
22 | static const char *rclksrc[] = { | ||
23 | [0] = "busclk", | ||
24 | [1] = "i2sclk", | ||
25 | }; | ||
26 | |||
22 | static int s5pv210_cfg_i2s(struct platform_device *pdev) | 27 | static int s5pv210_cfg_i2s(struct platform_device *pdev) |
23 | { | 28 | { |
24 | /* configure GPIO for i2s port */ | 29 | /* configure GPIO for i2s port */ |
25 | switch (pdev->id) { | 30 | switch (pdev->id) { |
31 | case 0: | ||
32 | s3c_gpio_cfgpin_range(S5PV210_GPI(0), 7, S3C_GPIO_SFN(2)); | ||
33 | break; | ||
26 | case 1: | 34 | case 1: |
27 | s3c_gpio_cfgpin_range(S5PV210_GPC0(0), 5, S3C_GPIO_SFN(2)); | 35 | s3c_gpio_cfgpin_range(S5PV210_GPC0(0), 5, S3C_GPIO_SFN(2)); |
28 | break; | 36 | break; |
29 | |||
30 | case 2: | 37 | case 2: |
31 | s3c_gpio_cfgpin_range(S5PV210_GPC1(0), 5, S3C_GPIO_SFN(4)); | 38 | s3c_gpio_cfgpin_range(S5PV210_GPC1(0), 5, S3C_GPIO_SFN(4)); |
32 | break; | 39 | break; |
33 | |||
34 | case -1: | ||
35 | s3c_gpio_cfgpin_range(S5PV210_GPI(0), 7, S3C_GPIO_SFN(2)); | ||
36 | break; | ||
37 | |||
38 | default: | 40 | default: |
39 | printk(KERN_ERR "Invalid Device %d\n", pdev->id); | 41 | printk(KERN_ERR "Invalid Device %d\n", pdev->id); |
40 | return -EINVAL; | 42 | return -EINVAL; |
@@ -43,8 +45,15 @@ static int s5pv210_cfg_i2s(struct platform_device *pdev) | |||
43 | return 0; | 45 | return 0; |
44 | } | 46 | } |
45 | 47 | ||
46 | static struct s3c_audio_pdata s3c_i2s_pdata = { | 48 | static struct s3c_audio_pdata i2sv5_pdata = { |
47 | .cfg_gpio = s5pv210_cfg_i2s, | 49 | .cfg_gpio = s5pv210_cfg_i2s, |
50 | .type = { | ||
51 | .i2s = { | ||
52 | .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI | ||
53 | | QUIRK_NEED_RSTCLR, | ||
54 | .src_clk = rclksrc, | ||
55 | }, | ||
56 | }, | ||
48 | }; | 57 | }; |
49 | 58 | ||
50 | static struct resource s5pv210_iis0_resource[] = { | 59 | static struct resource s5pv210_iis0_resource[] = { |
@@ -63,15 +72,34 @@ static struct resource s5pv210_iis0_resource[] = { | |||
63 | .end = DMACH_I2S0_RX, | 72 | .end = DMACH_I2S0_RX, |
64 | .flags = IORESOURCE_DMA, | 73 | .flags = IORESOURCE_DMA, |
65 | }, | 74 | }, |
75 | [3] = { | ||
76 | .start = DMACH_I2S0S_TX, | ||
77 | .end = DMACH_I2S0S_TX, | ||
78 | .flags = IORESOURCE_DMA, | ||
79 | }, | ||
66 | }; | 80 | }; |
67 | 81 | ||
68 | struct platform_device s5pv210_device_iis0 = { | 82 | struct platform_device s5pv210_device_iis0 = { |
69 | .name = "s3c64xx-iis-v4", | 83 | .name = "samsung-i2s", |
70 | .id = -1, | 84 | .id = 0, |
71 | .num_resources = ARRAY_SIZE(s5pv210_iis0_resource), | 85 | .num_resources = ARRAY_SIZE(s5pv210_iis0_resource), |
72 | .resource = s5pv210_iis0_resource, | 86 | .resource = s5pv210_iis0_resource, |
73 | .dev = { | 87 | .dev = { |
74 | .platform_data = &s3c_i2s_pdata, | 88 | .platform_data = &i2sv5_pdata, |
89 | }, | ||
90 | }; | ||
91 | |||
92 | static const char *rclksrc_v3[] = { | ||
93 | [0] = "iis", | ||
94 | [1] = "audio-bus", | ||
95 | }; | ||
96 | |||
97 | static struct s3c_audio_pdata i2sv3_pdata = { | ||
98 | .cfg_gpio = s5pv210_cfg_i2s, | ||
99 | .type = { | ||
100 | .i2s = { | ||
101 | .src_clk = rclksrc_v3, | ||
102 | }, | ||
75 | }, | 103 | }, |
76 | }; | 104 | }; |
77 | 105 | ||
@@ -94,12 +122,12 @@ static struct resource s5pv210_iis1_resource[] = { | |||
94 | }; | 122 | }; |
95 | 123 | ||
96 | struct platform_device s5pv210_device_iis1 = { | 124 | struct platform_device s5pv210_device_iis1 = { |
97 | .name = "s3c64xx-iis", | 125 | .name = "samsung-i2s", |
98 | .id = 1, | 126 | .id = 1, |
99 | .num_resources = ARRAY_SIZE(s5pv210_iis1_resource), | 127 | .num_resources = ARRAY_SIZE(s5pv210_iis1_resource), |
100 | .resource = s5pv210_iis1_resource, | 128 | .resource = s5pv210_iis1_resource, |
101 | .dev = { | 129 | .dev = { |
102 | .platform_data = &s3c_i2s_pdata, | 130 | .platform_data = &i2sv3_pdata, |
103 | }, | 131 | }, |
104 | }; | 132 | }; |
105 | 133 | ||
@@ -122,12 +150,12 @@ static struct resource s5pv210_iis2_resource[] = { | |||
122 | }; | 150 | }; |
123 | 151 | ||
124 | struct platform_device s5pv210_device_iis2 = { | 152 | struct platform_device s5pv210_device_iis2 = { |
125 | .name = "s3c64xx-iis", | 153 | .name = "samsung-i2s", |
126 | .id = 2, | 154 | .id = 2, |
127 | .num_resources = ARRAY_SIZE(s5pv210_iis2_resource), | 155 | .num_resources = ARRAY_SIZE(s5pv210_iis2_resource), |
128 | .resource = s5pv210_iis2_resource, | 156 | .resource = s5pv210_iis2_resource, |
129 | .dev = { | 157 | .dev = { |
130 | .platform_data = &s3c_i2s_pdata, | 158 | .platform_data = &i2sv3_pdata, |
131 | }, | 159 | }, |
132 | }; | 160 | }; |
133 | 161 | ||
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c index 5dd1681c069e..bb20a14da100 100644 --- a/arch/arm/mach-s5pv210/mach-smdkc110.c +++ b/arch/arm/mach-s5pv210/mach-smdkc110.c | |||
@@ -94,6 +94,7 @@ static struct platform_device *smdkc110_devices[] __initdata = { | |||
94 | 94 | ||
95 | static struct i2c_board_info smdkc110_i2c_devs0[] __initdata = { | 95 | static struct i2c_board_info smdkc110_i2c_devs0[] __initdata = { |
96 | { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung S524AD0XD1 */ | 96 | { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung S524AD0XD1 */ |
97 | { I2C_BOARD_INFO("wm8580", 0x1b), }, | ||
97 | }; | 98 | }; |
98 | 99 | ||
99 | static struct i2c_board_info smdkc110_i2c_devs1[] __initdata = { | 100 | static struct i2c_board_info smdkc110_i2c_devs1[] __initdata = { |
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index 30eec118a3a4..3a59068e983a 100644 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c | |||
@@ -178,6 +178,7 @@ static void __init smdkv210_dm9000_init(void) | |||
178 | 178 | ||
179 | static struct i2c_board_info smdkv210_i2c_devs0[] __initdata = { | 179 | static struct i2c_board_info smdkv210_i2c_devs0[] __initdata = { |
180 | { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung S524AD0XD1 */ | 180 | { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung S524AD0XD1 */ |
181 | { I2C_BOARD_INFO("wm8580", 0x1b), }, | ||
181 | }; | 182 | }; |
182 | 183 | ||
183 | static struct i2c_board_info smdkv210_i2c_devs1[] __initdata = { | 184 | static struct i2c_board_info smdkv210_i2c_devs1[] __initdata = { |