diff options
author | Alexander Shiyan <eagle.alexander923@gmail.com> | 2022-06-03 14:25:39 +0300 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-06-07 09:32:36 +0200 |
commit | 49f8eb93a0939f8ef9fb5386f6dc8ce5158fd431 (patch) | |
tree | e054239eb7b120406a776a5d0e71c9f6527a6814 | |
parent | 67c4acdb51e99b29daffa26c59ede06ad3bb4159 (diff) | |
download | barebox-49f8eb93a0939f8ef9fb5386f6dc8ce5158fd431.tar.gz barebox-49f8eb93a0939f8ef9fb5386f6dc8ce5158fd431.tar.xz |
ARM: OMAP: Use EMIF4 registers for get SDRAM size
Instead of using the registers of the control module, we will use
the EMIF registers in am335x_sdram_size().
This can help when porting this function to other CPU variants.
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
Link: https://lore.barebox.org/20220603112540.51644-7-eagle.alexander923@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/mach-omap/am33xx_generic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap/am33xx_generic.c b/arch/arm/mach-omap/am33xx_generic.c index bdfa0e9e26..2727ebdf7f 100644 --- a/arch/arm/mach-omap/am33xx_generic.c +++ b/arch/arm/mach-omap/am33xx_generic.c @@ -349,9 +349,9 @@ void am33xx_config_sdram(const struct am33xx_emif_regs *regs) */ unsigned long am335x_sdram_size(void) { + uint32_t sdram_config = readl(IOMEM(AM33XX_EMIF4_BASE + EMIF4_SDRAM_CONFIG)); int rows, cols, width, banks; unsigned long size; - uint32_t sdram_config = readl(CM_EMIF_SDRAM_CONFIG); rows = ((sdram_config >> 7) & 0x7) + 9; cols = (sdram_config & 0x7) + 8; |