summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-03-16 13:56:59 -0700
committerRandall Spangler <rspangler@chromium.org>2012-03-16 14:02:59 -0700
commite68844824b078df55c8ee19aec5d4b685d4898f5 (patch)
tree73d24a9f26b9665847904470036fcb19fdcc0e57
parenta9f4794edb0a7db06b34bf344809db4393e679ac (diff)
downloadchrome-ec-e68844824b078df55c8ee19aec5d4b685d4898f5.tar.gz
Clean up chip/board configs for LM4
Board-specific features like lightbar should be config'd at the board level, not at the chip level. BUG=none TEST=build link, bds, daisy Change-Id: If1df2ca0422f7b8bdc172d0df7bd9f6a1af6a9d2 Signed-off-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--board/bds/board.h2
-rw-r--r--board/bds/build.mk2
-rw-r--r--board/bds/ec.tasklist3
-rw-r--r--board/link/board.c4
-rw-r--r--board/link/board.h2
-rw-r--r--board/link/build.mk2
-rw-r--r--chip/lm4/adc.c1
-rw-r--r--chip/lm4/build.mk2
-rw-r--r--chip/lm4/config.h5
-rw-r--r--common/build.mk18
-rw-r--r--common/main.c2
-rw-r--r--include/adc.h3
12 files changed, 22 insertions, 24 deletions
diff --git a/board/bds/board.h b/board/bds/board.h
index dd96a58879..6ec010e221 100644
--- a/board/bds/board.h
+++ b/board/bds/board.h
@@ -9,7 +9,7 @@
#define __BOARD_H
/* Config flags */
-#define CONFIG_TMP006
+#define CONFIG_LIGHTBAR
/* 66.667 Mhz clock frequency */
#define CPU_CLOCK 66666667
diff --git a/board/bds/build.mk b/board/bds/build.mk
index 73f193751f..993dd04a05 100644
--- a/board/bds/build.mk
+++ b/board/bds/build.mk
@@ -10,4 +10,4 @@ CHIP:=lm4
board-y=board.o
board-$(CONFIG_CHARGER)+=dummy_charger.o
-board-$(CONFIG_TEMP_SENSOR)+=board_temp_sensor.o
+board-$(CONFIG_TASK_TEMPSENSOR)+=board_temp_sensor.o
diff --git a/board/bds/ec.tasklist b/board/bds/ec.tasklist
index b7f8a04532..573778f069 100644
--- a/board/bds/ec.tasklist
+++ b/board/bds/ec.tasklist
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -15,7 +15,6 @@
*/
#define CONFIG_TASK_LIST \
TASK(WATCHDOG, watchdog_task, NULL) \
- TASK(TEMPSENSOR, temp_sensor_task, NULL) \
TASK(PWM, pwm_task, NULL) \
TASK(KEYSCAN, keyboard_scan_task, NULL) \
TASK(POWERBTN, power_button_task, NULL) \
diff --git a/board/link/board.c b/board/link/board.c
index e6a03a0228..e9e0cd8208 100644
--- a/board/link/board.c
+++ b/board/link/board.c
@@ -4,15 +4,15 @@
*/
/* EC for Link board configuration */
+#include "adc.h"
#include "board.h"
#include "config.h"
#include "gpio.h"
+#include "lm4_adc.h"
#include "power_button.h"
#include "registers.h"
#include "util.h"
#include "x86_power.h"
-#include "lm4_adc.h"
-#include "adc.h"
#ifndef CONFIG_TASK_X86POWER
#define x86_power_interrupt NULL
diff --git a/board/link/board.h b/board/link/board.h
index 26f21477ea..81b764946f 100644
--- a/board/link/board.h
+++ b/board/link/board.h
@@ -9,6 +9,8 @@
#define __BOARD_H
/* Optional features */
+#define CONFIG_CHARGER
+#define CONFIG_LIGHTBAR
#define CONFIG_ONEWIRE
#define CONFIG_PECI
#define CONFIG_POWER_LED
diff --git a/board/link/build.mk b/board/link/build.mk
index b600d69d13..545950e249 100644
--- a/board/link/build.mk
+++ b/board/link/build.mk
@@ -9,4 +9,4 @@
CHIP:=lm4
board-y=board.o
-board-$(CONFIG_TEMP_SENSOR)+=board_temp_sensor.o
+board-$(CONFIG_TASK_TEMPSENSOR)+=board_temp_sensor.o
diff --git a/chip/lm4/adc.c b/chip/lm4/adc.c
index 2c08b9d25c..ad2080eb94 100644
--- a/chip/lm4/adc.c
+++ b/chip/lm4/adc.c
@@ -7,6 +7,7 @@
#include "adc.h"
#include "console.h"
+#include "gpio.h"
#include "lm4_adc.h"
#include "registers.h"
#include "timer.h"
diff --git a/chip/lm4/build.mk b/chip/lm4/build.mk
index df9b425c58..fadc116f11 100644
--- a/chip/lm4/build.mk
+++ b/chip/lm4/build.mk
@@ -16,6 +16,6 @@ chip-$(CONFIG_LPC)+=lpc.o
chip-$(CONFIG_ONEWIRE)+=onewire.o
chip-$(CONFIG_PECI)+=peci.o
chip-$(CONFIG_PWM)+=pwm.o
-chip-$(CONFIG_TEMP_SENSOR)+=chip_temp_sensor.o
chip-$(CONFIG_TASK_KEYSCAN)+=keyboard_scan.o
chip-$(CONFIG_TASK_POWERBTN)+=power_button.o
+chip-$(CONFIG_TASK_TEMPSENSOR)+=chip_temp_sensor.o
diff --git a/chip/lm4/config.h b/chip/lm4/config.h
index 947a10b28e..c1f86756b9 100644
--- a/chip/lm4/config.h
+++ b/chip/lm4/config.h
@@ -41,13 +41,10 @@
/* build with assertions and debug messages */
#define CONFIG_DEBUG
-/* Optional features */
+/* Optional features present on this chip */
#define CONFIG_FLASH
#define CONFIG_LPC
#define CONFIG_PWM
-#define CONFIG_TEMP_SENSOR
-#define CONFIG_CHARGER
-#define CONFIG_LIGHTBAR
#define CONFIG_FPU
/* Compile for running from RAM instead of flash */
diff --git a/common/build.mk b/common/build.mk
index 3c371c2078..fab876b4fb 100644
--- a/common/build.mk
+++ b/common/build.mk
@@ -8,22 +8,22 @@
common-y=main.o util.o console.o vboot.o uart_buffering.o usb_charge_commands.o
common-y+=memory_commands.o shared_mem.o system.o usb_charge.o
common-y+=gpio_commands.o version.o
-common-$(CONFIG_LPC)+=port80.o host_event_commands.o
-common-$(CONFIG_TASK_HOSTCMD)+=host_command.o
-common-$(CONFIG_TASK_I8042CMD)+=i8042.o keyboard.o
-common-$(CONFIG_TASK_X86POWER)+=x86_power.o
-common-$(CONFIG_TASK_GAIAPOWER)+=gaia_power.o
common-$(CONFIG_FLASH)+=flash_commands.o
+common-$(CONFIG_LIGHTBAR)+=leds.o
+common-$(CONFIG_LPC)+=port80.o host_event_commands.o
+common-$(CONFIG_POWER_LED)+=power_led.o
common-$(CONFIG_PSTORE)+=pstore_commands.o
common-$(CONFIG_PWM)+=pwm_commands.o
+common-$(CONFIG_TASK_GAIAPOWER)+=gaia_power.o
+common-$(CONFIG_TASK_HOSTCMD)+=host_command.o
+common-$(CONFIG_TASK_I8042CMD)+=i8042.o keyboard.o
+common-$(CONFIG_TASK_TEMPSENSOR)+=temp_sensor.o temp_sensor_commands.o
common-$(CONFIG_TASK_THERMAL)+=thermal.o thermal_commands.o
-common-$(CONFIG_TEMP_SENSOR)+=temp_sensor.o temp_sensor_commands.o
+common-$(CONFIG_TASK_X86POWER)+=x86_power.o
common-$(CONFIG_TMP006)+=tmp006.o
-common-$(CONFIG_LIGHTBAR)+=leds.o
-common-$(CONFIG_POWER_LED)+=power_led.o
# Board driver modules
-common-$(CONFIG_CHARGER_BQ24725)+=charger_bq24725.o
common-$(CONFIG_BATTERY_ATL706486)+=battery_atl706486.o
+common-$(CONFIG_CHARGER_BQ24725)+=charger_bq24725.o
common-$(CONFIG_SMART_BATTERY)+=smart_battery.o charge_state.o \
battery_commands.o
diff --git a/common/main.c b/common/main.c
index ca9426ee55..be9653cfb6 100644
--- a/common/main.c
+++ b/common/main.c
@@ -85,7 +85,7 @@ int main(void)
pwm_init();
#endif
i2c_init();
-#ifdef CONFIG_TEMP_SENSOR
+#ifdef CONFIG_TASK_TEMPSENSOR
temp_sensor_init();
chip_temp_sensor_init();
#endif
diff --git a/include/adc.h b/include/adc.h
index 3288e90445..5ce79d172e 100644
--- a/include/adc.h
+++ b/include/adc.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -10,7 +10,6 @@
#include "common.h"
#include "board.h"
-#include "gpio.h"
/* forward declaration */
enum adc_channel;