summaryrefslogtreecommitdiff
path: root/board/work-microwave/work_92105/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-01-28 06:53:43 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-01-29 20:59:08 +0900
commit3e9952be23e1fdc8b576dfeed80e442d3045cd87 (patch)
tree992f14233ca580bc72197974c647cdec6fb8d924 /board/work-microwave/work_92105/Makefile
parent773f5f63dc0db5e39b4782947e761479ecf1bef2 (diff)
downloadu-boot-imx-3e9952be23e1fdc8b576dfeed80e442d3045cd87.zip
u-boot-imx-3e9952be23e1fdc8b576dfeed80e442d3045cd87.tar.gz
u-boot-imx-3e9952be23e1fdc8b576dfeed80e442d3045cd87.tar.bz2
ARM: uniphier: detect RAM size by decoding HW register instead of DT
U-Boot needs to set up available memory area(s) in dram_init() and dram_init_banksize(). It is platform-dependent how to detect the memory banks. Currently, UniPhier adopts the memory banks _alleged_ by DT. This is based on the assumption that users bind a correct DT in their build process. Come to think of it, the DRAM controller has already been set up before U-Boot is entered (because U-Boot runs on DRAM). So, the DRAM controller setup register seems a more reliable source of any information about DRAM stuff. The DRAM banks are initialized by preliminary firmware (SPL, ARM Trusted Firmware BL2, or whatever), so this means the source of the reliability is shifted from Device Tree to such early-stage firmware. However, if the DRAM controller is wrongly configured, the system will crash. If your system is running, the DRAM setup register is very likely to provide the correct DRAM mapping. Decode the SG_MEMCONF register to get the available DRAM banks. The dram_init() and dram_init_banksize() need similar decoding. It would be nice if dram_init_banksize() could reuse the outcome of dram_init(), but global variables are unavailable at this stage because the .bss section is available only after the relocation. As a result, SG_MEMCONF must be checked twice, but a new helper uniphier_memconf_decode() will help to avoid code duplication. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'board/work-microwave/work_92105/Makefile')
0 files changed, 0 insertions, 0 deletions