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)
This commit is contained in:
Vladimir Serbinenko 2015-05-21 09:51:00 +02:00
parent 54e6aa7216
commit 537283ddc5
11 changed files with 15 additions and 152 deletions

View File

@ -24,6 +24,7 @@
#include <device/smbus.h> #include <device/smbus.h>
#include <smbios.h> #include <smbios.h>
#include <console/console.h> #include <console/console.h>
#include <version.h>
#include "lenovo.h" #include "lenovo.h"
#define ERROR_STRING "*INVALID*" #define ERROR_STRING "*INVALID*"
@ -198,3 +199,17 @@ const char *smbios_mainboard_version(void)
already_read = 1; already_read = 1;
return result; 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;
}

View File

@ -32,7 +32,6 @@
#include <device/pci.h> #include <device/pci.h>
#include <pc80/keyboard.h> #include <pc80/keyboard.h>
#include <ec/lenovo/h8/h8.h> #include <ec/lenovo/h8/h8.h>
#include <version.h>
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -40,20 +39,6 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); 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) static void mainboard_init(device_t dev)
{ {
/* init spi */ /* init spi */

View File

@ -32,7 +32,6 @@
#include <device/pci.h> #include <device/pci.h>
#include <pc80/keyboard.h> #include <pc80/keyboard.h>
#include <ec/lenovo/h8/h8.h> #include <ec/lenovo/h8/h8.h>
#include <version.h>
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -40,20 +39,6 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); 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) static void mainboard_init(device_t dev)
{ {
/* init spi */ /* init spi */

View File

@ -37,7 +37,6 @@
#include <cbfs.h> #include <cbfs.h>
#include <pc80/keyboard.h> #include <pc80/keyboard.h>
#include <ec/lenovo/h8/h8.h> #include <ec/lenovo/h8/h8.h>
#include <version.h>
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -45,20 +44,6 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); 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) static void mainboard_init(device_t dev)
{ {
RCBA32(0x38c8) = 0x00002005; RCBA32(0x38c8) = 0x00002005;

View File

@ -37,7 +37,6 @@
#include <cbfs.h> #include <cbfs.h>
#include <pc80/keyboard.h> #include <pc80/keyboard.h>
#include <ec/lenovo/h8/h8.h> #include <ec/lenovo/h8/h8.h>
#include <version.h>
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -45,20 +44,6 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); 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) static void mainboard_init(device_t dev)
{ {
RCBA32(0x38c8) = 0x00002005; RCBA32(0x38c8) = 0x00002005;

View File

@ -36,7 +36,6 @@
#include <arch/x86/include/arch/acpigen.h> #include <arch/x86/include/arch/acpigen.h>
#include <arch/interrupt.h> #include <arch/interrupt.h>
#include <smbios.h> #include <smbios.h>
#include <version.h>
#include <drivers/intel/gma/int15.h> #include <drivers/intel/gma/int15.h>
#define PANEL INT15_5F35_CL_DISPLAY_DEFAULT #define PANEL INT15_5F35_CL_DISPLAY_DEFAULT
@ -52,20 +51,6 @@ int get_cst_entries(acpi_cstate_t **entries)
return ARRAY_SIZE(cst_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) static void mainboard_init(device_t dev)
{ {
struct southbridge_intel_i82801gx_config *config; struct southbridge_intel_i82801gx_config *config;

View File

@ -27,7 +27,6 @@
#include <ec/acpi/ec.h> #include <ec/acpi/ec.h>
#include <smbios.h> #include <smbios.h>
#include <string.h> #include <string.h>
#include <version.h>
#include <ec/lenovo/pmh7/pmh7.h> #include <ec/lenovo/pmh7/pmh7.h>
#include <ec/acpi/ec.h> #include <ec/acpi/ec.h>
#include <ec/lenovo/h8/h8.h> #include <ec/lenovo/h8/h8.h>
@ -36,20 +35,6 @@
#include "cstates.c" /* Include it, as the linker won't find #include "cstates.c" /* Include it, as the linker won't find
the overloaded weak function in there. */ 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) static void fill_ssdt(void)
{ {
drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 0); drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 0);

View File

@ -45,7 +45,6 @@
#include <cpu/x86/lapic.h> #include <cpu/x86/lapic.h>
#include <device/pci.h> #include <device/pci.h>
#include <smbios.h> #include <smbios.h>
#include <version.h>
#include "drivers/lenovo/lenovo.h" #include "drivers/lenovo/lenovo.h"
static acpi_cstate_t cst_entries[] = { static acpi_cstate_t cst_entries[] = {
@ -60,22 +59,6 @@ int get_cst_entries(acpi_cstate_t ** entries)
return ARRAY_SIZE(cst_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) static void mainboard_init(device_t dev)
{ {
printk(BIOS_SPEW, "starting SPI configuration\n"); printk(BIOS_SPEW, "starting SPI configuration\n");

View File

@ -32,7 +32,6 @@
#include <device/pci.h> #include <device/pci.h>
#include <pc80/keyboard.h> #include <pc80/keyboard.h>
#include <ec/lenovo/h8/h8.h> #include <ec/lenovo/h8/h8.h>
#include <version.h>
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -40,20 +39,6 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); 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) static void mainboard_init(device_t dev)
{ {
RCBA32(0x38c8) = 0x00002005; RCBA32(0x38c8) = 0x00002005;

View File

@ -33,7 +33,6 @@
#include <device/pci.h> #include <device/pci.h>
#include <pc80/keyboard.h> #include <pc80/keyboard.h>
#include <ec/lenovo/h8/h8.h> #include <ec/lenovo/h8/h8.h>
#include <version.h>
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -41,20 +40,6 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); 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) static void mainboard_init(device_t dev)
{ {
RCBA32(0x38c8) = 0x00002005; RCBA32(0x38c8) = 0x00002005;

View File

@ -38,7 +38,6 @@
#include "dock.h" #include "dock.h"
#include <arch/x86/include/arch/acpigen.h> #include <arch/x86/include/arch/acpigen.h>
#include <smbios.h> #include <smbios.h>
#include <version.h>
#include <drivers/intel/gma/int15.h> #include <drivers/intel/gma/int15.h>
#include "drivers/lenovo/lenovo.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) static void fill_ssdt(void)
{ {
drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 1); drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 1);