summaryrefslogtreecommitdiffstats
path: root/src/mainboard/google/drallion/variants/drallion/smbios.c
diff options
context:
space:
mode:
authorMathew King <mathewk@chromium.org>2019-10-31 11:55:25 -0600
committerPatrick Georgi <pgeorgi@google.com>2019-11-06 13:58:08 +0000
commita0218958a046e102daabb297c2e9eb83cb244b1c (patch)
tree314288f259b1152e1dac7a6774626ac36fe5b62a /src/mainboard/google/drallion/variants/drallion/smbios.c
parent51b1fc6e3929229e997fe16aa8f653bfcd112eeb (diff)
downloadcoreboot-a0218958a046e102daabb297c2e9eb83cb244b1c.tar.gz
coreboot-a0218958a046e102daabb297c2e9eb83cb244b1c.tar.bz2
coreboot-a0218958a046e102daabb297c2e9eb83cb244b1c.zip
mb/g/drallion: Override smbios enclosure type for drallion
Drallion can be either a clamshell or convertible depending on the presence of the 360 sensor board. Set the smbios type 3 enclosure type to either CONVERTIBLE or LAPTOP accordingly. BUG=b:143701965 TEST='dmidecode -t 3' Type = Convertible with sensor board connected Type = Laptop with sensor board disconnected Change-Id: I766e9a4b22a490bc8252670a06504437e82f72d5 Signed-off-by: Mathew King <mathewk@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36512 Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/drallion/variants/drallion/smbios.c')
-rw-r--r--src/mainboard/google/drallion/variants/drallion/smbios.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mainboard/google/drallion/variants/drallion/smbios.c b/src/mainboard/google/drallion/variants/drallion/smbios.c
new file mode 100644
index 000000000000..45bd31d7b061
--- /dev/null
+++ b/src/mainboard/google/drallion/variants/drallion/smbios.c
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2019 Google LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
+ * GNU General Public License for more details.
+ */
+
+#include <smbios.h>
+#include <variant/variant.h>
+
+smbios_enclosure_type smbios_mainboard_enclosure_type(void)
+{
+ return has_360_sensor_board() ?
+ SMBIOS_ENCLOSURE_CONVERTIBLE :
+ SMBIOS_ENCLOSURE_LAPTOP;
+}