aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic-2.6/patches-2.6.23/300-add-mmc-spi-driver.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/generic-2.6/patches-2.6.23/300-add-mmc-spi-driver.patch')
-rw-r--r--target/linux/generic-2.6/patches-2.6.23/300-add-mmc-spi-driver.patch428
1 files changed, 178 insertions, 250 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.23/300-add-mmc-spi-driver.patch b/target/linux/generic-2.6/patches-2.6.23/300-add-mmc-spi-driver.patch
index 33421042ec..528d608d96 100644
--- a/target/linux/generic-2.6/patches-2.6.23/300-add-mmc-spi-driver.patch
+++ b/target/linux/generic-2.6/patches-2.6.23/300-add-mmc-spi-driver.patch
@@ -2,11 +2,9 @@ This is a port of the MMC-SPI driver from 2.6.24.3
--mb
-Index: linux-2.6.23.17/drivers/mmc/host/Kconfig
-===================================================================
---- linux-2.6.23.17.orig/drivers/mmc/host/Kconfig
-+++ linux-2.6.23.17/drivers/mmc/host/Kconfig
-@@ -100,3 +100,16 @@ config MMC_TIFM_SD
+--- a/drivers/mmc/host/Kconfig
++++ b/drivers/mmc/host/Kconfig
+@@ -100,3 +100,16 @@
To compile this driver as a module, choose M here: the
module will be called tifm_sd.
@@ -23,20 +21,16 @@ Index: linux-2.6.23.17/drivers/mmc/host/Kconfig
+
+ If unsure, or if your system has no SPI master driver, say N.
+
-Index: linux-2.6.23.17/drivers/mmc/host/Makefile
-===================================================================
---- linux-2.6.23.17.orig/drivers/mmc/host/Makefile
-+++ linux-2.6.23.17/drivers/mmc/host/Makefile
-@@ -15,4 +15,5 @@ obj-$(CONFIG_MMC_AU1X) += au1xmmc.o
+--- a/drivers/mmc/host/Makefile
++++ b/drivers/mmc/host/Makefile
+@@ -15,4 +15,5 @@
obj-$(CONFIG_MMC_OMAP) += omap.o
obj-$(CONFIG_MMC_AT91) += at91_mci.o
obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o
+obj-$(CONFIG_MMC_SPI) += mmc_spi.o
-Index: linux-2.6.23.17/drivers/mmc/host/mmc_spi.c
-===================================================================
--- /dev/null
-+++ linux-2.6.23.17/drivers/mmc/host/mmc_spi.c
++++ b/drivers/mmc/host/mmc_spi.c
@@ -0,0 +1,1419 @@
+/*
+ * mmc_spi.c - Access SD/MMC cards through SPI master controllers
@@ -1457,10 +1451,8 @@ Index: linux-2.6.23.17/drivers/mmc/host/mmc_spi.c
+ "Hans-Peter Nilsson, Jan Nikitenko");
+MODULE_DESCRIPTION("SPI SD/MMC host driver");
+MODULE_LICENSE("GPL");
-Index: linux-2.6.23.17/include/linux/spi/mmc_spi.h
-===================================================================
--- /dev/null
-+++ linux-2.6.23.17/include/linux/spi/mmc_spi.h
++++ b/include/linux/spi/mmc_spi.h
@@ -0,0 +1,33 @@
+#ifndef __LINUX_SPI_MMC_SPI_H
+#define __LINUX_SPI_MMC_SPI_H
@@ -1495,10 +1487,8 @@ Index: linux-2.6.23.17/include/linux/spi/mmc_spi.h
+};
+
+#endif /* __LINUX_SPI_MMC_SPI_H */
-Index: linux-2.6.23.17/drivers/mmc/core/bus.c
-===================================================================
---- linux-2.6.23.17.orig/drivers/mmc/core/bus.c
-+++ linux-2.6.23.17/drivers/mmc/core/bus.c
+--- a/drivers/mmc/core/bus.c
++++ b/drivers/mmc/core/bus.c
@@ -19,6 +19,7 @@
#include "sysfs.h"
@@ -1507,7 +1497,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/bus.c
#include "bus.h"
#define dev_to_mmc_card(d) container_of(d, struct mmc_card, dev)
-@@ -34,6 +35,8 @@ static ssize_t mmc_type_show(struct devi
+@@ -34,6 +35,8 @@
return sprintf(buf, "MMC\n");
case MMC_TYPE_SD:
return sprintf(buf, "SD\n");
@@ -1516,7 +1506,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/bus.c
default:
return -EFAULT;
}
-@@ -55,36 +58,37 @@ static int mmc_bus_match(struct device *
+@@ -55,36 +58,37 @@
}
static int
@@ -1572,7 +1562,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/bus.c
}
static int mmc_bus_probe(struct device *dev)
-@@ -176,6 +180,11 @@ static void mmc_release_card(struct devi
+@@ -176,6 +180,11 @@
{
struct mmc_card *card = dev_to_mmc_card(dev);
@@ -1584,7 +1574,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/bus.c
kfree(card);
}
-@@ -221,15 +230,25 @@ int mmc_add_card(struct mmc_card *card)
+@@ -221,15 +230,25 @@
if (mmc_card_blockaddr(card))
type = "SDHC";
break;
@@ -1614,7 +1604,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/bus.c
card->dev.uevent_suppress = 1;
-@@ -261,8 +280,13 @@ int mmc_add_card(struct mmc_card *card)
+@@ -261,8 +280,13 @@
void mmc_remove_card(struct mmc_card *card)
{
if (mmc_card_present(card)) {
@@ -1630,10 +1620,8 @@ Index: linux-2.6.23.17/drivers/mmc/core/bus.c
if (card->host->bus_ops->sysfs_remove)
card->host->bus_ops->sysfs_remove(card->host, card);
-Index: linux-2.6.23.17/drivers/mmc/core/core.c
-===================================================================
---- linux-2.6.23.17.orig/drivers/mmc/core/core.c
-+++ linux-2.6.23.17/drivers/mmc/core/core.c
+--- a/drivers/mmc/core/core.c
++++ b/drivers/mmc/core/core.c
@@ -18,7 +18,7 @@
#include <linux/delay.h>
#include <linux/pagemap.h>
@@ -1671,7 +1659,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
* Internal function. Schedule delayed work in the MMC work queue.
*/
static int mmc_schedule_delayed_work(struct delayed_work *work,
-@@ -68,6 +79,11 @@ void mmc_request_done(struct mmc_host *h
+@@ -68,6 +79,11 @@
struct mmc_command *cmd = mrq->cmd;
int err = cmd->error;
@@ -1683,7 +1671,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
if (err && cmd->retries) {
pr_debug("%s: req failed (CMD%u): %d, retrying...\n",
mmc_hostname(host), cmd->opcode, err);
-@@ -76,6 +92,8 @@ void mmc_request_done(struct mmc_host *h
+@@ -76,6 +92,8 @@
cmd->error = 0;
host->ops->request(host, mrq);
} else {
@@ -1692,7 +1680,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
pr_debug("%s: req done (CMD%u): %d: %08x %08x %08x %08x\n",
mmc_hostname(host), cmd->opcode, err,
cmd->resp[0], cmd->resp[1],
-@@ -118,7 +136,7 @@ mmc_start_request(struct mmc_host *host,
+@@ -118,7 +136,7 @@
"tsac %d ms nsac %d\n",
mmc_hostname(host), mrq->data->blksz,
mrq->data->blocks, mrq->data->flags,
@@ -1701,7 +1689,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
mrq->data->timeout_clks);
}
-@@ -130,6 +148,8 @@ mmc_start_request(struct mmc_host *host,
+@@ -130,6 +148,8 @@
WARN_ON(!host->claimed);
@@ -1710,7 +1698,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
mrq->cmd->error = 0;
mrq->cmd->mrq = mrq;
if (mrq->data) {
-@@ -199,7 +219,7 @@ int mmc_wait_for_cmd(struct mmc_host *ho
+@@ -199,7 +219,7 @@
{
struct mmc_request mrq;
@@ -1719,7 +1707,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
memset(&mrq, 0, sizeof(struct mmc_request));
-@@ -220,17 +240,24 @@ EXPORT_SYMBOL(mmc_wait_for_cmd);
+@@ -220,17 +240,24 @@
* mmc_set_data_timeout - set the timeout for a data command
* @data: data phase for command
* @card: the MMC card associated with the data transfer
@@ -1747,7 +1735,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
* SD cards use a 100 multiplier rather than 10
*/
mult = mmc_card_sd(card) ? 100 : 10;
-@@ -239,7 +266,7 @@ void mmc_set_data_timeout(struct mmc_dat
+@@ -239,7 +266,7 @@
* Scale up the multiplier (and therefore the timeout) by
* the r2w factor for writes.
*/
@@ -1756,7 +1744,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
mult <<= card->csd.r2w_factor;
data->timeout_ns = card->csd.tacc_ns * mult;
-@@ -255,7 +282,7 @@ void mmc_set_data_timeout(struct mmc_dat
+@@ -255,7 +282,7 @@
timeout_us += data->timeout_clks * 1000 /
(card->host->ios.clock / 1000);
@@ -1765,7 +1753,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
limit_us = 250000;
else
limit_us = 100000;
-@@ -272,15 +299,20 @@ void mmc_set_data_timeout(struct mmc_dat
+@@ -272,15 +299,20 @@
EXPORT_SYMBOL(mmc_set_data_timeout);
/**
@@ -1789,7 +1777,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
might_sleep();
-@@ -288,19 +320,24 @@ void mmc_claim_host(struct mmc_host *hos
+@@ -288,19 +320,24 @@
spin_lock_irqsave(&host->lock, flags);
while (1) {
set_current_state(TASK_UNINTERRUPTIBLE);
@@ -1817,7 +1805,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
/**
* mmc_release_host - release a host
-@@ -313,7 +350,7 @@ void mmc_release_host(struct mmc_host *h
+@@ -313,7 +350,7 @@
{
unsigned long flags;
@@ -1826,7 +1814,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
spin_lock_irqsave(&host->lock, flags);
host->claimed = 0;
-@@ -433,19 +470,32 @@ static void mmc_power_up(struct mmc_host
+@@ -433,19 +470,32 @@
int bit = fls(host->ocr_avail) - 1;
host->ios.vdd = bit;
@@ -1862,7 +1850,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
mmc_delay(2);
}
-@@ -453,8 +503,10 @@ static void mmc_power_off(struct mmc_hos
+@@ -453,8 +503,10 @@
{
host->ios.clock = 0;
host->ios.vdd = 0;
@@ -1875,7 +1863,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
host->ios.power_mode = MMC_POWER_OFF;
host->ios.bus_width = MMC_BUS_WIDTH_1;
host->ios.timing = MMC_TIMING_LEGACY;
-@@ -511,7 +563,7 @@ void mmc_attach_bus(struct mmc_host *hos
+@@ -511,7 +563,7 @@
BUG_ON(!host);
BUG_ON(!ops);
@@ -1884,7 +1872,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
spin_lock_irqsave(&host->lock, flags);
-@@ -535,8 +587,8 @@ void mmc_detach_bus(struct mmc_host *hos
+@@ -535,8 +587,8 @@
BUG_ON(!host);
@@ -1895,7 +1883,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
spin_lock_irqsave(&host->lock, flags);
-@@ -564,7 +616,7 @@ void mmc_detect_change(struct mmc_host *
+@@ -564,7 +616,7 @@
#ifdef CONFIG_MMC_DEBUG
unsigned long flags;
spin_lock_irqsave(&host->lock, flags);
@@ -1904,7 +1892,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
spin_unlock_irqrestore(&host->lock, flags);
#endif
-@@ -597,24 +649,38 @@ void mmc_rescan(struct work_struct *work
+@@ -597,24 +649,38 @@
mmc_send_if_cond(host, host->ocr_avail);
@@ -1956,7 +1944,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
} else {
if (host->bus_ops->detect && !host->bus_dead)
host->bus_ops->detect(host);
-@@ -725,22 +791,38 @@ static int __init mmc_init(void)
+@@ -725,22 +791,38 @@
return -ENOMEM;
ret = mmc_register_bus();
@@ -2001,11 +1989,9 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.c
module_exit(mmc_exit);
MODULE_LICENSE("GPL");
-Index: linux-2.6.23.17/drivers/mmc/core/core.h
-===================================================================
---- linux-2.6.23.17.orig/drivers/mmc/core/core.h
-+++ linux-2.6.23.17/drivers/mmc/core/core.h
-@@ -48,5 +48,7 @@ void mmc_rescan(struct work_struct *work
+--- a/drivers/mmc/core/core.h
++++ b/drivers/mmc/core/core.h
+@@ -48,5 +48,7 @@
void mmc_start_host(struct mmc_host *host);
void mmc_stop_host(struct mmc_host *host);
@@ -2013,10 +1999,8 @@ Index: linux-2.6.23.17/drivers/mmc/core/core.h
+
#endif
-Index: linux-2.6.23.17/drivers/mmc/core/host.c
-===================================================================
---- linux-2.6.23.17.orig/drivers/mmc/core/host.c
-+++ linux-2.6.23.17/drivers/mmc/core/host.c
+--- a/drivers/mmc/core/host.c
++++ b/drivers/mmc/core/host.c
@@ -15,6 +15,7 @@
#include <linux/err.h>
#include <linux/idr.h>
@@ -2025,7 +2009,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/host.c
#include <linux/mmc/host.h>
-@@ -100,6 +101,9 @@ int mmc_add_host(struct mmc_host *host)
+@@ -100,6 +101,9 @@
{
int err;
@@ -2035,7 +2019,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/host.c
if (!idr_pre_get(&mmc_host_idr, GFP_KERNEL))
return -ENOMEM;
-@@ -112,6 +116,8 @@ int mmc_add_host(struct mmc_host *host)
+@@ -112,6 +116,8 @@
snprintf(host->class_dev.bus_id, BUS_ID_SIZE,
"mmc%d", host->index);
@@ -2044,7 +2028,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/host.c
err = device_add(&host->class_dev);
if (err)
return err;
-@@ -137,6 +143,8 @@ void mmc_remove_host(struct mmc_host *ho
+@@ -137,6 +143,8 @@
device_del(&host->class_dev);
@@ -2053,11 +2037,9 @@ Index: linux-2.6.23.17/drivers/mmc/core/host.c
spin_lock(&mmc_host_lock);
idr_remove(&mmc_host_idr, host->index);
spin_unlock(&mmc_host_lock);
-Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
-===================================================================
---- linux-2.6.23.17.orig/drivers/mmc/core/mmc.c
-+++ linux-2.6.23.17/drivers/mmc/core/mmc.c
-@@ -161,13 +161,12 @@ static int mmc_read_ext_csd(struct mmc_c
+--- a/drivers/mmc/core/mmc.c
++++ b/drivers/mmc/core/mmc.c
+@@ -161,13 +161,12 @@
{
int err;
u8 *ext_csd;
@@ -2073,7 +2055,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
/*
* As the ext_csd is so large and mostly unused, we don't store the
-@@ -176,13 +175,19 @@ static int mmc_read_ext_csd(struct mmc_c
+@@ -176,13 +175,19 @@
ext_csd = kmalloc(512, GFP_KERNEL);
if (!ext_csd) {
printk(KERN_ERR "%s: could not allocate a buffer to "
@@ -2097,7 +2079,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
/*
* High capacity cards should have this "magic" size
* stored in their CSD.
-@@ -197,18 +202,30 @@ static int mmc_read_ext_csd(struct mmc_c
+@@ -197,18 +202,30 @@
"EXT_CSD, performance might "
"suffer.\n",
mmc_hostname(card->host));
@@ -2136,7 +2118,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
switch (ext_csd[EXT_CSD_CARD_TYPE]) {
case EXT_CSD_CARD_TYPE_52 | EXT_CSD_CARD_TYPE_26:
-@@ -246,7 +263,7 @@ static int mmc_init_card(struct mmc_host
+@@ -246,7 +263,7 @@
unsigned int max_dtr;
BUG_ON(!host);
@@ -2145,7 +2127,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
/*
* Since we're changing the OCR value, we seem to
-@@ -258,19 +275,33 @@ static int mmc_init_card(struct mmc_host
+@@ -258,19 +275,33 @@
/* The extra bit indicates that we support high capacity */
err = mmc_send_op_cond(host, ocr | (1 << 30), NULL);
@@ -2183,7 +2165,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
card = oldcard;
} else {
-@@ -278,8 +309,10 @@ static int mmc_init_card(struct mmc_host
+@@ -278,8 +309,10 @@
* Allocate card structure.
*/
card = mmc_alloc_card(host);
@@ -2195,7 +2177,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
card->type = MMC_TYPE_MMC;
card->rca = 1;
-@@ -287,43 +320,47 @@ static int mmc_init_card(struct mmc_host
+@@ -287,43 +320,47 @@
}
/*
@@ -2256,7 +2238,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
goto free_card;
}
-@@ -334,7 +371,7 @@ static int mmc_init_card(struct mmc_host
+@@ -334,7 +371,7 @@
(host->caps & MMC_CAP_MMC_HIGHSPEED)) {
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
EXT_CSD_HS_TIMING, 1);
@@ -2265,7 +2247,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
goto free_card;
mmc_card_set_highspeed(card);
-@@ -363,7 +400,7 @@ static int mmc_init_card(struct mmc_host
+@@ -363,7 +400,7 @@
(host->caps & MMC_CAP_4_BIT_DATA)) {
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
EXT_CSD_BUS_WIDTH, EXT_CSD_BUS_WIDTH_4);
@@ -2274,7 +2256,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
goto free_card;
mmc_set_bus_width(card->host, MMC_BUS_WIDTH_4);
-@@ -372,14 +409,14 @@ static int mmc_init_card(struct mmc_host
+@@ -372,14 +409,14 @@
if (!oldcard)
host->card = card;
@@ -2291,7 +2273,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
}
/*
-@@ -413,7 +450,7 @@ static void mmc_detect(struct mmc_host *
+@@ -413,7 +450,7 @@
mmc_release_host(host);
@@ -2300,7 +2282,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
mmc_remove(host);
mmc_claim_host(host);
-@@ -480,7 +517,8 @@ static void mmc_suspend(struct mmc_host
+@@ -480,7 +517,8 @@
BUG_ON(!host->card);
mmc_claim_host(host);
@@ -2310,7 +2292,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
host->card->state &= ~MMC_STATE_HIGHSPEED;
mmc_release_host(host);
}
-@@ -502,7 +540,7 @@ static void mmc_resume(struct mmc_host *
+@@ -502,7 +540,7 @@
err = mmc_init_card(host, host->ocr, host->card);
mmc_release_host(host);
@@ -2319,7 +2301,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
mmc_remove(host);
mmc_claim_host(host);
-@@ -536,11 +574,20 @@ int mmc_attach_mmc(struct mmc_host *host
+@@ -536,11 +574,20 @@
int err;
BUG_ON(!host);
@@ -2341,7 +2323,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
* Sanity check the voltages that the card claims to
* support.
*/
-@@ -565,7 +612,7 @@ int mmc_attach_mmc(struct mmc_host *host
+@@ -565,7 +612,7 @@
* Detect and init the card.
*/
err = mmc_init_card(host, host->ocr, NULL);
@@ -2350,7 +2332,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
goto err;
mmc_release_host(host);
-@@ -587,6 +634,6 @@ err:
+@@ -587,6 +634,6 @@
printk(KERN_ERR "%s: error %d whilst initialising MMC card\n",
mmc_hostname(host), err);
@@ -2358,10 +2340,8 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc.c
+ return err;
}
-Index: linux-2.6.23.17/drivers/mmc/core/mmc_ops.c
-===================================================================
---- linux-2.6.23.17.orig/drivers/mmc/core/mmc_ops.c
-+++ linux-2.6.23.17/drivers/mmc/core/mmc_ops.c
+--- a/drivers/mmc/core/mmc_ops.c
++++ b/drivers/mmc/core/mmc_ops.c
@@ -10,7 +10,6 @@
*/
@@ -2370,7 +2350,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc_ops.c
#include <linux/scatterlist.h>
#include <linux/mmc/host.h>
-@@ -40,10 +39,10 @@ static int _mmc_select_card(struct mmc_h
+@@ -40,10 +39,10 @@
}
err = mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES);
@@ -2383,7 +2363,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc_ops.c
}
int mmc_select_card(struct mmc_card *card)
-@@ -63,23 +62,36 @@ int mmc_go_idle(struct mmc_host *host)
+@@ -63,23 +62,36 @@
int err;
struct mmc_command cmd;
@@ -2426,7 +2406,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc_ops.c
return err;
}
-@@ -94,23 +106,33 @@ int mmc_send_op_cond(struct mmc_host *ho
+@@ -94,23 +106,33 @@
memset(&cmd, 0, sizeof(struct mmc_command));
cmd.opcode = MMC_SEND_OP_COND;
@@ -2466,7 +2446,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc_ops.c
*rocr = cmd.resp[0];
return err;
-@@ -131,12 +153,12 @@ int mmc_all_send_cid(struct mmc_host *ho
+@@ -131,12 +153,12 @@
cmd.flags = MMC_RSP_R2 | MMC_CMD_BCR;
err = mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES);
@@ -2481,7 +2461,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc_ops.c
}
int mmc_set_relative_addr(struct mmc_card *card)
-@@ -154,46 +176,52 @@ int mmc_set_relative_addr(struct mmc_car
+@@ -154,46 +176,52 @@
cmd.flags = MMC_RSP_R1 | MMC_CMD_AC;
err = mmc_wait_for_cmd(card->host, &cmd, MMC_CMD_RETRIES);
@@ -2550,7 +2530,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc_ops.c
memset(&mrq, 0, sizeof(struct mmc_request));
memset(&cmd, 0, sizeof(struct mmc_command));
-@@ -202,28 +230,117 @@ int mmc_send_ext_csd(struct mmc_card *ca
+@@ -202,28 +230,117 @@
mrq.cmd = &cmd;
mrq.data = &data;
@@ -2677,7 +2657,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc_ops.c
}
int mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value)
-@@ -241,13 +358,13 @@ int mmc_switch(struct mmc_card *card, u8
+@@ -241,13 +358,13 @@
(index << 16) |
(value << 8) |
set;
@@ -2694,7 +2674,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc_ops.c
}
int mmc_send_status(struct mmc_card *card, u32 *status)
-@@ -261,16 +378,20 @@ int mmc_send_status(struct mmc_card *car
+@@ -261,16 +378,20 @@
memset(&cmd, 0, sizeof(struct mmc_command));
cmd.opcode = MMC_SEND_STATUS;
@@ -2719,11 +2699,9 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc_ops.c
+ return 0;
}
-Index: linux-2.6.23.17/drivers/mmc/core/mmc_ops.h
-===================================================================
---- linux-2.6.23.17.orig/drivers/mmc/core/mmc_ops.h
-+++ linux-2.6.23.17/drivers/mmc/core/mmc_ops.h
-@@ -22,6 +22,9 @@ int mmc_send_csd(struct mmc_card *card,
+--- a/drivers/mmc/core/mmc_ops.h
++++ b/drivers/mmc/core/mmc_ops.h
+@@ -22,6 +22,9 @@
int mmc_send_ext_csd(struct mmc_card *card, u8 *ext_csd);
int mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value);
int mmc_send_status(struct mmc_card *card, u32 *status);
@@ -2733,11 +2711,9 @@ Index: linux-2.6.23.17/drivers/mmc/core/mmc_ops.h
#endif
-Index: linux-2.6.23.17/drivers/mmc/core/sd.c
-===================================================================
---- linux-2.6.23.17.orig/drivers/mmc/core/sd.c
-+++ linux-2.6.23.17/drivers/mmc/core/sd.c
-@@ -166,8 +166,6 @@ static int mmc_decode_scr(struct mmc_car
+--- a/drivers/mmc/core/sd.c
++++ b/drivers/mmc/core/sd.c
+@@ -166,8 +166,6 @@
unsigned int scr_struct;
u32 resp[4];
@@ -2746,7 +2722,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
resp[3] = card->raw_scr[1];
resp[2] = card->raw_scr[0];
-@@ -193,30 +191,38 @@ static int mmc_read_switch(struct mmc_ca
+@@ -193,30 +191,38 @@
u8 *status;
if (card->scr.sda_vsn < SCR_SPEC_VER_1)
@@ -2791,7 +2767,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
goto out;
}
-@@ -238,28 +244,28 @@ static int mmc_switch_hs(struct mmc_card
+@@ -238,28 +244,28 @@
u8 *status;
if (card->scr.sda_vsn < SCR_SPEC_VER_1)
@@ -2827,7 +2803,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
goto out;
if ((status[16] & 0xF) != 1) {
-@@ -292,7 +298,7 @@ static int mmc_sd_init_card(struct mmc_h
+@@ -292,7 +298,7 @@
unsigned int max_dtr;
BUG_ON(!host);
@@ -2836,7 +2812,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
/*
* Since we're changing the OCR value, we seem to
-@@ -309,23 +315,37 @@ static int mmc_sd_init_card(struct mmc_h
+@@ -309,23 +315,37 @@
* block-addressed SDHC cards.
*/
err = mmc_send_if_cond(host, ocr);
@@ -2879,7 +2855,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
card = oldcard;
} else {
-@@ -333,32 +353,36 @@ static int mmc_sd_init_card(struct mmc_h
+@@ -333,32 +353,36 @@
* Allocate card structure.
*/
card = mmc_alloc_card(host);
@@ -2924,7 +2900,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
goto free_card;
mmc_decode_cid(card);
-@@ -367,16 +391,18 @@ static int mmc_sd_init_card(struct mmc_h
+@@ -367,16 +391,18 @@
/*
* Select card, as all following commands rely on that.
*/
@@ -2947,7 +2923,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
goto free_card;
err = mmc_decode_scr(card);
-@@ -387,7 +413,7 @@ static int mmc_sd_init_card(struct mmc_h
+@@ -387,7 +413,7 @@
* Fetch switch information from card.
*/
err = mmc_read_switch(card);
@@ -2956,7 +2932,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
goto free_card;
}
-@@ -395,7 +421,7 @@ static int mmc_sd_init_card(struct mmc_h
+@@ -395,7 +421,7 @@
* Attempt to change to high-speed (if supported)
*/
err = mmc_switch_hs(card);
@@ -2965,7 +2941,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
goto free_card;
/*
-@@ -418,7 +444,7 @@ static int mmc_sd_init_card(struct mmc_h
+@@ -418,7 +444,7 @@
if ((host->caps & MMC_CAP_4_BIT_DATA) &&
(card->scr.bus_widths & SD_SCR_BUS_WIDTH_4)) {
err = mmc_app_set_bus_width(card, MMC_BUS_WIDTH_4);
@@ -2974,7 +2950,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
goto free_card;
mmc_set_bus_width(host, MMC_BUS_WIDTH_4);
-@@ -442,14 +468,14 @@ static int mmc_sd_init_card(struct mmc_h
+@@ -442,14 +468,14 @@
if (!oldcard)
host->card = card;
@@ -2991,7 +2967,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
}
/*
-@@ -483,7 +509,7 @@ static void mmc_sd_detect(struct mmc_hos
+@@ -483,7 +509,7 @@
mmc_release_host(host);
@@ -3000,7 +2976,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
mmc_sd_remove(host);
mmc_claim_host(host);
-@@ -552,7 +578,8 @@ static void mmc_sd_suspend(struct mmc_ho
+@@ -552,7 +578,8 @@
BUG_ON(!host->card);
mmc_claim_host(host);
@@ -3010,7 +2986,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
host->card->state &= ~MMC_STATE_HIGHSPEED;
mmc_release_host(host);
}
-@@ -574,7 +601,7 @@ static void mmc_sd_resume(struct mmc_hos
+@@ -574,7 +601,7 @@
err = mmc_sd_init_card(host, host->ocr, host->card);
mmc_release_host(host);
@@ -3019,7 +2995,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
mmc_sd_remove(host);
mmc_claim_host(host);
-@@ -608,11 +635,22 @@ int mmc_attach_sd(struct mmc_host *host,
+@@ -608,11 +635,22 @@
int err;
BUG_ON(!host);
@@ -3043,7 +3019,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
* Sanity check the voltages that the card claims to
* support.
*/
-@@ -644,7 +682,7 @@ int mmc_attach_sd(struct mmc_host *host,
+@@ -644,7 +682,7 @@
* Detect and init the card.
*/
err = mmc_sd_init_card(host, host->ocr, NULL);
@@ -3052,7 +3028,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
goto err;
mmc_release_host(host);
-@@ -666,6 +704,6 @@ err:
+@@ -666,6 +704,6 @@
printk(KERN_ERR "%s: error %d whilst initialising SD card\n",
mmc_hostname(host), err);
@@ -3060,10 +3036,8 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd.c
+ return err;
}
-Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
-===================================================================
---- linux-2.6.23.17.orig/drivers/mmc/core/sd_ops.c
-+++ linux-2.6.23.17/drivers/mmc/core/sd_ops.c
+--- a/drivers/mmc/core/sd_ops.c
++++ b/drivers/mmc/core/sd_ops.c
@@ -10,7 +10,6 @@
*/
@@ -3072,7 +3046,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
#include <linux/scatterlist.h>
#include <linux/mmc/host.h>
-@@ -33,21 +32,21 @@ static int mmc_app_cmd(struct mmc_host *
+@@ -33,21 +32,21 @@
if (card) {
cmd.arg = card->rca << 16;
@@ -3100,7 +3074,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
}
/**
-@@ -73,7 +72,7 @@ int mmc_wait_for_app_cmd(struct mmc_host
+@@ -73,7 +72,7 @@
BUG_ON(!cmd);
BUG_ON(retries < 0);
@@ -3109,7 +3083,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
/*
* We have to resend MMC_APP_CMD for each attempt so
-@@ -83,8 +82,14 @@ int mmc_wait_for_app_cmd(struct mmc_host
+@@ -83,8 +82,14 @@
memset(&mrq, 0, sizeof(struct mmc_request));
err = mmc_app_cmd(host, card);
@@ -3125,7 +3099,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
memset(&mrq, 0, sizeof(struct mmc_request));
-@@ -97,8 +102,14 @@ int mmc_wait_for_app_cmd(struct mmc_host
+@@ -97,8 +102,14 @@
mmc_wait_for_req(host, &mrq);
err = cmd->error;
@@ -3141,7 +3115,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
}
return err;
-@@ -127,14 +138,14 @@ int mmc_app_set_bus_width(struct mmc_car
+@@ -127,14 +138,14 @@
cmd.arg = SD_BUS_WIDTH_4;
break;
default:
@@ -3159,7 +3133,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
}
int mmc_send_app_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr)
-@@ -147,23 +158,36 @@ int mmc_send_app_op_cond(struct mmc_host
+@@ -147,23 +158,36 @@
memset(&cmd, 0, sizeof(struct mmc_command));
cmd.opcode = SD_APP_OP_COND;
@@ -3202,7 +3176,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
*rocr = cmd.resp[0];
return err;
-@@ -174,6 +198,7 @@ int mmc_send_if_cond(struct mmc_host *ho
+@@ -174,6 +198,7 @@
struct mmc_command cmd;
int err;
static const u8 test_pattern = 0xAA;
@@ -3210,7 +3184,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
/*
* To support SD 2.0 cards, we must always invoke SD_SEND_IF_COND
-@@ -182,16 +207,21 @@ int mmc_send_if_cond(struct mmc_host *ho
+@@ -182,16 +207,21 @@
*/
cmd.opcode = SD_SEND_IF_COND;
cmd.arg = ((ocr & 0xFF8000) != 0) << 8 | test_pattern;
@@ -3237,7 +3211,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
}
int mmc_send_relative_addr(struct mmc_host *host, unsigned int *rca)
-@@ -209,12 +239,12 @@ int mmc_send_relative_addr(struct mmc_ho
+@@ -209,12 +239,12 @@
cmd.flags = MMC_RSP_R6 | MMC_CMD_BCR;
err = mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES);
@@ -3252,7 +3226,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
}
int mmc_app_send_scr(struct mmc_card *card, u32 *scr)
-@@ -229,8 +259,10 @@ int mmc_app_send_scr(struct mmc_card *ca
+@@ -229,8 +259,10 @@
BUG_ON(!card->host);
BUG_ON(!scr);
@@ -3264,7 +3238,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
return err;
memset(&mrq, 0, sizeof(struct mmc_request));
-@@ -242,7 +274,7 @@ int mmc_app_send_scr(struct mmc_card *ca
+@@ -242,7 +274,7 @@
cmd.opcode = SD_APP_SEND_SCR;
cmd.arg = 0;
@@ -3273,7 +3247,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
data.blksz = 8;
data.blocks = 1;
-@@ -252,19 +284,19 @@ int mmc_app_send_scr(struct mmc_card *ca
+@@ -252,19 +284,19 @@
sg_init_one(&sg, scr, 8);
@@ -3299,7 +3273,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
}
int mmc_sd_switch(struct mmc_card *card, int mode, int group,
-@@ -278,6 +310,8 @@ int mmc_sd_switch(struct mmc_card *card,
+@@ -278,6 +310,8 @@
BUG_ON(!card);
BUG_ON(!card->host);
@@ -3308,7 +3282,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
mode = !!mode;
value &= 0xF;
-@@ -292,7 +326,7 @@ int mmc_sd_switch(struct mmc_card *card,
+@@ -292,7 +326,7 @@
cmd.arg = mode << 31 | 0x00FFFFFF;
cmd.arg &= ~(0xF << (group * 4));
cmd.arg |= value << (group * 4);
@@ -3317,7 +3291,7 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
data.blksz = 64;
data.blocks = 1;
-@@ -302,15 +336,15 @@ int mmc_sd_switch(struct mmc_card *card,
+@@ -302,15 +336,15 @@
sg_init_one(&sg, resp, 64);
@@ -3337,10 +3311,8 @@ Index: linux-2.6.23.17/drivers/mmc/core/sd_ops.c
+ return 0;
}
-Index: linux-2.6.23.17/drivers/mmc/core/sdio.c
-===================================================================
--- /dev/null
-+++ linux-2.6.23.17/drivers/mmc/core/sdio.c
++++ b/drivers/mmc/core/sdio.c
@@ -0,0 +1,395 @@
+/*
+ * linux/drivers/mmc/sdio.c
@@ -3737,10 +3709,8 @@ Index: linux-2.6.23.17/drivers/mmc/core/sdio.c
+ return err;
+}
+
-Index: linux-2.6.23.17/drivers/mmc/core/sdio_bus.c
-===================================================================
--- /dev/null
-+++ linux-2.6.23.17/drivers/mmc/core/sdio_bus.c
++++ b/drivers/mmc/core/sdio_bus.c
@@ -0,0 +1,265 @@
+/*
+ * linux/drivers/mmc/core/sdio_bus.c
@@ -4007,10 +3977,8 @@ Index: linux-2.6.23.17/drivers/mmc/core/sdio_bus.c
+ put_device(&func->dev);
+}
+
-Index: linux-2.6.23.17/drivers/mmc/core/sdio_bus.h
-===================================================================
--- /dev/null
-+++ linux-2.6.23.17/drivers/mmc/core/sdio_bus.h
++++ b/drivers/mmc/core/sdio_bus.h
@@ -0,0 +1,22 @@
+/*
+ * linux/drivers/mmc/core/sdio_bus.h
@@ -4034,10 +4002,8 @@ Index: linux-2.6.23.17/drivers/mmc/core/sdio_bus.h
+
+#endif
+
-Index: linux-2.6.23.17/drivers/mmc/core/sdio_cis.c
-===================================================================
--- /dev/null
-+++ linux-2.6.23.17/drivers/mmc/core/sdio_cis.c
++++ b/drivers/mmc/core/sdio_cis.c
@@ -0,0 +1,346 @@
+/*
+ * linux/drivers/mmc/core/sdio_cis.c
@@ -4385,10 +4351,8 @@ Index: linux-2.6.23.17/drivers/mmc/core/sdio_cis.c
+ put_device(&func->card->dev);
+}
+
-Index: linux-2.6.23.17/drivers/mmc/core/sdio_cis.h
-===================================================================
--- /dev/null
-+++ linux-2.6.23.17/drivers/mmc/core/sdio_cis.h
++++ b/drivers/mmc/core/sdio_cis.h
@@ -0,0 +1,23 @@
+/*
+ * linux/drivers/mmc/core/sdio_cis.h
@@ -4413,10 +4377,8 @@ Index: linux-2.6.23.17/drivers/mmc/core/sdio_cis.h
+void sdio_free_func_cis(struct sdio_func *func);
+
+#endif
-Index: linux-2.6.23.17/drivers/mmc/core/sdio_io.c
-===================================================================
--- /dev/null
-+++ linux-2.6.23.17/drivers/mmc/core/sdio_io.c
++++ b/drivers/mmc/core/sdio_io.c
@@ -0,0 +1,548 @@
+/*
+ * linux/drivers/mmc/core/sdio_io.c
@@ -4966,10 +4928,8 @@ Index: linux-2.6.23.17/drivers/mmc/core/sdio_io.c
+ *err_ret = ret;
+}
+EXPORT_SYMBOL_GPL(sdio_f0_writeb);
-Index: linux-2.6.23.17/drivers/mmc/core/sdio_irq.c
-===================================================================
--- /dev/null
-+++ linux-2.6.23.17/drivers/mmc/core/sdio_irq.c
++++ b/drivers/mmc/core/sdio_irq.c
@@ -0,0 +1,267 @@
+/*
+ * linux/drivers/mmc/core/sdio_irq.c
@@ -5238,10 +5198,8 @@ Index: linux-2.6.23.17/drivers/mmc/core/sdio_irq.c
+}
+EXPORT_SYMBOL_GPL(sdio_release_irq);
+
-Index: linux-2.6.23.17/drivers/mmc/core/sdio_ops.c
-===================================================================
--- /dev/null
-+++ linux-2.6.23.17/drivers/mmc/core/sdio_ops.c
++++ b/drivers/mmc/core/sdio_ops.c
@@ -0,0 +1,175 @@
+/*
+ * linux/drivers/mmc/sdio_ops.c
@@ -5418,10 +5376,8 @@ Index: linux-2.6.23.17/drivers/mmc/core/sdio_ops.c
+ return 0;
+}
+
-Index: linux-2.6.23.17/drivers/mmc/core/sdio_ops.h
-===================================================================
--- /dev/null
-+++ linux-2.6.23.17/drivers/mmc/core/sdio_ops.h
++++ b/drivers/mmc/core/sdio_ops.h
@@ -0,0 +1,22 @@
+/*
+ * linux/drivers/mmc/sdio_ops.c
@@ -5445,11 +5401,9 @@ Index: linux-2.6.23.17/drivers/mmc/core/sdio_ops.h
+
+#endif
+
-Index: linux-2.6.23.17/include/linux/mmc/card.h
-===================================================================
---- linux-2.6.23.17.orig/include/linux/mmc/card.h
-+++ linux-2.6.23.17/include/linux/mmc/card.h
-@@ -55,7 +55,28 @@ struct sd_switch_caps {
+--- a/include/linux/mmc/card.h
++++ b/include/linux/mmc/card.h
+@@ -55,7 +55,28 @@
unsigned int hs_max_dtr;
};
@@ -5478,7 +5432,7 @@ Index: linux-2.6.23.17/include/linux/mmc/card.h
/*
* MMC device
-@@ -67,11 +88,13 @@ struct mmc_card {
+@@ -67,11 +88,13 @@
unsigned int type; /* card type */
#define MMC_TYPE_MMC 0 /* MMC card */
#define MMC_TYPE_SD 1 /* SD card */
@@ -5492,7 +5446,7 @@ Index: linux-2.6.23.17/include/linux/mmc/card.h
u32 raw_cid[4]; /* raw card CID */
u32 raw_csd[4]; /* raw card CSD */
u32 raw_scr[2]; /* raw card SCR */
-@@ -80,10 +103,19 @@ struct mmc_card {
+@@ -80,10 +103,19 @@
struct mmc_ext_csd ext_csd; /* mmc v4 extended card specific */
struct sd_scr scr; /* extra SD information */
struct sd_switch_caps sw_caps; /* switch (CMD6) caps */
@@ -5512,11 +5466,9 @@ Index: linux-2.6.23.17/include/linux/mmc/card.h
#define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT)
#define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY)
-Index: linux-2.6.23.17/include/linux/mmc/core.h
-===================================================================
---- linux-2.6.23.17.orig/include/linux/mmc/core.h
-+++ linux-2.6.23.17/include/linux/mmc/core.h
-@@ -25,14 +25,20 @@ struct mmc_command {
+--- a/include/linux/mmc/core.h
++++ b/include/linux/mmc/core.h
+@@ -25,14 +25,20 @@
#define MMC_RSP_CRC (1 << 2) /* expect valid crc */
#define MMC_RSP_BUSY (1 << 3) /* card may send busy */
#define MMC_RSP_OPCODE (1 << 4) /* response contains opcode */
@@ -5539,7 +5491,7 @@ Index: linux-2.6.23.17/include/linux/mmc/core.h
* patterns of the above flags. One additional valid pattern
* is all zeros, which means we don't expect a response.
*/
-@@ -41,12 +47,30 @@ struct mmc_command {
+@@ -41,12 +47,30 @@
#define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY)
#define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC)
#define MMC_RSP_R3 (MMC_RSP_PRESENT)
@@ -5570,7 +5522,7 @@ Index: linux-2.6.23.17/include/linux/mmc/core.h
* These are the command types.
*/
#define mmc_cmd_type(cmd) ((cmd)->flags & MMC_CMD_MASK)
-@@ -54,12 +78,19 @@ struct mmc_command {
+@@ -54,12 +78,19 @@
unsigned int retries; /* max number of retries */
unsigned int error; /* command error */
@@ -5596,7 +5548,7 @@ Index: linux-2.6.23.17/include/linux/mmc/core.h
struct mmc_data *data; /* data segment associated with cmd */
struct mmc_request *mrq; /* associated request */
-@@ -76,7 +107,6 @@ struct mmc_data {
+@@ -76,7 +107,6 @@
#define MMC_DATA_WRITE (1 << 8)
#define MMC_DATA_READ (1 << 9)
#define MMC_DATA_STREAM (1 << 10)
@@ -5604,7 +5556,7 @@ Index: linux-2.6.23.17/include/linux/mmc/core.h
unsigned int bytes_xfered;
-@@ -104,9 +134,20 @@ extern int mmc_wait_for_cmd(struct mmc_h
+@@ -104,9 +134,20 @@
extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *,
struct mmc_command *, int);
@@ -5627,10 +5579,8 @@ Index: linux-2.6.23.17/include/linux/mmc/core.h
+}
+
#endif
-Index: linux-2.6.23.17/include/linux/mmc/host.h
-===================================================================
---- linux-2.6.23.17.orig/include/linux/mmc/host.h
-+++ linux-2.6.23.17/include/linux/mmc/host.h
+--- a/include/linux/mmc/host.h
++++ b/include/linux/mmc/host.h
@@ -10,6 +10,8 @@
#ifndef LINUX_MMC_HOST_H
#define LINUX_MMC_HOST_H
@@ -5640,7 +5590,7 @@ Index: linux-2.6.23.17/include/linux/mmc/host.h
#include <linux/mmc/core.h>
struct mmc_ios {
-@@ -51,6 +53,7 @@ struct mmc_host_ops {
+@@ -51,6 +53,7 @@
void (*request)(struct mmc_host *host, struct mmc_request *req);
void (*set_ios)(struct mmc_host *host, struct mmc_ios *ios);
int (*get_ro)(struct mmc_host *host);
@@ -5648,7 +5598,7 @@ Index: linux-2.6.23.17/include/linux/mmc/host.h
};
struct mmc_card;
-@@ -87,9 +90,10 @@ struct mmc_host {
+@@ -87,9 +90,10 @@
#define MMC_CAP_4_BIT_DATA (1 << 0) /* Can the host do 4 bit transfers */
#define MMC_CAP_MULTIWRITE (1 << 1) /* Can accurately report bytes sent to card on error */
@@ -5662,7 +5612,7 @@ Index: linux-2.6.23.17/include/linux/mmc/host.h
/* host specific block data */
unsigned int max_seg_size; /* see blk_queue_max_segment_size */
-@@ -106,23 +110,30 @@ struct mmc_host {
+@@ -106,23 +110,30 @@
struct mmc_ios ios; /* current io bus settings */
u32 ocr; /* the current OCR setting */
@@ -5701,7 +5651,7 @@ Index: linux-2.6.23.17/include/linux/mmc/host.h
unsigned long private[0] ____cacheline_aligned;
};
-@@ -137,6 +148,8 @@ static inline void *mmc_priv(struct mmc_
+@@ -137,6 +148,8 @@
return (void *)host->private;
}
@@ -5710,7 +5660,7 @@ Index: linux-2.6.23.17/include/linux/mmc/host.h
#define mmc_dev(x) ((x)->parent)
#define mmc_classdev(x) (&(x)->class_dev)
#define mmc_hostname(x) ((x)->class_dev.bus_id)
-@@ -147,5 +160,11 @@ extern int mmc_resume_host(struct mmc_ho
+@@ -147,5 +160,11 @@
extern void mmc_detect_change(struct mmc_host *, unsigned long delay);
extern void mmc_request_done(struct mmc_host *, struct mmc_request *);
@@ -5722,10 +5672,8 @@ Index: linux-2.6.23.17/include/linux/mmc/host.h
+
#endif
-Index: linux-2.6.23.17/include/linux/mmc/mmc.h
-===================================================================
---- linux-2.6.23.17.orig/include/linux/mmc/mmc.h
-+++ linux-2.6.23.17/include/linux/mmc/mmc.h
+--- a/include/linux/mmc/mmc.h
++++ b/include/linux/mmc/mmc.h
@@ -27,7 +27,7 @@
/* Standard MMC commands (4.1) type argument response */
@@ -5801,7 +5749,7 @@ Index: linux-2.6.23.17/include/linux/mmc/mmc.h
/* These are unpacked versions of the actual responses */
struct _mmc_csd {
-@@ -182,6 +207,7 @@ struct _mmc_csd {
+@@ -182,6 +207,7 @@
*/
#define CCC_BASIC (1<<0) /* (0) Basic protocol functions */
/* (CMD0,1,2,3,4,7,9,10,12,13,15) */
@@ -5809,7 +5757,7 @@ Index: linux-2.6.23.17/include/linux/mmc/mmc.h
#define CCC_STREAM_READ (1<<1) /* (1) Stream read commands */
/* (CMD11) */
#define CCC_BLOCK_READ (1<<2) /* (2) Block read commands */
-@@ -227,6 +253,7 @@ struct _mmc_csd {
+@@ -227,6 +253,7 @@
#define EXT_CSD_BUS_WIDTH 183 /* R/W */
#define EXT_CSD_HS_TIMING 185 /* R/W */
#define EXT_CSD_CARD_TYPE 196 /* RO */
@@ -5817,10 +5765,8 @@ Index: linux-2.6.23.17/include/linux/mmc/mmc.h
#define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */
/*
-Index: linux-2.6.23.17/include/linux/mmc/sdio.h
-===================================================================
--- /dev/null
-+++ linux-2.6.23.17/include/linux/mmc/sdio.h
++++ b/include/linux/mmc/sdio.h
@@ -0,0 +1,159 @@
+/*
+ * include/linux/mmc/sdio.h
@@ -5981,10 +5927,8 @@ Index: linux-2.6.23.17/include/linux/mmc/sdio.h
+
+#endif
+
-Index: linux-2.6.23.17/include/linux/mmc/sdio_func.h
-===================================================================
--- /dev/null
-+++ linux-2.6.23.17/include/linux/mmc/sdio_func.h
++++ b/include/linux/mmc/sdio_func.h
@@ -0,0 +1,153 @@
+/*
+ * include/linux/mmc/sdio_func.h
@@ -6139,10 +6083,8 @@ Index: linux-2.6.23.17/include/linux/mmc/sdio_func.h
+
+#endif
+
-Index: linux-2.6.23.17/include/linux/mmc/sdio_ids.h
-===================================================================
--- /dev/null
-+++ linux-2.6.23.17/include/linux/mmc/sdio_ids.h
++++ b/include/linux/mmc/sdio_ids.h
@@ -0,0 +1,29 @@
+/*
+ * SDIO Classes, Interface Types, Manufacturer IDs, etc.
@@ -6173,11 +6115,9 @@ Index: linux-2.6.23.17/include/linux/mmc/sdio_ids.h
+#define SDIO_DEVICE_ID_MARVELL_LIBERTAS 0x9103
+
+#endif
-Index: linux-2.6.23.17/include/linux/mod_devicetable.h
-===================================================================
---- linux-2.6.23.17.orig/include/linux/mod_devicetable.h
-+++ linux-2.6.23.17/include/linux/mod_devicetable.h
-@@ -22,6 +22,18 @@ struct pci_device_id {
+--- a/include/linux/mod_devicetable.h
++++ b/include/linux/mod_devicetable.h
+@@ -22,6 +22,18 @@
};
@@ -6196,11 +6136,9 @@ Index: linux-2.6.23.17/include/linux/mod_devicetable.h
#define IEEE1394_MATCH_VENDOR_ID 0x0001
#define IEEE1394_MATCH_MODEL_ID 0x0002
#define IEEE1394_MATCH_SPECIFIER_ID 0x0004
-Index: linux-2.6.23.17/drivers/mmc/card/Kconfig
-===================================================================
---- linux-2.6.23.17.orig/drivers/mmc/card/Kconfig
-+++ linux-2.6.23.17/drivers/mmc/card/Kconfig
-@@ -32,3 +32,10 @@ config MMC_BLOCK_BOUNCE
+--- a/drivers/mmc/card/Kconfig
++++ b/drivers/mmc/card/Kconfig
+@@ -32,3 +32,10 @@
If unsure, say Y here.
@@ -6211,20 +6149,16 @@ Index: linux-2.6.23.17/drivers/mmc/card/Kconfig
+ SDIO function driver for SDIO cards that implements the UART
+ class, as well as the GPS class which appears like a UART.
+
-Index: linux-2.6.23.17/drivers/mmc/card/Makefile
-===================================================================
---- linux-2.6.23.17.orig/drivers/mmc/card/Makefile
-+++ linux-2.6.23.17/drivers/mmc/card/Makefile
-@@ -9,3 +9,5 @@ endif
+--- a/drivers/mmc/card/Makefile
++++ b/drivers/mmc/card/Makefile
+@@ -9,3 +9,5 @@
obj-$(CONFIG_MMC_BLOCK) += mmc_block.o
mmc_block-objs := block.o queue.o
+obj-$(CONFIG_SDIO_UART) += sdio_uart.o
+
-Index: linux-2.6.23.17/drivers/mmc/card/block.c
-===================================================================
---- linux-2.6.23.17.orig/drivers/mmc/card/block.c
-+++ linux-2.6.23.17/drivers/mmc/card/block.c
+--- a/drivers/mmc/card/block.c
++++ b/drivers/mmc/card/block.c
@@ -44,6 +44,9 @@
* max 8 partitions per card
*/
@@ -6235,7 +6169,7 @@ Index: linux-2.6.23.17/drivers/mmc/card/block.c
/*
* There is one mmc_blk_data per slot.
-@@ -80,6 +83,9 @@ static void mmc_blk_put(struct mmc_blk_d
+@@ -80,6 +83,9 @@
mutex_lock(&open_lock);
md->usage--;
if (md->usage == 0) {
@@ -6245,7 +6179,7 @@ Index: linux-2.6.23.17/drivers/mmc/card/block.c
put_disk(md->disk);
kfree(md);
}
-@@ -151,17 +157,19 @@ static u32 mmc_sd_num_wr_blocks(struct m
+@@ -151,17 +157,19 @@
cmd.opcode = MMC_APP_CMD;
cmd.arg = card->rca << 16;
@@ -6268,7 +6202,7 @@ Index: linux-2.6.23.17/drivers/mmc/card/block.c
memset(&data, 0, sizeof(struct mmc_data));
-@@ -192,7 +200,7 @@ static u32 mmc_sd_num_wr_blocks(struct m
+@@ -192,7 +200,7 @@
mmc_wait_for_req(card->host, &mrq);
@@ -6277,7 +6211,7 @@ Index: linux-2.6.23.17/drivers/mmc/card/block.c
return (u32)-1;
blocks = ntohl(blocks);
-@@ -220,17 +228,15 @@ static int mmc_blk_issue_rq(struct mmc_q
+@@ -220,17 +228,15 @@
brq.cmd.arg = req->sector;
if (!mmc_card_blockaddr(card))
brq.cmd.arg <<= 9;
@@ -6297,7 +6231,7 @@ Index: linux-2.6.23.17/drivers/mmc/card/block.c
/*
* If the host doesn't support multiple block writes, force
* block writes to single block. SD cards are excepted from
-@@ -243,8 +249,12 @@ static int mmc_blk_issue_rq(struct mmc_q
+@@ -243,8 +249,12 @@
brq.data.blocks = 1;
if (brq.data.blocks > 1) {
@@ -6312,7 +6246,7 @@ Index: linux-2.6.23.17/drivers/mmc/card/block.c
readcmd = MMC_READ_MULTIPLE_BLOCK;
writecmd = MMC_WRITE_MULTIPLE_BLOCK;
} else {
-@@ -261,6 +271,8 @@ static int mmc_blk_issue_rq(struct mmc_q
+@@ -261,6 +271,8 @@
brq.data.flags |= MMC_DATA_WRITE;
}
@@ -6321,7 +6255,7 @@ Index: linux-2.6.23.17/drivers/mmc/card/block.c
brq.data.sg = mq->sg;
brq.data.sg_len = mmc_queue_map_sg(mq);
-@@ -302,7 +314,7 @@ static int mmc_blk_issue_rq(struct mmc_q
+@@ -302,7 +314,7 @@
goto cmd_err;
}
@@ -6330,7 +6264,7 @@ Index: linux-2.6.23.17/drivers/mmc/card/block.c
do {
int err;
-@@ -315,7 +327,13 @@ static int mmc_blk_issue_rq(struct mmc_q
+@@ -315,7 +327,13 @@
req->rq_disk->disk_name, err);
goto cmd_err;
}
@@ -6345,7 +6279,7 @@ Index: linux-2.6.23.17/drivers/mmc/card/block.c
#if 0
if (cmd.resp[0] & ~0x00000900)
-@@ -394,9 +412,6 @@ static int mmc_blk_issue_rq(struct mmc_q
+@@ -394,9 +412,6 @@
return 0;
}
@@ -6355,7 +6289,7 @@ Index: linux-2.6.23.17/drivers/mmc/card/block.c
static inline int mmc_blk_readonly(struct mmc_card *card)
{
-@@ -510,7 +525,7 @@ mmc_blk_set_blksize(struct mmc_blk_data
+@@ -510,7 +525,7 @@
mmc_claim_host(card->host);
cmd.opcode = MMC_SET_BLOCKLEN;
cmd.arg = 1 << md->block_bits;
@@ -6364,7 +6298,7 @@ Index: linux-2.6.23.17/drivers/mmc/card/block.c
err = mmc_wait_for_cmd(card->host, &cmd, 5);
mmc_release_host(card->host);
-@@ -562,17 +577,12 @@ static void mmc_blk_remove(struct mmc_ca
+@@ -562,17 +577,12 @@
struct mmc_blk_data *md = mmc_get_drvdata(card);
if (md) {
@@ -6382,10 +6316,8 @@ Index: linux-2.6.23.17/drivers/mmc/card/block.c
mmc_blk_put(md);
}
mmc_set_drvdata(card, NULL);
-Index: linux-2.6.23.17/drivers/mmc/card/queue.c
-===================================================================
---- linux-2.6.23.17.orig/drivers/mmc/card/queue.c
-+++ linux-2.6.23.17/drivers/mmc/card/queue.c
+--- a/drivers/mmc/card/queue.c
++++ b/drivers/mmc/card/queue.c
@@ -13,6 +13,7 @@
#include <linux/blkdev.h>
#include <linux/freezer.h>
@@ -6407,7 +6339,7 @@ Index: linux-2.6.23.17/drivers/mmc/card/queue.c
/*
* Prepare a MMC request. This just filters out odd stuff.
*/
-@@ -159,6 +166,7 @@ int mmc_init_queue(struct mmc_queue *mq,
+@@ -159,6 +166,7 @@
ret = -ENOMEM;
goto cleanup_queue;
}
@@ -6415,7 +6347,7 @@ Index: linux-2.6.23.17/drivers/mmc/card/queue.c
mq->bounce_sg = kmalloc(sizeof(struct scatterlist) *
bouncesz / 512, GFP_KERNEL);
-@@ -166,6 +174,7 @@ int mmc_init_queue(struct mmc_queue *mq,
+@@ -166,6 +174,7 @@
ret = -ENOMEM;
goto cleanup_queue;
}
@@ -6423,7 +6355,7 @@ Index: linux-2.6.23.17/drivers/mmc/card/queue.c
}
}
#endif
-@@ -183,6 +192,7 @@ int mmc_init_queue(struct mmc_queue *mq,
+@@ -183,6 +192,7 @@
ret = -ENOMEM;
goto cleanup_queue;
}
@@ -6431,7 +6363,7 @@ Index: linux-2.6.23.17/drivers/mmc/card/queue.c
}
init_MUTEX(&mq->thread_sem);
-@@ -302,12 +312,12 @@ static void copy_sg(struct scatterlist *
+@@ -302,12 +312,12 @@
BUG_ON(dst_len == 0);
if (dst_size == 0) {
@@ -6446,7 +6378,7 @@ Index: linux-2.6.23.17/drivers/mmc/card/queue.c
src_size = src->length;
}
-@@ -353,9 +363,7 @@ unsigned int mmc_queue_map_sg(struct mmc
+@@ -353,9 +363,7 @@
return 1;
}
@@ -6457,10 +6389,8 @@ Index: linux-2.6.23.17/drivers/mmc/card/queue.c
while (sg_len) {
mq->sg[0].length += mq->bounce_sg[sg_len - 1].length;
-Index: linux-2.6.23.17/drivers/mmc/card/sdio_uart.c
-===================================================================
--- /dev/null
-+++ linux-2.6.23.17/drivers/mmc/card/sdio_uart.c
++++ b/drivers/mmc/card/sdio_uart.c
@@ -0,0 +1,1158 @@
+/*
+ * linux/drivers/mmc/card/sdio_uart.c - SDIO UART/GPS driver
@@ -7620,11 +7550,9 @@ Index: linux-2.6.23.17/drivers/mmc/card/sdio_uart.c
+
+MODULE_AUTHOR("Nicolas Pitre");
+MODULE_LICENSE("GPL");
-Index: linux-2.6.23.17/drivers/mmc/core/Makefile
-===================================================================
---- linux-2.6.23.17.orig/drivers/mmc/core/Makefile
-+++ linux-2.6.23.17/drivers/mmc/core/Makefile
-@@ -8,5 +8,7 @@ endif
+--- a/drivers/mmc/core/Makefile
++++ b/drivers/mmc/core/Makefile
+@@ -8,5 +8,7 @@
obj-$(CONFIG_MMC) += mmc_core.o
mmc_core-y := core.o sysfs.o bus.o host.o \