Skip to content

Commit

Permalink
Merge branch 'topic/asoc' into for-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Iwai committed Jan 13, 2011
2 parents c400c9e + 18b022e commit 6db9a0f
Show file tree
Hide file tree
Showing 236 changed files with 22,152 additions and 5,623 deletions.
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5176,7 +5176,7 @@ SAMSUNG AUDIO (ASoC) DRIVERS
M: Jassi Brar <jassi.brar@samsung.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Supported
F: sound/soc/s3c24xx
F: sound/soc/samsung

TLG2300 VIDEO4LINUX-2 DRIVER
M: Huang Shijie <shijie8@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-kirkwood/openrd-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static void __init openrd_init(void)

kirkwood_i2c_init();

if (machine_is_openrd_client()) {
if (machine_is_openrd_client() || machine_is_openrd_ultimate()) {
i2c_register_board_info(0, i2c_board_info,
ARRAY_SIZE(i2c_board_info));
kirkwood_audio_init();
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c2410/mach-h1940.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ static struct platform_device *h1940_devices[] __initdata = {
&s3c_device_wdt,
&s3c_device_i2c0,
&s3c_device_iis,
&s3c_device_pcm,
&samsung_asoc_dma,
&s3c_device_usbgadget,
&h1940_device_leds,
&h1940_device_bluetooth,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c2440/mach-rx1950.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ static struct platform_device *rx1950_devices[] __initdata = {
&s3c_device_wdt,
&s3c_device_i2c0,
&s3c_device_iis,
&s3c_device_pcm,
&samsung_asoc_dma,
&s3c_device_usbgadget,
&s3c_device_rtc,
&s3c_device_nand,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c64xx/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ static struct clksrc_clk clksrcs[] = {
}, {
.clk = {
.name = "audio-bus",
.id = -1, /* There's only one IISv4 port */
.id = 2,
.ctrlbit = S3C6410_CLKCON_SCLK_AUDIO2,
.enable = s3c64xx_sclk_ctrl,
},
Expand Down
75 changes: 35 additions & 40 deletions arch/arm/mach-s3c64xx/dev-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
#include <plat/audio.h>
#include <plat/gpio-cfg.h>

static int s3c64xx_i2sv3_cfg_gpio(struct platform_device *pdev)
static const char *rclksrc[] = {
[0] = "iis",
[1] = "audio-bus",
};

static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev)
{
unsigned int base;

Expand All @@ -33,6 +38,12 @@ static int s3c64xx_i2sv3_cfg_gpio(struct platform_device *pdev)
case 1:
base = S3C64XX_GPE(0);
break;
case 2:
s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C_GPIO_SFN(5));
s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C_GPIO_SFN(5));
s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C_GPIO_SFN(5));
s3c_gpio_cfgpin_range(S3C64XX_GPH(6), 4, S3C_GPIO_SFN(5));
return 0;
default:
printk(KERN_DEBUG "Invalid I2S Controller number: %d\n",
pdev->id);
Expand All @@ -44,16 +55,6 @@ static int s3c64xx_i2sv3_cfg_gpio(struct platform_device *pdev)
return 0;
}

static int s3c64xx_i2sv4_cfg_gpio(struct platform_device *pdev)
{
s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C_GPIO_SFN(5));
s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C_GPIO_SFN(5));
s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C_GPIO_SFN(5));
s3c_gpio_cfgpin_range(S3C64XX_GPH(6), 4, S3C_GPIO_SFN(5));

return 0;
}

static struct resource s3c64xx_iis0_resource[] = {
[0] = {
.start = S3C64XX_PA_IIS0,
Expand All @@ -72,17 +73,22 @@ static struct resource s3c64xx_iis0_resource[] = {
},
};

static struct s3c_audio_pdata s3c_i2s0_pdata = {
.cfg_gpio = s3c64xx_i2sv3_cfg_gpio,
static struct s3c_audio_pdata i2sv3_pdata = {
.cfg_gpio = s3c64xx_i2s_cfg_gpio,
.type = {
.i2s = {
.src_clk = rclksrc,
},
},
};

struct platform_device s3c64xx_device_iis0 = {
.name = "s3c64xx-iis",
.name = "samsung-i2s",
.id = 0,
.num_resources = ARRAY_SIZE(s3c64xx_iis0_resource),
.resource = s3c64xx_iis0_resource,
.dev = {
.platform_data = &s3c_i2s0_pdata,
.platform_data = &i2sv3_pdata,
},
};
EXPORT_SYMBOL(s3c64xx_device_iis0);
Expand All @@ -105,17 +111,13 @@ static struct resource s3c64xx_iis1_resource[] = {
},
};

static struct s3c_audio_pdata s3c_i2s1_pdata = {
.cfg_gpio = s3c64xx_i2sv3_cfg_gpio,
};

struct platform_device s3c64xx_device_iis1 = {
.name = "s3c64xx-iis",
.name = "samsung-i2s",
.id = 1,
.num_resources = ARRAY_SIZE(s3c64xx_iis1_resource),
.resource = s3c64xx_iis1_resource,
.dev = {
.platform_data = &s3c_i2s1_pdata,
.platform_data = &i2sv3_pdata,
},
};
EXPORT_SYMBOL(s3c64xx_device_iis1);
Expand All @@ -138,17 +140,23 @@ static struct resource s3c64xx_iisv4_resource[] = {
},
};

static struct s3c_audio_pdata s3c_i2sv4_pdata = {
.cfg_gpio = s3c64xx_i2sv4_cfg_gpio,
static struct s3c_audio_pdata i2sv4_pdata = {
.cfg_gpio = s3c64xx_i2s_cfg_gpio,
.type = {
.i2s = {
.quirks = QUIRK_PRI_6CHAN,
.src_clk = rclksrc,
},
},
};

struct platform_device s3c64xx_device_iisv4 = {
.name = "s3c64xx-iis-v4",
.id = -1,
.name = "samsung-i2s",
.id = 2,
.num_resources = ARRAY_SIZE(s3c64xx_iisv4_resource),
.resource = s3c64xx_iisv4_resource,
.dev = {
.platform_data = &s3c_i2sv4_pdata,
.platform_data = &i2sv4_pdata,
},
};
EXPORT_SYMBOL(s3c64xx_device_iisv4);
Expand Down Expand Up @@ -288,7 +296,7 @@ static struct s3c_audio_pdata s3c_ac97_pdata;
static u64 s3c64xx_ac97_dmamask = DMA_BIT_MASK(32);

struct platform_device s3c64xx_device_ac97 = {
.name = "s3c-ac97",
.name = "samsung-ac97",
.id = -1,
.num_resources = ARRAY_SIZE(s3c64xx_ac97_resource),
.resource = s3c64xx_ac97_resource,
Expand All @@ -307,16 +315,3 @@ void __init s3c64xx_ac97_setup_gpio(int num)
else
s3c_ac97_pdata.cfg_gpio = s3c64xx_ac97_cfg_gpe;
}

static u64 s3c_device_audio_dmamask = 0xffffffffUL;

struct platform_device s3c_device_pcm = {
.name = "s3c24xx-pcm-audio",
.id = -1,
.dev = {
.dma_mask = &s3c_device_audio_dmamask,
.coherent_dma_mask = 0xffffffffUL
}
};
EXPORT_SYMBOL(s3c_device_pcm);

2 changes: 1 addition & 1 deletion arch/arm/mach-s3c64xx/mach-smdk6410.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ static struct platform_device *smdk6410_devices[] __initdata = {
&s3c_device_fb,
&s3c_device_ohci,
&s3c_device_usb_hsotg,
&s3c_device_pcm,
&samsung_asoc_dma,
&s3c64xx_device_iisv4,
&samsung_device_keypad,

Expand Down
44 changes: 37 additions & 7 deletions arch/arm/mach-s5p6442/dev-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static int s5p6442_cfg_i2s(struct platform_device *pdev)
base = S5P6442_GPC1(0);
break;

case -1:
case 0:
base = S5P6442_GPC0(0);
break;

Expand All @@ -42,8 +42,19 @@ static int s5p6442_cfg_i2s(struct platform_device *pdev)
return 0;
}

static struct s3c_audio_pdata s3c_i2s_pdata = {
static const char *rclksrc_v35[] = {
[0] = "busclk",
[1] = "i2sclk",
};

static struct s3c_audio_pdata i2sv35_pdata = {
.cfg_gpio = s5p6442_cfg_i2s,
.type = {
.i2s = {
.quirks = QUIRK_SEC_DAI | QUIRK_NEED_RSTCLR,
.src_clk = rclksrc_v35,
},
},
};

static struct resource s5p6442_iis0_resource[] = {
Expand All @@ -62,15 +73,34 @@ static struct resource s5p6442_iis0_resource[] = {
.end = DMACH_I2S0_RX,
.flags = IORESOURCE_DMA,
},
[3] = {
.start = DMACH_I2S0S_TX,
.end = DMACH_I2S0S_TX,
.flags = IORESOURCE_DMA,
},
};

struct platform_device s5p6442_device_iis0 = {
.name = "s3c64xx-iis-v4",
.id = -1,
.name = "samsung-i2s",
.id = 0,
.num_resources = ARRAY_SIZE(s5p6442_iis0_resource),
.resource = s5p6442_iis0_resource,
.dev = {
.platform_data = &s3c_i2s_pdata,
.platform_data = &i2sv35_pdata,
},
};

static const char *rclksrc_v3[] = {
[0] = "iis",
[1] = "sclk_audio",
};

static struct s3c_audio_pdata i2sv3_pdata = {
.cfg_gpio = s5p6442_cfg_i2s,
.type = {
.i2s = {
.src_clk = rclksrc_v3,
},
},
};

Expand All @@ -93,12 +123,12 @@ static struct resource s5p6442_iis1_resource[] = {
};

struct platform_device s5p6442_device_iis1 = {
.name = "s3c64xx-iis",
.name = "samsung-i2s",
.id = 1,
.num_resources = ARRAY_SIZE(s5p6442_iis1_resource),
.resource = s5p6442_iis1_resource,
.dev = {
.platform_data = &s3c_i2s_pdata,
.platform_data = &i2sv3_pdata,
},
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s5p64x0/clock-s5p6440.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ static struct clk init_clocks_disable[] = {
.enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 25),
}, {
.name = "i2s_v40",
.name = "iis",
.id = 0,
.parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s5p64x0/clock-s5p6450.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static struct clk init_clocks_disable[] = {
.ctrlbit = (1 << 22),
}, {
.name = "iis",
.id = -1,
.id = 0,
.parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 26),
Expand Down
55 changes: 21 additions & 34 deletions arch/arm/mach-s5p64x0/dev-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,19 @@
#include <mach/dma.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 */
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(13), 2, S3C_GPIO_SFN(5));
break;

default:
printk(KERN_ERR "Invalid Device %d\n", pdev->id);
return -EINVAL;
Expand All @@ -36,31 +40,14 @@ static int s5p6440_cfg_i2s(struct platform_device *pdev)
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:
printk(KERN_ERR "Invalid Device %d\n", pdev->id);
return -EINVAL;
}

return 0;
}

static struct s3c_audio_pdata s5p6440_i2s_pdata = {
.cfg_gpio = s5p6440_cfg_i2s,
};

static struct s3c_audio_pdata s5p6450_i2s_pdata = {
.cfg_gpio = s5p6450_cfg_i2s,
static struct s3c_audio_pdata s5p64x0_i2s_pdata = {
.cfg_gpio = s5p64x0_cfg_i2s,
.type = {
.i2s = {
.quirks = QUIRK_PRI_6CHAN,
.src_clk = rclksrc,
},
},
};

static struct resource s5p64x0_iis0_resource[] = {
Expand All @@ -82,22 +69,22 @@ static struct resource s5p64x0_iis0_resource[] = {
};

struct platform_device s5p6440_device_iis = {
.name = "s3c64xx-iis-v4",
.id = -1,
.name = "samsung-i2s",
.id = 0,
.num_resources = ARRAY_SIZE(s5p64x0_iis0_resource),
.resource = s5p64x0_iis0_resource,
.dev = {
.platform_data = &s5p6440_i2s_pdata,
.platform_data = &s5p64x0_i2s_pdata,
},
};

struct platform_device s5p6450_device_iis0 = {
.name = "s3c64xx-iis-v4",
.id = -1,
.name = "samsung-i2s",
.id = 0,
.num_resources = ARRAY_SIZE(s5p64x0_iis0_resource),
.resource = s5p64x0_iis0_resource,
.dev = {
.platform_data = &s5p6450_i2s_pdata,
.platform_data = &s5p64x0_i2s_pdata,
},
};

Expand Down
Loading

0 comments on commit 6db9a0f

Please sign in to comment.