input: keyboard: rk_keys: add rk_keys.h
[firefly-linux-kernel-4.4.55.git] / drivers / mmc / host / rk_sdmmc.c
index 68dbc6491a442399739ffdaca693aa64dbdcc5c9..27b114179fe264a5fdbfdd9a3b79426b331e9d23 100755 (executable)
@@ -53,6 +53,7 @@
 #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"
 
@@ -111,7 +112,6 @@ static inline bool dw_mci_fifo_reset(struct dw_mci *host);
 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)
@@ -638,8 +638,7 @@ static int dw_mci_edmac_init(struct dw_mci *host)
         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;
@@ -3567,6 +3566,8 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
                        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 */
@@ -3669,9 +3670,10 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 #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;