mmc: core: rk_sdmmc: prepare for next Soc(s)

Merge branch from develop-3.10-next into develop-3.10
This commit is contained in:
lintao
2014-06-26 21:27:48 +08:00
parent 533d7de8c0
commit 78f99b8039
4 changed files with 268 additions and 74 deletions

View File

@@ -16,6 +16,7 @@
#include <linux/scatterlist.h>
#include <linux/mmc/core.h>
#include <linux/dmaengine.h>
#include <linux/timer.h>
#define MAX_MCI_SLOTS 2
@@ -36,6 +37,11 @@ enum {
EVENT_DATA_ERROR,
EVENT_XFER_ERROR
};
struct dw_mci_dma_slave {
struct dma_chan *ch;
enum dma_transfer_direction direction;
unsigned int dmach;
};
struct mmc_data;
@@ -148,6 +154,10 @@ struct dw_mci {
#else
struct dw_mci_dma_data *dma_data;
#endif
#ifdef CONFIG_MMC_DW_EDMAC
struct dw_mci_dma_slave *dms;
#endif
u32 cmd_status;
u32 data_status;
u32 stop_cmdr;
@@ -176,9 +186,10 @@ struct dw_mci {
struct dw_mci_slot *slot[MAX_MCI_SLOTS];
struct mmc_host *mmc;
struct mmc_command *pre_cmd;
unsigned int hold_reg_flag;//to fix the hold_reg value
struct timer_list dto_timer; //the timer for INT_DTO
/* Fix the hold_reg value */
unsigned int hold_reg_flag;
/* Timer for INT_DTO */
struct timer_list dto_timer;
/* FIFO push and pull */
int fifo_depth;
int data_shift;
@@ -211,7 +222,7 @@ struct dw_mci_dma_ops {
/* DMA Ops */
int (*init)(struct dw_mci *host);
void (*start)(struct dw_mci *host, unsigned int sg_len);
void (*complete)(struct dw_mci *host);
void (*complete)(void *host);
void (*stop)(struct dw_mci *host);
void (*cleanup)(struct dw_mci *host);
void (*exit)(struct dw_mci *host);