Should be abstracted in reset driver.
+ else if (IS_ERR(host->pdata)) {
dev_err(host->dev, "platform data not
available\n");
return -EINVAL;
}
@@ -3012,6 +3022,9 @@ int dw_mci_probe(struct dw_mci *host)
}
}
+ if (host->pdata->rstc != NULL)
+ reset_control_deassert(host->pdata->rstc);
+
sorry, I can't follow your intention here. Shouldn't it be something
like "assert mmc -> may need delay -> deassert mmc". As your current
code, nothing happend right?
The chip exits from bootloader with this bit asserted. And when entering
kernel, we only need to deassert.
In my current code, the driver deassert mmc in _probe(), and assert mmc
in _remove().
I catch your point. From the previous discussion, we add it to make sure
dw_mmc in good state after leaving bootloader to kernel. But My real
question is that you can assert it in bootloader, so you can also
dessert it in bootloaer to make sure dw_mmc work fine when probing
in kernel. In that way, we don't need this patch?
More to think, Is it ok to match the behaviour of bootloader stage?
My bootloader doesn't assert the reset pin of dw_mmc, so it seams if
I want to fix you issue on kernel stage, I need a new round of
assert->delay->deassert.