[coreboot-gerrit] Patch set updated for coreboot: d907801 lenovo: Remerge smbios_mainboard_bios_version.

Vladimir Serbinenko (phcoder@gmail.com) gerrit at coreboot.org
Thu May 21 10:09:08 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 d907801215f8b99506293e2c4fb8faebba9750ff
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 | 15 +++++++++++++++
 src/mainboard/lenovo/t420s/mainboard.c     | 15 ---------------
 src/mainboard/lenovo/t430s/mainboard.c     | 15 ---------------
 src/mainboard/lenovo/t520/mainboard.c      | 15 ---------------
 src/mainboard/lenovo/t530/mainboard.c      | 15 ---------------
 src/mainboard/lenovo/t60/mainboard.c       | 15 ---------------
 src/mainboard/lenovo/x200/mainboard.c      | 15 ---------------
 src/mainboard/lenovo/x201/mainboard.c      | 17 -----------------
 src/mainboard/lenovo/x220/mainboard.c      | 15 ---------------
 src/mainboard/lenovo/x230/mainboard.c      | 15 ---------------
 src/mainboard/lenovo/x60/mainboard.c       | 15 ---------------
 11 files changed, 15 insertions(+), 152 deletions(-)

diff --git a/src/drivers/i2c/at24rf08c/lenovo_serials.c b/src/drivers/i2c/at24rf08c/lenovo_serials.c
index b9beeb7..595770c 100644
--- a/src/drivers/i2c/at24rf08c/lenovo_serials.c
+++ b/src/drivers/i2c/at24rf08c/lenovo_serials.c
@@ -24,6 +24,7 @@
 #include <device/smbus.h>
 #include <smbios.h>
 #include <console/console.h>
+#include <version.h>
 #include "lenovo.h"
 
 #define ERROR_STRING "*INVALID*"
@@ -198,3 +199,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..6eaf90e 100644
--- a/src/mainboard/lenovo/t420s/mainboard.c
+++ b/src/mainboard/lenovo/t420s/mainboard.c
@@ -32,7 +32,6 @@
 #include <device/pci.h>
 #include <pc80/keyboard.h>
 #include <ec/lenovo/h8/h8.h>
-#include <version.h>
 
 void mainboard_suspend_resume(void)
 {
@@ -40,20 +39,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..bded3f6 100644
--- a/src/mainboard/lenovo/t430s/mainboard.c
+++ b/src/mainboard/lenovo/t430s/mainboard.c
@@ -32,7 +32,6 @@
 #include <device/pci.h>
 #include <pc80/keyboard.h>
 #include <ec/lenovo/h8/h8.h>
-#include <version.h>
 
 void mainboard_suspend_resume(void)
 {
@@ -40,20 +39,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..06b2b8f 100644
--- a/src/mainboard/lenovo/t520/mainboard.c
+++ b/src/mainboard/lenovo/t520/mainboard.c
@@ -37,7 +37,6 @@
 #include <cbfs.h>
 #include <pc80/keyboard.h>
 #include <ec/lenovo/h8/h8.h>
-#include <version.h>
 
 void mainboard_suspend_resume(void)
 {
@@ -45,20 +44,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..12c4d05 100644
--- a/src/mainboard/lenovo/t530/mainboard.c
+++ b/src/mainboard/lenovo/t530/mainboard.c
@@ -37,7 +37,6 @@
 #include <cbfs.h>
 #include <pc80/keyboard.h>
 #include <ec/lenovo/h8/h8.h>
-#include <version.h>
 
 void mainboard_suspend_resume(void)
 {
@@ -45,20 +44,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..ff30b15 100644
--- a/src/mainboard/lenovo/t60/mainboard.c
+++ b/src/mainboard/lenovo/t60/mainboard.c
@@ -36,7 +36,6 @@
 #include <arch/x86/include/arch/acpigen.h>
 #include <arch/interrupt.h>
 #include <smbios.h>
-#include <version.h>
 #include <drivers/intel/gma/int15.h>
 #define PANEL INT15_5F35_CL_DISPLAY_DEFAULT
 
@@ -52,20 +51,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..8efb3a2 100644
--- a/src/mainboard/lenovo/x200/mainboard.c
+++ b/src/mainboard/lenovo/x200/mainboard.c
@@ -27,7 +27,6 @@
 #include <ec/acpi/ec.h>
 #include <smbios.h>
 #include <string.h>
-#include <version.h>
 #include <ec/lenovo/pmh7/pmh7.h>
 #include <ec/acpi/ec.h>
 #include <ec/lenovo/h8/h8.h>
@@ -36,20 +35,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..ca34d2a 100644
--- a/src/mainboard/lenovo/x201/mainboard.c
+++ b/src/mainboard/lenovo/x201/mainboard.c
@@ -45,7 +45,6 @@
 #include <cpu/x86/lapic.h>
 #include <device/pci.h>
 #include <smbios.h>
-#include <version.h>
 #include "drivers/lenovo/lenovo.h"
 
 static acpi_cstate_t cst_entries[] = {
@@ -60,22 +59,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..82597a1 100644
--- a/src/mainboard/lenovo/x220/mainboard.c
+++ b/src/mainboard/lenovo/x220/mainboard.c
@@ -32,7 +32,6 @@
 #include <device/pci.h>
 #include <pc80/keyboard.h>
 #include <ec/lenovo/h8/h8.h>
-#include <version.h>
 
 void mainboard_suspend_resume(void)
 {
@@ -40,20 +39,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..797b476 100644
--- a/src/mainboard/lenovo/x230/mainboard.c
+++ b/src/mainboard/lenovo/x230/mainboard.c
@@ -33,7 +33,6 @@
 #include <device/pci.h>
 #include <pc80/keyboard.h>
 #include <ec/lenovo/h8/h8.h>
-#include <version.h>
 
 void mainboard_suspend_resume(void)
 {
@@ -41,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/x60/mainboard.c b/src/mainboard/lenovo/x60/mainboard.c
index 334c27d..df3ee41 100644
--- a/src/mainboard/lenovo/x60/mainboard.c
+++ b/src/mainboard/lenovo/x60/mainboard.c
@@ -38,7 +38,6 @@
 #include "dock.h"
 #include <arch/x86/include/arch/acpigen.h>
 #include <smbios.h>
-#include <version.h>
 #include <drivers/intel/gma/int15.h>
 #include "drivers/lenovo/lenovo.h"
 
@@ -101,20 +100,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