diff options
author | Marc Ferland <ferlandm@amotus.ca> | 2021-01-04 14:07:53 -0500 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2021-01-23 13:47:50 +0100 |
commit | 5df34feb240ecfeabab382cb0caac779f35d8e21 (patch) | |
tree | 130ca4583aa9dc1879c3401cfd78373fe8860992 /board/variscite | |
parent | 38b92ca196adbc257c4e777a2e270df9537d8890 (diff) | |
download | u-boot-5df34feb240ecfeabab382cb0caac779f35d8e21.tar.gz |
arm: dart6ul: fix ddr size macro
The previous macro was off by one bit and so we were getting a ddr
size which was twice the real size. This commit refactors the macro so
it returns the right size in _bytes_ and modifies the printf call so the
size is still printed in MiB.
Signed-off-by: Marc Ferland <ferlandm@amotus.ca>
Diffstat (limited to 'board/variscite')
-rw-r--r-- | board/variscite/dart_6ul/dart_6ul.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/board/variscite/dart_6ul/dart_6ul.c b/board/variscite/dart_6ul/dart_6ul.c index d997d81e7b..764aaa8b6b 100644 --- a/board/variscite/dart_6ul/dart_6ul.c +++ b/board/variscite/dart_6ul/dart_6ul.c @@ -180,7 +180,7 @@ struct dart6ul_info { #define DART6UL_INFO_STORAGE_GET(n) ((n) & 0x3) #define DART6UL_INFO_WIFI_GET(n) ((n) >> 2 & 0x1) #define DART6UL_INFO_REV_GET(n) ((n) >> 3 & 0x3) -#define DART6UL_DDRSIZE_IN_MIB(n) ((n) << 8) +#define DART6UL_DDRSIZE(n) ((n) * SZ_128M) #define DART6UL_INFO_MAGIC 0x32524156 static const char *som_info_storage_to_str(u8 som_info) @@ -253,7 +253,7 @@ int checkboard(void) info->date, som_info_storage_to_str(info->som_info), DART6UL_INFO_WIFI_GET(info->som_info) ? "yes" : "no", - DART6UL_DDRSIZE_IN_MIB(info->ddr_size), + DART6UL_DDRSIZE(info->ddr_size) / SZ_1M, som_info_rev_to_str(info->som_info)); free(info); |