projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://git.denx.de/u-boot-net
[oweals/u-boot.git]
/
drivers
/
mmc
/
bcm2835_sdhci.c
diff --git
a/drivers/mmc/bcm2835_sdhci.c
b/drivers/mmc/bcm2835_sdhci.c
index 82079d67cd8fc07565e5b8c57cc7e7c8234793b7..227d2dfa2efddebbab3d89779efb6c4322e556e4 100644
(file)
--- a/
drivers/mmc/bcm2835_sdhci.c
+++ b/
drivers/mmc/bcm2835_sdhci.c
@@
-39,7
+39,8
@@
#include <common.h>
#include <malloc.h>
#include <sdhci.h>
#include <common.h>
#include <malloc.h>
#include <sdhci.h>
-#include <asm/arch/timer.h>
+#include <mach/timer.h>
+#include <mach/sdhci.h>
/* 400KHz is max freq for card ID etc. Use that as min */
#define MIN_FREQ 400000
/* 400KHz is max freq for card ID etc. Use that as min */
#define MIN_FREQ 400000
@@
-68,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)
*/
* (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 (
timer_get_us() - bcm_host->last_write
< bcm_host->twoticks_delay)
;
writel(val, host->ioaddr + reg);
;
writel(val, host->ioaddr + reg);
- bcm_host->last_write =
get_timer_us(0
);
+ bcm_host->last_write =
timer_get_us(
);
}
static inline u32 bcm2835_sdhci_raw_readl(struct sdhci_host *host, int reg)
}
static inline u32 bcm2835_sdhci_raw_readl(struct sdhci_host *host, int reg)
@@
-153,9
+154,9
@@
int bcm2835_sdhci_init(u32 regbase, u32 emmc_freq)
struct bcm2835_sdhci_host *bcm_host;
struct sdhci_host *host;
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) {
if (!bcm_host) {
- printf("sdhci_host
m
alloc fail!\n");
+ printf("sdhci_host
c
alloc fail!\n");
return 1;
}
return 1;
}