--- ../s3cmci.patch	2006-11-22 20:17:55.000000000 +0100
+++ patches/s3cmci.patch	2006-11-23 00:55:17.000000000 +0100
@@ -1,9 +1,27 @@
-diff -uprN a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
---- a/drivers/mmc/Kconfig	2006-06-23 02:15:58.000000000 +0200
-+++ b/drivers/mmc/Kconfig	2006-06-23 02:23:44.000000000 +0200
-@@ -109,4 +109,16 @@ config MMC_IMX
- 
- 	  If unsure, say N.
+- Rediffed for -git
+- update according to 2.6.18 dma changes
+- config.h is dead
+- blksz_bits is dead too
+- pt_regs is now gone
+- set_irq_type is gone
+---
+ drivers/mmc/Kconfig                     |   12 	12 +	0 -	0 !
+ drivers/mmc/Makefile                    |    2 	2 +	0 -	0 !
+ drivers/mmc/mmc_debug.c                 |   59 	59 +	0 -	0 !
+ drivers/mmc/mmc_debug.h                 |    7 	7 +	0 -	0 !
+ drivers/mmc/s3cmci.c                    | 1338 	1338 +	0 -	0 !
+ drivers/mmc/s3cmci.h                    |   71 	71 +	0 -	0 !
+ include/asm-arm/arch-s3c2410/regs-sdi.h |   22 	18 +	4 -	0 !
+ include/linux/mmc/mmc.h                 |   15 	9 +	6 -	0 !
+ 8 files changed, 1516 insertions(+), 10 deletions(-)
+
+Index: linux-2.6/drivers/mmc/Kconfig
+===================================================================
+--- linux-2.6.orig/drivers/mmc/Kconfig	2006-11-22 20:17:34.000000000 +0100
++++ linux-2.6/drivers/mmc/Kconfig	2006-11-22 20:43:12.000000000 +0100
+@@ -125,4 +125,16 @@ config MMC_TIFM_SD
+           To compile this driver as a module, choose M here: the
+ 	  module will be called tifm_sd.
  
 +config MMC_S3C
 +	tristate "Samsung S3C SD/MMC Card Interface support"
@@ -18,24 +36,27 @@ diff -uprN a/drivers/mmc/Kconfig b/drive
 +
 +
  endmenu
-diff -uprN a/drivers/mmc/Makefile b/drivers/mmc/Makefile
---- a/drivers/mmc/Makefile	2006-06-23 02:15:58.000000000 +0200
-+++ b/drivers/mmc/Makefile	2006-06-23 02:58:02.000000000 +0200
-@@ -23,9 +23,11 @@ obj-$(CONFIG_MMC_WBSD)		+= wbsd.o
- obj-$(CONFIG_MMC_AU1X)		+= au1xmmc.o
+Index: linux-2.6/drivers/mmc/Makefile
+===================================================================
+--- linux-2.6.orig/drivers/mmc/Makefile	2006-11-22 20:17:34.000000000 +0100
++++ linux-2.6/drivers/mmc/Makefile	2006-11-22 20:43:12.000000000 +0100
+@@ -24,10 +24,12 @@ obj-$(CONFIG_MMC_AU1X)		+= au1xmmc.o
  obj-$(CONFIG_MMC_OMAP)		+= omap.o
  obj-$(CONFIG_MMC_AT91RM9200)	+= at91_mci.o
+ obj-$(CONFIG_MMC_TIFM_SD)	+= tifm_sd.o
 +obj-$(CONFIG_MMC_S3C)		+= s3cmci.o
  
- mmc_core-y := mmc.o mmc_queue.o mmc_sysfs.o
+ mmc_core-y := mmc.o mmc_sysfs.o
+ mmc_core-$(CONFIG_BLOCK) += mmc_queue.o
  
  ifeq ($(CONFIG_MMC_DEBUG),y)
 +obj-$(CONFIG_MMC)		+= mmc_debug.o
  EXTRA_CFLAGS += -DDEBUG
  endif
-diff -uprN a/drivers/mmc/mmc_debug.c b/drivers/mmc/mmc_debug.c
---- a/drivers/mmc/mmc_debug.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/drivers/mmc/mmc_debug.c	2006-06-23 02:23:44.000000000 +0200
+Index: linux-2.6/drivers/mmc/mmc_debug.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6/drivers/mmc/mmc_debug.c	2006-11-22 20:43:12.000000000 +0100
 @@ -0,0 +1,59 @@
 +/*
 + *  linux/drivers/mmc/mmc_debug.c
@@ -96,9 +117,10 @@ diff -uprN a/drivers/mmc/mmc_debug.c b/d
 +	}
 +}
 +EXPORT_SYMBOL(mmc_err2str);
-diff -uprN a/drivers/mmc/mmc_debug.h b/drivers/mmc/mmc_debug.h
---- a/drivers/mmc/mmc_debug.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/drivers/mmc/mmc_debug.h	2006-06-23 02:23:44.000000000 +0200
+Index: linux-2.6/drivers/mmc/mmc_debug.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6/drivers/mmc/mmc_debug.h	2006-11-22 20:43:12.000000000 +0100
 @@ -0,0 +1,7 @@
 +#ifndef MMC_DEBUG_H
 +#define MMC_DEBUG_H
@@ -107,10 +129,11 @@ diff -uprN a/drivers/mmc/mmc_debug.h b/d
 +char *mmc_err2str(int err);
 +
 +#endif /* MMC_DEBUG_H */
-diff -uprN a/drivers/mmc/s3cmci.c b/drivers/mmc/s3cmci.c
---- a/drivers/mmc/s3cmci.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/drivers/mmc/s3cmci.c	2006-06-23 03:02:04.000000000 +0200
-@@ -0,0 +1,1339 @@
+Index: linux-2.6/drivers/mmc/s3cmci.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6/drivers/mmc/s3cmci.c	2006-11-23 00:55:15.000000000 +0100
+@@ -0,0 +1,1338 @@
 +/*
 + *  linux/drivers/mmc/s3cmci.h - Samsung S3C MCI driver
 + *
@@ -121,7 +144,6 @@ diff -uprN a/drivers/mmc/s3cmci.c b/driv
 + * published by the Free Software Foundation.
 + */
 +
-+#include <linux/config.h>
 +#include <linux/module.h>
 +#include <linux/dma-mapping.h>
 +#include <linux/clk.h>
@@ -225,9 +247,9 @@ diff -uprN a/drivers/mmc/s3cmci.c b/driv
 +	if (cmd->data) {
 +		snprintf(host->dbgmsg_dat, 300,
 +			"#%u bsize:%u blocks:%u bytes:%u",
-+			host->dcnt, (1 << cmd->data->blksz_bits),
++			host->dcnt, cmd->data->blksz,
 +			cmd->data->blocks,
-+			cmd->data->blocks * (1 << cmd->data->blksz_bits));
++			cmd->data->blocks * cmd->data->blksz);
 +	} else {
 +		host->dbgmsg_dat[0] = '\0';
 +	}
@@ -480,7 +502,7 @@ diff -uprN a/drivers/mmc/s3cmci.c b/driv
 + *       contition comes up
 + */
 +
-+static irqreturn_t s3cmci_irq(int irq, void *dev_id, struct pt_regs *regs)
++static irqreturn_t s3cmci_irq(int irq, void *dev_id)
 +{
 +	struct s3cmci_host *host;
 +	struct mmc_command *cmd;
@@ -662,7 +684,7 @@ diff -uprN a/drivers/mmc/s3cmci.c b/driv
 + * ISR for the CardDetect Pin
 +*/
 +
-+static irqreturn_t s3cmci_irq_cd(int irq, void *dev_id, struct pt_regs *regs)
++static irqreturn_t s3cmci_irq_cd(int irq, void *dev_id)
 +{
 +	struct s3cmci_host *host = (struct s3cmci_host *)dev_id;
 +
@@ -673,8 +695,8 @@ diff -uprN a/drivers/mmc/s3cmci.c b/driv
 +	return IRQ_HANDLED;
 +}
 +
-+void s3cmci_dma_done_callback(s3c2410_dma_chan_t *dma_ch, void *buf_id,
-+	int size, s3c2410_dma_buffresult_t result)
++void s3cmci_dma_done_callback(struct s3c2410_dma_chan *dma_ch, void *buf_id,
++	int size, enum s3c2410_dma_buffresult result)
 +{
 +	unsigned long iflags;
 +	u32 mci_csta, mci_dsta, mci_fsta, mci_dcnt;
@@ -794,7 +816,7 @@ diff -uprN a/drivers/mmc/s3cmci.c b/driv
 +	// no error
 +	if (mrq->data->error == MMC_ERR_NONE) {
 +		mrq->data->bytes_xfered =
-+			(mrq->data->blocks << mrq->data->blksz_bits);
++			(mrq->data->blocks * mrq->data->blksz);
 +	} else {
 +		mrq->data->bytes_xfered = 0;
 +	}
@@ -828,10 +850,10 @@ diff -uprN a/drivers/mmc/s3cmci.c b/driv
 +}
 +
 +
-+void s3cmci_dma_setup(struct s3cmci_host *host, s3c2410_dmasrc_t source)
++void s3cmci_dma_setup(struct s3cmci_host *host, enum s3c2410_dmasrc source)
 +{
 +	static int setup_ok = 0;
-+	static s3c2410_dmasrc_t last_source = -1;
++	static enum s3c2410_dmasrc last_source = -1;
 +
 +	if (last_source == source)
 +		return;
@@ -945,7 +967,7 @@ diff -uprN a/drivers/mmc/s3cmci.c b/driv
 +
 +	/* write BSIZE register */
 +
-+	writel((1 << data->blksz_bits), host->base + S3C2410_SDIBSIZE);
++	writel(data->blksz, host->base + S3C2410_SDIBSIZE);
 +
 +	/* add to IMASK register */
 +	imsk =	S3C2410_SDIIMSK_FIFOFAIL | S3C2410_SDIIMSK_DATACRC |
@@ -1265,9 +1287,9 @@ diff -uprN a/drivers/mmc/s3cmci.c b/driv
 +	disable_irq(host->irq);
 +
 +	s3c2410_gpio_cfgpin(S3C2410_GPF2, S3C2410_GPF2_EINT2);
-+	set_irq_type(host->irq_cd, IRQT_BOTHEDGE);
 +
-+	if (request_irq(host->irq_cd, s3cmci_irq_cd, 0, DRIVER_NAME, host)) {
++	if (request_irq(host->irq_cd, s3cmci_irq_cd, \
++		SA_TRIGGER_RISING | SA_TRIGGER_FALLING, DRIVER_NAME, host)) {
 +		dev_err(&pdev->dev,
 +			"failed to request card detect interrupt.\n");
 +
@@ -1450,9 +1472,10 @@ diff -uprN a/drivers/mmc/s3cmci.c b/driv
 +MODULE_LICENSE("GPL");
 +MODULE_AUTHOR("Thomas Kleffel <tk@maintech.de>");
 +
-diff -uprN a/drivers/mmc/s3cmci.h b/drivers/mmc/s3cmci.h
---- a/drivers/mmc/s3cmci.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/drivers/mmc/s3cmci.h	2006-06-23 02:23:44.000000000 +0200
+Index: linux-2.6/drivers/mmc/s3cmci.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6/drivers/mmc/s3cmci.h	2006-11-22 20:43:12.000000000 +0100
 @@ -0,0 +1,71 @@
 +/*
 + *  linux/drivers/mmc/s3cmci.h - Samsung S3C MCI driver
@@ -1525,22 +1548,20 @@ diff -uprN a/drivers/mmc/s3cmci.h b/driv
 +	unsigned int		ccnt, dcnt;
 +	struct tasklet_struct	pio_tasklet;
 +};
-diff -uprN a/include/asm-arm/arch-s3c2410/regs-sdi.h b/include/asm-arm/arch-s3c2410/regs-sdi.h
---- a/include/asm-arm/arch-s3c2410/regs-sdi.h	2006-06-23 02:18:01.000000000 +0200
-+++ b/include/asm-arm/arch-s3c2410/regs-sdi.h	2006-06-23 02:23:44.000000000 +0200
-@@ -7,9 +7,10 @@
+Index: linux-2.6/include/asm-arm/arch-s3c2410/regs-sdi.h
+===================================================================
+--- linux-2.6.orig/include/asm-arm/arch-s3c2410/regs-sdi.h	2006-11-22 20:17:37.000000000 +0100
++++ linux-2.6/include/asm-arm/arch-s3c2410/regs-sdi.h	2006-11-22 20:23:04.000000000 +0100
+@@ -7,7 +7,7 @@
   * it under the terms of the GNU General Public License version 2 as
   * published by the Free Software Foundation.
   *
 - * S3C2410 MMC/SDIO register definitions
 + * Samsung S3C MCI register definitions
-  *
-  *  Changelog:
-+ *    09-May-2006 Thomas Kleffel Added defines for 2440
-  *    18-Aug-2004 Ben Dooks      Created initial file
-  *    29-Nov-2004 Koen Martens   Added some missing defines, fixed duplicates
-  *    29-Nov-2004 Ben Dooks	 Updated Koen's patch
-@@ -33,9 +34,15 @@
+ */
+ 
+ #ifndef __ASM_ARM_REGS_SDI
+@@ -28,9 +28,15 @@
  #define S3C2410_SDIDCNT               (0x30)
  #define S3C2410_SDIDSTA               (0x34)
  #define S3C2410_SDIFSTA               (0x38)
@@ -1556,7 +1577,7 @@ diff -uprN a/include/asm-arm/arch-s3c241
  #define S3C2410_SDICON_BYTEORDER      (1<<4)
  #define S3C2410_SDICON_SDIOIRQ        (1<<3)
  #define S3C2410_SDICON_RWAITEN        (1<<2)
-@@ -47,7 +54,8 @@
+@@ -42,7 +48,8 @@
  #define S3C2410_SDICMDCON_LONGRSP     (1<<10)
  #define S3C2410_SDICMDCON_WAITRSP     (1<<9)
  #define S3C2410_SDICMDCON_CMDSTART    (1<<8)
@@ -1566,7 +1587,7 @@ diff -uprN a/include/asm-arm/arch-s3c241
  
  #define S3C2410_SDICMDSTAT_CRCFAIL    (1<<12)
  #define S3C2410_SDICMDSTAT_CMDSENT    (1<<11)
-@@ -56,6 +64,9 @@
+@@ -51,6 +58,9 @@
  #define S3C2410_SDICMDSTAT_XFERING    (1<<8)
  #define S3C2410_SDICMDSTAT_INDEX      (0xff)
  
@@ -1576,7 +1597,7 @@ diff -uprN a/include/asm-arm/arch-s3c241
  #define S3C2410_SDIDCON_IRQPERIOD     (1<<21)
  #define S3C2410_SDIDCON_TXAFTERRESP   (1<<20)
  #define S3C2410_SDIDCON_RXAFTERCMD    (1<<19)
-@@ -64,6 +75,7 @@
+@@ -59,6 +69,7 @@
  #define S3C2410_SDIDCON_WIDEBUS       (1<<16)
  #define S3C2410_SDIDCON_DMAEN         (1<<15)
  #define S3C2410_SDIDCON_STOP          (1<<14)
@@ -1584,7 +1605,7 @@ diff -uprN a/include/asm-arm/arch-s3c241
  #define S3C2410_SDIDCON_DATMODE	      (3<<12)
  #define S3C2410_SDIDCON_BLKNUM        (0x7ff)
  
-@@ -73,6 +85,7 @@
+@@ -68,6 +79,7 @@
  #define S3C2410_SDIDCON_XFER_RXSTART  (2<<12)
  #define S3C2410_SDIDCON_XFER_TXSTART  (3<<12)
  
@@ -1592,7 +1613,7 @@ diff -uprN a/include/asm-arm/arch-s3c241
  #define S3C2410_SDIDCNT_BLKNUM_SHIFT  (12)
  
  #define S3C2410_SDIDSTA_RDYWAITREQ    (1<<10)
-@@ -87,10 +100,12 @@
+@@ -82,10 +94,12 @@
  #define S3C2410_SDIDSTA_TXDATAON      (1<<1)
  #define S3C2410_SDIDSTA_RXDATAON      (1<<0)
  
@@ -1607,9 +1628,10 @@ diff -uprN a/include/asm-arm/arch-s3c241
  #define S3C2410_SDIFSTA_RFLAST         (1<<9)
  #define S3C2410_SDIFSTA_RFFULL         (1<<8)
  #define S3C2410_SDIFSTA_RFHALF         (1<<7)
-diff -uprN a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
---- a/include/linux/mmc/mmc.h	2006-06-23 02:17:16.000000000 +0200
-+++ b/include/linux/mmc/mmc.h	2006-06-23 02:23:44.000000000 +0200
+Index: linux-2.6/include/linux/mmc/mmc.h
+===================================================================
+--- linux-2.6.orig/include/linux/mmc/mmc.h	2006-11-22 20:17:38.000000000 +0100
++++ linux-2.6/include/linux/mmc/mmc.h	2006-11-22 20:20:52.000000000 +0100
 @@ -54,12 +54,15 @@ struct mmc_command {
  	unsigned int		retries;	/* max number of retries */
  	unsigned int		error;		/* command error */
@@ -1632,5 +1654,3 @@ diff -uprN a/include/linux/mmc/mmc.h b/i
  
  	struct mmc_data		*data;		/* data segment associated with cmd */
  	struct mmc_request	*mrq;		/* associated request */
-
-
