diff options
author | David Hendricks <dhendrix@fb.com> | 2019-04-05 19:40:26 -0700 |
---|---|---|
committer | David Hendricks <david.hendricks@gmail.com> | 2019-04-08 20:55:13 +0000 |
commit | c4f3972f2e1575718dc83ee32bd5153bca97be26 (patch) | |
tree | bf4ec2c49195b60474d816814d66b40855caf7e5 | |
parent | 44ad93e97087d73f4680184e9b2548061beaf915 (diff) | |
download | coreboot-c4f3972f2e1575718dc83ee32bd5153bca97be26.tar.xz |
mb/facebook/watson: Make turbo mode configurable (disabled by default)
Change-Id: Ief1eaab960c8fdab5bd5041b1a4f0c6ba1dd833f
Signed-off-by: David Hendricks <dhendrix@fb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32222
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r-- | src/mainboard/facebook/watson/Kconfig | 4 | ||||
-rw-r--r-- | src/mainboard/facebook/watson/mainboard.c | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/mainboard/facebook/watson/Kconfig b/src/mainboard/facebook/watson/Kconfig index 609b14a43a..6c2f9542e4 100644 --- a/src/mainboard/facebook/watson/Kconfig +++ b/src/mainboard/facebook/watson/Kconfig @@ -41,4 +41,8 @@ config FMDFILE string default "src/mainboard/$(CONFIG_MAINBOARD_DIR)/board.fmd" +config ENABLE_TURBO + bool "Enable turbo frequency" + default n + endif # BOARD_FACEBOOK_WATSON diff --git a/src/mainboard/facebook/watson/mainboard.c b/src/mainboard/facebook/watson/mainboard.c index e6b78501a4..3a1692fa1d 100644 --- a/src/mainboard/facebook/watson/mainboard.c +++ b/src/mainboard/facebook/watson/mainboard.c @@ -3,6 +3,7 @@ * * Copyright (C) 2007-2009 coresystems GmbH * Copyright (C) 2011 Google Inc. + * Copyright (C) Facebook, Inc. and its affiliates * * 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 @@ -14,6 +15,7 @@ * GNU General Public License for more details. */ +#include <cpu/intel/turbo.h> #include <device/device.h> /* @@ -25,6 +27,14 @@ static void mainboard_enable(struct device *dev) } +static void mainboard_init(void *chip_info) +{ +#if !IS_ENABLED(CONFIG_ENABLE_TURBO) + disable_turbo(); +#endif +} + struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, + .init = mainboard_init, }; |