diff options
author | Simon Glass <sjg@chromium.org> | 2017-03-31 08:40:33 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-04-05 16:36:51 -0400 |
commit | 5e924a13e729c83351f76609d058c1db30746c9b (patch) | |
tree | d04cef6926175e075803dea107b974260c65a5f4 /include/common.h | |
parent | 76b00aca4f1c13bc8f91a539e612abc70d0c692f (diff) | |
download | u-boot-5e924a13e729c83351f76609d058c1db30746c9b.tar.gz u-boot-5e924a13e729c83351f76609d058c1db30746c9b.tar.bz2 u-boot-5e924a13e729c83351f76609d058c1db30746c9b.zip |
Move dram_init_banksize() to a common header
This is an weak function present on all archs so we should have it in the
common header file. Remove it from arch-specific headers and add a
function comment.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/common.h')
-rw-r--r-- | include/common.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h index dd8b25f421..c1f1712d5a 100644 --- a/include/common.h +++ b/include/common.h @@ -203,6 +203,23 @@ typedef void (interrupt_handler_t)(void *); */ int dram_init(void); +/** + * dram_init_banksize() - Set up DRAM bank sizes + * + * This can be implemented by boards to set up the DRAM bank information in + * gd->bd->bi_dram(). It is called just before relocation, after dram_init() + * is called. + * + * If this is not provided, a default implementation will try to set up a + * single bank. It will do this if CONFIG_NR_DRAM_BANKS and + * CONFIG_SYS_SDRAM_BASE are set. The bank will have a start address of + * CONFIG_SYS_SDRAM_BASE and the size will be determined by a call to + * get_effective_memsize(). + * + * @return 0 if OK, -ve on error + */ +int dram_init_banksize(void); + void hang (void) __attribute__ ((noreturn)); int timer_init(void); |