host->irq_flags = 0;
host->pdata = pdev->dev.platform_data;
host->regs = devm_ioremap_resource(&pdev->dev, regs);
+ #ifdef CONFIG_MMC_DW_EDMAC
+ host->phy_regs = (void *)(regs->start);
+ #endif
if (IS_ERR(host->regs))
return PTR_ERR(host->regs);
int ret = 0;
/* Set external dma config: burst size, burst width*/
- slave_config.dst_addr = (dma_addr_t)(host->regs + host->data_offset);
+ slave_config.dst_addr = (dma_addr_t)(host->phy_regs + host->data_offset);
slave_config.src_addr = slave_config.dst_addr;
slave_config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
slave_config.src_addr_width = slave_config.dst_addr_width;
(unsigned int)(rockchip_soc_id & ROCKCHIP_CPU_MASK), mmc_hostname(host->mmc));
/* 1) request external dma channel, SHOULD decide chn in dts */
+ host->dms = (struct dw_mci_dma_slave *)kmalloc(sizeof(struct dw_mci_dma_slave),GFP_KERNEL);
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: channel id = %d\n",
else
present = (mci_readl(slot->host, CDETECT) & (1 << slot->id))
== 0 ? 1 : 0;
-
spin_lock_bh(&host->lock);
if (present) {
set_bit(DW_MMC_CARD_PRESENT, &slot->flags);