Commit 92a8cd42 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
  mmc: Fix re-probing with PM_POST_RESTORE notification
  mmc: atmel-mci: fix multiblock SDIO transfers
  mmc: at91_mci: fix multiblock SDIO transfers
parents 88a58101 274476f8
...@@ -74,6 +74,8 @@ ...@@ -74,6 +74,8 @@
#define AT91_MCI_TRTYP_BLOCK (0 << 19) #define AT91_MCI_TRTYP_BLOCK (0 << 19)
#define AT91_MCI_TRTYP_MULTIPLE (1 << 19) #define AT91_MCI_TRTYP_MULTIPLE (1 << 19)
#define AT91_MCI_TRTYP_STREAM (2 << 19) #define AT91_MCI_TRTYP_STREAM (2 << 19)
#define AT91_MCI_TRTYP_SDIO_BYTE (4 << 19)
#define AT91_MCI_TRTYP_SDIO_BLOCK (5 << 19)
#define AT91_MCI_BLKR 0x18 /* Block Register */ #define AT91_MCI_BLKR 0x18 /* Block Register */
#define AT91_MCI_BLKR_BCNT(n) ((0xffff & (n)) << 0) /* Block count */ #define AT91_MCI_BLKR_BCNT(n) ((0xffff & (n)) << 0) /* Block count */
......
...@@ -1773,6 +1773,7 @@ int mmc_pm_notify(struct notifier_block *notify_block, ...@@ -1773,6 +1773,7 @@ int mmc_pm_notify(struct notifier_block *notify_block,
case PM_POST_SUSPEND: case PM_POST_SUSPEND:
case PM_POST_HIBERNATION: case PM_POST_HIBERNATION:
case PM_POST_RESTORE:
spin_lock_irqsave(&host->lock, flags); spin_lock_irqsave(&host->lock, flags);
host->rescan_disable = 0; host->rescan_disable = 0;
......
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
#include <linux/highmem.h> #include <linux/highmem.h>
#include <linux/mmc/host.h> #include <linux/mmc/host.h>
#include <linux/mmc/sdio.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -493,10 +494,14 @@ static void at91_mci_send_command(struct at91mci_host *host, struct mmc_command ...@@ -493,10 +494,14 @@ static void at91_mci_send_command(struct at91mci_host *host, struct mmc_command
else if (data->flags & MMC_DATA_WRITE) else if (data->flags & MMC_DATA_WRITE)
cmdr |= AT91_MCI_TRCMD_START; cmdr |= AT91_MCI_TRCMD_START;
if (data->flags & MMC_DATA_STREAM) if (cmd->opcode == SD_IO_RW_EXTENDED) {
cmdr |= AT91_MCI_TRTYP_STREAM; cmdr |= AT91_MCI_TRTYP_SDIO_BLOCK;
if (data->blocks > 1) } else {
cmdr |= AT91_MCI_TRTYP_MULTIPLE; if (data->flags & MMC_DATA_STREAM)
cmdr |= AT91_MCI_TRTYP_STREAM;
if (data->blocks > 1)
cmdr |= AT91_MCI_TRTYP_MULTIPLE;
}
} }
else { else {
block_length = 0; block_length = 0;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/mmc/host.h> #include <linux/mmc/host.h>
#include <linux/mmc/sdio.h>
#include <mach/atmel-mci.h> #include <mach/atmel-mci.h>
#include <linux/atmel-mci.h> #include <linux/atmel-mci.h>
...@@ -532,12 +533,17 @@ static u32 atmci_prepare_command(struct mmc_host *mmc, ...@@ -532,12 +533,17 @@ static u32 atmci_prepare_command(struct mmc_host *mmc,
data = cmd->data; data = cmd->data;
if (data) { if (data) {
cmdr |= MCI_CMDR_START_XFER; cmdr |= MCI_CMDR_START_XFER;
if (data->flags & MMC_DATA_STREAM)
cmdr |= MCI_CMDR_STREAM; if (cmd->opcode == SD_IO_RW_EXTENDED) {
else if (data->blocks > 1) cmdr |= MCI_CMDR_SDIO_BLOCK;
cmdr |= MCI_CMDR_MULTI_BLOCK; } else {
else if (data->flags & MMC_DATA_STREAM)
cmdr |= MCI_CMDR_BLOCK; cmdr |= MCI_CMDR_STREAM;
else if (data->blocks > 1)
cmdr |= MCI_CMDR_MULTI_BLOCK;
else
cmdr |= MCI_CMDR_BLOCK;
}
if (data->flags & MMC_DATA_READ) if (data->flags & MMC_DATA_READ)
cmdr |= MCI_CMDR_TRDIR_READ; cmdr |= MCI_CMDR_TRDIR_READ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment