From ec20fba77df4053ef703900be882527b95606592 Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Tue, 12 Mar 2013 23:09:35 +0100 Subject: [PATCH 1/6] ASoC: samsung: remove last traces of neo1973-gta01 The support for the Openmoko Neo1973 GTA01 got removed in commit 1ae5cbc52e7c6619a3f44b87809fd25370df31bb ("ASoC: neo1973_wm8753: remove references to the neo1973-gta01 machine"). Remove its last traces in the Kconfig file too. Signed-off-by: Paul Bolle Acked-by: Kukjin Kim Signed-off-by: Mark Brown --- sound/soc/samsung/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig index 90e7e6653233..475fb0d8b3c6 100644 --- a/sound/soc/samsung/Kconfig +++ b/sound/soc/samsung/Kconfig @@ -35,11 +35,10 @@ config SND_SAMSUNG_I2S tristate config SND_SOC_SAMSUNG_NEO1973_WM8753 - tristate "Audio support for Openmoko Neo1973 Smartphones (GTA01/GTA02)" - depends on SND_SOC_SAMSUNG && (MACH_NEO1973_GTA01 || MACH_NEO1973_GTA02) + tristate "Audio support for Openmoko Neo1973 Smartphones (GTA02)" + depends on SND_SOC_SAMSUNG && MACH_NEO1973_GTA02 select SND_S3C24XX_I2S select SND_SOC_WM8753 - select SND_SOC_LM4857 if MACH_NEO1973_GTA01 select SND_SOC_DFBMCS320 help Say Y here to enable audio support for the Openmoko Neo1973 From cb00e3a16dc60618c1ce56882e8bde1ad55069d9 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 11 Apr 2013 02:05:01 +0200 Subject: [PATCH 2/6] ASoC: samsung: use irq resource for idma With multiplatform kernels, we cannot use hardwired IRQ numbers in device drivers. This changes the idma driver to use a proper resource, like all other drivers do. Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown --- arch/arm/plat-samsung/devs.c | 6 ++++++ sound/soc/samsung/idma.c | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 51afedda9ab6..d81d9fbc8866 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c @@ -146,14 +146,20 @@ struct platform_device s3c_device_camif = { /* ASOC DMA */ +#ifdef CONFIG_PLAT_S5P +static struct resource samsung_asoc_idma_resource = DEFINE_RES_IRQ(IRQ_I2S0); + struct platform_device samsung_asoc_idma = { .name = "samsung-idma", .id = -1, + .num_resources = 1, + .resource = &samsung_asoc_idma_resource, .dev = { .dma_mask = &samsung_device_dma_mask, .coherent_dma_mask = DMA_BIT_MASK(32), } }; +#endif /* FB */ diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c index a07950b0c8ce..f36a5414f5c4 100644 --- a/sound/soc/samsung/idma.c +++ b/sound/soc/samsung/idma.c @@ -68,6 +68,8 @@ static struct idma_info { dma_addr_t lp_tx_addr; } idma; +static int idma_irq; + static void idma_getpos(dma_addr_t *src) { *src = idma.lp_tx_addr + @@ -305,7 +307,7 @@ static int idma_open(struct snd_pcm_substream *substream) if (prtd == NULL) return -ENOMEM; - ret = request_irq(IRQ_I2S0, iis_irq, 0, "i2s", prtd); + ret = request_irq(idma_irq, iis_irq, 0, "i2s", prtd); if (ret < 0) { pr_err("fail to claim i2s irq , ret = %d\n", ret); kfree(prtd); @@ -324,7 +326,7 @@ static int idma_close(struct snd_pcm_substream *substream) struct snd_pcm_runtime *runtime = substream->runtime; struct idma_ctrl *prtd = runtime->private_data; - free_irq(IRQ_I2S0, prtd); + free_irq(idma_irq, prtd); if (!prtd) pr_err("idma_close called with prtd == NULL\n"); @@ -418,6 +420,10 @@ static struct snd_soc_platform_driver asoc_idma_platform = { static int asoc_idma_platform_probe(struct platform_device *pdev) { + idma_irq = platform_get_irq(pdev, 0); + if (idma_irq < 0) + return idma_irq; + return snd_soc_register_platform(&pdev->dev, &asoc_idma_platform); } From 2af1955848dffad480120a494fc39ae99e7580ba Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 11 Apr 2013 02:05:03 +0200 Subject: [PATCH 3/6] ASoC: samsung: fix module_device_table The second argument to the module_device_table macro must be the name of the device id array. In the samsung i2s driver, there was a small typo, resulting in a build error when building it as a loadable module. Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown --- sound/soc/samsung/i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 6bbeb0bf1a73..a487635412eb 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1298,7 +1298,7 @@ static struct platform_device_id samsung_i2s_driver_ids[] = { }, {}, }; -MODULE_DEVICE_TABLE(platform, samsung-i2s-driver-ids); +MODULE_DEVICE_TABLE(platform, samsung_i2s_driver_ids); #ifdef CONFIG_OF static struct samsung_i2s_dai_data samsung_i2s_dai_data_array[] = { From 0930c33ad005f5af955059f8e85cdd1816e25a1b Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 11 Apr 2013 02:05:04 +0200 Subject: [PATCH 4/6] ASoC: samsung: export idma_reg_addr_init The idma_reg_addr_init function is used by the samsung i2s driver, which can be a loadable module, so we have to export this function. Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown --- sound/soc/samsung/idma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c index f36a5414f5c4..6e5fed30aa27 100644 --- a/sound/soc/samsung/idma.c +++ b/sound/soc/samsung/idma.c @@ -411,6 +411,7 @@ void idma_reg_addr_init(void __iomem *regs, dma_addr_t addr) idma.regs = regs; idma.lp_tx_addr = addr; } +EXPORT_SYMBOL_GPL(idma_reg_addr_init); static struct snd_soc_platform_driver asoc_idma_platform = { .ops = &idma_ops, From 5d229ce569be74f6f10c01dd99061cdb1dabb312 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 11 Apr 2013 19:08:42 +0200 Subject: [PATCH 5/6] ASoC: samsung: move plat/ headers to local directory The plat/regs-iis.h and plat/regs-ac97.h files in the samsung platform are only needed by the ASoC drivers, so they can be moved into the same directory, as one more step towards a multiplatform build. Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown --- arch/arm/mach-s3c24xx/dma-s3c2410.c | 2 -- arch/arm/mach-s3c24xx/dma-s3c2412.c | 2 -- arch/arm/mach-s3c24xx/dma-s3c2440.c | 2 -- arch/arm/mach-s3c24xx/dma-s3c2443.c | 2 -- sound/soc/samsung/ac97.c | 2 +- sound/soc/samsung/h1940_uda1380.c | 2 +- sound/soc/samsung/neo1973_wm8753.c | 2 +- .../plat-samsung/include/plat => sound/soc/samsung}/regs-ac97.h | 0 .../plat-samsung/include/plat => sound/soc/samsung}/regs-iis.h | 0 sound/soc/samsung/rx1950_uda1380.c | 2 +- sound/soc/samsung/s3c24xx-i2s.c | 2 +- sound/soc/samsung/s3c24xx_uda134x.c | 2 +- 12 files changed, 6 insertions(+), 14 deletions(-) rename {arch/arm/plat-samsung/include/plat => sound/soc/samsung}/regs-ac97.h (100%) rename {arch/arm/plat-samsung/include/plat => sound/soc/samsung}/regs-iis.h (100%) diff --git a/arch/arm/mach-s3c24xx/dma-s3c2410.c b/arch/arm/mach-s3c24xx/dma-s3c2410.c index 25d085adc93c..a4a13c99083b 100644 --- a/arch/arm/mach-s3c24xx/dma-s3c2410.c +++ b/arch/arm/mach-s3c24xx/dma-s3c2410.c @@ -25,11 +25,9 @@ #include #include -#include #include #include #include -#include #include static struct s3c24xx_dma_map __initdata s3c2410_dma_mappings[] = { diff --git a/arch/arm/mach-s3c24xx/dma-s3c2412.c b/arch/arm/mach-s3c24xx/dma-s3c2412.c index d2408ba372cb..6eaa7a4991f8 100644 --- a/arch/arm/mach-s3c24xx/dma-s3c2412.c +++ b/arch/arm/mach-s3c24xx/dma-s3c2412.c @@ -25,11 +25,9 @@ #include #include -#include #include #include #include -#include #include #define MAP(x) { (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID } diff --git a/arch/arm/mach-s3c24xx/dma-s3c2440.c b/arch/arm/mach-s3c24xx/dma-s3c2440.c index 0b86e74d104f..477d4501967f 100644 --- a/arch/arm/mach-s3c24xx/dma-s3c2440.c +++ b/arch/arm/mach-s3c24xx/dma-s3c2440.c @@ -25,11 +25,9 @@ #include #include -#include #include #include #include -#include #include static struct s3c24xx_dma_map __initdata s3c2440_dma_mappings[] = { diff --git a/arch/arm/mach-s3c24xx/dma-s3c2443.c b/arch/arm/mach-s3c24xx/dma-s3c2443.c index 05536254a3f8..80a8d56e2559 100644 --- a/arch/arm/mach-s3c24xx/dma-s3c2443.c +++ b/arch/arm/mach-s3c24xx/dma-s3c2443.c @@ -25,11 +25,9 @@ #include #include -#include #include #include #include -#include #include #define MAP(x) { \ diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c index 0df3c5644cfa..c76abdf6173f 100644 --- a/sound/soc/samsung/ac97.c +++ b/sound/soc/samsung/ac97.c @@ -20,7 +20,7 @@ #include #include -#include +#include "regs-ac97.h" #include #include "dma.h" diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c index 15a3817aa5c8..fa91376e323d 100644 --- a/sound/soc/samsung/h1940_uda1380.c +++ b/sound/soc/samsung/h1940_uda1380.c @@ -20,7 +20,7 @@ #include #include -#include +#include "regs-iis.h" #include #include "s3c24xx-i2s.h" diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c index a301d8cfaa34..ccc601d5a3fb 100644 --- a/sound/soc/samsung/neo1973_wm8753.c +++ b/sound/soc/samsung/neo1973_wm8753.c @@ -21,7 +21,7 @@ #include #include -#include +#include "regs-iis.h" #include #include "../codecs/wm8753.h" diff --git a/arch/arm/plat-samsung/include/plat/regs-ac97.h b/sound/soc/samsung/regs-ac97.h similarity index 100% rename from arch/arm/plat-samsung/include/plat/regs-ac97.h rename to sound/soc/samsung/regs-ac97.h diff --git a/arch/arm/plat-samsung/include/plat/regs-iis.h b/sound/soc/samsung/regs-iis.h similarity index 100% rename from arch/arm/plat-samsung/include/plat/regs-iis.h rename to sound/soc/samsung/regs-iis.h diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c index a5826ea9cad6..704460a37005 100644 --- a/sound/soc/samsung/rx1950_uda1380.c +++ b/sound/soc/samsung/rx1950_uda1380.c @@ -24,7 +24,7 @@ #include #include -#include +#include "regs-iis.h" #include #include "s3c24xx-i2s.h" diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c index 13f6dd1ceb00..a7b17c15236f 100644 --- a/sound/soc/samsung/s3c24xx-i2s.c +++ b/sound/soc/samsung/s3c24xx-i2s.c @@ -24,7 +24,7 @@ #include #include -#include +#include "regs-iis.h" #include "dma.h" #include "s3c24xx-i2s.h" diff --git a/sound/soc/samsung/s3c24xx_uda134x.c b/sound/soc/samsung/s3c24xx_uda134x.c index 333e1b7f06c7..1b7b52b0af97 100644 --- a/sound/soc/samsung/s3c24xx_uda134x.c +++ b/sound/soc/samsung/s3c24xx_uda134x.c @@ -18,7 +18,7 @@ #include #include -#include +#include "regs-iis.h" #include "s3c24xx-i2s.h" From 32873b595371acec3a7c5cd225e266d8426e087f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20St=C3=BCbner?= Date: Thu, 11 Apr 2013 21:02:43 +0200 Subject: [PATCH 6/6] ASoC: samsung: fix neo1973-wm8753 compilation Commit b2ca78717cea (ARM: S3C24XX: make gta02.h local) already replaced the GTA02_GPIO_* constants in neo1973-wm8753.c but forgot to remove the inclusion of mach/gta02.h before moving the file out of mach/. Signed-off-by: Heiko Stuebner Signed-off-by: Mark Brown --- sound/soc/samsung/neo1973_wm8753.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c index ccc601d5a3fb..e591c386917a 100644 --- a/sound/soc/samsung/neo1973_wm8753.c +++ b/sound/soc/samsung/neo1973_wm8753.c @@ -22,7 +22,6 @@ #include #include "regs-iis.h" -#include #include "../codecs/wm8753.h" #include "s3c24xx-i2s.h"