Commit d9a93c34 authored by Jassi Brar's avatar Jassi Brar Committed by Kukjin Kim

ARM: S5P64X0: Upgrade platform device for I2S

Add more information to I2S platform_devices in order
to prepare them for new controller driver.
Also, discard duplicated gpio-cfg.
Signed-off-by: default avatarJassi Brar <jassi.brar@samsung.com>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent 6a62bee2
...@@ -261,7 +261,7 @@ static struct clk init_clocks_disable[] = { ...@@ -261,7 +261,7 @@ static struct clk init_clocks_disable[] = {
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 25), .ctrlbit = (1 << 25),
}, { }, {
.name = "i2s_v40", .name = "iis",
.id = 0, .id = 0,
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
......
...@@ -256,7 +256,7 @@ static struct clk init_clocks_disable[] = { ...@@ -256,7 +256,7 @@ static struct clk init_clocks_disable[] = {
.ctrlbit = (1 << 22), .ctrlbit = (1 << 22),
}, { }, {
.name = "iis", .name = "iis",
.id = -1, .id = 0,
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 26), .ctrlbit = (1 << 26),
......
...@@ -19,34 +19,19 @@ ...@@ -19,34 +19,19 @@
#include <mach/dma.h> #include <mach/dma.h>
#include <mach/irqs.h> #include <mach/irqs.h>
static int s5p6440_cfg_i2s(struct platform_device *pdev) static const char *rclksrc[] = {
[0] = "iis",
[1] = "sclk_audio2",
};
static int s5p64x0_cfg_i2s(struct platform_device *pdev)
{ {
/* configure GPIO for i2s port */ /* configure GPIO for i2s port */
switch (pdev->id) { switch (pdev->id) {
case -1: case 0:
s3c_gpio_cfgpin_range(S5P6440_GPR(4), 5, S3C_GPIO_SFN(5)); s3c_gpio_cfgpin_range(S5P6440_GPR(4), 5, S3C_GPIO_SFN(5));
s3c_gpio_cfgpin_range(S5P6440_GPR(13), 2, S3C_GPIO_SFN(5)); s3c_gpio_cfgpin_range(S5P6440_GPR(13), 2, S3C_GPIO_SFN(5));
break; break;
default:
printk(KERN_ERR "Invalid Device %d\n", pdev->id);
return -EINVAL;
}
return 0;
}
static int s5p6450_cfg_i2s(struct platform_device *pdev)
{
/* configure GPIO for i2s port */
switch (pdev->id) {
case -1:
s3c_gpio_cfgpin(S5P6450_GPB(4), S3C_GPIO_SFN(5));
s3c_gpio_cfgpin_range(S5P6450_GPR(4), 5, S3C_GPIO_SFN(5));
s3c_gpio_cfgpin_range(S5P6450_GPR(13), 2, S3C_GPIO_SFN(5));
break;
default: default:
printk(KERN_ERR "Invalid Device %d\n", pdev->id); printk(KERN_ERR "Invalid Device %d\n", pdev->id);
return -EINVAL; return -EINVAL;
...@@ -55,12 +40,14 @@ static int s5p6450_cfg_i2s(struct platform_device *pdev) ...@@ -55,12 +40,14 @@ static int s5p6450_cfg_i2s(struct platform_device *pdev)
return 0; return 0;
} }
static struct s3c_audio_pdata s5p6440_i2s_pdata = { static struct s3c_audio_pdata s5p64x0_i2s_pdata = {
.cfg_gpio = s5p6440_cfg_i2s, .cfg_gpio = s5p64x0_cfg_i2s,
}; .type = {
.i2s = {
static struct s3c_audio_pdata s5p6450_i2s_pdata = { .quirks = QUIRK_PRI_6CHAN,
.cfg_gpio = s5p6450_cfg_i2s, .src_clk = rclksrc,
},
},
}; };
static struct resource s5p64x0_iis0_resource[] = { static struct resource s5p64x0_iis0_resource[] = {
...@@ -82,22 +69,22 @@ static struct resource s5p64x0_iis0_resource[] = { ...@@ -82,22 +69,22 @@ static struct resource s5p64x0_iis0_resource[] = {
}; };
struct platform_device s5p6440_device_iis = { struct platform_device s5p6440_device_iis = {
.name = "samsung-i2s-v4", .name = "samsung-i2s",
.id = -1, .id = 0,
.num_resources = ARRAY_SIZE(s5p64x0_iis0_resource), .num_resources = ARRAY_SIZE(s5p64x0_iis0_resource),
.resource = s5p64x0_iis0_resource, .resource = s5p64x0_iis0_resource,
.dev = { .dev = {
.platform_data = &s5p6440_i2s_pdata, .platform_data = &s5p64x0_i2s_pdata,
}, },
}; };
struct platform_device s5p6450_device_iis0 = { struct platform_device s5p6450_device_iis0 = {
.name = "samsung-i2s-v4", .name = "samsung-i2s",
.id = -1, .id = 0,
.num_resources = ARRAY_SIZE(s5p64x0_iis0_resource), .num_resources = ARRAY_SIZE(s5p64x0_iis0_resource),
.resource = s5p64x0_iis0_resource, .resource = s5p64x0_iis0_resource,
.dev = { .dev = {
.platform_data = &s5p6450_i2s_pdata, .platform_data = &s5p64x0_i2s_pdata,
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment