From: Stephen Rothwell Date: Wed, 3 Oct 2012 03:07:12 +0000 (+1000) Subject: Merge remote-tracking branch 'sound/for-next' X-Git-Tag: next-20121003~48 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3d6b52458cc6c651b83d918bb714f2f2563260f8;p=karo-tx-linux.git Merge remote-tracking branch 'sound/for-next' Conflicts: arch/arm/mach-davinci/davinci.h arch/arm/mach-davinci/dm355.c arch/arm/mach-davinci/dm365.c arch/arm/mach-davinci/include/mach/da8xx.h arch/arm/mach-imx/mach-imx27_visstrim_m10.c sound/soc/omap/igep0020.c sound/soc/omap/omap-mcbsp.c sound/soc/omap/omap-pcm.c sound/soc/omap/omap3beagle.c sound/soc/omap/omap3evm.c sound/soc/omap/overo.c --- 3d6b52458cc6c651b83d918bb714f2f2563260f8 diff --cc arch/arm/mach-davinci/davinci.h index a37fc44e29bc,8661b2013527..acb545aebcf1 --- a/arch/arm/mach-davinci/davinci.h +++ b/arch/arm/mach-davinci/davinci.h @@@ -22,10 -22,11 +22,11 @@@ #include #include #include + #include - #include -#include +#include #include + #include #include #include diff --cc arch/arm/mach-davinci/dm355.c index adbde33eca01,e47a3f0e8ac4..a255434908db --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c @@@ -26,8 -26,7 +26,7 @@@ #include #include #include - #include -#include +#include #include #include "davinci.h" diff --cc arch/arm/mach-davinci/dm365.c index 719e22f2a37e,f473745d6e3c..b680c832e0ba --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c @@@ -29,9 -29,8 +29,8 @@@ #include #include #include - #include -#include -#include +#include +#include #include #include "davinci.h" diff --cc arch/arm/mach-davinci/include/mach/da8xx.h index 33e78ae2a254,c74a6abef187..c9ee723c56f3 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h @@@ -19,12 -20,11 +20,11 @@@ #include #include - #include -#include -#include -#include #include -#include +#include +#include +#include +#include extern void __iomem *da8xx_syscfg0_base; extern void __iomem *da8xx_syscfg1_base; diff --cc arch/arm/mach-imx/mach-imx27_visstrim_m10.c index 821d6aac411c,562722959666..141756f00ae5 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c @@@ -32,6 -32,8 +32,7 @@@ #include #include #include -#include + #include #include #include #include @@@ -403,47 -436,14 +434,55 @@@ static const struct imx_ssi_platform_da .flags = IMX_SSI_DMA | IMX_SSI_SYN, }; +/* coda */ + +static void __init visstrim_coda_init(void) +{ + struct platform_device *pdev; + int dma; + + pdev = imx27_add_coda(); + dma = dma_declare_coherent_memory(&pdev->dev, + mx2_camera_base + MX2_CAMERA_BUF_SIZE, + mx2_camera_base + MX2_CAMERA_BUF_SIZE, + MX2_CAMERA_BUF_SIZE, + DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE); + if (!(dma & DMA_MEMORY_MAP)) + return; +} + +/* DMA deinterlace */ +static struct platform_device visstrim_deinterlace = { + .name = "m2m-deinterlace", + .id = 0, +}; + +static void __init visstrim_deinterlace_init(void) +{ + int ret = -ENOMEM; + struct platform_device *pdev = &visstrim_deinterlace; + int dma; + + ret = platform_device_register(pdev); + + dma = dma_declare_coherent_memory(&pdev->dev, + mx2_camera_base + 2 * MX2_CAMERA_BUF_SIZE, + mx2_camera_base + 2 * MX2_CAMERA_BUF_SIZE, + MX2_CAMERA_BUF_SIZE, + DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE); + if (!(dma & DMA_MEMORY_MAP)) + return; +} + + + /* Audio */ + static const struct snd_mx27vis_platform_data snd_mx27vis_pdata __initconst = { + .amp_gain0_gpio = AMP_GAIN_0, + .amp_gain1_gpio = AMP_GAIN_1, + .amp_mutel_gpio = AMP_MUTE_SDL, + .amp_muter_gpio = AMP_MUTE_SDR, + }; + static void __init visstrim_m10_revision(void) { int exp_version = 0; diff --cc arch/arm/mach-omap2/board-zoom-peripherals.c index 6bcc107b9fc3,a7d3b0480744..67f8540c8e07 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c @@@ -245,13 -245,10 +246,7 @@@ static int zoom_twl_gpio_setup(struct d return ret; } - /* EXTMUTE callback function */ - static void zoom2_set_hs_extmute(int mute) - { - gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); - } - static struct twl4030_gpio_platform_data zoom_gpio_data = { - .gpio_base = OMAP_MAX_GPIO_LINES, - .irq_base = TWL4030_GPIO_IRQ_BASE, - .irq_end = TWL4030_GPIO_IRQ_END, .setup = zoom_twl_gpio_setup, }; @@@ -277,9 -274,9 +272,9 @@@ static int __init omap_i2c_init(void codec_data->ramp_delay_value = 3; /* 161 ms */ codec_data->hs_extmute = 1; - codec_data->set_hs_extmute = zoom2_set_hs_extmute; + codec_data->hs_extmute_gpio = ZOOM2_HEADSET_EXTMUTE_GPIO; } - omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); + omap_pmic_init(1, 2400, "twl5030", 7 + OMAP_INTC_START, &zoom_twldata); omap_register_i2c_bus(2, 400, NULL, 0); omap_register_i2c_bus(3, 400, NULL, 0); return 0; diff --cc arch/arm/mach-omap2/mcbsp.c index 7d47407d6d46,d57a3578bf03..37f8f948047b --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c @@@ -15,11 -15,14 +15,12 @@@ #include #include #include + #include #include #include +#include -#include #include -#include -#include #include #include diff --cc drivers/dma/ep93xx_dma.c index 64256f644252,493735b9b2c9..bcfde400904f --- a/drivers/dma/ep93xx_dma.c +++ b/drivers/dma/ep93xx_dma.c @@@ -1118,8 -1118,9 +1118,9 @@@ fail * @chan: channel * @dma_addr: DMA mapped address of the buffer * @buf_len: length of the buffer (in bytes) - * @period_len: lenght of a single period + * @period_len: length of a single period * @dir: direction of the operation + * @flags: tx descriptor status flags * @context: operation context (ignored) * * Prepares a descriptor for cyclic DMA operation. This means that once the diff --cc sound/soc/codecs/ab8500-codec.c index 07abd09e0b1d,2c1c2524ef8c..af547490b4f7 --- a/sound/soc/codecs/ab8500-codec.c +++ b/sound/soc/codecs/ab8500-codec.c @@@ -2462,35 -2405,8 +2462,32 @@@ static int ab8500_codec_probe(struct sn dev_dbg(dev, "%s: Enter.\n", __func__); /* Setup AB8500 according to board-settings */ - pdata = (struct ab8500_platform_data *)dev_get_platdata(dev->parent); - - /* Inform SoC Core that we have our own I/O arrangements. */ - codec->control_data = (void *)true; + pdata = dev_get_platdata(dev->parent); + if (np) { + if (!pdata) + pdata = devm_kzalloc(dev, + sizeof(struct ab8500_platform_data), + GFP_KERNEL); + + if (pdata && !pdata->codec) + pdata->codec + = devm_kzalloc(dev, + sizeof(struct ab8500_codec_platform_data), + GFP_KERNEL); + + if (!(pdata && pdata->codec)) + return -ENOMEM; + + ab8500_codec_of_probe(dev, np, pdata->codec); + + } else { + if (!(pdata && pdata->codec)) { + dev_err(dev, "No codec platform data or DT found\n"); + return -EINVAL; + } + } + status = ab8500_audio_setup_mics(codec, &pdata->codec->amics); if (status < 0) { pr_err("%s: Failed to setup mics (%d)!\n", __func__, status); diff --cc sound/soc/omap/mcbsp.c index a681a9a8b846,bc06175e6367..afb8d4f1bedf --- a/sound/soc/omap/mcbsp.c +++ b/sound/soc/omap/mcbsp.c @@@ -24,10 -24,9 +24,11 @@@ #include #include #include + #include -#include +#include + +#include #include "mcbsp.h" diff --cc sound/soc/omap/omap-mcbsp.c index 1b18627763ce,fef2f5933bb2..a6ee15747859 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@@ -32,9 -34,7 +34,8 @@@ #include #include -#include +#include - #include +#include #include "mcbsp.h" #include "omap-mcbsp.h" #include "omap-pcm.h" diff --cc sound/soc/omap/omap-pcm.c index b30994179885,a2636f6b8362..340874ebf9ae --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@@ -28,10 -29,9 +29,10 @@@ #include #include #include + #include #include +#include - #include #include "omap-pcm.h" static const struct snd_pcm_hardware omap_pcm_hardware = { diff --cc sound/soc/ux500/ux500_msp_i2s.c index e5c79ca42518,1b7c2f58ce13..b7c996e77570 --- a/sound/soc/ux500/ux500_msp_i2s.c +++ b/sound/soc/ux500/ux500_msp_i2s.c @@@ -684,31 -665,20 +684,33 @@@ int ux500_msp_i2s_init_msp(struct platf { struct resource *res = NULL; struct i2s_controller *i2s_cont; + struct device_node *np = pdev->dev.of_node; struct ux500_msp *msp; - dev_dbg(&pdev->dev, "%s: Enter (name: %s, id: %d).\n", __func__, - pdev->name, platform_data->id); - *msp_p = devm_kzalloc(&pdev->dev, sizeof(struct ux500_msp), GFP_KERNEL); msp = *msp_p; + if (!msp) + return -ENOMEM; + if (np) { + if (!platform_data) { + platform_data = devm_kzalloc(&pdev->dev, + sizeof(struct msp_i2s_platform_data), GFP_KERNEL); + if (!platform_data) + ret = -ENOMEM; + } + } else + if (!platform_data) + ret = -EINVAL; + + if (ret) + goto err_res; + + dev_dbg(&pdev->dev, "%s: Enter (name: %s, id: %d).\n", __func__, + pdev->name, platform_data->id); + msp->id = platform_data->id; msp->dev = &pdev->dev; - msp->plat_init = platform_data->msp_i2s_init; - msp->plat_exit = platform_data->msp_i2s_exit; msp->dma_cfg_rx = platform_data->msp_i2s_dma_rx; msp->dma_cfg_tx = platform_data->msp_i2s_dma_tx;