#include <asm/io.h>
#include <asm/arch/mmc.h>
-#ifdef DEBUG_S5P_HSMMC
-#define dbg(x...) printf(x)
-#else
-#define dbg(x...) do { } while (0)
-#endif
-
/* support 4 mmc hosts */
struct mmc mmc_dev[4];
struct mmc_host mmc_host[4];
{
unsigned char ctrl;
- dbg("data->dest: %08x\n", (u32)data->dest);
+ debug("data->dest: %08x\n", (u32)data->dest);
writel((u32)data->dest, &host->reg->sysad);
/*
* DMASEL[4:3]
if (data)
mmc_prepare_data(host, data);
- dbg("cmd->arg: %08x\n", cmd->cmdarg);
+ debug("cmd->arg: %08x\n", cmd->cmdarg);
writel(cmd->cmdarg, &host->reg->argument);
if (data)
if (data)
flags |= (1 << 5);
- dbg("cmd: %d\n", cmd->cmdidx);
+ debug("cmd: %d\n", cmd->cmdidx);
writew((cmd->cmdidx << 8) | flags, &host->reg->cmdreg);
if (mask & (1 << 16)) {
/* Timeout Error */
- dbg("timeout: %08x cmd %d\n", mask, cmd->cmdidx);
+ debug("timeout: %08x cmd %d\n", mask, cmd->cmdidx);
return TIMEOUT;
} else if (mask & (1 << 15)) {
/* Error Interrupt */
- dbg("error: %08x cmd %d\n", mask, cmd->cmdidx);
+ debug("error: %08x cmd %d\n", mask, cmd->cmdidx);
return -1;
}
cmd->response[i] |=
readb(offset - 1);
}
- dbg("cmd->resp[%d]: %08x\n",
+ debug("cmd->resp[%d]: %08x\n",
i, cmd->response[i]);
}
} else if (cmd->resp_type & MMC_RSP_BUSY) {
}
cmd->response[0] = readl(&host->reg->rspreg0);
- dbg("cmd->resp[0]: %08x\n", cmd->response[0]);
+ debug("cmd->resp[0]: %08x\n", cmd->response[0]);
} else {
cmd->response[0] = readl(&host->reg->rspreg0);
- dbg("cmd->resp[0]: %08x\n", cmd->response[0]);
+ debug("cmd->resp[0]: %08x\n", cmd->response[0]);
}
}
return -1;
} else if (mask & (1 << 3)) {
/* DMA Interrupt */
- dbg("DMA end\n");
+ debug("DMA end\n");
break;
} else if (mask & (1 << 1)) {
/* Transfer Complete */
- dbg("r/w is done\n");
+ debug("r/w is done\n");
break;
}
}
div = 2;
else
div = 1;
- dbg("div: %d\n", div);
+ debug("div: %d\n", div);
div >>= 1;
/*
unsigned char ctrl;
unsigned long val;
- dbg("set_ios: bus_width: %x, clock: %d\n", mmc->bus_width, mmc->clock);
+ debug("bus_width: %x, clock: %d\n", mmc->bus_width, mmc->clock);
/*
* SELCLKPADDS[17:16]