[Blackfin] arch: detect the memory available in the system on the fly by default

detect the memory available in the system on the fly by default
rather than forcing people to set this manually in the kconfig

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>

diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 308bbe2..75bceee9 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -294,6 +294,11 @@
 	  are also not changed, and the Bootloader does 100% of the hardware
 	  configuration.
 
+config MEM_SIZE
+	int "SDRAM Memory Size in MBytes"
+	depends on BFIN_KERNEL_CLOCK
+	default 64
+
 config MEM_ADD_WIDTH
 	int "Memory Address Width"
 	depends on BFIN_KERNEL_CLOCK
@@ -373,6 +378,14 @@
 	  This can be between 1 and 15
 	  System Clock = (PLL frequency) / (this setting)
 
+config MAX_MEM_SIZE
+	int "Max SDRAM Memory Size in MBytes"
+	depends on !BFIN_KERNEL_CLOCK && !MPU
+	default 512
+	help
+	  This is the max memory size that the kernel will create CPLB
+	  tables for.  Your system will not be able to handle any more.
+
 #
 # Max & Min Speeds for various Chips
 #
@@ -441,19 +454,6 @@
 
 comment "Memory Setup"
 
-config MEM_SIZE
-	int "SDRAM Memory Size in MBytes"
-	default  32 if BFIN533_EZKIT
-	default  64 if BFIN527_EZKIT
-	default  64 if BFIN537_STAMP
-	default  64 if BFIN548_EZKIT
-	default  64 if BFIN561_EZKIT
-	default 128 if BFIN533_STAMP
-	default  64 if PNAV10
-	default  32 if H8606_HVSISTEMAS
-	default  64 if BFIN548_BLUETECHNIX_CM
-	default  64 if BFIN532_IP0X
-
 choice
 	prompt "DDR SDRAM Chip Type"
 	depends on (BFIN548_EZKIT || BFIN548_BLUETECHNIX_CM)