diff options
author | Tom Rini <trini@konsulko.com> | 2015-05-05 07:00:38 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-05-05 07:00:38 -0400 |
commit | ff7e9cfc338ecd6db5ed7d6ff8fb7a2889b0131c (patch) | |
tree | d127b051d0cb5ad8571fc176056600488576bdb5 /drivers/mmc/bcm2835_sdhci.c | |
parent | 3f2f1a00394eb7ce7176f9d0930e40e55ba2c79c (diff) | |
parent | 33fe2fb8df01647f97a7bce96a1c7781a7f6d253 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-mmc
Diffstat (limited to 'drivers/mmc/bcm2835_sdhci.c')
-rw-r--r-- | drivers/mmc/bcm2835_sdhci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c index 4ec2968ece..078ef0523a 100644 --- a/drivers/mmc/bcm2835_sdhci.c +++ b/drivers/mmc/bcm2835_sdhci.c @@ -69,11 +69,11 @@ static inline void bcm2835_sdhci_raw_writel(struct sdhci_host *host, u32 val, * (Which is just as well - otherwise we'd have to nobble the DMA engine * too) */ - while (get_timer_us(bcm_host->last_write) < bcm_host->twoticks_delay) + while (get_timer(bcm_host->last_write) < bcm_host->twoticks_delay) ; writel(val, host->ioaddr + reg); - bcm_host->last_write = get_timer_us(0); + bcm_host->last_write = get_timer(0); } static inline u32 bcm2835_sdhci_raw_readl(struct sdhci_host *host, int reg) @@ -154,9 +154,9 @@ int bcm2835_sdhci_init(u32 regbase, u32 emmc_freq) struct bcm2835_sdhci_host *bcm_host; struct sdhci_host *host; - bcm_host = malloc(sizeof(*bcm_host)); + bcm_host = calloc(1, sizeof(*bcm_host)); if (!bcm_host) { - printf("sdhci_host malloc fail!\n"); + printf("sdhci_host calloc fail!\n"); return 1; } |