summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-12-18 13:26:45 +0100
committerAngel Pons <th3fanbus@gmail.com>2021-12-20 12:18:01 +0000
commita2c10a25391a739186caa43799657a4bf8959c3b (patch)
tree2932c9cedfaef88aa5a06a6fbfcf4c452333b118
parent6d84c08fbff1e94c1af20a806a571c36c57d7372 (diff)
mb/starlabs/labtop: Rename some files
Rename `mainboard.c` to `smbios.c` as it only contains SMBIOS functions. Rename `ramstage.c` to `mainboard.c` as it contains the mainboard chip operations struct. Change-Id: I9548ca72a7583de98f5b154e3381825bba00d5cf Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60211 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sean Rhodes <admin@starlabs.systems> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
-rw-r--r--src/mainboard/starlabs/labtop/Makefile.inc2
-rw-r--r--src/mainboard/starlabs/labtop/mainboard.c46
-rw-r--r--src/mainboard/starlabs/labtop/ramstage.c21
-rw-r--r--src/mainboard/starlabs/labtop/smbios.c47
4 files changed, 58 insertions, 58 deletions
diff --git a/src/mainboard/starlabs/labtop/Makefile.inc b/src/mainboard/starlabs/labtop/Makefile.inc
index cb72a089ec..71fc0cf282 100644
--- a/src/mainboard/starlabs/labtop/Makefile.inc
+++ b/src/mainboard/starlabs/labtop/Makefile.inc
@@ -7,5 +7,5 @@ bootblock-y += bootblock.c
ramstage-y += hda_verb.c
ramstage-y += mainboard.c
-ramstage-y += ramstage.c
+ramstage-y += smbios.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += variants/$(VARIANT_DIR)/gma-mainboard.ads
diff --git a/src/mainboard/starlabs/labtop/mainboard.c b/src/mainboard/starlabs/labtop/mainboard.c
index 8babae3943..60e65ee8c4 100644
--- a/src/mainboard/starlabs/labtop/mainboard.c
+++ b/src/mainboard/starlabs/labtop/mainboard.c
@@ -1,47 +1,21 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <chip.h>
-#include <console/console.h>
#include <device/device.h>
-#include <device/pci_def.h>
-#include <ec/starlabs/merlin/ec.h>
-#include <limits.h>
+#include <soc/ramstage.h>
#include <option.h>
-#include <smbios.h>
-#include <types.h>
-#include <uuid.h>
#include <variants.h>
-const char *smbios_mainboard_bios_version(void)
+static void init_mainboard(void *chip_info)
{
- return "8";
-}
+ const struct pad_config *pads;
+ size_t num;
-/* Get the Embedded Controller firmware version */
-void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision)
-{
- u16 ec_version = it_get_version();
+ pads = variant_gpio_table(&num);
+ gpio_configure_pads(pads, num);
- *ec_major_revision = ec_version >> 8;
- *ec_minor_revision = ec_version & 0xff;
+ devtree_update();
}
-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();
-}
+struct chip_operations mainboard_ops = {
+ .init = init_mainboard,
+};
diff --git a/src/mainboard/starlabs/labtop/ramstage.c b/src/mainboard/starlabs/labtop/ramstage.c
deleted file mode 100644
index 60e65ee8c4..0000000000
--- a/src/mainboard/starlabs/labtop/ramstage.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include <device/device.h>
-#include <soc/ramstage.h>
-#include <option.h>
-#include <variants.h>
-
-static void init_mainboard(void *chip_info)
-{
- const struct pad_config *pads;
- size_t num;
-
- pads = variant_gpio_table(&num);
- gpio_configure_pads(pads, num);
-
- devtree_update();
-}
-
-struct chip_operations mainboard_ops = {
- .init = init_mainboard,
-};
diff --git a/src/mainboard/starlabs/labtop/smbios.c b/src/mainboard/starlabs/labtop/smbios.c
new file mode 100644
index 0000000000..8babae3943
--- /dev/null
+++ b/src/mainboard/starlabs/labtop/smbios.c
@@ -0,0 +1,47 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <chip.h>
+#include <console/console.h>
+#include <device/device.h>
+#include <device/pci_def.h>
+#include <ec/starlabs/merlin/ec.h>
+#include <limits.h>
+#include <option.h>
+#include <smbios.h>
+#include <types.h>
+#include <uuid.h>
+#include <variants.h>
+
+const char *smbios_mainboard_bios_version(void)
+{
+ return "8";
+}
+
+/* Get the Embedded Controller firmware version */
+void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision)
+{
+ u16 ec_version = it_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();
+}