mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-02-14 11:59:19 +01:00
Merge "ipq6018: fixing "reset never completed issue""
This commit is contained in:
commit
37c8c2403e
2 changed files with 16 additions and 0 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue