[coreboot-gerrit] New patch to review for coreboot: 47dd0e3 lenovo: Remerge smbios_mainboard_bios_version.

Vladimir Serbinenko (phcoder@gmail.com) gerrit at coreboot.org
Thu May 21 09:53:29 CEST 2015


Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10275

-gerrit

commit 47dd0e3f9f73cbfedd9d4a053646a3abd0962e02
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date:   Thu May 21 09:51:00 2015 +0200

    lenovo: Remerge smbios_mainboard_bios_version.
    
    Change-Id: I8df5b7f6707957b925f7bb4dc06a717252c70868
    Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
 src/drivers/i2c/at24rf08c/lenovo_serials.c | 14 ++++++++++++++
 src/mainboard/lenovo/t420s/mainboard.c     | 14 --------------
 src/mainboard/lenovo/t430s/mainboard.c     | 14 --------------
 src/mainboard/lenovo/t520/mainboard.c      | 14 --------------
 src/mainboard/lenovo/t530/mainboard.c      | 14 --------------
 src/mainboard/lenovo/t60/mainboard.c       | 14 --------------
 src/mainboard/lenovo/x200/mainboard.c      | 14 --------------
 src/mainboard/lenovo/x201/mainboard.c      | 16 ----------------
 src/mainboard/lenovo/x220/mainboard.c      | 14 --------------
 src/mainboard/lenovo/x230/mainboard.c      | 14 --------------
 src/mainboard/lenovo/x60/mainboard.c       | 14 --------------
 11 files changed, 14 insertions(+), 142 deletions(-)

diff --git a/src/drivers/i2c/at24rf08c/lenovo_serials.c b/src/drivers/i2c/at24rf08c/lenovo_serials.c
index b9beeb7..3352ecd 100644
--- a/src/drivers/i2c/at24rf08c/lenovo_serials.c
+++ b/src/drivers/i2c/at24rf08c/lenovo_serials.c
@@ -198,3 +198,17 @@ const char *smbios_mainboard_version(void)
 	already_read = 1;
 	return result;
 }
+
+const char *smbios_mainboard_bios_version(void)
+{
+	static char *s = NULL;
+
+	/* Satisfy thinkpad_acpi.  */
+	if (strlen(CONFIG_LOCALVERSION))
+		return "CBET4000 " CONFIG_LOCALVERSION;
+
+	if (s != NULL)
+		return s;
+	s = strconcat("CBET4000 ", coreboot_version);
+	return s;
+}
diff --git a/src/mainboard/lenovo/t420s/mainboard.c b/src/mainboard/lenovo/t420s/mainboard.c
index 698301d..8e26edc 100644
--- a/src/mainboard/lenovo/t420s/mainboard.c
+++ b/src/mainboard/lenovo/t420s/mainboard.c
@@ -40,20 +40,6 @@ void mainboard_suspend_resume(void)
 	outb(0xcb, 0xb2);
 }
 
-const char *smbios_mainboard_bios_version(void)
-{
-	static char *s = NULL;
-
-	/* Satisfy thinkpad_acpi.  */
-	if (strlen(CONFIG_LOCALVERSION))
-		return "CBET4000 " CONFIG_LOCALVERSION;
-
-	if (s != NULL)
-		return s;
-	s = strconcat("CBET4000 ", coreboot_version);
-	return s;
-}
-
 static void mainboard_init(device_t dev)
 {
 	/* init spi */
diff --git a/src/mainboard/lenovo/t430s/mainboard.c b/src/mainboard/lenovo/t430s/mainboard.c
index 359de8c..b9c34bf 100644
--- a/src/mainboard/lenovo/t430s/mainboard.c
+++ b/src/mainboard/lenovo/t430s/mainboard.c
@@ -40,20 +40,6 @@ void mainboard_suspend_resume(void)
 	outb(0xcb, 0xb2);
 }
 
-const char *smbios_mainboard_bios_version(void)
-{
-	static char *s = NULL;
-
-	/* Satisfy thinkpad_acpi.  */
-	if (strlen(CONFIG_LOCALVERSION))
-		return "CBET4000 " CONFIG_LOCALVERSION;
-
-	if (s != NULL)
-		return s;
-	s = strconcat("CBET4000 ", coreboot_version);
-	return s;
-}
-
 static void mainboard_init(device_t dev)
 {
 	/* init spi */
diff --git a/src/mainboard/lenovo/t520/mainboard.c b/src/mainboard/lenovo/t520/mainboard.c
index 8419abc..d4479bb 100644
--- a/src/mainboard/lenovo/t520/mainboard.c
+++ b/src/mainboard/lenovo/t520/mainboard.c
@@ -45,20 +45,6 @@ void mainboard_suspend_resume(void)
 	outb(0xcb, 0xb2);
 }
 
-const char *smbios_mainboard_bios_version(void)
-{
-	static char *s = NULL;
-
-	/* Satisfy thinkpad_acpi.  */
-	if (strlen(CONFIG_LOCALVERSION))
-		return "CBET4000 " CONFIG_LOCALVERSION;
-
-	if (s != NULL)
-		return s;
-	s = strconcat("CBET4000 ", coreboot_version);
-	return s;
-}
-
 static void mainboard_init(device_t dev)
 {
 	RCBA32(0x38c8) = 0x00002005;
diff --git a/src/mainboard/lenovo/t530/mainboard.c b/src/mainboard/lenovo/t530/mainboard.c
index 072ebe9..2617051 100644
--- a/src/mainboard/lenovo/t530/mainboard.c
+++ b/src/mainboard/lenovo/t530/mainboard.c
@@ -45,20 +45,6 @@ void mainboard_suspend_resume(void)
 	outb(0xcb, 0xb2);
 }
 
-const char *smbios_mainboard_bios_version(void)
-{
-	static char *s = NULL;
-
-	/* Satisfy thinkpad_acpi.  */
-	if (strlen(CONFIG_LOCALVERSION))
-		return "CBET4000 " CONFIG_LOCALVERSION;
-
-	if (s != NULL)
-		return s;
-	s = strconcat("CBET4000 ", coreboot_version);
-	return s;
-}
-
 static void mainboard_init(device_t dev)
 {
 	RCBA32(0x38c8) = 0x00002005;
diff --git a/src/mainboard/lenovo/t60/mainboard.c b/src/mainboard/lenovo/t60/mainboard.c
index abda9ea..4213a23 100644
--- a/src/mainboard/lenovo/t60/mainboard.c
+++ b/src/mainboard/lenovo/t60/mainboard.c
@@ -52,20 +52,6 @@ int get_cst_entries(acpi_cstate_t **entries)
 	return ARRAY_SIZE(cst_entries);
 }
 
-const char *smbios_mainboard_bios_version(void)
-{
-	static char *s = NULL;
-
-	/* Satisfy thinkpad_acpi.  */
-	if (strlen(CONFIG_LOCALVERSION))
-		return "CBET4000 " CONFIG_LOCALVERSION;
-
-	if (s != NULL)
-		return s;
-	s = strconcat("CBET4000 ", coreboot_version);
-	return s;
-}
-
 static void mainboard_init(device_t dev)
 {
 	struct southbridge_intel_i82801gx_config *config;
diff --git a/src/mainboard/lenovo/x200/mainboard.c b/src/mainboard/lenovo/x200/mainboard.c
index 0ecffda..adaa5c5 100644
--- a/src/mainboard/lenovo/x200/mainboard.c
+++ b/src/mainboard/lenovo/x200/mainboard.c
@@ -36,20 +36,6 @@
 #include "cstates.c" /* Include it, as the linker won't find
 			the overloaded weak function in there. */
 
-const char *smbios_mainboard_bios_version(void)
-{
-	static char *s = NULL;
-
-	/* Satisfy thinkpad_acpi.  */
-	if (strlen(CONFIG_LOCALVERSION))
-		return "CBET4000 " CONFIG_LOCALVERSION;
-
-	if (s != NULL)
-		return s;
-	s = strconcat("CBET4000 ", coreboot_version);
-	return s;
-}
-
 static void fill_ssdt(void)
 {
 	drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 0);
diff --git a/src/mainboard/lenovo/x201/mainboard.c b/src/mainboard/lenovo/x201/mainboard.c
index 3cda4fa..b9daae6 100644
--- a/src/mainboard/lenovo/x201/mainboard.c
+++ b/src/mainboard/lenovo/x201/mainboard.c
@@ -60,22 +60,6 @@ int get_cst_entries(acpi_cstate_t ** entries)
 	return ARRAY_SIZE(cst_entries);
 }
 
-const char *smbios_mainboard_bios_version(void)
-{
-	static char *s = NULL;
-
-	/* Satisfy thinkpad_acpi.  */
-	if (strlen(CONFIG_LOCALVERSION))
-		return "CBET4000 " CONFIG_LOCALVERSION;
-
-	if (s != NULL)
-		return s;
-	s = strconcat("CBET4000 ", coreboot_version);
-	return s;
-}
-
-
-
 static void mainboard_init(device_t dev)
 {
 	printk(BIOS_SPEW, "starting SPI configuration\n");
diff --git a/src/mainboard/lenovo/x220/mainboard.c b/src/mainboard/lenovo/x220/mainboard.c
index 87c6c90..378b988 100644
--- a/src/mainboard/lenovo/x220/mainboard.c
+++ b/src/mainboard/lenovo/x220/mainboard.c
@@ -40,20 +40,6 @@ void mainboard_suspend_resume(void)
 	outb(0xcb, 0xb2);
 }
 
-const char *smbios_mainboard_bios_version(void)
-{
-	static char *s = NULL;
-
-	/* Satisfy thinkpad_acpi.  */
-	if (strlen(CONFIG_LOCALVERSION))
-		return "CBET4000 " CONFIG_LOCALVERSION;
-
-	if (s != NULL)
-		return s;
-	s = strconcat("CBET4000 ", coreboot_version);
-	return s;
-}
-
 static void mainboard_init(device_t dev)
 {
 	RCBA32(0x38c8) = 0x00002005;
diff --git a/src/mainboard/lenovo/x230/mainboard.c b/src/mainboard/lenovo/x230/mainboard.c
index 2a45808..3f913d2 100644
--- a/src/mainboard/lenovo/x230/mainboard.c
+++ b/src/mainboard/lenovo/x230/mainboard.c
@@ -41,20 +41,6 @@ void mainboard_suspend_resume(void)
 	outb(0xcb, 0xb2);
 }
 
-const char *smbios_mainboard_bios_version(void)
-{
-	static char *s = NULL;
-
-	/* Satisfy thinkpad_acpi.  */
-	if (strlen(CONFIG_LOCALVERSION))
-		return "CBET4000 " CONFIG_LOCALVERSION;
-
-	if (s != NULL)
-		return s;
-	s = strconcat("CBET4000 ", coreboot_version);
-	return s;
-}
-
 static void mainboard_init(device_t dev)
 {
 	RCBA32(0x38c8) = 0x00002005;
diff --git a/src/mainboard/lenovo/x60/mainboard.c b/src/mainboard/lenovo/x60/mainboard.c
index 334c27d..fa7373c 100644
--- a/src/mainboard/lenovo/x60/mainboard.c
+++ b/src/mainboard/lenovo/x60/mainboard.c
@@ -101,20 +101,6 @@ static void mainboard_init(device_t dev)
 	}
 }
 
-const char *smbios_mainboard_bios_version(void)
-{
-	static char *s = NULL;
-
-	/* Satisfy thinkpad_acpi.  */
-	if (strlen(CONFIG_LOCALVERSION))
-		return "CBET4000 " CONFIG_LOCALVERSION;
-
-	if (s != NULL)
-		return s;
-	s = strconcat("CBET4000 ", coreboot_version);
-	return s;
-}
-
 static void fill_ssdt(void)
 {
 	drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 1);



More information about the coreboot-gerrit mailing list