diff options
author | Rong Chang <rongchang@chromium.org> | 2016-03-03 15:59:48 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-03-03 06:21:57 -0800 |
commit | fc715ba428e044519e80078652d70d239fe340c3 (patch) | |
tree | 81a6acd1056cb13dff1ac0eac3eb247f0531e87c | |
parent | 99ab107819fe2726e9dfe4fde084408e097acada (diff) | |
download | chrome-ec-fc715ba428e044519e80078652d70d239fe340c3.tar.gz |
oak: fix issues on building oak rev1-4 EC
The default target hardware is rev5. This is a maintainess change for
old and deprecated HW.
BRANCH=none
BUG=chrome-os-partner:49114
BUG=chrome-os-partner:50720
TEST=manual
for N=1,5 do
make BOARD=oak clean && make BOARD=oak EXTRA_CFLAGS="-DBOARD_REV=$N" -j
Signed-off-by: Rong chang <rongchang@chromium.org>
Change-Id: Ibb4ebf9fab429964ace7c3e548598f0fb08e7dea
Reviewed-on: https://chromium-review.googlesource.com/330065
Commit-Ready: Rong Chang <rongchang@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
Reviewed-by: Wei-Ning Huang <wnhuang@chromium.org>
-rw-r--r-- | board/oak/board.c | 18 | ||||
-rw-r--r-- | board/oak/board.h | 2 | ||||
-rw-r--r-- | board/oak/ec.tasklist | 21 |
3 files changed, 22 insertions, 19 deletions
diff --git a/board/oak/board.c b/board/oak/board.c index 6c1f9ff571..5a8cee9fb1 100644 --- a/board/oak/board.c +++ b/board/oak/board.c @@ -548,8 +548,22 @@ void vbus_task(void) task_wait_event(-1); } } +#else +void vbus_task(void) +{ + while (1) + task_wait_event(-1); +} #endif /* BOARD_REV < OAK_REV4 */ +#ifndef CONFIG_ALS +void als_task(void) +{ + while (1) + task_wait_event(-1); +} +#endif + #ifdef CONFIG_TEMP_SENSOR_TMP432 static void tmp432_set_power_deferred(void) { @@ -627,7 +641,9 @@ DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT); #ifdef HAS_TASK_MOTIONSENSE /* Motion sensors */ /* Mutexes */ +#ifdef CONFIG_ACCEL_KX022 static struct mutex g_lid_mutex; +#endif #ifdef CONFIG_ACCELGYRO_BMI160 static struct mutex g_base_mutex; #endif @@ -714,6 +730,7 @@ struct motion_sensor_t motion_sensors[] = { }, }, #endif +#ifdef CONFIG_ACCEL_KX022 {.name = "Lid Accel", .active_mask = SENSOR_ACTIVE_S0, .chip = MOTIONSENSE_CHIP_KX022, @@ -747,6 +764,7 @@ struct motion_sensor_t motion_sensors[] = { }, }, }, +#endif }; const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); diff --git a/board/oak/board.h b/board/oak/board.h index b657b1b257..5d6bea437e 100644 --- a/board/oak/board.h +++ b/board/oak/board.h @@ -33,7 +33,6 @@ #define CONFIG_BATTERY_PRESENT_GPIO GPIO_BAT_PRESENT_L #define CONFIG_BATTERY_SMART #define CONFIG_CHARGE_MANAGER -#define CONFIG_CHARGE_RAMP_HW #define CONFIG_CHARGER #define CONFIG_CHARGER_INPUT_CURRENT 512 @@ -44,6 +43,7 @@ #define CONFIG_CHARGER_SENSE_RESISTOR 10 #define CONFIG_CHARGER_SENSE_RESISTOR_AC 10 #else +#define CONFIG_CHARGE_RAMP_HW #define CONFIG_CHARGER_ISL9237 #define CONFIG_CHARGER_MAX_INPUT_CURRENT 2250 #define CONFIG_CHARGER_NARROW_VDC diff --git a/board/oak/ec.tasklist b/board/oak/ec.tasklist index e0f2f9d150..dcc2e34c06 100644 --- a/board/oak/ec.tasklist +++ b/board/oak/ec.tasklist @@ -16,25 +16,10 @@ * 'd' in an opaque parameter passed to the routine at startup * 's' is the stack size in bytes; must be a multiple of 8 */ -#include "board_revs.h" - -#if BOARD_REV < OAK_REV4 -#define TASK_VBUS(n, r, d, s) TASK_ALWAYS(n, r, d, s) -#else -#define TASK_VBUS(n, r, d, s) -#endif - -#if (BOARD_REV > OAK_REV4) -#define TASK_ALS(n, r, d, s) TASK_ALWAYS(n, r, d, s) -#define TASK_MOTIONSENSE(n, r, d, s) TASK_NOTEST(n, r, d, s) -#else -#define TASK_ALS(n, r, d, s) -#define TASK_MOTIONSENSE(n, r, d, s) -#endif #define CONFIG_TASK_LIST \ TASK_ALWAYS(HOOKS, hook_task, NULL, LARGER_TASK_STACK_SIZE) \ - TASK_VBUS(VBUS, vbus_task, NULL, TASK_STACK_SIZE) \ + TASK_ALWAYS(VBUS, vbus_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(USB_CHG_P0, usb_charger_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(USB_CHG_P1, usb_charger_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(CHARGER, charger_task, NULL, LARGER_TASK_STACK_SIZE) \ @@ -43,7 +28,7 @@ TASK_ALWAYS(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) \ - TASK_ALS(ALS, als_task, NULL, TASK_STACK_SIZE) \ - TASK_MOTIONSENSE(MOTIONSENSE, motion_sense_task, NULL, TASK_STACK_SIZE) \ + TASK_ALWAYS(ALS, als_task, NULL, TASK_STACK_SIZE) \ + TASK_NOTEST(MOTIONSENSE, motion_sense_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(PD_C0, pd_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_ALWAYS(PD_C1, pd_task, NULL, LARGER_TASK_STACK_SIZE) |