diff options
Diffstat (limited to 'include/memory.h')
-rw-r--r-- | include/memory.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/memory.h b/include/memory.h index 56d16d20c8..73ee7661ef 100644 --- a/include/memory.h +++ b/include/memory.h @@ -32,4 +32,12 @@ void memory_bank_find_space(struct memory_bank *bank, resource_size_t *retstart, int memory_bank_first_find_space(resource_size_t *retstart, resource_size_t *retend); +static inline u64 memory_sdram_size(unsigned int cols, + unsigned int rows, + unsigned int banks, + unsigned int width) +{ + return (u64)banks * width << (rows + cols); +} + #endif |