Merge "ipq6018: fixing "reset never completed issue""

This commit is contained in:
Linux Build Service Account 2019-06-27 22:04:21 -07:00 committed by Gerrit - the friendly Code Review server
commit 37c8c2403e
2 changed files with 16 additions and 0 deletions

View file

@ -246,6 +246,14 @@ void mmc_iopad_config(struct sdhci_host *host)
writel(val, host->ioaddr + SDHCI_VENDOR_IOPAD);
}
void sdhci_bus_pwr_off(struct sdhci_host *host)
{
u32 val;
val = sdhci_readb(host, SDHCI_HOST_CONTROL);
sdhci_writeb(host,(val & (~SDHCI_POWER_ON)), SDHCI_POWER_CONTROL);
}
void emmc_clock_disable(void)
{
/* Clear divider */

View file

@ -21,10 +21,18 @@ void *aligned_buffer;
#define CACHE_LINE_SIZE (CONFIG_SYS_CACHELINE_SIZE)
__weak void sdhci_bus_pwr_off(struct sdhci_host *host)
{
return;
}
static void sdhci_reset(struct sdhci_host *host, u8 mask)
{
unsigned long timeout;
if (mask & SDHCI_RESET_ALL) {
sdhci_bus_pwr_off(host);
}
/* Wait max 100 ms */
timeout = 100;
sdhci_writeb(host, mask, SDHCI_SOFTWARE_RESET);