#include "rk_sdmmc_dbg.h"
#include <linux/regulator/rockchip_io_vol_domain.h>
#include "../../clk/rockchip/clk-ops.h"
+#include <linux/rk_keys.h>
#define RK_SDMMC_DRIVER_VERSION "Ver 2.00 2015-06-10"
static inline bool dw_mci_ctrl_all_reset(struct dw_mci *host);
static bool dw_mci_ctrl_reset(struct dw_mci *host, u32 reset);
static void dw_mci_disable_low_power(struct dw_mci_slot *slot);
-extern void rk_send_wakeup_key(void);
#if defined(CONFIG_DEBUG_FS)
static int dw_mci_req_show(struct seq_file *s, void *v)
host->dms->ch = dma_request_slave_channel(host->dev, "dw_mci");
if (!host->dms->ch) {
dev_err(host->dev,
- "Failed to get external DMA channel %d\n",
- host->dms->ch->chan_id);
+ "Failed to get external DMA channel\n");
kfree(host->dms);
host->dms = NULL;
return -ENXIO;
host->pending_events = 0;
host->completed_events = 0;
host->data_status = 0;
+ host->cmd_status = 0;
data = cmd->data;
if (data) {
regmap_write(host->grf, 0x43c, (1<<13)<<16 | (0 << 13));
} else if (cpu_is_rk3288()) {
grf_writel(((1 << 12) << 16) | (0 << 12), RK3288_GRF_SOC_CON0);
+ } else if (host->cid == DW_MCI_TYPE_RK3228) {
+ grf_writel(((1 << 8) << 16) | (0 << 8), RK3228_GRF_SOC_CON6);
}
/* We assume only low-level chip use gpio_cd */
#ifdef CONFIG_MMC_DW_IDMAC
mmc->max_segs = host->ring_size;
mmc->max_blk_size = 65536;
- mmc->max_blk_count = host->ring_size;
mmc->max_seg_size = 0x1000;
- mmc->max_req_size = mmc->max_seg_size * mmc->max_blk_count;
+ mmc->max_req_size = mmc->max_seg_size * host->ring_size;
+ mmc->max_blk_count = mmc->max_req_size / 512;
+
if(cpu_is_rk3036() || cpu_is_rk312x()){
/* fixup for external dmac setting */
mmc->max_segs = 64;