From edcbd6e38899589b8d03d1f1f8ebc01beb3b574b Mon Sep 17 00:00:00 2001
From: Tom Rini <trini@konsulko.com>
Date: Mon, 27 Jun 2022 13:35:48 -0400
Subject: [PATCH] omap3: emif4: More clearly hard-code cs0 size

We have a single platform that is both in the OMAP3 family of parts, but
has an EMIF4 memory controller.  Currently we hard-code the size of
chip select 0.  Make this more clear by putting the value in the
function rather than a CONFIG option.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 arch/arm/mach-omap2/omap3/emif4.c | 2 +-
 include/configs/am3517_evm.h      | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/omap3/emif4.c b/arch/arm/mach-omap2/omap3/emif4.c
index d7d779819b..491e7c23db 100644
--- a/arch/arm/mach-omap2/omap3/emif4.c
+++ b/arch/arm/mach-omap2/omap3/emif4.c
@@ -41,7 +41,7 @@ static u32 get_sdr_cs_size(u32 cs)
 
 	/* TODO: Calculate the size based on EMIF4 configuration */
 	if (cs == CS0)
-		size = CONFIG_SYS_CS0_SIZE;
+		size = 256 * 1024 * 1024;
 
 	return size;
 }
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index e6c9039d16..93beed4ad7 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -85,9 +85,6 @@
 
 /* memtest works on */
 
-/* Physical Memory Map */
-#define CONFIG_SYS_CS0_SIZE		(256 * 1024 * 1024)
-
 /* FLASH and environment organization */
 
 /* **** PISMO SUPPORT *** */
-- 
2.39.5