diff options
4 files changed, 22 insertions, 6 deletions
diff --git a/src/mainboard/google/rex/mainboard.c b/src/mainboard/google/rex/mainboard.c index 619ca71927..3ca85ff77c 100644 --- a/src/mainboard/google/rex/mainboard.c +++ b/src/mainboard/google/rex/mainboard.c @@ -41,12 +41,12 @@ static void mainboard_init(void *chip_info) fw_config_gpio_padbased_override(padbased_table); gpio_configure_pads_with_padbased(padbased_table); free(padbased_table); - variant_devtree_update(); + baseboard_devtree_update(); } -void __weak variant_devtree_update(void) +void __weak baseboard_devtree_update(void) { - /* Override dev tree settings per board */ + /* Override dev tree settings per baseboard */ } void __weak variant_generate_s0ix_hook(enum s0ix_entry entry) diff --git a/src/mainboard/google/rex/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/rex/variants/baseboard/include/baseboard/variants.h index afed754438..bd3d535c16 100644 --- a/src/mainboard/google/rex/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/rex/variants/baseboard/include/baseboard/variants.h @@ -31,7 +31,9 @@ enum s0ix_entry { void variant_generate_s0ix_hook(enum s0ix_entry entry); -/* Modify devictree settings during ramstage */ +/* Modify devictree settings during ramstage by baseboard */ +void baseboard_devtree_update(void); +/* Modify devictree settings during ramstage by dedicated variant */ void variant_devtree_update(void); #endif /*__BASEBOARD_VARIANTS_H__ */ diff --git a/src/mainboard/google/rex/variants/baseboard/ovis/ramstage.c b/src/mainboard/google/rex/variants/baseboard/ovis/ramstage.c index 5955b2adc4..17d39ae139 100644 --- a/src/mainboard/google/rex/variants/baseboard/ovis/ramstage.c +++ b/src/mainboard/google/rex/variants/baseboard/ovis/ramstage.c @@ -21,8 +21,15 @@ const struct cpu_tdp_power_limits limits[] = { }, }; -void variant_devtree_update(void) +void __weak variant_devtree_update(void) { + printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__); + size_t total_entries = ARRAY_SIZE(limits); variant_update_cpu_power_limits(limits, total_entries); } + +void baseboard_devtree_update(void) +{ + variant_devtree_update(); +} diff --git a/src/mainboard/google/rex/variants/baseboard/rex/ramstage.c b/src/mainboard/google/rex/variants/baseboard/rex/ramstage.c index 02bdca5d01..7c09651046 100644 --- a/src/mainboard/google/rex/variants/baseboard/rex/ramstage.c +++ b/src/mainboard/google/rex/variants/baseboard/rex/ramstage.c @@ -96,8 +96,10 @@ const struct cpu_tdp_power_limits power_optimized_limits[] = { }; #endif -void variant_devtree_update(void) +void __weak variant_devtree_update(void) { + printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__); + const struct cpu_tdp_power_limits *limits = performance_efficient_limits; size_t limits_size = ARRAY_SIZE(performance_efficient_limits); @@ -115,3 +117,8 @@ void variant_devtree_update(void) variant_update_cpu_power_limits(limits, limits_size); } + +void baseboard_devtree_update(void) +{ + variant_devtree_update(); +} |