summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2018-07-25 08:06:21 -0600
committerAaron Durbin <adurbin@chromium.org>2018-07-26 15:35:57 +0000
commit2fcc034705d010d44d3424059519f8487889e594 (patch)
tree7a057e534ef1afb1f422bc452a425fabe3d1a6c9 /src/mainboard/google
parenta0dabd1848e3e857fe6b6b882278a96b62614ba2 (diff)
downloadcoreboot-2fcc034705d010d44d3424059519f8487889e594.tar.xz
mb/google/octopus: add variant devicetree update callback
The variants of the octopus family have their own schedule and needs for modifying settings based on the phase of the build schedule while also needing to maintain support for previous builds. Therefore, utilize the SoC callback, mainboard_devtree_update(), but just callback into the newly introduced variant_update_devtree(). The indirection allows for the ability to move the call around earlier than the mainboard_devtree_update() if needed while maintaining consistency in the naming of the variant API. BUG=b:111808427,b:111743717 TEST=built Change-Id: If1c2f60cabe65b5f1c6a04dd60e056e50c4993df Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/27637 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/octopus/mainboard.c13
-rw-r--r--src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h4
2 files changed, 17 insertions, 0 deletions
diff --git a/src/mainboard/google/octopus/mainboard.c b/src/mainboard/google/octopus/mainboard.c
index eda44bad11..fa2075bc3d 100644
--- a/src/mainboard/google/octopus/mainboard.c
+++ b/src/mainboard/google/octopus/mainboard.c
@@ -16,12 +16,14 @@
#include <arch/acpi.h>
#include <baseboard/variants.h>
#include <boardid.h>
+#include <compiler.h>
#include <console/console.h>
#include <device/device.h>
#include <ec/google/chromeec/ec.h>
#include <ec/ec.h>
#include <nhlt.h>
#include <smbios.h>
+#include <soc/cpu.h>
#include <soc/gpio.h>
#include <soc/nhlt.h>
#include <string.h>
@@ -110,3 +112,14 @@ const char *smbios_mainboard_sku(void)
return sku_str;
}
+
+void __weak variant_update_devtree(struct device *dev)
+{
+ /* Place holder for common updates. */
+}
+
+void mainboard_devtree_update(struct device *dev)
+{
+ /* Defer to variant for board-specific updates. */
+ variant_update_devtree(dev);
+}
diff --git a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h
index 87ab7fd2a0..c9d7d7bf85 100644
--- a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h
@@ -41,4 +41,8 @@ const struct cros_gpio *variant_cros_gpios(size_t *num);
struct nhlt;
void variant_nhlt_init(struct nhlt *nhlt);
+/* Modify devictree settings during ramstage. */
+struct device;
+void variant_update_devtree(struct device *dev);
+
#endif /* BASEBOARD_VARIANTS_H */