if (sdhci_readb(host, SDHCI_SOFTWARE_RESET) & SDHCI_RESET_ALL) {
printf("%s: sd host controller reset error\n", __func__);
- return 1;
+ return -EBUSY;
}
/* For kona a hardware reset before anything else. */
do {
if (timeout == 0) {
printf("%s: reset timeout error\n", __func__);
- return 1;
+ return -ETIMEDOUT;
}
timeout--;
udelay(100);
while (!(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT)) {
if (timeout == 0) {
printf("%s: CARD DETECT timeout error\n", __func__);
- return 1;
+ return -ETIMEDOUT;
}
timeout--;
udelay(100);
host->name = "kona-sdhci";
host->ioaddr = reg_base;
host->quirks = quirks;
+ host->max_clk = max_clk;
if (init_kona_mmc_core(host)) {
free(host);
return -EINVAL;
}
- add_sdhci(host, max_clk, min_clk);
+ add_sdhci(host, 0, min_clk);
return ret;
}