mb/starlabs/common: Move the SMBIOS code to common directory
This avoids storing the same files in 5 different places in the tree. Change-Id: I84bd5705613947444f48331d1a2d06b1ab71b2f3 Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-on: https://review.coreboot.org/c/coreboot/+/88943 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
parent
e7dd184e5f
commit
7622a57771
13 changed files with 20 additions and 161 deletions
|
|
@ -11,4 +11,3 @@ romstage-$(CONFIG_VBOOT) += vboot.c
|
|||
|
||||
ramstage-$(CONFIG_DRIVERS_OPTION_CFR) += cfr.c
|
||||
ramstage-y += mainboard.c
|
||||
ramstage-y += smbios.c
|
||||
|
|
|
|||
13
src/mainboard/starlabs/common/Kconfig
Normal file
13
src/mainboard/starlabs/common/Kconfig
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
## SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
if VENDOR_STARLABS
|
||||
|
||||
menu "Star Labs Settings"
|
||||
|
||||
config MB_COMMON_DIR
|
||||
string
|
||||
default "starlabs/common"
|
||||
|
||||
endmenu
|
||||
|
||||
endif
|
||||
3
src/mainboard/starlabs/common/Makefile.mk
Normal file
3
src/mainboard/starlabs/common/Makefile.mk
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
subdirs-$(CONFIG_VENDOR_STARLABS) += smbios
|
||||
3
src/mainboard/starlabs/common/smbios/Makefile.mk
Normal file
3
src/mainboard/starlabs/common/smbios/Makefile.mk
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
ramstage-y += smbios.c
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <chip.h>
|
||||
#include <soc/soc_chip.h>
|
||||
#include <device/device.h>
|
||||
#include <device/pci_def.h>
|
||||
#include <ec/starlabs/merlin/ec.h>
|
||||
|
|
@ -12,5 +12,4 @@ romstage-$(CONFIG_VBOOT) += vboot.c
|
|||
ramstage-$(CONFIG_DRIVERS_OPTION_CFR) += cfr.c
|
||||
ramstage-y += devtree.c
|
||||
ramstage-y += mainboard.c
|
||||
ramstage-y += smbios.c
|
||||
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <device/device.h>
|
||||
#include <device/pci_def.h>
|
||||
#include <ec/starlabs/merlin/ec.h>
|
||||
#include <smbios.h>
|
||||
#include <types.h>
|
||||
#include <uuid.h>
|
||||
#include <variants.h>
|
||||
|
||||
/* Get the Embedded Controller firmware version */
|
||||
void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision)
|
||||
{
|
||||
u16 ec_version = ec_get_version();
|
||||
|
||||
*ec_major_revision = ec_version >> 8;
|
||||
*ec_minor_revision = ec_version & 0xff;
|
||||
}
|
||||
|
||||
const char *smbios_system_sku(void)
|
||||
{
|
||||
return CONFIG_MAINBOARD_FAMILY;
|
||||
}
|
||||
|
||||
u8 smbios_mainboard_feature_flags(void)
|
||||
{
|
||||
return SMBIOS_FEATURE_FLAGS_HOSTING_BOARD | SMBIOS_FEATURE_FLAGS_REPLACEABLE;
|
||||
}
|
||||
|
||||
const char *smbios_chassis_version(void)
|
||||
{
|
||||
return smbios_mainboard_version();
|
||||
}
|
||||
|
||||
const char *smbios_chassis_serial_number(void)
|
||||
{
|
||||
return smbios_mainboard_serial_number();
|
||||
}
|
||||
|
|
@ -13,5 +13,4 @@ romstage-$(CONFIG_VBOOT) += vboot.c
|
|||
ramstage-$(CONFIG_DRIVERS_OPTION_CFR) += cfr.c
|
||||
ramstage-y += hda_verb.c
|
||||
ramstage-y += mainboard.c
|
||||
ramstage-y += smbios.c
|
||||
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += variants/$(VARIANT_DIR)/gma-mainboard.ads
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <chip.h>
|
||||
#include <device/device.h>
|
||||
#include <device/pci_def.h>
|
||||
#include <ec/starlabs/merlin/ec.h>
|
||||
#include <smbios.h>
|
||||
#include <types.h>
|
||||
#include <uuid.h>
|
||||
#include <variants.h>
|
||||
|
||||
/* Get the Embedded Controller firmware version */
|
||||
void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision)
|
||||
{
|
||||
u16 ec_version = ec_get_version();
|
||||
|
||||
*ec_major_revision = ec_version >> 8;
|
||||
*ec_minor_revision = ec_version & 0xff;
|
||||
}
|
||||
|
||||
const char *smbios_system_sku(void)
|
||||
{
|
||||
return CONFIG_MAINBOARD_FAMILY;
|
||||
}
|
||||
|
||||
u8 smbios_mainboard_feature_flags(void)
|
||||
{
|
||||
return SMBIOS_FEATURE_FLAGS_HOSTING_BOARD | SMBIOS_FEATURE_FLAGS_REPLACEABLE;
|
||||
}
|
||||
|
||||
const char *smbios_chassis_version(void)
|
||||
{
|
||||
return smbios_mainboard_version();
|
||||
}
|
||||
|
||||
const char *smbios_chassis_serial_number(void)
|
||||
{
|
||||
return smbios_mainboard_serial_number();
|
||||
}
|
||||
|
|
@ -9,5 +9,4 @@ bootblock-y += bootblock.c
|
|||
ramstage-$(CONFIG_DRIVERS_OPTION_CFR) += cfr.c
|
||||
ramstage-y += hda_verb.c
|
||||
ramstage-y += mainboard.c
|
||||
ramstage-y += smbios.c
|
||||
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += variants/$(VARIANT_DIR)/gma-mainboard.ads
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <chip.h>
|
||||
#include <device/device.h>
|
||||
#include <device/pci_def.h>
|
||||
#include <ec/starlabs/merlin/ec.h>
|
||||
#include <smbios.h>
|
||||
#include <types.h>
|
||||
#include <uuid.h>
|
||||
#include <variants.h>
|
||||
|
||||
/* Get the Embedded Controller firmware version */
|
||||
void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision)
|
||||
{
|
||||
u16 ec_version = ec_get_version();
|
||||
|
||||
*ec_major_revision = ec_version >> 8;
|
||||
*ec_minor_revision = ec_version & 0xff;
|
||||
}
|
||||
|
||||
const char *smbios_system_sku(void)
|
||||
{
|
||||
return CONFIG_MAINBOARD_FAMILY;
|
||||
}
|
||||
|
||||
u8 smbios_mainboard_feature_flags(void)
|
||||
{
|
||||
return SMBIOS_FEATURE_FLAGS_HOSTING_BOARD | SMBIOS_FEATURE_FLAGS_REPLACEABLE;
|
||||
}
|
||||
|
||||
const char *smbios_chassis_version(void)
|
||||
{
|
||||
return smbios_mainboard_version();
|
||||
}
|
||||
|
||||
const char *smbios_chassis_serial_number(void)
|
||||
{
|
||||
return smbios_mainboard_serial_number();
|
||||
}
|
||||
|
|
@ -13,4 +13,3 @@ romstage-$(CONFIG_VBOOT) += vboot.c
|
|||
ramstage-$(CONFIG_DRIVERS_OPTION_CFR) += cfr.c
|
||||
ramstage-y += hda_verb.c
|
||||
ramstage-y += mainboard.c
|
||||
ramstage-y += smbios.c
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <chip.h>
|
||||
#include <device/device.h>
|
||||
#include <device/pci_def.h>
|
||||
#include <ec/starlabs/merlin/ec.h>
|
||||
#include <smbios.h>
|
||||
#include <types.h>
|
||||
#include <uuid.h>
|
||||
#include <variants.h>
|
||||
|
||||
/* Get the Embedded Controller firmware version */
|
||||
void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision)
|
||||
{
|
||||
u16 ec_version = ec_get_version();
|
||||
|
||||
*ec_major_revision = ec_version >> 8;
|
||||
*ec_minor_revision = ec_version & 0xff;
|
||||
}
|
||||
|
||||
const char *smbios_system_sku(void)
|
||||
{
|
||||
return CONFIG_MAINBOARD_FAMILY;
|
||||
}
|
||||
|
||||
u8 smbios_mainboard_feature_flags(void)
|
||||
{
|
||||
return SMBIOS_FEATURE_FLAGS_HOSTING_BOARD | SMBIOS_FEATURE_FLAGS_REPLACEABLE;
|
||||
}
|
||||
|
||||
const char *smbios_chassis_version(void)
|
||||
{
|
||||
return smbios_mainboard_version();
|
||||
}
|
||||
|
||||
const char *smbios_chassis_serial_number(void)
|
||||
{
|
||||
return smbios_mainboard_serial_number();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue