diff options
author | Tom Rini <trini@ti.com> | 2015-02-16 14:55:50 -0500 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2015-02-17 06:27:44 -0500 |
commit | a851604ca36493e8319a7d3a17594b7224d546fe (patch) | |
tree | dff68fbdd1b098e334d0da031de250dc8852c3b9 /arch/arm/include/asm/arch-sunxi/dram.h | |
parent | 0ce3f1f90ae6168805f20e473a9ed7fab5fb13a8 (diff) | |
parent | 840fe95c3bcff7692c51b90ebc0d350792597ff0 (diff) | |
download | blackbird-obmc-uboot-a851604ca36493e8319a7d3a17594b7224d546fe.tar.gz blackbird-obmc-uboot-a851604ca36493e8319a7d3a17594b7224d546fe.zip |
Merge branch 'master' of http://git.denx.de/u-boot-sunxi
Diffstat (limited to 'arch/arm/include/asm/arch-sunxi/dram.h')
-rw-r--r-- | arch/arm/include/asm/arch-sunxi/dram.h | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/arch/arm/include/asm/arch-sunxi/dram.h b/arch/arm/include/asm/arch-sunxi/dram.h index 7ff43e6d3a..aedd1941d5 100644 --- a/arch/arm/include/asm/arch-sunxi/dram.h +++ b/arch/arm/include/asm/arch-sunxi/dram.h @@ -25,31 +25,7 @@ #endif unsigned long sunxi_dram_init(void); - -/* - * Wait up to 1s for value to be set in given part of reg. - */ -static inline void mctl_await_completion(u32 *reg, u32 mask, u32 val) -{ - unsigned long tmo = timer_get_us() + 1000000; - - while ((readl(reg) & mask) != val) { - if (timer_get_us() > tmo) - panic("Timeout initialising DRAM\n"); - } -} - -/* - * Test if memory at offset offset matches memory at begin of DRAM - */ -static inline bool mctl_mem_matches(u32 offset) -{ - /* Try to write different values to RAM at two addresses */ - writel(0, CONFIG_SYS_SDRAM_BASE); - writel(0xaa55aa55, CONFIG_SYS_SDRAM_BASE + offset); - /* Check if the same value is actually observed when reading back */ - return readl(CONFIG_SYS_SDRAM_BASE) == - readl(CONFIG_SYS_SDRAM_BASE + offset); -} +void mctl_await_completion(u32 *reg, u32 mask, u32 val); +bool mctl_mem_matches(u32 offset); #endif /* _SUNXI_DRAM_H */ |