@@ -468,6 +468,9 @@ static void meson_mmc_start_cmd(struct m
/* data? */
if (cmd->data) {
+
+ dev_dbg(host->dev, "DBG data");
+
desc->cmd_cfg |= CMD_CFG_DATA_IO;
if (cmd->data->blocks > 1) {
desc->cmd_cfg |= CMD_CFG_BLOCK_MODE;
@@ -526,6 +529,10 @@ static void meson_mmc_start_cmd(struct m
writel(desc->cmd_data, host->regs + SD_EMMC_CMD_DAT);
writel(desc->cmd_resp, host->regs + SD_EMMC_CMD_RSP);
wmb(); /* ensure descriptor is written before kicked */
+
+ dev_dbg(host->dev, "DBG cmd_cfg: 0x%08x, arg: 0x%08x, resp: 0x%08x",
+ desc->cmd_cfg, desc->cmd_arg, desc->cmd_resp);
+
writel(desc->cmd_arg, host->regs + SD_EMMC_CMD_ARG);
}
@@ -576,6 +583,8 @@ static irqreturn_t meson_mmc_irq(int irq
raw_status = readl(host->regs + SD_EMMC_STATUS);
status = raw_status & irq_en;
+ dev_dbg(host->dev, "DBG status 0x%08x", status);
+
if (!status) {
dev_warn(host->dev, "Spurious IRQ! status=0x%08x, irq_en=0x%08x\n",
raw_status, irq_en);
and this is for the version with the sdio problem
@@ -493,6 +493,9 @@ static void meson_mmc_start_cmd(struct m
}
if (data) {
+
+ dev_dbg(host->dev, "DBG data");
+
cmd_cfg |= CMD_CFG_DATA_IO;
if (data->blocks > 1) {
@@ -549,6 +552,10 @@ static void meson_mmc_start_cmd(struct m
host->cmd = cmd;
wmb(); /* ensure descriptor is written before kicked */
+
+ dev_dbg(host->dev, "DBG cmd_cfg: 0x%08x, arg: 0x%08x, resp: 0x%08x",
+ desc[0].cmd_cfg, desc[0].cmd_arg, desc[0].cmd_resp);
+
cfg = host->descs_dma_addr | START_DESC_BUSY;
writel(cfg, host->regs + SD_EMMC_START);
}
@@ -610,6 +617,8 @@ static irqreturn_t meson_mmc_irq(int irq
raw_status = readl(host->regs + SD_EMMC_STATUS);
status = raw_status & irq_en;
+ dev_dbg(host->dev, "DBG status 0x%08x", status);
+
if (!status) {
dev_warn(host->dev, "Spurious IRQ! status=0x%08x, irq_en=0x%08x\n",
raw_status, irq_en);