device/dram/ddr2: Add common ddr2 spd decoder

Decode DDR2 SPD similar to DDR3 SPD decoder to ease
readability, reduce code complexity and reduce size of
maintainable code.

Rename dimm_is_registered to spd_dimm_is_registered_ddr3 to avoid
compilation errors.

Change-Id: I741f0e61ab23e3999ae9e31f57228ba034c2509e
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/18273
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins)
diff --git a/src/device/dram/ddr3.c b/src/device/dram/ddr3.c
index db661a9..87aa3c5 100644
--- a/src/device/dram/ddr3.c
+++ b/src/device/dram/ddr3.c
@@ -36,7 +36,7 @@
  *
  * @param type DIMM type. This is byte[3] of the SPD.
  */
-int dimm_is_registered(enum spd_dimm_type type)
+int spd_dimm_is_registered_ddr3(enum spd_dimm_type type)
 {
 	if ((type == SPD_DIMM_TYPE_RDIMM)
 	    | (type == SPD_DIMM_TYPE_MINI_RDIMM)