Nick Vaccaro has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45890 )
Change subject: soc/intel: remove duplicate weak versions of mainboard_get_dram_part_num() ......................................................................
soc/intel: remove duplicate weak versions of mainboard_get_dram_part_num()
Consolidate all weak declarations of mainboard_get_dram_part_num() to instead use the common definition in lib/spd_bin.c.
BUG=b:168724473 TEST="emerge-volteer coreboot && emerge-nocturne coreboot && emerge-dedede coreboot" and verify build succeeds without error.
Change-Id: I322899c080ab7ebcf1cdcad3ce3dfa1d022864d1 Signed-off-by: Nick Vaccaro nvaccaro@google.com --- M src/lib/spd_bin.c M src/soc/intel/alderlake/romstage/romstage.c M src/soc/intel/cannonlake/romstage/romstage.c M src/soc/intel/elkhartlake/romstage/romstage.c M src/soc/intel/jasperlake/romstage/romstage.c M src/soc/intel/tigerlake/romstage/romstage.c 6 files changed, 7 insertions(+), 30 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/45890/1
diff --git a/src/lib/spd_bin.c b/src/lib/spd_bin.c index 3888896..aeed204 100644 --- a/src/lib/spd_bin.c +++ b/src/lib/spd_bin.c @@ -2,6 +2,7 @@
#include <cbfs.h> #include <console/console.h> +#include <memory_info.h> #include <spd_bin.h> #include <string.h> #include <device/dram/ddr3.h> @@ -17,6 +18,12 @@ } }
+const char * __weak mainboard_get_dram_part_num(void) +{ + /* Default weak implementation, no need to override part number. */ + return NULL; +} + static bool use_ddr4_params(int dram_type) { switch (dram_type) { diff --git a/src/soc/intel/alderlake/romstage/romstage.c b/src/soc/intel/alderlake/romstage/romstage.c index 32657c7..6cd22d0 100644 --- a/src/soc/intel/alderlake/romstage/romstage.c +++ b/src/soc/intel/alderlake/romstage/romstage.c @@ -21,12 +21,6 @@ 0x8d, 0x09, 0x11, 0xcf, 0x8b, 0x9f, 0x03, 0x23 \ }
-const char * __weak mainboard_get_dram_part_num(void) -{ - /* Default weak implementation, no need to override part number. */ - return NULL; -} - /* Save the DIMM information for SMBIOS table 17 */ static void save_dimm_info(void) { diff --git a/src/soc/intel/cannonlake/romstage/romstage.c b/src/soc/intel/cannonlake/romstage/romstage.c index e8947f1..0bf0404 100644 --- a/src/soc/intel/cannonlake/romstage/romstage.c +++ b/src/soc/intel/cannonlake/romstage/romstage.c @@ -23,12 +23,6 @@ 0x8d, 0x09, 0x11, 0xcf, 0x8b, 0x9f, 0x03, 0x23 \ }
-const char * __weak mainboard_get_dram_part_num(void) -{ - /* Default weak implementation, no need to override part number. */ - return NULL; -} - /* Save the DIMM information for SMBIOS table 17 */ static void save_dimm_info(void) { diff --git a/src/soc/intel/elkhartlake/romstage/romstage.c b/src/soc/intel/elkhartlake/romstage/romstage.c index 06fa114..ae9cc4a 100644 --- a/src/soc/intel/elkhartlake/romstage/romstage.c +++ b/src/soc/intel/elkhartlake/romstage/romstage.c @@ -21,12 +21,6 @@ 0x8d, 0x09, 0x11, 0xcf, 0x8b, 0x9f, 0x03, 0x23 \ }
-const char * __weak mainboard_get_dram_part_num(void) -{ - /* Default implementation, no need to override part number. */ - return NULL; -} - /* Save the DIMM information for SMBIOS table 17 */ static void save_dimm_info(void) { diff --git a/src/soc/intel/jasperlake/romstage/romstage.c b/src/soc/intel/jasperlake/romstage/romstage.c index 6fddbc4..1fa6c2d 100644 --- a/src/soc/intel/jasperlake/romstage/romstage.c +++ b/src/soc/intel/jasperlake/romstage/romstage.c @@ -21,12 +21,6 @@ 0x8d, 0x09, 0x11, 0xcf, 0x8b, 0x9f, 0x03, 0x23 \ }
-const char * __weak mainboard_get_dram_part_num(void) -{ - /* Default weak implementation, no need to override part number. */ - return NULL; -} - /* Save the DIMM information for SMBIOS table 17 */ static void save_dimm_info(void) { diff --git a/src/soc/intel/tigerlake/romstage/romstage.c b/src/soc/intel/tigerlake/romstage/romstage.c index 6fddbc4..1fa6c2d 100644 --- a/src/soc/intel/tigerlake/romstage/romstage.c +++ b/src/soc/intel/tigerlake/romstage/romstage.c @@ -21,12 +21,6 @@ 0x8d, 0x09, 0x11, 0xcf, 0x8b, 0x9f, 0x03, 0x23 \ }
-const char * __weak mainboard_get_dram_part_num(void) -{ - /* Default weak implementation, no need to override part number. */ - return NULL; -} - /* Save the DIMM information for SMBIOS table 17 */ static void save_dimm_info(void) {
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45890 )
Change subject: soc/intel: remove duplicate weak versions of mainboard_get_dram_part_num() ......................................................................
Patch Set 1: Code-Review+2
Nick Vaccaro has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45890 )
Change subject: soc/intel: remove duplicate weak versions of mainboard_get_dram_part_num() ......................................................................
soc/intel: remove duplicate weak versions of mainboard_get_dram_part_num()
Consolidate all weak declarations of mainboard_get_dram_part_num() to instead use the common definition in lib/spd_bin.c.
BUG=b:168724473 TEST="emerge-volteer coreboot && emerge-nocturne coreboot && emerge-dedede coreboot" and verify build succeeds without error.
Change-Id: I322899c080ab7ebcf1cdcad3ce3dfa1d022864d1 Signed-off-by: Nick Vaccaro nvaccaro@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/45890 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Furquan Shaikh furquan@google.com --- M src/lib/spd_bin.c M src/soc/intel/alderlake/romstage/romstage.c M src/soc/intel/cannonlake/romstage/romstage.c M src/soc/intel/elkhartlake/romstage/romstage.c M src/soc/intel/jasperlake/romstage/romstage.c M src/soc/intel/tigerlake/romstage/romstage.c 6 files changed, 7 insertions(+), 30 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
diff --git a/src/lib/spd_bin.c b/src/lib/spd_bin.c index 3888896..aeed204 100644 --- a/src/lib/spd_bin.c +++ b/src/lib/spd_bin.c @@ -2,6 +2,7 @@
#include <cbfs.h> #include <console/console.h> +#include <memory_info.h> #include <spd_bin.h> #include <string.h> #include <device/dram/ddr3.h> @@ -17,6 +18,12 @@ } }
+const char * __weak mainboard_get_dram_part_num(void) +{ + /* Default weak implementation, no need to override part number. */ + return NULL; +} + static bool use_ddr4_params(int dram_type) { switch (dram_type) { diff --git a/src/soc/intel/alderlake/romstage/romstage.c b/src/soc/intel/alderlake/romstage/romstage.c index 32657c7..6cd22d0 100644 --- a/src/soc/intel/alderlake/romstage/romstage.c +++ b/src/soc/intel/alderlake/romstage/romstage.c @@ -21,12 +21,6 @@ 0x8d, 0x09, 0x11, 0xcf, 0x8b, 0x9f, 0x03, 0x23 \ }
-const char * __weak mainboard_get_dram_part_num(void) -{ - /* Default weak implementation, no need to override part number. */ - return NULL; -} - /* Save the DIMM information for SMBIOS table 17 */ static void save_dimm_info(void) { diff --git a/src/soc/intel/cannonlake/romstage/romstage.c b/src/soc/intel/cannonlake/romstage/romstage.c index e8947f1..0bf0404 100644 --- a/src/soc/intel/cannonlake/romstage/romstage.c +++ b/src/soc/intel/cannonlake/romstage/romstage.c @@ -23,12 +23,6 @@ 0x8d, 0x09, 0x11, 0xcf, 0x8b, 0x9f, 0x03, 0x23 \ }
-const char * __weak mainboard_get_dram_part_num(void) -{ - /* Default weak implementation, no need to override part number. */ - return NULL; -} - /* Save the DIMM information for SMBIOS table 17 */ static void save_dimm_info(void) { diff --git a/src/soc/intel/elkhartlake/romstage/romstage.c b/src/soc/intel/elkhartlake/romstage/romstage.c index 06fa114..ae9cc4a 100644 --- a/src/soc/intel/elkhartlake/romstage/romstage.c +++ b/src/soc/intel/elkhartlake/romstage/romstage.c @@ -21,12 +21,6 @@ 0x8d, 0x09, 0x11, 0xcf, 0x8b, 0x9f, 0x03, 0x23 \ }
-const char * __weak mainboard_get_dram_part_num(void) -{ - /* Default implementation, no need to override part number. */ - return NULL; -} - /* Save the DIMM information for SMBIOS table 17 */ static void save_dimm_info(void) { diff --git a/src/soc/intel/jasperlake/romstage/romstage.c b/src/soc/intel/jasperlake/romstage/romstage.c index 6fddbc4..1fa6c2d 100644 --- a/src/soc/intel/jasperlake/romstage/romstage.c +++ b/src/soc/intel/jasperlake/romstage/romstage.c @@ -21,12 +21,6 @@ 0x8d, 0x09, 0x11, 0xcf, 0x8b, 0x9f, 0x03, 0x23 \ }
-const char * __weak mainboard_get_dram_part_num(void) -{ - /* Default weak implementation, no need to override part number. */ - return NULL; -} - /* Save the DIMM information for SMBIOS table 17 */ static void save_dimm_info(void) { diff --git a/src/soc/intel/tigerlake/romstage/romstage.c b/src/soc/intel/tigerlake/romstage/romstage.c index 6fddbc4..1fa6c2d 100644 --- a/src/soc/intel/tigerlake/romstage/romstage.c +++ b/src/soc/intel/tigerlake/romstage/romstage.c @@ -21,12 +21,6 @@ 0x8d, 0x09, 0x11, 0xcf, 0x8b, 0x9f, 0x03, 0x23 \ }
-const char * __weak mainboard_get_dram_part_num(void) -{ - /* Default weak implementation, no need to override part number. */ - return NULL; -} - /* Save the DIMM information for SMBIOS table 17 */ static void save_dimm_info(void) {