-Index: linux-2.6.30-rc6/arch/arm/mach-s3c2410/include/mach/dma.h
-===================================================================
---- linux-2.6.30-rc6.orig/arch/arm/mach-s3c2410/include/mach/dma.h 2009-05-16 06:12:57.000000000 +0200
-+++ linux-2.6.30-rc6/arch/arm/mach-s3c2410/include/mach/dma.h 2009-05-18 19:08:29.000000000 +0200
+--- a/arch/arm/mach-s3c2410/include/mach/dma.h
++++ b/arch/arm/mach-s3c2410/include/mach/dma.h
@@ -3,7 +3,7 @@
* Copyright (C) 2003,2004,2006 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
#define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */
-@@ -55,9 +55,9 @@
+@@ -55,9 +55,9 @@ enum dma_ch {
/* we have 4 dma channels */
#ifndef CONFIG_CPU_S3C2443
#endif
/* types */
-@@ -68,7 +68,6 @@
+@@ -68,7 +68,6 @@ enum s3c2410_dma_state {
S3C2410_DMA_PAUSED
};
/* enum s3c2410_dma_loadst
*
* This represents the state of the DMA engine, wrt to the loaded / running
-@@ -104,32 +103,6 @@
+@@ -104,32 +103,6 @@ enum s3c2410_dma_loadst {
S3C2410_DMALOAD_1LOADED_1RUNNING,
};
/* flags */
-@@ -137,19 +110,18 @@
+@@ -137,19 +110,18 @@ enum s3c2410_chan_op {
* waiting for reloads */
#define S3C2410_DMAF_AUTOSTART (1<<1) /* auto-start if buffer queued */
struct s3c2410_dma_buf {
struct s3c2410_dma_buf *next;
int magic; /* magic */
-@@ -161,20 +133,6 @@
+@@ -161,20 +133,6 @@ struct s3c2410_dma_buf {
/* [1] is this updated for both recv/send modes? */
struct s3c2410_dma_stats {
unsigned long loads;
unsigned long timeout_longest;
-@@ -206,10 +164,10 @@
+@@ -206,10 +164,10 @@ struct s3c2410_dma_chan {
/* channel configuration */
enum s3c2410_dmasrc source;
struct s3c24xx_dma_map *map; /* channel hw maps */
-@@ -236,213 +194,12 @@
+@@ -236,213 +194,12 @@ struct s3c2410_dma_chan {
struct sys_device dev;
};
+}
#endif /* __ASM_ARCH_DMA_H */
-Index: linux-2.6.30-rc6/arch/arm/mach-s3c2442/Kconfig
-===================================================================
---- linux-2.6.30-rc6.orig/arch/arm/mach-s3c2442/Kconfig 2009-05-16 06:12:57.000000000 +0200
-+++ linux-2.6.30-rc6/arch/arm/mach-s3c2442/Kconfig 2009-05-18 19:08:29.000000000 +0200
-@@ -11,6 +11,7 @@
+--- a/arch/arm/mach-s3c2442/Kconfig
++++ b/arch/arm/mach-s3c2442/Kconfig
+@@ -11,6 +11,7 @@ config CPU_S3C2442
select S3C2410_CLOCK
select S3C2410_GPIO
select S3C2410_PM if PM
select CPU_S3C244X
select CPU_LLSERIAL_S3C2440
help
-Index: linux-2.6.30-rc6/arch/arm/plat-s3c/dma.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.30-rc6/arch/arm/plat-s3c/dma.c 2009-05-18 19:08:29.000000000 +0200
+--- /dev/null
++++ b/arch/arm/plat-s3c/dma.c
@@ -0,0 +1,86 @@
+/* linux/arch/arm/plat-s3c/dma.c
+ *
+ return 0;
+}
+EXPORT_SYMBOL(s3c2410_dma_setflags);
-Index: linux-2.6.30-rc6/arch/arm/plat-s3c/include/plat/dma-core.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.30-rc6/arch/arm/plat-s3c/include/plat/dma-core.h 2009-05-18 19:08:29.000000000 +0200
+--- /dev/null
++++ b/arch/arm/plat-s3c/include/plat/dma-core.h
@@ -0,0 +1,22 @@
+/* arch/arm/plat-s3c/include/plat/dma.h
+ *
+extern struct s3c2410_dma_chan s3c2410_chans[];
+
+
-Index: linux-2.6.30-rc6/arch/arm/plat-s3c/include/plat/dma.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.30-rc6/arch/arm/plat-s3c/include/plat/dma.h 2009-05-18 19:08:29.000000000 +0200
+--- /dev/null
++++ b/arch/arm/plat-s3c/include/plat/dma.h
@@ -0,0 +1,128 @@
+/* arch/arm/plat-s3c/include/plat/dma.h
+ *
+extern int s3c2410_dma_set_buffdone_fn(unsigned int, s3c2410_dma_cbfn_t rtn);
+
+
-Index: linux-2.6.30-rc6/arch/arm/plat-s3c/Kconfig
-===================================================================
---- linux-2.6.30-rc6.orig/arch/arm/plat-s3c/Kconfig 2009-05-16 06:12:57.000000000 +0200
-+++ linux-2.6.30-rc6/arch/arm/plat-s3c/Kconfig 2009-05-18 19:08:29.000000000 +0200
-@@ -150,6 +150,13 @@
+--- a/arch/arm/plat-s3c/Kconfig
++++ b/arch/arm/plat-s3c/Kconfig
+@@ -150,6 +150,13 @@ config S3C_GPIO_CFG_S3C64XX
Internal configuration to enable S3C64XX style GPIO configuration
functions.
# device definitions to compile in
config S3C_DEV_HSMMC
-Index: linux-2.6.30-rc6/arch/arm/plat-s3c/Makefile
-===================================================================
---- linux-2.6.30-rc6.orig/arch/arm/plat-s3c/Makefile 2009-05-18 19:07:48.000000000 +0200
-+++ linux-2.6.30-rc6/arch/arm/plat-s3c/Makefile 2009-05-18 19:08:29.000000000 +0200
-@@ -18,6 +18,10 @@
+--- a/arch/arm/plat-s3c/Makefile
++++ b/arch/arm/plat-s3c/Makefile
+@@ -18,6 +18,10 @@ obj-y += pwm-clock.o
obj-y += gpio.o
obj-y += gpio-config.o
# PM support
obj-$(CONFIG_PM) += pm.o
-@@ -31,3 +35,5 @@
+@@ -31,3 +35,5 @@ obj-$(CONFIG_S3C_DEV_HSMMC1) += dev-hsmm
obj-y += dev-i2c0.o
obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o
obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o
+obj-$(CONFIG_S3C_DMA) += dma.o
+
-Index: linux-2.6.30-rc6/arch/arm/plat-s3c24xx/dma.c
-===================================================================
---- linux-2.6.30-rc6.orig/arch/arm/plat-s3c24xx/dma.c 2009-05-16 06:12:57.000000000 +0200
-+++ linux-2.6.30-rc6/arch/arm/plat-s3c24xx/dma.c 2009-05-18 19:08:29.000000000 +0200
+--- a/arch/arm/plat-s3c24xx/dma.c
++++ b/arch/arm/plat-s3c24xx/dma.c
@@ -31,10 +31,11 @@
#include <asm/irq.h>
#include <mach/hardware.h>
/* io map for dma */
static void __iomem *dma_base;
-@@ -44,8 +45,6 @@
+@@ -44,8 +45,6 @@ static int dma_channels;
static struct s3c24xx_dma_selection dma_sel;
/* debugging functions */
-@@ -135,21 +134,6 @@
+@@ -135,21 +134,6 @@ dmadbg_showregs(const char *fname, int l
#define dbg_showchan(chan) do { } while(0)
#endif /* CONFIG_S3C2410_DMA_DEBUG */
/* s3c2410_dma_stats_timeout
*
* Update DMA stats from timeout info
-@@ -214,8 +198,6 @@
+@@ -214,8 +198,6 @@ s3c2410_dma_waitforload(struct s3c2410_d
return 0;
}
/* s3c2410_dma_loadbuffer
*
* load a buffer, and update the channel state
-@@ -453,7 +435,7 @@
+@@ -453,7 +435,7 @@ s3c2410_dma_canload(struct s3c2410_dma_c
int s3c2410_dma_enqueue(unsigned int channel, void *id,
dma_addr_t data, int size)
{
struct s3c2410_dma_buf *buf;
unsigned long flags;
-@@ -804,7 +786,7 @@
+@@ -804,7 +786,7 @@ EXPORT_SYMBOL(s3c2410_dma_request);
int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client)
{
unsigned long flags;
if (chan == NULL)
-@@ -836,7 +818,7 @@
+@@ -836,7 +818,7 @@ int s3c2410_dma_free(unsigned int channe
chan->irq_claimed = 0;
if (!(channel & DMACH_LOW_LEVEL))
local_irq_restore(flags);
-@@ -995,7 +977,7 @@
+@@ -995,7 +977,7 @@ static int s3c2410_dma_started(struct s3
int
s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op)
{
if (chan == NULL)
return -EINVAL;
-@@ -1038,14 +1020,13 @@
+@@ -1038,14 +1020,13 @@ EXPORT_SYMBOL(s3c2410_dma_ctrl);
/* s3c2410_dma_config
*
* xfersize: size of unit in bytes (1,2,4)
pr_debug("%s: chan=%d, xfer_unit=%d, dcon=%08x\n",
__func__, channel, xferunit, dcon);
-@@ -1055,10 +1036,33 @@
+@@ -1055,10 +1036,33 @@ int s3c2410_dma_config(unsigned int chan
pr_debug("%s: Initial dcon is %08x\n", __func__, dcon);
switch (xferunit) {
case 1:
dcon |= S3C2410_DCON_BYTE;
-@@ -1089,10 +1093,10 @@
+@@ -1089,10 +1093,10 @@ int s3c2410_dma_config(unsigned int chan
}
EXPORT_SYMBOL(s3c2410_dma_config);
if (chan == NULL)
return -EINVAL;
-@@ -1105,43 +1109,7 @@
+@@ -1105,43 +1109,7 @@ int s3c2410_dma_setflags(unsigned int ch
}
EXPORT_SYMBOL(s3c2410_dma_setflags);
/* s3c2410_dma_devconfig
*
-@@ -1150,29 +1118,38 @@
+@@ -1150,29 +1118,38 @@ EXPORT_SYMBOL(s3c2410_dma_set_buffdone_f
* source: S3C2410_DMASRC_HW: source is hardware
* S3C2410_DMASRC_MEM: source is memory
*
switch (source) {
case S3C2410_DMASRC_HW:
-@@ -1219,7 +1196,7 @@
+@@ -1219,7 +1196,7 @@ EXPORT_SYMBOL(s3c2410_dma_devconfig);
int s3c2410_dma_getposition(unsigned int channel, dma_addr_t *src, dma_addr_t *dst)
{
if (chan == NULL)
return -EINVAL;
-@@ -1278,8 +1255,8 @@
+@@ -1278,8 +1255,8 @@ static int s3c2410_dma_resume(struct sys
printk(KERN_INFO "dma%d: restoring configuration\n", cp->number);
/* re-select the dma source for this channel */
-@@ -1476,7 +1453,8 @@
+@@ -1476,7 +1453,8 @@ static struct s3c2410_dma_chan *s3c2410_
found:
dmach = &s3c2410_chans[ch];
dmach->map = ch_map;
/* select the channel */
-Index: linux-2.6.30-rc6/arch/arm/plat-s3c24xx/include/plat/dma.h
-===================================================================
---- linux-2.6.30-rc6.orig/arch/arm/plat-s3c24xx/include/plat/dma.h 2009-05-16 06:12:57.000000000 +0200
-+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+--- a/arch/arm/plat-s3c24xx/include/plat/dma.h
++++ /dev/null
@@ -1,82 +0,0 @@
-/* linux/include/asm-arm/plat-s3c24xx/dma.h
- *
-
-extern int s3c24xx_dma_init(unsigned int channels, unsigned int irq,
- unsigned int stride);
-Index: linux-2.6.30-rc6/arch/arm/plat-s3c24xx/include/plat/dma-plat.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.30-rc6/arch/arm/plat-s3c24xx/include/plat/dma-plat.h 2009-05-18 19:08:29.000000000 +0200
+--- /dev/null
++++ b/arch/arm/plat-s3c24xx/include/plat/dma-plat.h
@@ -0,0 +1,84 @@
+/* linux/arch/arm/plat-s3c24xx/include/plat/dma-plat.h
+ *
+
+extern int s3c24xx_dma_init(unsigned int channels, unsigned int irq,
+ unsigned int stride);
-Index: linux-2.6.30-rc6/arch/arm/plat-s3c24xx/include/plat/regs-dma.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.30-rc6/arch/arm/plat-s3c24xx/include/plat/regs-dma.h 2009-05-18 19:08:29.000000000 +0200
+--- /dev/null
++++ b/arch/arm/plat-s3c24xx/include/plat/regs-dma.h
@@ -0,0 +1,145 @@
+/* arch/arm/mach-s3c2410/include/mach/dma.h
+ *
+#define S3C2443_DMAREQSEL_PCMOUT S3C2443_DMAREQSEL_SRC(27)
+#define S3C2443_DMAREQSEL_PCMIN S3C2443_DMAREQSEL_SRC(28)
+#define S3C2443_DMAREQSEL_MICIN S3C2443_DMAREQSEL_SRC(29)
-Index: linux-2.6.30-rc6/arch/arm/plat-s3c24xx/Kconfig
-===================================================================
---- linux-2.6.30-rc6.orig/arch/arm/plat-s3c24xx/Kconfig 2009-05-16 06:12:57.000000000 +0200
-+++ linux-2.6.30-rc6/arch/arm/plat-s3c24xx/Kconfig 2009-05-18 19:08:29.000000000 +0200
-@@ -71,6 +71,7 @@
+--- a/arch/arm/plat-s3c24xx/Kconfig
++++ b/arch/arm/plat-s3c24xx/Kconfig
+@@ -71,6 +71,7 @@ config PM_SIMTEC
config S3C2410_DMA
bool "S3C2410 DMA support"
depends on ARCH_S3C2410
help
S3C2410 DMA support. This is needed for drivers like sound which
use the S3C2410's DMA system to move data to and from the
-Index: linux-2.6.30-rc6/arch/arm/mach-s3c2410/dma.c
-===================================================================
---- linux-2.6.30-rc6.orig/arch/arm/mach-s3c2410/dma.c 2009-05-16 06:12:57.000000000 +0200
-+++ linux-2.6.30-rc6/arch/arm/mach-s3c2410/dma.c 2009-05-18 19:08:29.000000000 +0200
+--- a/arch/arm/mach-s3c2410/dma.c
++++ b/arch/arm/mach-s3c2410/dma.c
@@ -17,14 +17,16 @@
#include <linux/sysdev.h>
#include <linux/serial_core.h>
#include <mach/regs-mem.h>
#include <mach/regs-lcd.h>
#include <mach/regs-sdi.h>
-Index: linux-2.6.30-rc6/arch/arm/mach-s3c2440/dma.c
-===================================================================
---- linux-2.6.30-rc6.orig/arch/arm/mach-s3c2440/dma.c 2009-05-16 06:12:57.000000000 +0200
-+++ linux-2.6.30-rc6/arch/arm/mach-s3c2440/dma.c 2009-05-18 19:08:29.000000000 +0200
+--- a/arch/arm/mach-s3c2440/dma.c
++++ b/arch/arm/mach-s3c2440/dma.c
@@ -17,14 +17,16 @@
#include <linux/sysdev.h>
#include <linux/serial_core.h>
#include <mach/regs-mem.h>
#include <mach/regs-lcd.h>
#include <mach/regs-sdi.h>
+--- a/sound/soc/s3c24xx/s3c24xx-pcm.c
++++ b/sound/soc/s3c24xx/s3c24xx-pcm.c
+@@ -218,24 +218,17 @@ static int s3c24xx_pcm_prepare(struct sn
+ * sync to pclk, half-word transfers to the IIS-FIFO. */
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ s3c2410_dma_devconfig(prtd->params->channel,
+- S3C2410_DMASRC_MEM, S3C2410_DISRCC_INC |
+- S3C2410_DISRCC_APB, prtd->params->dma_addr);
+-
+- s3c2410_dma_config(prtd->params->channel,
+- prtd->params->dma_size,
+- S3C2410_DCON_SYNC_PCLK |
+- S3C2410_DCON_HANDSHAKE);
++ S3C2410_DMASRC_MEM,
++ prtd->params->dma_addr);
+ } else {
+- s3c2410_dma_config(prtd->params->channel,
+- prtd->params->dma_size,
+- S3C2410_DCON_HANDSHAKE |
+- S3C2410_DCON_SYNC_PCLK);
+-
+ s3c2410_dma_devconfig(prtd->params->channel,
+- S3C2410_DMASRC_HW, 0x3,
+- prtd->params->dma_addr);
++ S3C2410_DMASRC_HW,
++ prtd->params->dma_addr);
+ }
+
++ s3c2410_dma_config(prtd->params->channel,
++ prtd->params->dma_size);
++
+ /* flush the DMA channel */
+ s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_FLUSH);
+ prtd->dma_loaded = 0;