* [PATCH 00/30] ARM: exynos multiplatform support
@ 2013-04-11 0:04 Arnd Bergmann
2013-04-11 0:05 ` [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory Arnd Bergmann
` (4 more replies)
0 siblings, 5 replies; 21+ messages in thread
From: Arnd Bergmann @ 2013-04-11 0:04 UTC (permalink / raw)
To: linux-arm-kernel
Cc: linux-kernel, Kukjin Kim, linux-samsung-soc, Arnd Bergmann, stern,
a.zummo, ben-linux, cjb, dwmw2, grant.likely, gregkh, jg1.han,
john.stultz, broonie, mchehab, mturquette, padma.kvr,
thierry.reding, tglx, t.figa, wsa, rui.zhang, alsa-devel,
linux-fbdev, linux-i2c, linux-media, linux-mmc, linux-mtd,
linux-pm, linux-serial, linux-usb, rtc-linux, spi-devel-general
Hi everyone,
I have updated my series for multiplatform support of the ARM exynos
platform, based on what is currently queued up in arm-soc.
It would be really nice to still get this merged for 3.10. A lot of
the patches are really trivial, but there are some complex ones
as well.
To all subsystem maintainers: feel free to directly apply the patches
for your subsystem, there should be no dependencies between any of them,
aside from the last patch requiring all of the earlier ones to be applied
first. Getting an Ack is also fine so we can put the patches into arm-soc.
Arnd
Arnd Bergmann (30):
ARM: exynos: introduce EXYNOS_ATAGS symbol
ARM: exynos: prepare for sparse IRQ
ARM: exynos: move debug-macro.S to include/debug/
ARM: samsung: move mfc device definition to s5p-dev-mfc.c
tty: serial/samsung: prepare for common clock API
tty: serial/samsung: make register definitions global
tty: serial/samsung: fix modular build
i2c: s3c2410: make header file local
mmc: sdhci-s3c: remove platform dependencies
usb: exynos: do not include plat/usb-phy.h
[media] exynos: remove unnecessary header inclusions
video/exynos: remove unnecessary header inclusions
video/s3c: move platform_data out of arch/arm
thermal/exynos: remove unnecessary header inclusions
mtd: onenand/samsung: make regs-onenand.h file local
rtc: s3c: make header file local
pwm: samsung: repair the worst MMIO abuses
ASoC: samsung: move plat/ headers to local directory
ASoC: samsung: use irq resource for idma
ASoC: samsung: convert to dmaengine API
ASoC: samsung/i2s: fix module_device_table
ASoC: samsung/idma: export idma_reg_addr_init
clk: exynos: prepare for multiplatform
clocksource: exynos_mct: remove platform header dependency
irqchip: exynos: pass max combiner number to combiner_init
irqchip: exynos: allocate combiner_data dynamically
irqchip: exynos: localize irq lookup for ATAGS
irqchip: exynos: pass irq_base from platform
spi: s3c64xx: move to generic dmaengine API
ARM: exynos: enable multiplatform support
arch/arm/Kconfig | 10 +-
arch/arm/Kconfig.debug | 8 +
arch/arm/configs/exynos4_defconfig | 2 +-
.../mach/debug-macro.S => include/debug/exynos.S} | 12 +-
.../plat/debug-macro.S => include/debug/samsung.S} | 2 +-
arch/arm/mach-exynos/Kconfig | 40 ++-
arch/arm/mach-exynos/Makefile | 5 +-
arch/arm/mach-exynos/common.c | 26 +-
arch/arm/mach-exynos/common.h | 7 +-
arch/arm/mach-exynos/dev-uart.c | 1 +
arch/arm/mach-exynos/include/mach/irqs.h | 5 +-
arch/arm/mach-exynos/mach-armlex4210.c | 2 +
arch/arm/mach-exynos/mach-exynos4-dt.c | 3 +
arch/arm/mach-exynos/mach-exynos5-dt.c | 2 +
arch/arm/mach-exynos/mach-nuri.c | 2 +
arch/arm/mach-exynos/mach-origen.c | 2 +
arch/arm/mach-exynos/mach-smdk4x12.c | 2 +
arch/arm/mach-exynos/mach-smdkv310.c | 3 +
arch/arm/mach-exynos/setup-sdhci-gpio.c | 2 +-
arch/arm/mach-exynos/setup-usb-phy.c | 8 +-
arch/arm/mach-s3c24xx/clock-s3c2440.c | 5 +
arch/arm/mach-s3c24xx/common.c | 5 +
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 -
arch/arm/mach-s3c24xx/include/mach/debug-macro.S | 2 +-
arch/arm/mach-s3c24xx/mach-rx1950.c | 1 -
arch/arm/mach-s3c64xx/include/mach/debug-macro.S | 2 +-
arch/arm/mach-s3c64xx/setup-usb-phy.c | 4 +-
arch/arm/mach-s5p64x0/include/mach/debug-macro.S | 2 +-
arch/arm/mach-s5pc100/include/mach/debug-macro.S | 2 +-
arch/arm/mach-s5pc100/setup-sdhci-gpio.c | 1 -
arch/arm/mach-s5pv210/include/mach/debug-macro.S | 2 +-
arch/arm/mach-s5pv210/setup-sdhci-gpio.c | 1 -
arch/arm/mach-s5pv210/setup-usb-phy.c | 4 +-
arch/arm/plat-samsung/Kconfig | 7 +-
arch/arm/plat-samsung/Makefile | 8 +-
arch/arm/plat-samsung/devs.c | 62 ++---
arch/arm/plat-samsung/include/plat/fb.h | 50 +---
arch/arm/plat-samsung/include/plat/pm.h | 5 +
arch/arm/plat-samsung/include/plat/regs-serial.h | 282 +--------------------
arch/arm/plat-samsung/include/plat/sdhci.h | 56 +---
arch/arm/plat-samsung/include/plat/usb-phy.h | 5 +-
arch/arm/plat-samsung/irq-vic-timer.c | 1 +
arch/arm/plat-samsung/pm.c | 1 +
arch/arm/plat-samsung/s5p-dev-mfc.c | 42 ++-
arch/arm/plat-samsung/s5p-irq.c | 1 +
drivers/clk/samsung/clk-exynos4.c | 93 +++----
drivers/clk/samsung/clk-exynos5250.c | 1 -
drivers/clk/samsung/clk-exynos5440.c | 1 -
drivers/clk/samsung/clk.h | 2 -
drivers/clocksource/exynos_mct.c | 21 +-
drivers/gpio/Makefile | 2 +-
drivers/i2c/busses/i2c-s3c2410.c | 3 +-
.../regs-iic.h => drivers/i2c/busses/i2c-s3c2410.h | 0
drivers/irqchip/exynos-combiner.c | 116 +++++----
drivers/media/platform/exynos-gsc/gsc-regs.c | 1 -
drivers/media/platform/s5p-tv/sii9234_drv.c | 3 -
drivers/mmc/host/Kconfig | 2 +-
.../mmc/host/sdhci-s3c-regs.h | 0
drivers/mmc/host/sdhci-s3c.c | 5 +-
drivers/mtd/onenand/samsung.c | 4 +-
.../mtd/onenand/samsung.h | 2 -
drivers/pwm/pwm-samsung.c | 60 +++--
drivers/rtc/rtc-s3c.c | 3 +-
.../plat/regs-rtc.h => drivers/rtc/rtc-s3c.h | 3 +-
drivers/spi/spi-s3c64xx.c | 185 ++++++++++----
drivers/thermal/exynos_thermal.c | 2 -
drivers/tty/serial/samsung.c | 17 +-
drivers/tty/serial/samsung.h | 4 +-
drivers/usb/host/ehci-s5p.c | 1 -
drivers/usb/host/ohci-exynos.c | 1 -
drivers/video/exynos/exynos_mipi_dsi.c | 2 -
drivers/video/exynos/exynos_mipi_dsi_common.c | 2 -
drivers/video/exynos/exynos_mipi_dsi_lowlevel.c | 2 -
drivers/video/s3c-fb.c | 3 +-
include/linux/platform_data/mmc-sdhci-s3c.h | 56 ++++
include/linux/platform_data/spi-s3c64xx.h | 3 +
include/linux/platform_data/video_s3c.h | 54 ++++
include/linux/serial_s3c.h | 260 +++++++++++++++++++
sound/soc/samsung/ac97.c | 2 +-
sound/soc/samsung/dma.c | 219 ++++++++++++++++
sound/soc/samsung/dma.h | 15 +-
sound/soc/samsung/h1940_uda1380.c | 2 +-
sound/soc/samsung/i2s.c | 4 +-
sound/soc/samsung/idma.c | 11 +-
sound/soc/samsung/neo1973_wm8753.c | 2 +-
sound/soc/samsung/pcm.c | 1 -
.../include/plat => sound/soc/samsung}/regs-ac97.h | 0
.../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 +-
sound/soc/samsung/spdif.c | 1 -
95 files changed, 1146 insertions(+), 734 deletions(-)
rename arch/arm/{mach-exynos/include/mach/debug-macro.S => include/debug/exynos.S} (84%)
rename arch/arm/{plat-samsung/include/plat/debug-macro.S => include/debug/samsung.S} (98%)
rename arch/arm/plat-samsung/include/plat/regs-iic.h => drivers/i2c/busses/i2c-s3c2410.h (100%)
rename arch/arm/plat-samsung/include/plat/regs-sdhci.h => drivers/mmc/host/sdhci-s3c-regs.h (100%)
rename arch/arm/plat-samsung/include/plat/regs-onenand.h => drivers/mtd/onenand/samsung.h (98%)
rename arch/arm/plat-samsung/include/plat/regs-rtc.h => drivers/rtc/rtc-s3c.h (97%)
create mode 100644 include/linux/platform_data/mmc-sdhci-s3c.h
create mode 100644 include/linux/platform_data/video_s3c.h
create mode 100644 include/linux/serial_s3c.h
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%)
--
1.8.1.2
Cc: stern@rowland.harvard.edu
Cc: a.zummo@towertech.it
Cc: ben-linux@fluff.org
Cc: cjb@laptop.org
Cc: dwmw2@infradead.org
Cc: grant.likely@secretlab.ca
Cc: gregkh@linuxfoundation.org
Cc: jg1.han@samsung.com
Cc: john.stultz@linaro.org
Cc: broonie@opensource.wolfsonmicro.com
Cc: mchehab@redhat.com
Cc: mturquette@linaro.org
Cc: padma.kvr@gmail.com
Cc: thierry.reding@avionic-design.de
Cc: tglx@linutronix.de
Cc: t.figa@samsung.com
Cc: wsa@the-dreams.de
Cc: rui.zhang@intel.com
Cc: alsa-devel@alsa-project.org
Cc: linux-fbdev@vger.kernel.org
Cc: linux-i2c@vger.kernel.org
Cc: linux-media@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Cc: linux-mtd@lists.infradead.org
Cc: linux-pm@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: rtc-linux@googlegroups.com
Cc: spi-devel-general@lists.sourceforge.net
.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory
2013-04-11 0:04 [PATCH 00/30] ARM: exynos multiplatform support Arnd Bergmann
@ 2013-04-11 0:05 ` Arnd Bergmann
2013-04-11 16:47 ` Mark Brown
2013-04-11 0:05 ` [PATCH 19/30] ASoC: samsung: use irq resource for idma Arnd Bergmann
` (3 subsequent siblings)
4 siblings, 1 reply; 21+ messages in thread
From: Arnd Bergmann @ 2013-04-11 0:05 UTC (permalink / raw)
To: linux-arm-kernel
Cc: alsa-devel, linux-samsung-soc, Arnd Bergmann, Mark Brown,
linux-kernel, Liam Girdwood, Kukjin Kim
The plat/iis.h and plat/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 <arnd@arndb.de>
Cc: alsa-devel@alsa-project.org
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
---
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 +-
{arch/arm/plat-samsung/include/plat => sound/soc/samsung}/regs-ac97.h | 0
{arch/arm/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 a6c94b8..30aa53f 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2410.c
@@ -25,10 +25,8 @@
#include <plat/regs-serial.h>
#include <mach/regs-gpio.h>
-#include <plat/regs-ac97.h>
#include <plat/regs-dma.h>
#include <mach/regs-lcd.h>
-#include <plat/regs-iis.h>
#include <plat/regs-spi.h>
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 c0e8c3f..ab1700e 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2412.c
@@ -25,10 +25,8 @@
#include <plat/regs-serial.h>
#include <mach/regs-gpio.h>
-#include <plat/regs-ac97.h>
#include <plat/regs-dma.h>
#include <mach/regs-lcd.h>
-#include <plat/regs-iis.h>
#include <plat/regs-spi.h>
#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 1c08eccd..cd25de2 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2440.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2440.c
@@ -25,10 +25,8 @@
#include <plat/regs-serial.h>
#include <mach/regs-gpio.h>
-#include <plat/regs-ac97.h>
#include <plat/regs-dma.h>
#include <mach/regs-lcd.h>
-#include <plat/regs-iis.h>
#include <plat/regs-spi.h>
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 000e4c6..5fe3539 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2443.c
@@ -25,10 +25,8 @@
#include <plat/regs-serial.h>
#include <mach/regs-gpio.h>
-#include <plat/regs-ac97.h>
#include <plat/regs-dma.h>
#include <mach/regs-lcd.h>
-#include <plat/regs-iis.h>
#include <plat/regs-spi.h>
#define MAP(x) { \
diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c
index 0df3c56..c76abdf 100644
--- a/sound/soc/samsung/ac97.c
+++ b/sound/soc/samsung/ac97.c
@@ -20,7 +20,7 @@
#include <sound/soc.h>
#include <mach/dma.h>
-#include <plat/regs-ac97.h>
+#include "regs-ac97.h"
#include <linux/platform_data/asoc-s3c.h>
#include "dma.h"
diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c
index 15a3817..fa91376 100644
--- a/sound/soc/samsung/h1940_uda1380.c
+++ b/sound/soc/samsung/h1940_uda1380.c
@@ -20,7 +20,7 @@
#include <sound/soc.h>
#include <sound/jack.h>
-#include <plat/regs-iis.h>
+#include "regs-iis.h"
#include <asm/mach-types.h>
#include "s3c24xx-i2s.h"
diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c
index a301d8c..ccc601d 100644
--- a/sound/soc/samsung/neo1973_wm8753.c
+++ b/sound/soc/samsung/neo1973_wm8753.c
@@ -21,7 +21,7 @@
#include <sound/soc.h>
#include <asm/mach-types.h>
-#include <plat/regs-iis.h>
+#include "regs-iis.h"
#include <mach/gta02.h>
#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 a5826ea..704460a 100644
--- a/sound/soc/samsung/rx1950_uda1380.c
+++ b/sound/soc/samsung/rx1950_uda1380.c
@@ -24,7 +24,7 @@
#include <sound/soc.h>
#include <sound/jack.h>
-#include <plat/regs-iis.h>
+#include "regs-iis.h"
#include <asm/mach-types.h>
#include "s3c24xx-i2s.h"
diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c
index 13f6dd1..a7b17c1 100644
--- a/sound/soc/samsung/s3c24xx-i2s.c
+++ b/sound/soc/samsung/s3c24xx-i2s.c
@@ -24,7 +24,7 @@
#include <sound/pcm_params.h>
#include <mach/dma.h>
-#include <plat/regs-iis.h>
+#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 333e1b7..1b7b52b 100644
--- a/sound/soc/samsung/s3c24xx_uda134x.c
+++ b/sound/soc/samsung/s3c24xx_uda134x.c
@@ -18,7 +18,7 @@
#include <sound/soc.h>
#include <sound/s3c24xx_uda134x.h>
-#include <plat/regs-iis.h>
+#include "regs-iis.h"
#include "s3c24xx-i2s.h"
--
1.8.1.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 19/30] ASoC: samsung: use irq resource for idma
2013-04-11 0:04 [PATCH 00/30] ARM: exynos multiplatform support Arnd Bergmann
2013-04-11 0:05 ` [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory Arnd Bergmann
@ 2013-04-11 0:05 ` Arnd Bergmann
2013-04-11 16:48 ` Mark Brown
2013-04-11 0:05 ` [PATCH 20/30] ASoC: samsung: convert to dmaengine API Arnd Bergmann
` (2 subsequent siblings)
4 siblings, 1 reply; 21+ messages in thread
From: Arnd Bergmann @ 2013-04-11 0:05 UTC (permalink / raw)
To: linux-arm-kernel
Cc: linux-kernel, Kukjin Kim, linux-samsung-soc, Arnd Bergmann,
alsa-devel, Mark Brown, Liam Girdwood
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 <arnd@arndb.de>
Cc: alsa-devel@alsa-project.org
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
---
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 78be9c0..b441908 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -145,14 +145,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 a07950b..f36a541 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);
}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 20/30] ASoC: samsung: convert to dmaengine API
2013-04-11 0:04 [PATCH 00/30] ARM: exynos multiplatform support Arnd Bergmann
2013-04-11 0:05 ` [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory Arnd Bergmann
2013-04-11 0:05 ` [PATCH 19/30] ASoC: samsung: use irq resource for idma Arnd Bergmann
@ 2013-04-11 0:05 ` Arnd Bergmann
2013-04-11 14:27 ` Mark Brown
2013-04-11 0:05 ` [PATCH 21/30] ASoC: samsung/i2s: fix module_device_table Arnd Bergmann
2013-04-11 0:05 ` [PATCH 22/30] ASoC: samsung/idma: export idma_reg_addr_init Arnd Bergmann
4 siblings, 1 reply; 21+ messages in thread
From: Arnd Bergmann @ 2013-04-11 0:05 UTC (permalink / raw)
To: linux-arm-kernel
Cc: alsa-devel, linux-samsung-soc, Arnd Bergmann, Mark Brown,
linux-kernel, Liam Girdwood, Kukjin Kim
In order to build the exynos kernel with CONFIG_ARCH_MULTIPLATFORM,
we must convert all users of the Samsung private DMA interface to
the generic dmaengine API. This version of the patch adds the
generic dmaengine API as an alternative to the existing samsung
specific one. Once all the older platforms provide support for
the common dmaengine interfaces, we can remove the old code.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: alsa-devel@alsa-project.org
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
---
sound/soc/samsung/dma.c | 219 ++++++++++++++++++++++++++++++++++++++++++++++
sound/soc/samsung/dma.h | 15 +++-
sound/soc/samsung/i2s.c | 2 -
sound/soc/samsung/pcm.c | 1 -
sound/soc/samsung/spdif.c | 1 -
5 files changed, 232 insertions(+), 6 deletions(-)
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c
index 21b7926..9fd53df 100644
--- a/sound/soc/samsung/dma.c
+++ b/sound/soc/samsung/dma.c
@@ -22,8 +22,14 @@
#include <sound/pcm_params.h>
#include <asm/dma.h>
+
+#ifdef CONFIG_SAMSUNG_DMADEV
#include <mach/hardware.h>
#include <mach/dma.h>
+#else
+#include <linux/dmaengine.h>
+#include <linux/amba/pl330.h>
+#endif
#include "dma.h"
@@ -62,11 +68,13 @@ struct runtime_data {
static void audio_buffdone(void *data);
+#ifdef CONFIG_SAMSUNG_DMADEV
/* dma_enqueue
*
* place a dma buffer onto the queue for the dma system
* to handle.
*/
+
static void dma_enqueue(struct snd_pcm_substream *substream)
{
struct runtime_data *prtd = substream->runtime->private_data;
@@ -265,6 +273,217 @@ static int dma_trigger(struct snd_pcm_substream *substream, int cmd)
return ret;
}
+#else
+/* dma_enqueue
+ *
+ * place a dma buffer onto the queue for the dma system
+ * to handle.
+ */
+
+static void dma_enqueue(struct snd_pcm_substream *substream)
+{
+ struct runtime_data *prtd = substream->runtime->private_data;
+ dma_addr_t pos = prtd->dma_pos;
+ unsigned long period = prtd->dma_period;
+ unsigned int limit;
+ enum dma_transfer_direction direction;
+ struct dma_chan *chan = prtd->params->ch;
+ struct dma_async_tx_descriptor *desc;
+
+ pr_debug("Entered %s\n", __func__);
+
+ limit = (prtd->dma_end - prtd->dma_start) / prtd->dma_period;
+
+ pr_debug("%s: loaded %d, limit %d\n",
+ __func__, prtd->dma_loaded, limit);
+
+ direction = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK
+ ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM);
+
+ while (prtd->dma_loaded < limit) {
+ pr_debug("dma_loaded: %d\n", prtd->dma_loaded);
+
+ if ((pos + period) > prtd->dma_end) {
+ period = prtd->dma_end - pos;
+ pr_debug("%s: corrected dma len %ld\n",
+ __func__, period);
+ }
+
+ desc = dmaengine_prep_dma_cyclic(chan, pos,
+ prtd->dma_period*limit, period, direction,
+ DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
+
+ if (desc) {
+ desc->callback = audio_buffdone;
+ desc->callback_param = substream;
+ dmaengine_submit(desc);
+ }
+
+ prtd->dma_loaded++;
+ pos += period;
+ if (pos >= prtd->dma_end)
+ pos = prtd->dma_start;
+ }
+
+ prtd->dma_pos = pos;
+}
+
+static void audio_buffdone(void *data)
+{
+ struct snd_pcm_substream *substream = data;
+ struct runtime_data *prtd = substream->runtime->private_data;
+
+ pr_debug("Entered %s\n", __func__);
+
+ if (prtd->state & ST_RUNNING) {
+ prtd->dma_pos += prtd->dma_period;
+ if (prtd->dma_pos >= prtd->dma_end)
+ prtd->dma_pos = prtd->dma_start;
+
+ if (substream)
+ snd_pcm_period_elapsed(substream);
+ }
+}
+
+static int dma_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params)
+{
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct runtime_data *prtd = runtime->private_data;
+ struct snd_soc_pcm_runtime *rtd = substream->private_data;
+ unsigned long totbytes = params_buffer_bytes(params);
+ struct s3c_dma_params *dma =
+ snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
+
+ pr_debug("Entered %s\n", __func__);
+
+ /* return if this is a bufferless transfer e.g.
+ * codec <--> BT codec or GSM modem -- lg FIXME */
+ if (!dma)
+ return 0;
+
+ /* this may get called several times by oss emulation
+ * with different params -HW */
+ if (prtd->params == NULL) {
+ struct dma_slave_config config;
+ dma_cap_mask_t mask;
+
+ /* prepare DMA */
+ prtd->params = dma;
+
+ pr_debug("params %p, channel %d\n", prtd->params,
+ prtd->params->channel);
+
+ dma_cap_zero(mask);
+ dma_cap_set(DMA_CYCLIC, mask);
+
+ prtd->params->ch = dma_request_slave_channel_compat(mask,
+ pl330_filter, (void *)prtd->params->channel,
+ rtd->cpu_dai->dev, prtd->params->ch_name);
+
+ memset(&config, 0, sizeof(struct dma_slave_config));
+
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ config.direction = DMA_MEM_TO_DEV;
+ config.dst_addr = prtd->params->dma_addr;
+ config.dst_addr_width = prtd->params->dma_size;
+ config.dst_maxburst = 1;
+ dmaengine_slave_config(prtd->params->ch, &config);
+ } else {
+ config.direction = DMA_DEV_TO_MEM;
+ config.src_addr = prtd->params->dma_addr;
+ config.src_addr_width = prtd->params->dma_size;
+ config.src_maxburst = 1;
+ dmaengine_slave_config(prtd->params->ch, &config);
+ }
+ }
+
+ snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer);
+
+ runtime->dma_bytes = totbytes;
+
+ spin_lock_irq(&prtd->lock);
+ prtd->dma_loaded = 0;
+ prtd->dma_period = params_period_bytes(params);
+ prtd->dma_start = runtime->dma_addr;
+ prtd->dma_pos = prtd->dma_start;
+ prtd->dma_end = prtd->dma_start + totbytes;
+ spin_unlock_irq(&prtd->lock);
+
+ return 0;
+}
+
+static int dma_hw_free(struct snd_pcm_substream *substream)
+{
+ struct runtime_data *prtd = substream->runtime->private_data;
+
+ pr_debug("Entered %s\n", __func__);
+
+ snd_pcm_set_runtime_buffer(substream, NULL);
+
+ if (prtd->params) {
+ dmaengine_terminate_all(prtd->params->ch);
+ dma_release_channel(prtd->params->ch);
+ prtd->params = NULL;
+ }
+
+ return 0;
+}
+
+static int dma_prepare(struct snd_pcm_substream *substream)
+{
+ struct runtime_data *prtd = substream->runtime->private_data;
+ int ret = 0;
+
+ pr_debug("Entered %s\n", __func__);
+
+ /* return if this is a bufferless transfer e.g.
+ * codec <--> BT codec or GSM modem -- lg FIXME */
+ if (!prtd->params)
+ return 0;
+
+ /* flush the DMA channel */
+ dmaengine_terminate_all(prtd->params->ch);
+
+ prtd->dma_loaded = 0;
+ prtd->dma_pos = prtd->dma_start;
+
+ /* enqueue dma buffers */
+ dma_enqueue(substream);
+
+ return ret;
+}
+
+static int dma_trigger(struct snd_pcm_substream *substream, int cmd)
+{
+ struct runtime_data *prtd = substream->runtime->private_data;
+ int ret = 0;
+
+ pr_debug("Entered %s\n", __func__);
+
+ spin_lock(&prtd->lock);
+
+ switch (cmd) {
+ case SNDRV_PCM_TRIGGER_START:
+ prtd->state |= ST_RUNNING;
+ dma_async_issue_pending(prtd->params->ch);
+ break;
+
+ case SNDRV_PCM_TRIGGER_STOP:
+ prtd->state &= ~ST_RUNNING;
+ dmaengine_terminate_all(prtd->params->ch);
+ break;
+
+ default:
+ ret = -EINVAL;
+ break;
+ }
+
+ spin_unlock(&prtd->lock);
+
+ return ret;
+}
+#endif
static snd_pcm_uframes_t
dma_pointer(struct snd_pcm_substream *substream)
diff --git a/sound/soc/samsung/dma.h b/sound/soc/samsung/dma.h
index 189a7a6..6bd1857 100644
--- a/sound/soc/samsung/dma.h
+++ b/sound/soc/samsung/dma.h
@@ -12,13 +12,24 @@
#ifndef _S3C_AUDIO_H
#define _S3C_AUDIO_H
+#ifdef CONFIG_SAMSUNG_DMADEV
+#include <mach/dma.h>
+#endif
+
struct s3c_dma_params {
+#ifdef CONFIG_SAMSUNG_DMADEV
struct s3c2410_dma_client *client; /* stream identifier */
+ unsigned ch;
+ struct samsung_dma_ops *ops;
+#else
+ struct s3c2410_dma_client {
+ char *name; /* unused */
+ } *client;
+ struct dma_chan *ch;
+#endif
int channel; /* Channel ID */
dma_addr_t dma_addr;
int dma_size; /* Size of the DMA transfer */
- unsigned ch;
- struct samsung_dma_ops *ops;
char *ch_name;
};
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index d7231e3..61f2622 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -22,8 +22,6 @@
#include <sound/soc.h>
#include <sound/pcm_params.h>
-#include <mach/dma.h>
-
#include <linux/platform_data/asoc-s3c.h>
#include "dma.h"
diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c
index 13bab79..b5f267c 100644
--- a/sound/soc/samsung/pcm.c
+++ b/sound/soc/samsung/pcm.c
@@ -20,7 +20,6 @@
#include <sound/pcm_params.h>
#include <linux/platform_data/asoc-s3c.h>
-#include <mach/dma.h>
#include "dma.h"
#include "pcm.h"
diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c
index 5008e5b..ee792aa 100644
--- a/sound/soc/samsung/spdif.c
+++ b/sound/soc/samsung/spdif.c
@@ -18,7 +18,6 @@
#include <sound/pcm_params.h>
#include <linux/platform_data/asoc-s3c.h>
-#include <mach/dma.h>
#include "dma.h"
#include "spdif.h"
--
1.8.1.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 21/30] ASoC: samsung/i2s: fix module_device_table
2013-04-11 0:04 [PATCH 00/30] ARM: exynos multiplatform support Arnd Bergmann
` (2 preceding siblings ...)
2013-04-11 0:05 ` [PATCH 20/30] ASoC: samsung: convert to dmaengine API Arnd Bergmann
@ 2013-04-11 0:05 ` Arnd Bergmann
2013-04-11 16:48 ` Mark Brown
2013-04-11 0:05 ` [PATCH 22/30] ASoC: samsung/idma: export idma_reg_addr_init Arnd Bergmann
4 siblings, 1 reply; 21+ messages in thread
From: Arnd Bergmann @ 2013-04-11 0:05 UTC (permalink / raw)
To: linux-arm-kernel
Cc: linux-kernel, Kukjin Kim, linux-samsung-soc, Arnd Bergmann,
alsa-devel, Mark Brown, Liam Girdwood
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 <arnd@arndb.de>
Cc: alsa-devel@alsa-project.org
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
---
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 61f2622..f7c6816 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -1289,7 +1289,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[] = {
--
1.8.1.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 22/30] ASoC: samsung/idma: export idma_reg_addr_init
2013-04-11 0:04 [PATCH 00/30] ARM: exynos multiplatform support Arnd Bergmann
` (3 preceding siblings ...)
2013-04-11 0:05 ` [PATCH 21/30] ASoC: samsung/i2s: fix module_device_table Arnd Bergmann
@ 2013-04-11 0:05 ` Arnd Bergmann
2013-04-11 16:48 ` Mark Brown
4 siblings, 1 reply; 21+ messages in thread
From: Arnd Bergmann @ 2013-04-11 0:05 UTC (permalink / raw)
To: linux-arm-kernel
Cc: alsa-devel, linux-samsung-soc, Arnd Bergmann, Mark Brown,
linux-kernel, Liam Girdwood, Kukjin Kim
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 <arnd@arndb.de>
Cc: alsa-devel@alsa-project.org
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
---
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 f36a541..6e5fed3 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,
--
1.8.1.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH 20/30] ASoC: samsung: convert to dmaengine API
2013-04-11 0:05 ` [PATCH 20/30] ASoC: samsung: convert to dmaengine API Arnd Bergmann
@ 2013-04-11 14:27 ` Mark Brown
2013-04-11 14:47 ` Arnd Bergmann
0 siblings, 1 reply; 21+ messages in thread
From: Mark Brown @ 2013-04-11 14:27 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel, linux-kernel, Kukjin Kim, linux-samsung-soc,
alsa-devel, Liam Girdwood
On Thu, Apr 11, 2013 at 02:05:02AM +0200, Arnd Bergmann wrote:
> In order to build the exynos kernel with CONFIG_ARCH_MULTIPLATFORM,
> we must convert all users of the Samsung private DMA interface to
> the generic dmaengine API. This version of the patch adds the
> generic dmaengine API as an alternative to the existing samsung
> specific one. Once all the older platforms provide support for
> the common dmaengine interfaces, we can remove the old code.
There's generic ASoC dmaengine code which should be used instead of open
coding this. Lars-Peter Clausen and Lee Jones have been working on
making this a totally generic driver, right now it's a library.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 20/30] ASoC: samsung: convert to dmaengine API
2013-04-11 14:27 ` Mark Brown
@ 2013-04-11 14:47 ` Arnd Bergmann
2013-04-11 15:42 ` Mark Brown
2013-04-12 19:27 ` [alsa-devel] " Lars-Peter Clausen
0 siblings, 2 replies; 21+ messages in thread
From: Arnd Bergmann @ 2013-04-11 14:47 UTC (permalink / raw)
To: Mark Brown
Cc: linux-arm-kernel, linux-kernel, Kukjin Kim, linux-samsung-soc,
alsa-devel, Liam Girdwood
On Thursday 11 April 2013, Mark Brown wrote:
>
> On Thu, Apr 11, 2013 at 02:05:02AM +0200, Arnd Bergmann wrote:
> > In order to build the exynos kernel with CONFIG_ARCH_MULTIPLATFORM,
> > we must convert all users of the Samsung private DMA interface to
> > the generic dmaengine API. This version of the patch adds the
> > generic dmaengine API as an alternative to the existing samsung
> > specific one. Once all the older platforms provide support for
> > the common dmaengine interfaces, we can remove the old code.
>
> There's generic ASoC dmaengine code which should be used instead of open
> coding this. Lars-Peter Clausen and Lee Jones have been working on
> making this a totally generic driver, right now it's a library.
Ok, I see. I'll drop this patch from my series then and will let someone
else handle this driver in 3.11. We can probably live without sound support
in 3.10 when running a multiplatform kernel, and it will keep working
for exynos-only kernels without the patch.
Can you have a look at the other three ASoC patches in the series? I think
it would still be useful to merge them.
Arnd
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 20/30] ASoC: samsung: convert to dmaengine API
2013-04-11 14:47 ` Arnd Bergmann
@ 2013-04-11 15:42 ` Mark Brown
2013-04-12 19:27 ` [alsa-devel] " Lars-Peter Clausen
1 sibling, 0 replies; 21+ messages in thread
From: Mark Brown @ 2013-04-11 15:42 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel, linux-kernel, Kukjin Kim, linux-samsung-soc,
alsa-devel, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 275 bytes --]
On Thu, Apr 11, 2013 at 04:47:17PM +0200, Arnd Bergmann wrote:
> Can you have a look at the other three ASoC patches in the series? I think
> it would still be useful to merge them.
Yeah, they looked fine - just waiting for me to do a patch run. Should
get to it shortly.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory
2013-04-11 0:05 ` [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory Arnd Bergmann
@ 2013-04-11 16:47 ` Mark Brown
2013-04-11 17:08 ` Arnd Bergmann
0 siblings, 1 reply; 21+ messages in thread
From: Mark Brown @ 2013-04-11 16:47 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel, linux-kernel, Kukjin Kim, linux-samsung-soc,
alsa-devel, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 392 bytes --]
On Thu, Apr 11, 2013 at 02:05:00AM +0200, Arnd Bergmann wrote:
> The plat/iis.h and plat/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.
This doesn't apply to my topic/samsung branch, can you please regenerate
it against that or let me know what to apply it against?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 19/30] ASoC: samsung: use irq resource for idma
2013-04-11 0:05 ` [PATCH 19/30] ASoC: samsung: use irq resource for idma Arnd Bergmann
@ 2013-04-11 16:48 ` Mark Brown
0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2013-04-11 16:48 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel, linux-kernel, Kukjin Kim, linux-samsung-soc,
alsa-devel, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 252 bytes --]
On Thu, Apr 11, 2013 at 02:05:01AM +0200, Arnd Bergmann wrote:
> 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.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 21/30] ASoC: samsung/i2s: fix module_device_table
2013-04-11 0:05 ` [PATCH 21/30] ASoC: samsung/i2s: fix module_device_table Arnd Bergmann
@ 2013-04-11 16:48 ` Mark Brown
0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2013-04-11 16:48 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel, linux-kernel, Kukjin Kim, linux-samsung-soc,
alsa-devel, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 300 bytes --]
On Thu, Apr 11, 2013 at 02:05:03AM +0200, Arnd Bergmann wrote:
> 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.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 22/30] ASoC: samsung/idma: export idma_reg_addr_init
2013-04-11 0:05 ` [PATCH 22/30] ASoC: samsung/idma: export idma_reg_addr_init Arnd Bergmann
@ 2013-04-11 16:48 ` Mark Brown
0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2013-04-11 16:48 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel, linux-kernel, Kukjin Kim, linux-samsung-soc,
alsa-devel, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 220 bytes --]
On Thu, Apr 11, 2013 at 02:05:04AM +0200, Arnd Bergmann wrote:
> 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.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory
2013-04-11 16:47 ` Mark Brown
@ 2013-04-11 17:08 ` Arnd Bergmann
2013-04-11 17:19 ` Mark Brown
0 siblings, 1 reply; 21+ messages in thread
From: Arnd Bergmann @ 2013-04-11 17:08 UTC (permalink / raw)
To: Mark Brown
Cc: linux-arm-kernel, linux-kernel, Kukjin Kim, linux-samsung-soc,
alsa-devel, Liam Girdwood
On Thursday 11 April 2013, Mark Brown wrote:
> On Thu, Apr 11, 2013 at 02:05:00AM +0200, Arnd Bergmann wrote:
> > The plat/iis.h and plat/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.
>
> This doesn't apply to my topic/samsung branch, can you please regenerate
> it against that or let me know what to apply it against?
>
This one should work. Unfortunately I now found during testing that the
s3c24xx sound support has a few build errors at the moment, but this
patch should not add any new ones:
/git/arm-soc/sound/soc/samsung/idma.c: In function 'idma_close':
/git/arm-soc/sound/soc/samsung/idma.c:327:11: error: 'IRQ_I2S0' undeclared (first use in this function)
free_irq(IRQ_I2S0, prtd);
^
make[5]: *** [sound/soc/samsung/idma.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: *** [sound/soc/samsung/i2s.o] Error 1
/git/arm-soc/sound/soc/samsung/neo1973_wm8753.c:25:24: fatal error: mach/gta02.h: No such file or directory
#include <mach/gta02.h>
^
Arnd
8<----
>From 91cb290e665b10d094729a42f9e676e2de154996 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Sat, 16 Mar 2013 09:10:15 +0100
Subject: [PATCH] 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 <arnd@arndb.de>
Cc: alsa-devel@alsa-project.org
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2410.c b/arch/arm/mach-s3c24xx/dma-s3c2410.c
index 25d085a..a4a13c9 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2410.c
@@ -25,11 +25,9 @@
#include <plat/regs-serial.h>
#include <mach/regs-gpio.h>
-#include <plat/regs-ac97.h>
#include <plat/regs-dma.h>
#include <mach/regs-lcd.h>
#include <mach/regs-sdi.h>
-#include <plat/regs-iis.h>
#include <plat/regs-spi.h>
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 d2408ba..6eaa7a4 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2412.c
@@ -25,11 +25,9 @@
#include <plat/regs-serial.h>
#include <mach/regs-gpio.h>
-#include <plat/regs-ac97.h>
#include <plat/regs-dma.h>
#include <mach/regs-lcd.h>
#include <mach/regs-sdi.h>
-#include <plat/regs-iis.h>
#include <plat/regs-spi.h>
#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 0b86e74..477d450 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2440.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2440.c
@@ -25,11 +25,9 @@
#include <plat/regs-serial.h>
#include <mach/regs-gpio.h>
-#include <plat/regs-ac97.h>
#include <plat/regs-dma.h>
#include <mach/regs-lcd.h>
#include <mach/regs-sdi.h>
-#include <plat/regs-iis.h>
#include <plat/regs-spi.h>
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 0553625..80a8d56 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2443.c
@@ -25,11 +25,9 @@
#include <plat/regs-serial.h>
#include <mach/regs-gpio.h>
-#include <plat/regs-ac97.h>
#include <plat/regs-dma.h>
#include <mach/regs-lcd.h>
#include <mach/regs-sdi.h>
-#include <plat/regs-iis.h>
#include <plat/regs-spi.h>
#define MAP(x) { \
diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c
index 0df3c56..c76abdf 100644
--- a/sound/soc/samsung/ac97.c
+++ b/sound/soc/samsung/ac97.c
@@ -20,7 +20,7 @@
#include <sound/soc.h>
#include <mach/dma.h>
-#include <plat/regs-ac97.h>
+#include "regs-ac97.h"
#include <linux/platform_data/asoc-s3c.h>
#include "dma.h"
diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c
index 15a3817..fa91376 100644
--- a/sound/soc/samsung/h1940_uda1380.c
+++ b/sound/soc/samsung/h1940_uda1380.c
@@ -20,7 +20,7 @@
#include <sound/soc.h>
#include <sound/jack.h>
-#include <plat/regs-iis.h>
+#include "regs-iis.h"
#include <asm/mach-types.h>
#include "s3c24xx-i2s.h"
diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c
index a301d8c..ccc601d 100644
--- a/sound/soc/samsung/neo1973_wm8753.c
+++ b/sound/soc/samsung/neo1973_wm8753.c
@@ -21,7 +21,7 @@
#include <sound/soc.h>
#include <asm/mach-types.h>
-#include <plat/regs-iis.h>
+#include "regs-iis.h"
#include <mach/gta02.h>
#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 a5826ea..704460a 100644
--- a/sound/soc/samsung/rx1950_uda1380.c
+++ b/sound/soc/samsung/rx1950_uda1380.c
@@ -24,7 +24,7 @@
#include <sound/soc.h>
#include <sound/jack.h>
-#include <plat/regs-iis.h>
+#include "regs-iis.h"
#include <asm/mach-types.h>
#include "s3c24xx-i2s.h"
diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c
index 13f6dd1..a7b17c1 100644
--- a/sound/soc/samsung/s3c24xx-i2s.c
+++ b/sound/soc/samsung/s3c24xx-i2s.c
@@ -24,7 +24,7 @@
#include <sound/pcm_params.h>
#include <mach/dma.h>
-#include <plat/regs-iis.h>
+#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 333e1b7..1b7b52b 100644
--- a/sound/soc/samsung/s3c24xx_uda134x.c
+++ b/sound/soc/samsung/s3c24xx_uda134x.c
@@ -18,7 +18,7 @@
#include <sound/soc.h>
#include <sound/s3c24xx_uda134x.h>
-#include <plat/regs-iis.h>
+#include "regs-iis.h"
#include "s3c24xx-i2s.h"
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory
2013-04-11 17:08 ` Arnd Bergmann
@ 2013-04-11 17:19 ` Mark Brown
2013-04-11 19:02 ` [PATCH] ASoC: samsung: fix neo1973-wm8753 compilation Heiko Stübner
2013-04-12 11:04 ` [alsa-devel] [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory Lars-Peter Clausen
0 siblings, 2 replies; 21+ messages in thread
From: Mark Brown @ 2013-04-11 17:19 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel, linux-kernel, Kukjin Kim, linux-samsung-soc,
alsa-devel, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 827 bytes --]
On Thu, Apr 11, 2013 at 07:08:42PM +0200, Arnd Bergmann wrote:
> On Thursday 11 April 2013, Mark Brown wrote:
> > This doesn't apply to my topic/samsung branch, can you please regenerate
> > it against that or let me know what to apply it against?
> This one should work. Unfortunately I now found during testing that the
> s3c24xx sound support has a few build errors at the moment, but this
> patch should not add any new ones:
Applied (after hand editing the commit message), thanks.
> make[5]: *** [sound/soc/samsung/i2s.o] Error 1
> /git/arm-soc/sound/soc/samsung/neo1973_wm8753.c:25:24: fatal error: mach/gta02.h: No such file or directory
> #include <mach/gta02.h>
Hrm, someone killed GTA02 support? That's sad... if that's really the
case we could kill the machine driver but not tonight as I'm running
late...
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH] ASoC: samsung: fix neo1973-wm8753 compilation
2013-04-11 17:19 ` Mark Brown
@ 2013-04-11 19:02 ` Heiko Stübner
2013-04-12 12:13 ` Mark Brown
2013-04-12 11:04 ` [alsa-devel] [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory Lars-Peter Clausen
1 sibling, 1 reply; 21+ messages in thread
From: Heiko Stübner @ 2013-04-11 19:02 UTC (permalink / raw)
To: Mark Brown
Cc: Arnd Bergmann, linux-arm-kernel, linux-kernel, Kukjin Kim,
linux-samsung-soc, alsa-devel, Liam Girdwood
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 <heiko@sntech.de>
---
sound/soc/samsung/neo1973_wm8753.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c
index a301d8c..68675dd 100644
--- a/sound/soc/samsung/neo1973_wm8753.c
+++ b/sound/soc/samsung/neo1973_wm8753.c
@@ -22,7 +22,6 @@
#include <asm/mach-types.h>
#include <plat/regs-iis.h>
-#include <mach/gta02.h>
#include "../codecs/wm8753.h"
#include "s3c24xx-i2s.h"
--
1.7.2.3
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [alsa-devel] [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory
2013-04-11 17:19 ` Mark Brown
2013-04-11 19:02 ` [PATCH] ASoC: samsung: fix neo1973-wm8753 compilation Heiko Stübner
@ 2013-04-12 11:04 ` Lars-Peter Clausen
2013-04-12 11:26 ` Mark Brown
1 sibling, 1 reply; 21+ messages in thread
From: Lars-Peter Clausen @ 2013-04-12 11:04 UTC (permalink / raw)
To: Mark Brown
Cc: Arnd Bergmann, alsa-devel, linux-samsung-soc, linux-kernel,
Liam Girdwood, Kukjin Kim, linux-arm-kernel
On 04/11/2013 07:19 PM, Mark Brown wrote:
> On Thu, Apr 11, 2013 at 07:08:42PM +0200, Arnd Bergmann wrote:
>> On Thursday 11 April 2013, Mark Brown wrote:
>
>>> This doesn't apply to my topic/samsung branch, can you please regenerate
>>> it against that or let me know what to apply it against?
>
>> This one should work. Unfortunately I now found during testing that the
>> s3c24xx sound support has a few build errors at the moment, but this
>> patch should not add any new ones:
>
> Applied (after hand editing the commit message), thanks.
>
>> make[5]: *** [sound/soc/samsung/i2s.o] Error 1
>> /git/arm-soc/sound/soc/samsung/neo1973_wm8753.c:25:24: fatal error: mach/gta02.h: No such file or directory
>> #include <mach/gta02.h>
>
> Hrm, someone killed GTA02 support? That's sad... if that's really the
> case we could kill the machine driver but not tonight as I'm running
> late...
I think the file was moved, we should pull over the audio relevant GPIO
definitions into the ASoC board driver.
- Lars
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [alsa-devel] [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory
2013-04-12 11:04 ` [alsa-devel] [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory Lars-Peter Clausen
@ 2013-04-12 11:26 ` Mark Brown
0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2013-04-12 11:26 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: Arnd Bergmann, alsa-devel, linux-samsung-soc, linux-kernel,
Liam Girdwood, Kukjin Kim, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 441 bytes --]
On Fri, Apr 12, 2013 at 01:04:22PM +0200, Lars-Peter Clausen wrote:
> On 04/11/2013 07:19 PM, Mark Brown wrote:
> > Hrm, someone killed GTA02 support? That's sad... if that's really the
> > case we could kill the machine driver but not tonight as I'm running
> > late...
> I think the file was moved, we should pull over the audio relevant GPIO
> definitions into the ASoC board driver.
Yeah, so I see - Heiko sent a patch fixing this.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] ASoC: samsung: fix neo1973-wm8753 compilation
2013-04-11 19:02 ` [PATCH] ASoC: samsung: fix neo1973-wm8753 compilation Heiko Stübner
@ 2013-04-12 12:13 ` Mark Brown
0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2013-04-12 12:13 UTC (permalink / raw)
To: Heiko Stübner
Cc: Arnd Bergmann, linux-arm-kernel, linux-kernel, Kukjin Kim,
linux-samsung-soc, alsa-devel, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 300 bytes --]
On Thu, Apr 11, 2013 at 09:02:43PM +0200, Heiko Stübner wrote:
> 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/.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [alsa-devel] [PATCH 20/30] ASoC: samsung: convert to dmaengine API
2013-04-11 14:47 ` Arnd Bergmann
2013-04-11 15:42 ` Mark Brown
@ 2013-04-12 19:27 ` Lars-Peter Clausen
2013-04-15 11:04 ` Mark Brown
1 sibling, 1 reply; 21+ messages in thread
From: Lars-Peter Clausen @ 2013-04-12 19:27 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Mark Brown, alsa-devel, linux-samsung-soc, linux-kernel,
Liam Girdwood, Kukjin Kim, linux-arm-kernel
On 04/11/2013 04:47 PM, Arnd Bergmann wrote:
> On Thursday 11 April 2013, Mark Brown wrote:
>>
>> On Thu, Apr 11, 2013 at 02:05:02AM +0200, Arnd Bergmann wrote:
>>> In order to build the exynos kernel with CONFIG_ARCH_MULTIPLATFORM,
>>> we must convert all users of the Samsung private DMA interface to
>>> the generic dmaengine API. This version of the patch adds the
>>> generic dmaengine API as an alternative to the existing samsung
>>> specific one. Once all the older platforms provide support for
>>> the common dmaengine interfaces, we can remove the old code.
>>
>> There's generic ASoC dmaengine code which should be used instead of open
>> coding this. Lars-Peter Clausen and Lee Jones have been working on
>> making this a totally generic driver, right now it's a library.
>
> Ok, I see. I'll drop this patch from my series then and will let someone
> else handle this driver in 3.11. We can probably live without sound support
> in 3.10 when running a multiplatform kernel, and it will keep working
> for exynos-only kernels without the patch.
I actually had a look at how the Samsung PCM driver a couple of days back,
but I didn't fully grasp how things work with the secondary TX channel for
the i2s driver and to make it work with the generic dmaengine PCM driver.
The code handling this in the i2s driver seems to be rather messy with lots
of ifs and elses. Also things would have would be a lot easier if the dt
bindings had used two subnodes each with their own 'dmas' property.
- Lars
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [alsa-devel] [PATCH 20/30] ASoC: samsung: convert to dmaengine API
2013-04-12 19:27 ` [alsa-devel] " Lars-Peter Clausen
@ 2013-04-15 11:04 ` Mark Brown
0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2013-04-15 11:04 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: Arnd Bergmann, alsa-devel, linux-samsung-soc, linux-kernel,
Liam Girdwood, Kukjin Kim, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 909 bytes --]
On Fri, Apr 12, 2013 at 09:27:27PM +0200, Lars-Peter Clausen wrote:
> I actually had a look at how the Samsung PCM driver a couple of days back,
> but I didn't fully grasp how things work with the secondary TX channel for
> the i2s driver and to make it work with the generic dmaengine PCM driver.
> The code handling this in the i2s driver seems to be rather messy with lots
> of ifs and elses. Also things would have would be a lot easier if the dt
> bindings had used two subnodes each with their own 'dmas' property.
Yeah, it's quite messy at the minute as it predates any subsystem
support for things like multiple DMA channels going into a single DAI on
an AP so it was having to do things it really shouldn't have done. What
ought to happen is that the driver gets refactored to use soc-pcm or
change to represent the mixer block as a CODEC, I think if that happens
then things ought to get easier.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2013-04-15 11:04 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-11 0:04 [PATCH 00/30] ARM: exynos multiplatform support Arnd Bergmann
2013-04-11 0:05 ` [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory Arnd Bergmann
2013-04-11 16:47 ` Mark Brown
2013-04-11 17:08 ` Arnd Bergmann
2013-04-11 17:19 ` Mark Brown
2013-04-11 19:02 ` [PATCH] ASoC: samsung: fix neo1973-wm8753 compilation Heiko Stübner
2013-04-12 12:13 ` Mark Brown
2013-04-12 11:04 ` [alsa-devel] [PATCH 18/30] ASoC: samsung: move plat/ headers to local directory Lars-Peter Clausen
2013-04-12 11:26 ` Mark Brown
2013-04-11 0:05 ` [PATCH 19/30] ASoC: samsung: use irq resource for idma Arnd Bergmann
2013-04-11 16:48 ` Mark Brown
2013-04-11 0:05 ` [PATCH 20/30] ASoC: samsung: convert to dmaengine API Arnd Bergmann
2013-04-11 14:27 ` Mark Brown
2013-04-11 14:47 ` Arnd Bergmann
2013-04-11 15:42 ` Mark Brown
2013-04-12 19:27 ` [alsa-devel] " Lars-Peter Clausen
2013-04-15 11:04 ` Mark Brown
2013-04-11 0:05 ` [PATCH 21/30] ASoC: samsung/i2s: fix module_device_table Arnd Bergmann
2013-04-11 16:48 ` Mark Brown
2013-04-11 0:05 ` [PATCH 22/30] ASoC: samsung/idma: export idma_reg_addr_init Arnd Bergmann
2013-04-11 16:48 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox