mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-02-21 20:02:51 +01:00
ipq6018: fixing "reset never completed issue"
As per the SD controller hardware design document the SD bus power should be turned off and the iopad voltage has to be set to 3V (default), before doing reset for all in SD host controller. Change-Id: Ia77bb0acefe1e619c8ae7a2bc60024bf1ac5c6cd Signed-off-by: Antony Arun T <antothom@codeaurora.org>
This commit is contained in:
parent
3a92213ad1
commit
6dded97c74
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