Move memory type information out of some AMD sockets.

Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5800 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
diff --git a/src/cpu/amd/socket_AM2/Kconfig b/src/cpu/amd/socket_AM2/Kconfig
index d4b8b22..3663061 100644
--- a/src/cpu/amd/socket_AM2/Kconfig
+++ b/src/cpu/amd/socket_AM2/Kconfig
@@ -10,9 +10,3 @@
 	default 0x11
 	depends on CPU_AMD_SOCKET_AM2
 
-# DDR2 and REG
-config DIMM_SUPPORT
-	hex
-	default 0x0004
-	depends on CPU_AMD_SOCKET_AM2
-
diff --git a/src/cpu/amd/socket_AM2r2/Kconfig b/src/cpu/amd/socket_AM2r2/Kconfig
index bdbfc64..9435a55 100644
--- a/src/cpu/amd/socket_AM2r2/Kconfig
+++ b/src/cpu/amd/socket_AM2r2/Kconfig
@@ -9,12 +9,6 @@
 	default 0x11
 	depends on CPU_AMD_SOCKET_AM2R2
 
-# DDR2 and REG
-config DIMM_SUPPORT
-	hex
-	default 0x0104
-	depends on CPU_AMD_SOCKET_AM2R2
-
 config EXT_RT_TBL_SUPPORT
 	bool
 	default n
diff --git a/src/cpu/amd/socket_AM3/Kconfig b/src/cpu/amd/socket_AM3/Kconfig
index 6b8d12d..2979cbe 100644
--- a/src/cpu/amd/socket_AM3/Kconfig
+++ b/src/cpu/amd/socket_AM3/Kconfig
@@ -9,12 +9,6 @@
 	default 0x11
 	depends on CPU_AMD_SOCKET_AM3
 
-# DDR3 and REG
-config DIMM_SUPPORT
-	hex
-	default 0x0005
-	depends on CPU_AMD_SOCKET_AM3
-
 config EXT_RT_TBL_SUPPORT
 	bool
 	default n
diff --git a/src/cpu/amd/socket_ASB2/Kconfig b/src/cpu/amd/socket_ASB2/Kconfig
index 3aa95c3..7b8857f 100644
--- a/src/cpu/amd/socket_ASB2/Kconfig
+++ b/src/cpu/amd/socket_ASB2/Kconfig
@@ -9,12 +9,6 @@
 	default 0x13
 	depends on CPU_AMD_SOCKET_ASB2
 
-# DDR3 and REG
-config DIMM_SUPPORT
-	hex
-	default 0x0005
-	depends on CPU_AMD_SOCKET_ASB2
-
 config EXT_RT_TBL_SUPPORT
 	bool
 	default n
diff --git a/src/cpu/amd/socket_F/Kconfig b/src/cpu/amd/socket_F/Kconfig
index 83ca2b9..f32e690 100644
--- a/src/cpu/amd/socket_F/Kconfig
+++ b/src/cpu/amd/socket_F/Kconfig
@@ -9,9 +9,3 @@
 	default 0x10
 	depends on CPU_AMD_SOCKET_F
 
-# DDR2 and REG
-config DIMM_SUPPORT
-	hex
-	default 0x0104
-	depends on CPU_AMD_SOCKET_F
-
diff --git a/src/cpu/amd/socket_F_1207/Kconfig b/src/cpu/amd/socket_F_1207/Kconfig
index 643827c..959fea5 100644
--- a/src/cpu/amd/socket_F_1207/Kconfig
+++ b/src/cpu/amd/socket_F_1207/Kconfig
@@ -8,12 +8,6 @@
 	default 0x10
 	depends on CPU_AMD_SOCKET_F_1207
 
-# DDR2 and REG
-config DIMM_SUPPORT
-	hex
-	default 0x0104
-	depends on CPU_AMD_SOCKET_F_1207
-
 config EXT_RT_TBL_SUPPORT
 	bool
 	default n
diff --git a/src/mainboard/amd/mahogany/Kconfig b/src/mainboard/amd/mahogany/Kconfig
index e20d9a8..c69d5b4 100644
--- a/src/mainboard/amd/mahogany/Kconfig
+++ b/src/mainboard/amd/mahogany/Kconfig
@@ -4,6 +4,7 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_AM2
+	select DIMM_DDR2
 	select NORTHBRIDGE_AMD_AMDK8
 	select NORTHBRIDGE_AMD_AMDK8_ROOT_COMPLEX
 	select SOUTHBRIDGE_AMD_RS780
diff --git a/src/mainboard/amd/mahogany_fam10/Kconfig b/src/mainboard/amd/mahogany_fam10/Kconfig
index 762a1ac..961ef153 100644
--- a/src/mainboard/amd/mahogany_fam10/Kconfig
+++ b/src/mainboard/amd/mahogany_fam10/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_AM2R2
+	select DIMM_DDR2
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDFAM10
 	select SOUTHBRIDGE_AMD_RS780
 	select SOUTHBRIDGE_AMD_SB700
diff --git a/src/mainboard/amd/pistachio/Kconfig b/src/mainboard/amd/pistachio/Kconfig
index f0f8b25..94c714c 100644
--- a/src/mainboard/amd/pistachio/Kconfig
+++ b/src/mainboard/amd/pistachio/Kconfig
@@ -4,6 +4,7 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_AM2
+	select DIMM_DDR2
 	select NORTHBRIDGE_AMD_AMDK8
 	select NORTHBRIDGE_AMD_AMDK8_ROOT_COMPLEX
 	select SOUTHBRIDGE_AMD_RS690
diff --git a/src/mainboard/amd/serengeti_cheetah/Kconfig b/src/mainboard/amd/serengeti_cheetah/Kconfig
index f2a0901..2e7308c 100644
--- a/src/mainboard/amd/serengeti_cheetah/Kconfig
+++ b/src/mainboard/amd/serengeti_cheetah/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_F
+	select DIMM_DDR2
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDK8
 	select NORTHBRIDGE_AMD_AMDK8_ROOT_COMPLEX
 	select SOUTHBRIDGE_AMD_AMD8111
diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/Kconfig b/src/mainboard/amd/serengeti_cheetah_fam10/Kconfig
index 5149df3..7191d70 100644
--- a/src/mainboard/amd/serengeti_cheetah_fam10/Kconfig
+++ b/src/mainboard/amd/serengeti_cheetah_fam10/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_F_1207
+	select DIMM_DDR2
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDFAM10
 	select SOUTHBRIDGE_AMD_AMD8111
 	select SOUTHBRIDGE_AMD_AMD8132
diff --git a/src/mainboard/amd/tilapia_fam10/Kconfig b/src/mainboard/amd/tilapia_fam10/Kconfig
index e44d012..c09b8aa 100644
--- a/src/mainboard/amd/tilapia_fam10/Kconfig
+++ b/src/mainboard/amd/tilapia_fam10/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_AM3
+	select DIMM_DDR3
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDFAM10
 	select SOUTHBRIDGE_AMD_RS780
 	select SOUTHBRIDGE_AMD_SB700
diff --git a/src/mainboard/asus/m2v-mx_se/Kconfig b/src/mainboard/asus/m2v-mx_se/Kconfig
index 4149961..ac967bd 100644
--- a/src/mainboard/asus/m2v-mx_se/Kconfig
+++ b/src/mainboard/asus/m2v-mx_se/Kconfig
@@ -22,6 +22,7 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_AM2
+	select DIMM_DDR2
 	select NORTHBRIDGE_AMD_AMDK8
 	select NORTHBRIDGE_AMD_AMDK8_ROOT_COMPLEX
 	select SOUTHBRIDGE_VIA_VT8237R
diff --git a/src/mainboard/gigabyte/ga_2761gxdk/Kconfig b/src/mainboard/gigabyte/ga_2761gxdk/Kconfig
index 1b17b65..6424570 100644
--- a/src/mainboard/gigabyte/ga_2761gxdk/Kconfig
+++ b/src/mainboard/gigabyte/ga_2761gxdk/Kconfig
@@ -4,6 +4,7 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_AM2
+	select DIMM_DDR2
 	select NORTHBRIDGE_AMD_AMDK8
 	select NORTHBRIDGE_AMD_AMDK8_ROOT_COMPLEX
 	select SOUTHBRIDGE_SIS_SIS966
diff --git a/src/mainboard/gigabyte/m57sli/Kconfig b/src/mainboard/gigabyte/m57sli/Kconfig
index e0e582e..ed860ba 100644
--- a/src/mainboard/gigabyte/m57sli/Kconfig
+++ b/src/mainboard/gigabyte/m57sli/Kconfig
@@ -4,6 +4,7 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_AM2
+	select DIMM_DDR2
 	select NORTHBRIDGE_AMD_AMDK8
 	select NORTHBRIDGE_AMD_AMDK8_ROOT_COMPLEX
 	select SOUTHBRIDGE_NVIDIA_MCP55
diff --git a/src/mainboard/gigabyte/ma785gmt/Kconfig b/src/mainboard/gigabyte/ma785gmt/Kconfig
index 99cf850..685be90 100644
--- a/src/mainboard/gigabyte/ma785gmt/Kconfig
+++ b/src/mainboard/gigabyte/ma785gmt/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_AM3
+	select DIMM_DDR3
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDFAM10
 	select SOUTHBRIDGE_AMD_RS780
 	select SOUTHBRIDGE_AMD_SB700
diff --git a/src/mainboard/gigabyte/ma78gm/Kconfig b/src/mainboard/gigabyte/ma78gm/Kconfig
index 6ad715c..1290a09 100644
--- a/src/mainboard/gigabyte/ma78gm/Kconfig
+++ b/src/mainboard/gigabyte/ma78gm/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_AM2R2
+	select DIMM_DDR2
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDFAM10
 	select SOUTHBRIDGE_AMD_RS780
 	select SOUTHBRIDGE_AMD_SB700
diff --git a/src/mainboard/hp/dl145_g3/Kconfig b/src/mainboard/hp/dl145_g3/Kconfig
index 065ddac..1bae1d8 100644
--- a/src/mainboard/hp/dl145_g3/Kconfig
+++ b/src/mainboard/hp/dl145_g3/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_F
+	select DIMM_DDR2
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDK8
 	select NORTHBRIDGE_AMD_AMDK8_ROOT_COMPLEX
 	select SOUTHBRIDGE_BROADCOM_BCM21000
diff --git a/src/mainboard/jetway/pa78vm5/Kconfig b/src/mainboard/jetway/pa78vm5/Kconfig
index 63e48eb..6f5ed79 100644
--- a/src/mainboard/jetway/pa78vm5/Kconfig
+++ b/src/mainboard/jetway/pa78vm5/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_AM2R2
+	select DIMM_DDR2
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDFAM10
 	select SOUTHBRIDGE_AMD_RS780
 	select SOUTHBRIDGE_AMD_SB700
diff --git a/src/mainboard/msi/ms7260/Kconfig b/src/mainboard/msi/ms7260/Kconfig
index 9c979aa..06de20c 100644
--- a/src/mainboard/msi/ms7260/Kconfig
+++ b/src/mainboard/msi/ms7260/Kconfig
@@ -4,6 +4,7 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_AM2
+	select DIMM_DDR2
 	select NORTHBRIDGE_AMD_AMDK8
 	select NORTHBRIDGE_AMD_AMDK8_ROOT_COMPLEX
 	select SOUTHBRIDGE_NVIDIA_MCP55
diff --git a/src/mainboard/msi/ms9185/Kconfig b/src/mainboard/msi/ms9185/Kconfig
index 4a64101..38aa6ed 100644
--- a/src/mainboard/msi/ms9185/Kconfig
+++ b/src/mainboard/msi/ms9185/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_F
+	select DIMM_DDR2
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDK8
 	select NORTHBRIDGE_AMD_AMDK8_ROOT_COMPLEX
 	select SOUTHBRIDGE_BROADCOM_BCM5780
diff --git a/src/mainboard/msi/ms9282/Kconfig b/src/mainboard/msi/ms9282/Kconfig
index 40a0718..bce75d6 100644
--- a/src/mainboard/msi/ms9282/Kconfig
+++ b/src/mainboard/msi/ms9282/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_F
+	select DIMM_DDR2
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDK8
 	select NORTHBRIDGE_AMD_AMDK8_ROOT_COMPLEX
 	select SOUTHBRIDGE_NVIDIA_MCP55
diff --git a/src/mainboard/msi/ms9652_fam10/Kconfig b/src/mainboard/msi/ms9652_fam10/Kconfig
index 829b70b..ea9ccc0 100644
--- a/src/mainboard/msi/ms9652_fam10/Kconfig
+++ b/src/mainboard/msi/ms9652_fam10/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_F_1207
+	select DIMM_DDR2
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDFAM10
 	select SOUTHBRIDGE_NVIDIA_MCP55
 	select SUPERIO_WINBOND_W83627EHG
diff --git a/src/mainboard/nvidia/l1_2pvv/Kconfig b/src/mainboard/nvidia/l1_2pvv/Kconfig
index d948c22..502da61 100644
--- a/src/mainboard/nvidia/l1_2pvv/Kconfig
+++ b/src/mainboard/nvidia/l1_2pvv/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_F
+	select DIMM_DDR2
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDK8
 	select NORTHBRIDGE_AMD_AMDK8_ROOT_COMPLEX
 	select SOUTHBRIDGE_NVIDIA_MCP55
diff --git a/src/mainboard/supermicro/h8dme/Kconfig b/src/mainboard/supermicro/h8dme/Kconfig
index 88b27a7..9e69f9f 100644
--- a/src/mainboard/supermicro/h8dme/Kconfig
+++ b/src/mainboard/supermicro/h8dme/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_F
+	select DIMM_DDR2
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDK8
 	select NORTHBRIDGE_AMD_AMDK8_ROOT_COMPLEX
 	select SOUTHBRIDGE_NVIDIA_MCP55
diff --git a/src/mainboard/supermicro/h8dmr/Kconfig b/src/mainboard/supermicro/h8dmr/Kconfig
index 20d9e3c..35282d8 100644
--- a/src/mainboard/supermicro/h8dmr/Kconfig
+++ b/src/mainboard/supermicro/h8dmr/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_F
+	select DIMM_DDR2
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDK8
 	select NORTHBRIDGE_AMD_AMDK8_ROOT_COMPLEX
 	select SOUTHBRIDGE_NVIDIA_MCP55
diff --git a/src/mainboard/supermicro/h8dmr_fam10/Kconfig b/src/mainboard/supermicro/h8dmr_fam10/Kconfig
index c47fe48..a5b32cc 100644
--- a/src/mainboard/supermicro/h8dmr_fam10/Kconfig
+++ b/src/mainboard/supermicro/h8dmr_fam10/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_F_1207
+	select DIMM_DDR2
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDFAM10
 	select SOUTHBRIDGE_NVIDIA_MCP55
 	select SUPERIO_WINBOND_W83627HF
diff --git a/src/mainboard/supermicro/h8qme_fam10/Kconfig b/src/mainboard/supermicro/h8qme_fam10/Kconfig
index 3bac4ff..b716973 100644
--- a/src/mainboard/supermicro/h8qme_fam10/Kconfig
+++ b/src/mainboard/supermicro/h8qme_fam10/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_F_1207
+	select DIMM_DDR2
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDFAM10
 	select SOUTHBRIDGE_AMD_AMD8132
 	select SOUTHBRIDGE_NVIDIA_MCP55
diff --git a/src/mainboard/tyan/s2912/Kconfig b/src/mainboard/tyan/s2912/Kconfig
index 30dd3bb..2075b31 100644
--- a/src/mainboard/tyan/s2912/Kconfig
+++ b/src/mainboard/tyan/s2912/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_F
+	select DIMM_DDR2
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDK8
 	select NORTHBRIDGE_AMD_AMDK8_ROOT_COMPLEX
 	select SOUTHBRIDGE_NVIDIA_MCP55
diff --git a/src/mainboard/tyan/s2912_fam10/Kconfig b/src/mainboard/tyan/s2912_fam10/Kconfig
index e00408b..5f3a687 100644
--- a/src/mainboard/tyan/s2912_fam10/Kconfig
+++ b/src/mainboard/tyan/s2912_fam10/Kconfig
@@ -4,6 +4,8 @@
 	def_bool y
 	select ARCH_X86
 	select CPU_AMD_SOCKET_F_1207
+	select DIMM_DDR2
+	select DIMM_REGISTERED
 	select NORTHBRIDGE_AMD_AMDFAM10
 	select SOUTHBRIDGE_NVIDIA_MCP55
 	select SUPERIO_WINBOND_W83627HF
diff --git a/src/northbridge/amd/amdfam10/Kconfig b/src/northbridge/amd/amdfam10/Kconfig
index 5ba0fa9..e73eca8 100644
--- a/src/northbridge/amd/amdfam10/Kconfig
+++ b/src/northbridge/amd/amdfam10/Kconfig
@@ -75,4 +75,52 @@
 	default n
 	depends on NORTHBRIDGE_AMD_AMDFAM10
 
+config DIMM_FBDIMM
+	bool
+	default n
+	depends on NORTHBRIDGE_AMD_AMDFAM10
+
+config DIMM_DDR2
+	bool
+	default n
+	depends on NORTHBRIDGE_AMD_AMDFAM10
+
+config DIMM_DDR3
+	bool
+	default n
+	depends on NORTHBRIDGE_AMD_AMDFAM10
+
+config DIMM_REGISTERED
+	bool
+	default n
+	depends on NORTHBRIDGE_AMD_AMDFAM10
+
+if DIMM_FB_DIMM
+	config DIMM_SUPPORT
+		hex
+		default 0x0110
+endif
+
+if DIMM_DDR2
+	if DIMM_REGISTERED
+	config DIMM_SUPPORT
+		hex
+		default 0x0104
+	endif
+
+	if !DIMM_REGISTERED
+	config DIMM_SUPPORT
+		hex
+		default 0x0004
+	endif
+endif
+
+if DIMM_DDR3
+	if DIMM_REGISTERED
+	config DIMM_SUPPORT
+		hex
+		default 0x0005
+	endif
+endif
+
 source src/northbridge/amd/amdfam10/root_complex/Kconfig
diff --git a/src/northbridge/amd/amdk8/Kconfig b/src/northbridge/amd/amdk8/Kconfig
index 014e1ee..02a23ab 100644
--- a/src/northbridge/amd/amdk8/Kconfig
+++ b/src/northbridge/amd/amdk8/Kconfig
@@ -53,4 +53,28 @@
 	default n
 	depends on NORTHBRIDGE_AMD_AMDK8
 
+config DIMM_DDR2
+	bool
+	default n
+	depends on NORTHBRIDGE_AMD_AMDFAM10
+
+config DIMM_REGISTERED
+	bool
+	default n
+	depends on NORTHBRIDGE_AMD_AMDFAM10
+
+if DIMM_DDR2
+	if DIMM_REGISTERED
+	config DIMM_SUPPORT
+		hex
+		default 0x0104
+	endif
+
+	if !DIMM_REGISTERED
+	config DIMM_SUPPORT
+		hex
+		default 0x0004
+	endif
+endif
+
 source src/northbridge/amd/amdk8/root_complex/Kconfig