diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2015-05-21 09:51:00 +0200 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2015-05-21 10:34:38 +0200 |
commit | 537283ddc55549b5fa0f1ba05f2b447a0cd9478f (patch) | |
tree | 3813b55bedabcdde186ec0ade07595a83d40ad8c /src | |
parent | 54e6aa7216a6776daa67c94c97d8568e1d395861 (diff) |
lenovo: Remerge smbios_mainboard_bios_version.
Change-Id: I8df5b7f6707957b925f7bb4dc06a717252c70868
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/10275
Reviewed-by: Nicolas Reinecke <nr@das-labor.org>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/i2c/at24rf08c/lenovo_serials.c | 15 | ||||
-rw-r--r-- | src/mainboard/lenovo/t420s/mainboard.c | 15 | ||||
-rw-r--r-- | src/mainboard/lenovo/t430s/mainboard.c | 15 | ||||
-rw-r--r-- | src/mainboard/lenovo/t520/mainboard.c | 15 | ||||
-rw-r--r-- | src/mainboard/lenovo/t530/mainboard.c | 15 | ||||
-rw-r--r-- | src/mainboard/lenovo/t60/mainboard.c | 15 | ||||
-rw-r--r-- | src/mainboard/lenovo/x200/mainboard.c | 15 | ||||
-rw-r--r-- | src/mainboard/lenovo/x201/mainboard.c | 17 | ||||
-rw-r--r-- | src/mainboard/lenovo/x220/mainboard.c | 15 | ||||
-rw-r--r-- | src/mainboard/lenovo/x230/mainboard.c | 15 | ||||
-rw-r--r-- | 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 b9beeb73d1..595770c2d9 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 698301d866..6eaf90e29f 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 359de8c08a..bded3f602c 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 8419abca10..06b2b8fbb1 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 072ebe94a4..12c4d05161 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 abda9eabc4..ff30b1578b 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 0ecffdac9c..8efb3a2cdc 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 3cda4fa6c6..ca34d2ac7f 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 87c6c90743..82597a1d3e 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 2a45808eed..797b476aa3 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 334c27d64e..df3ee419b1 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); |