summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2014-07-29 17:27:05 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-08-10 18:39:24 +0000
commitb61bfc8febcf9e897bb5a76f2fbe59b791f9d514 (patch)
treeaa993f8f063bc19bede0ad32c630499bd506f917
parent0739074fbf735cffefdac7ff6d086084449f6493 (diff)
downloadchrome-ec-b61bfc8febcf9e897bb5a76f2fbe59b791f9d514.tar.gz
Add more build conditions on x86-only code.
ACPI and thermal throttling are used only by x86 platforms. Modify the conditional build to avoid building them where they are not used. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=none TEST=make buildall check the flash size on Ryu and see we are saving about 200 bytes with this changes. Change-Id: Ie5e1603fb3bea95eaa5cb1e6cb19f4ddb0e235e8 Reviewed-on: https://chromium-review.googlesource.com/210056 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--common/build.mk8
-rw-r--r--include/throttle_ap.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/common/build.mk b/common/build.mk
index 4401c570aa..eeb079181c 100644
--- a/common/build.mk
+++ b/common/build.mk
@@ -51,7 +51,7 @@ common-$(CONFIG_KEYBOARD_TEST)+=keyboard_test.o
common-$(CONFIG_LED_COMMON)+=led_common.o
common-$(CONFIG_LID_ANGLE_KEY_SCAN)+=lid_angle.o
common-$(CONFIG_LID_SWITCH)+=lid_switch.o
-common-$(CONFIG_LPC)+=port80.o
+common-$(CONFIG_LPC)+=acpi.o port80.o
common-$(CONFIG_ONEWIRE)+=onewire.o
common-$(CONFIG_POWER_BUTTON)+=power_button.o
common-$(CONFIG_POWER_BUTTON_X86)+=power_button_x86.o
@@ -63,16 +63,16 @@ common-$(CONFIG_SOFTWARE_CLZ)+=clz.o
common-$(CONFIG_SPI_FLASH)+=spi_flash.o
common-$(CONFIG_SWITCH)+=switch.o
common-$(CONFIG_SW_CRC)+=crc.o
-common-$(CONFIG_TEMP_SENSOR)+=temp_sensor.o thermal.o
+common-$(CONFIG_TEMP_SENSOR)+=temp_sensor.o thermal.o throttle_ap.o
common-$(CONFIG_USB_PORT_POWER_DUMB)+=usb_port_power_dumb.o
common-$(CONFIG_USB_PORT_POWER_SMART)+=usb_port_power_smart.o
common-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_protocol.o
common-$(CONFIG_VBOOT_HASH)+=sha256.o vboot_hash.o
common-$(CONFIG_WIRELESS)+=wireless.o
-common-$(HAS_TASK_CHIPSET)+=chipset.o throttle_ap.o
+common-$(HAS_TASK_CHIPSET)+=chipset.o
common-$(HAS_TASK_CONSOLE)+=console.o console_output.o uart_buffering.o
common-$(HAS_TASK_CONSOLE)+=memory_commands.o
-common-$(HAS_TASK_HOSTCMD)+=acpi.o host_command.o host_event_commands.o
+common-$(HAS_TASK_HOSTCMD)+=host_command.o host_event_commands.o
common-$(HAS_TASK_PDCMD)+=host_command_master.o host_command_pd.o
common-$(HAS_TASK_KEYSCAN)+=keyboard_scan.o
common-$(HAS_TASK_LIGHTBAR)+=lb_common.o lightbar.o
diff --git a/include/throttle_ap.h b/include/throttle_ap.h
index 54a4b9fc40..8d2af51db9 100644
--- a/include/throttle_ap.h
+++ b/include/throttle_ap.h
@@ -43,7 +43,7 @@ enum throttle_sources {
* @param type Type of throttling desired
* @param source Which task is requesting throttling
*/
-#ifdef HAS_TASK_CHIPSET
+#ifdef CONFIG_TEMP_SENSOR
void throttle_ap(enum throttle_level level,
enum throttle_type type,
enum throttle_sources source);