static void dw_mci_handle_cd(struct dw_mci *host)
{
- int i = 0;
- struct dw_mci_slot *slot = host->slot[i];
+ struct dw_mci_slot *slot = host->slot;
if (slot->mmc->ops->card_event)
slot->mmc->ops->card_event(slot->mmc);
{
struct dw_mci *host = dev_id;
u32 pending;
- int i = 0;
- struct dw_mci_slot *slot = host->slot[i];
+ struct dw_mci_slot *slot = host->slot;
pending = mci_readl(host, MINTSTS); /* read-only mask reg */
slot->sdio_id = host->sdio_id0 + id;
slot->mmc = mmc;
slot->host = host;
- host->slot[id] = slot;
+ host->slot = slot;
mmc->ops = &dw_mci_ops;
if (device_property_read_u32_array(host->dev, "clock-freq-min-max",
{
/* Debugfs stuff is cleaned up by mmc core */
mmc_remove_host(slot->mmc);
- slot->host->slot[id] = NULL;
+ slot->host->slot = NULL;
mmc_free_host(slot->mmc);
}
{
unsigned long irqflags;
u32 temp;
- int i = 0;
struct dw_mci_slot *slot;
/*
* No need for CD if all slots have a non-error GPIO
* as well as broken card detection is found.
*/
- slot = host->slot[i];
+ slot = host->slot;
if (slot->mmc->caps & MMC_CAP_NEEDS_POLL)
return;
int i = 0;
dev_dbg(host->dev, "remove slot %d\n", i);
- if (host->slot[i])
- dw_mci_cleanup_slot(host->slot[i], i);
+ if (host->slot)
+ dw_mci_cleanup_slot(host->slot, i);
mci_writel(host, RINTSTS, 0xFFFFFFFF);
mci_writel(host, INTMASK, 0); /* disable all mmc interrupt first */
int dw_mci_runtime_resume(struct device *dev)
{
- int i = 0, ret = 0;
+ int ret = 0;
struct dw_mci *host = dev_get_drvdata(dev);
- struct dw_mci_slot *slot = host->slot[i];
+ struct dw_mci_slot *slot = host->slot;
if (host->cur_slot &&
(mmc_can_gpio_cd(host->cur_slot->mmc) ||