diff options
author | Randall Spangler <rspangler@chromium.org> | 2015-06-09 11:15:06 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-06-10 18:24:05 +0000 |
commit | fe9e3bf56532b33a9d99b9372b53905dece5907b (patch) | |
tree | 6bffb4bdd8ad8bac679e44d021eaf21bcb557fbd /test | |
parent | 4e5b020ca917e99c1e68523e4c5aec518b7d9510 (diff) | |
download | chrome-ec-fe9e3bf56532b33a9d99b9372b53905dece5907b.tar.gz |
Remove obsolete board-specific code
Now that we've removed boards from ToT, also delete board-specific
code used only by the removed boards.
There are still more things to remove (unused charging chips, LED
drivers, COMx support). More CLs coming.
BUG=chromium:493866
BRANCH=none
TEST=make buildall -j
Change-Id: Ie6bdeaf96e61cadd77e3f6336c73b9b54ff4eabb
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/276524
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/adapter.c | 610 | ||||
-rw-r--r-- | test/adapter.tasklist | 18 | ||||
-rw-r--r-- | test/adapter_externs.h | 21 | ||||
-rw-r--r-- | test/build.mk | 3 | ||||
-rw-r--r-- | test/stress.c | 15 | ||||
-rw-r--r-- | test/test_config.h | 30 |
6 files changed, 3 insertions, 694 deletions
diff --git a/test/adapter.c b/test/adapter.c deleted file mode 100644 index 483dcf82ce..0000000000 --- a/test/adapter.c +++ /dev/null @@ -1,610 +0,0 @@ -/* Copyright (c) 2013 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. - * - * Test GPIO extpower module. - */ - -#include "adc.h" -#include "chipset.h" -#include "common.h" -#include "console.h" -#include "extpower.h" -#include "gpio.h" -#include "hooks.h" -#include "host_command.h" -#include "test_util.h" -#include "timer.h" -#include "util.h" -#include "power.h" - -/* Normally private stuff from the modules we're going to test */ -#include "adapter_externs.h" - -/* Local state */ -static int mock_id; -static int mock_current; -static struct charge_state_context ctx; - -/* Mocked functions from the rest of the EC */ - -int adc_read_channel(enum adc_channel ch) -{ - switch (ch) { - case ADC_AC_ADAPTER_ID_VOLTAGE: - return mock_id; - case ADC_CH_CHARGER_CURRENT: - return mock_current; - default: - break; - } - - return 0; -} - -int charger_set_input_current(int input_current) -{ - return EC_SUCCESS; -} - -int charger_get_option(int *option) -{ - return EC_SUCCESS; -} - - -int charger_set_option(int option) -{ - return EC_SUCCESS; -} - -void chipset_throttle_cpu(int throttle) -{ - /* PROCHOT, ugh. */ -} - -/* Local functions to control the mocked functions. */ - -static void change_ac(int val) -{ - gpio_set_level(GPIO_AC_PRESENT, val); - msleep(50); -} - -static void set_id(int val) -{ - mock_id = val; -} - -static void test_reset_mocks(void) -{ - change_ac(0); - set_id(0); - mock_current = 0; - memset(&ctx, 0, sizeof(ctx)); -} - -/* Specify as discharge current */ -static void mock_batt(int cur) -{ - ctx.curr.batt.current = -cur; -} - -/* And the tests themselves... */ - -/* - * Run through the known ID ranges, making sure that values inside are - * correctly identified, and values outside are not. We'll skip the default - * ADAPTER_UNKNOWN range, of course. - * - * NOTE: This assumes that the ranges have a gap between them. - */ -static int test_identification(void) -{ - int i; - - test_reset_mocks(); - - for (i = 1; i < NUM_ADAPTER_TYPES; i++) { - - change_ac(0); - TEST_ASSERT(ac_adapter == ADAPTER_UNKNOWN); - - set_id(ad_id_vals[i].lo - 1); - change_ac(1); - TEST_ASSERT(ac_adapter == ADAPTER_UNKNOWN); - - change_ac(0); - TEST_ASSERT(ac_adapter == ADAPTER_UNKNOWN); - - set_id(ad_id_vals[i].lo); - change_ac(1); - TEST_ASSERT(ac_adapter == i); - - change_ac(0); - TEST_ASSERT(ac_adapter == ADAPTER_UNKNOWN); - - set_id(ad_id_vals[i].hi); - change_ac(1); - TEST_ASSERT(ac_adapter == i); - - change_ac(0); - TEST_ASSERT(ac_adapter == ADAPTER_UNKNOWN); - - set_id(ad_id_vals[i].hi + 1); - change_ac(1); - TEST_ASSERT(ac_adapter == ADAPTER_UNKNOWN); - } - - return EC_SUCCESS; -} - -/* Helper function */ -static void test_turbo_init(void) -{ - /* Battery is awake and in good shape */ - ctx.curr.error = 0; - ctx.curr.batt.state_of_charge = 25; - - /* Adapter is present and known */ - set_id(ad_id_vals[1].lo + 1); - change_ac(1); -} - -/* Test all the things that can turn turbo mode on and off */ -static int test_turbo(void) -{ - test_reset_mocks(); - - /* There's only one path that can enable turbo. Check it first. */ - test_turbo_init(); - watch_adapter_closely(&ctx); - TEST_ASSERT(ac_turbo == 1); - - /* Now test things that turn turbo off. */ - - test_turbo_init(); - ctx.curr.error = 1; - watch_adapter_closely(&ctx); - TEST_ASSERT(ac_turbo == 0); - - test_turbo_init(); - ctx.curr.batt.state_of_charge = 5; - watch_adapter_closely(&ctx); - TEST_ASSERT(ac_turbo == 0); - - test_turbo_init(); - change_ac(0); - set_id(ad_id_vals[1].lo - 1); - change_ac(1); - watch_adapter_closely(&ctx); - TEST_ASSERT(ac_turbo == 0); - - test_turbo_init(); - change_ac(0); - watch_adapter_closely(&ctx); - TEST_ASSERT(ac_turbo == -1); - - return EC_SUCCESS; -} - -/* Check the detection logic on one set of struct adapter_limits */ -static int test_thresholds_sequence(int entry) -{ - struct adapter_limits *lim = &ad_limits[ac_adapter][ac_turbo][entry]; - int longtime = MAX(lim->lo_cnt, lim->hi_cnt) + 2; - int i; - - /* reset, by staying low for a long time */ - mock_current = lim->lo_val - 1; - for (i = 1; i < longtime; i++) - check_threshold(mock_current, lim); - TEST_ASSERT(lim->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - /* midrange for a long time shouldn't do anything */ - mock_current = (lim->lo_val + lim->hi_val) / 2; - for (i = 1; i < longtime; i++) - check_threshold(mock_current, lim); - TEST_ASSERT(lim->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - /* above high limit for not quite long enough */ - mock_current = lim->hi_val + 1; - for (i = 1; i < lim->hi_cnt; i++) - check_threshold(mock_current, lim); - TEST_ASSERT(lim->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - /* drop below the high limit once */ - mock_current = lim->hi_val - 1; - check_threshold(mock_current, lim); - TEST_ASSERT(lim->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - /* now back up - that should have reset the count */ - mock_current = lim->hi_val + 1; - for (i = 1; i < lim->hi_cnt; i++) - check_threshold(mock_current, lim); - TEST_ASSERT(lim->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - /* one more ought to do it */ - check_threshold(mock_current, lim); - TEST_ASSERT(lim->triggered == 1); - TEST_ASSERT(ap_is_throttled); - - /* going midrange for a long time shouldn't change anything */ - mock_current = (lim->lo_val + lim->hi_val) / 2; - for (i = 1; i < longtime; i++) - check_threshold(mock_current, lim); - TEST_ASSERT(lim->triggered == 1); - TEST_ASSERT(ap_is_throttled); - - /* below low limit for not quite long enough */ - mock_current = lim->lo_val - 1; - for (i = 1; i < lim->lo_cnt; i++) - check_threshold(mock_current, lim); - TEST_ASSERT(lim->triggered == 1); - TEST_ASSERT(ap_is_throttled); - - /* back above the low limit once */ - mock_current = lim->lo_val + 1; - check_threshold(mock_current, lim); - TEST_ASSERT(lim->triggered == 1); - TEST_ASSERT(ap_is_throttled); - - /* now back down - that should have reset the count */ - mock_current = lim->lo_val - 1; - for (i = 1; i < lim->lo_cnt; i++) - check_threshold(mock_current, lim); - TEST_ASSERT(lim->triggered == 1); - TEST_ASSERT(ap_is_throttled); - - /* One more ought to do it */ - check_threshold(mock_current, lim); - TEST_ASSERT(lim->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - return EC_SUCCESS; -} - -/* - * Check all sets of thresholds. This probably doesn't add much value, but at - * least it ensures that they're somewhat sane. - */ -static int test_thresholds(void) -{ - int e; - - for (ac_adapter = 0; ac_adapter < NUM_ADAPTER_TYPES; ac_adapter++) - for (ac_turbo = 0; ac_turbo < NUM_AC_TURBO_STATES; ac_turbo++) - for (e = 0; e < NUM_AC_THRESHOLDS; e++) - TEST_ASSERT(EC_SUCCESS == - test_thresholds_sequence(e)); - - return EC_SUCCESS; -} - -static int test_batt(void) -{ - struct adapter_limits *l, *h; - int longtime; - int i; - - /* NB: struct adapter_limits assumes hi_val > lo_val, so the values in - * batt_limits[] indicate discharge current (mA). However, the value - * returned from battery_current() is postive for charging, and - * negative for discharging. - */ - - /* We're assuming two limits, mild and urgent. */ - TEST_ASSERT(NUM_BATT_THRESHOLDS == 2); - /* Find out which is which */ - if (batt_limits[0].hi_val > batt_limits[1].hi_val) { - h = &batt_limits[0]; - l = &batt_limits[1]; - } else { - h = &batt_limits[1]; - l = &batt_limits[0]; - } - - /* Find a time longer than all sample count limits */ - for (i = longtime = 0; i < NUM_BATT_THRESHOLDS; i++) - longtime = MAX(longtime, - MAX(batt_limits[i].lo_cnt, - batt_limits[i].hi_cnt)); - longtime += 2; - - test_reset_mocks(); - TEST_ASSERT(ap_is_throttled == 0); - - /* reset, by staying low for a long time */ - for (i = 1; i < longtime; i++) - watch_battery_closely(&ctx); - TEST_ASSERT(l->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - /* mock_batt() specifies the DISCHARGE current. Charging - * should do nothing, no matter how high. */ - mock_batt(-(h->hi_val + 2)); - for (i = 1; i < longtime; i++) - watch_battery_closely(&ctx); - TEST_ASSERT(l->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - /* midrange for a long time shouldn't do anything */ - mock_batt((l->lo_val + l->hi_val) / 2); - for (i = 1; i < longtime; i++) - watch_battery_closely(&ctx); - TEST_ASSERT(l->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - /* above high limit for not quite long enough */ - mock_batt(l->hi_val + 1); - for (i = 1; i < l->hi_cnt; i++) - watch_battery_closely(&ctx); - TEST_ASSERT(l->count != 0); - TEST_ASSERT(l->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - /* drop below the high limit once */ - mock_batt(l->hi_val - 1); - watch_battery_closely(&ctx); - TEST_ASSERT(l->count == 0); - TEST_ASSERT(l->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - /* now back up */ - mock_batt(l->hi_val + 1); - for (i = 1; i < l->hi_cnt; i++) - watch_battery_closely(&ctx); - TEST_ASSERT(l->count != 0); - TEST_ASSERT(l->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - /* one more ought to do it */ - watch_battery_closely(&ctx); - TEST_ASSERT(l->triggered == 1); - TEST_ASSERT(ap_is_throttled); - - /* going midrange for a long time shouldn't change anything */ - mock_batt((l->lo_val + l->hi_val) / 2); - for (i = 1; i < longtime; i++) - watch_battery_closely(&ctx); - TEST_ASSERT(l->triggered == 1); - TEST_ASSERT(ap_is_throttled); - - /* charge for not quite long enough */ - mock_batt(-1); - for (i = 1; i < l->lo_cnt; i++) - watch_battery_closely(&ctx); - TEST_ASSERT(l->triggered == 1); - TEST_ASSERT(ap_is_throttled); - - /* back above the low limit once */ - mock_batt(l->lo_val + 1); - watch_battery_closely(&ctx); - TEST_ASSERT(l->triggered == 1); - TEST_ASSERT(ap_is_throttled); - - /* now charge again - that should have reset the count */ - mock_batt(-1); - for (i = 1; i < l->lo_cnt; i++) - watch_battery_closely(&ctx); - TEST_ASSERT(l->triggered == 1); - TEST_ASSERT(ap_is_throttled); - - /* One more ought to do it */ - watch_battery_closely(&ctx); - TEST_ASSERT(l->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - /* Check the high limits too, just for fun */ - mock_batt(h->hi_val + 1); - for (i = 1; i < h->hi_cnt; i++) - watch_battery_closely(&ctx); - TEST_ASSERT(h->triggered == 0); - /* one more */ - watch_battery_closely(&ctx); - TEST_ASSERT(h->triggered == 1); - TEST_ASSERT(ap_is_throttled); - - return EC_SUCCESS; -} - -static int test_batt_vs_adapter(void) -{ - /* Only need one set of adapter thresholds for this test */ - struct adapter_limits *a_lim; - - /* Same structs are used for battery thresholds */ - struct adapter_limits *b_lim; - - int longtime; - int i; - - /* For adapter, we'll use ADAPTER_UNKNOWN, Turbo off, softer limits */ - a_lim = &ad_limits[0][0][0]; - - /* NB: struct adapter_limits assumes hi_val > lo_val, so the values in - * batt_limits[] indicate discharge current (mA). However, the value - * returned from battery_current() is postive for charging, and - * negative for discharging. - */ - - /* We're assuming two limits, mild and urgent. */ - TEST_ASSERT(NUM_BATT_THRESHOLDS == 2); - /* Find out which is which. We want the mild one. */ - if (batt_limits[0].hi_val > batt_limits[1].hi_val) - b_lim = &batt_limits[1]; - else - b_lim = &batt_limits[0]; - - - /* DANGER: we need these two to not be in sync. */ - TEST_ASSERT(a_lim->hi_cnt == 16); - TEST_ASSERT(b_lim->hi_cnt == 16); - /* Now that we know they're the same, let's change one */ - b_lim->hi_cnt = 12; - - /* DANGER: We also rely on these values */ - TEST_ASSERT(a_lim->lo_cnt == 80); - TEST_ASSERT(b_lim->lo_cnt == 50); - - - /* Find a time longer than all sample count limits */ - longtime = MAX(MAX(a_lim->lo_cnt, a_lim->hi_cnt), - MAX(b_lim->lo_cnt, b_lim->hi_cnt)) + 2; - - - test_reset_mocks(); /* everything == 0 */ - ctx.curr.batt.state_of_charge = 25; - change_ac(1); - - /* make sure no limits are triggered by staying low for a long time */ - mock_current = a_lim->lo_val - 1; /* charger current is safe */ - mock_batt(-1); /* battery is charging */ - - for (i = 1; i < longtime; i++) - watch_adapter_closely(&ctx); - TEST_ASSERT(a_lim->triggered == 0); - TEST_ASSERT(b_lim->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - - /* battery discharge current is too high for almost long enough */ - mock_batt(b_lim->hi_val + 1); - for (i = 1; i < b_lim->hi_cnt; i++) - watch_adapter_closely(&ctx); - TEST_ASSERT(b_lim->count != 0); - TEST_ASSERT(b_lim->triggered == 0); - TEST_ASSERT(a_lim->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - /* one more ought to do it */ - watch_adapter_closely(&ctx); - TEST_ASSERT(b_lim->triggered == 1); - TEST_ASSERT(a_lim->triggered == 0); - TEST_ASSERT(ap_is_throttled); - - - /* charge for not quite long enough */ - mock_batt(-1); - for (i = 1; i < b_lim->lo_cnt; i++) - watch_adapter_closely(&ctx); - TEST_ASSERT(b_lim->triggered == 1); - TEST_ASSERT(a_lim->triggered == 0); - TEST_ASSERT(ap_is_throttled); - - /* and one more */ - watch_adapter_closely(&ctx); - TEST_ASSERT(b_lim->triggered == 0); - TEST_ASSERT(a_lim->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - - /* Now adapter current is too high for almost long enough */ - mock_current = a_lim->hi_val + 1; - for (i = 1; i < a_lim->hi_cnt; i++) - watch_adapter_closely(&ctx); - TEST_ASSERT(a_lim->triggered == 0); - TEST_ASSERT(b_lim->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - /* one more ought to do it */ - watch_adapter_closely(&ctx); - TEST_ASSERT(a_lim->triggered == 1); - TEST_ASSERT(b_lim->triggered == 0); - TEST_ASSERT(ap_is_throttled); - - /* below low limit for not quite long enough */ - mock_current = a_lim->lo_val - 1; - for (i = 1; i < a_lim->lo_cnt; i++) - watch_adapter_closely(&ctx); - TEST_ASSERT(a_lim->triggered == 1); - TEST_ASSERT(b_lim->triggered == 0); - TEST_ASSERT(ap_is_throttled); - - /* One more ought to do it */ - watch_adapter_closely(&ctx); - TEST_ASSERT(a_lim->triggered == 0); - TEST_ASSERT(b_lim->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - - /* Now both are high, but battery hi_cnt is shorter */ - mock_batt(b_lim->hi_val + 1); - mock_current = a_lim->hi_val + 1; - for (i = 1; i < b_lim->hi_cnt; i++) /* just under battery limit */ - watch_adapter_closely(&ctx); - TEST_ASSERT(a_lim->triggered == 0); - TEST_ASSERT(b_lim->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - /* one more should kick the battery threshold */ - watch_adapter_closely(&ctx); - TEST_ASSERT(a_lim->triggered == 0); - TEST_ASSERT(b_lim->triggered == 1); - TEST_ASSERT(ap_is_throttled); - - /* don't quite reach the adapter threshold */ - for (i = 1; i < a_lim->hi_cnt - b_lim->hi_cnt; i++) - watch_adapter_closely(&ctx); - TEST_ASSERT(a_lim->triggered == 0); - TEST_ASSERT(b_lim->triggered == 1); - TEST_ASSERT(ap_is_throttled); - - /* okay, now */ - watch_adapter_closely(&ctx); - TEST_ASSERT(a_lim->triggered == 1); - TEST_ASSERT(b_lim->triggered == 1); - TEST_ASSERT(ap_is_throttled); - - /* Leave battery high, let the adapter come down */ - mock_current = a_lim->lo_val - 1; - for (i = 1; i < a_lim->lo_cnt; i++) - watch_adapter_closely(&ctx); - TEST_ASSERT(a_lim->triggered == 1); - TEST_ASSERT(b_lim->triggered == 1); - TEST_ASSERT(ap_is_throttled); - - /* One more ought to do it for the adapter */ - watch_adapter_closely(&ctx); - TEST_ASSERT(a_lim->triggered == 0); - TEST_ASSERT(b_lim->triggered == 1); - TEST_ASSERT(ap_is_throttled); - - /* now charge the battery again */ - mock_batt(-1); - for (i = 1; i < b_lim->lo_cnt; i++) - watch_adapter_closely(&ctx); - TEST_ASSERT(b_lim->triggered == 1); - TEST_ASSERT(a_lim->triggered == 0); - TEST_ASSERT(ap_is_throttled); - - /* and one more */ - watch_adapter_closely(&ctx); - TEST_ASSERT(b_lim->triggered == 0); - TEST_ASSERT(a_lim->triggered == 0); - TEST_ASSERT(ap_is_throttled == 0); - - return EC_SUCCESS; -} - - - -void run_test(void) -{ - test_reset(); - test_chipset_on(); - - RUN_TEST(test_identification); - RUN_TEST(test_turbo); - RUN_TEST(test_thresholds); - RUN_TEST(test_batt); - - RUN_TEST(test_batt_vs_adapter); - - test_print_result(); -} diff --git a/test/adapter.tasklist b/test/adapter.tasklist deleted file mode 100644 index 8ef20bab32..0000000000 --- a/test/adapter.tasklist +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (c) 2013 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. - */ - -/** - * List of enabled tasks in the priority order - * - * The first one has the lowest priority. - * - * For each task, use the macro TASK_TEST(n, r, d, s) where : - * 'n' in the name of the task - * 'r' in the main routine of the task - * 'd' in an opaque parameter passed to the routine at startup - * 's' is the stack size in bytes; must be a multiple of 8 - */ -#define CONFIG_TEST_TASK_LIST \ - TASK_TEST(CHIPSET, chipset_task, NULL, TASK_STACK_SIZE) diff --git a/test/adapter_externs.h b/test/adapter_externs.h deleted file mode 100644 index c55cecea88..0000000000 --- a/test/adapter_externs.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2013 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. - */ - -#ifndef __ADAPTER_EXTERNS_H -#define __ADAPTER_EXTERNS_H - -/* Normally private symbols from the modules that we're testing. */ - -extern enum adapter_type ac_adapter; -extern struct adapter_id_vals ad_id_vals[]; -extern struct adapter_limits - ad_limits[][NUM_AC_TURBO_STATES][NUM_AC_THRESHOLDS]; -extern int ac_turbo; -extern uint32_t ap_is_throttled; -extern void check_threshold(int current, struct adapter_limits *lim); -extern struct adapter_limits batt_limits[NUM_BATT_THRESHOLDS]; -extern void watch_battery_closely(struct charge_state_context *ctx); - -#endif /* __ADAPTER_EXTERNS_H */ diff --git a/test/build.mk b/test/build.mk index 5addad174f..9fc35555b2 100644 --- a/test/build.mk +++ b/test/build.mk @@ -36,13 +36,12 @@ test-list-$(BOARD_OAK_PD)= # Emulator tests test-list-host=mutex pingpong utils kb_scan kb_mkbp lid_sw power_button hooks test-list-host+=thermal flash queue kb_8042 extpwr_gpio console_edit system -test-list-host+=sbs_charging adapter host_command +test-list-host+=sbs_charging host_command test-list-host+=bklight_lid bklight_passthru interrupt timer_dos button test-list-host+=motion_lid math_util sbs_charging_v2 battery_get_params_smart test-list-host+=lightbar inductive_charging usb_pd fan charge_manager test-list-host+=charge_ramp -adapter-y=adapter.o battery_get_params_smart-y=battery_get_params_smart.o bklight_lid-y=bklight_lid.o bklight_passthru-y=bklight_passthru.o diff --git a/test/stress.c b/test/stress.c index c9c5d7fa36..58a727adbe 100644 --- a/test/stress.c +++ b/test/stress.c @@ -31,23 +31,12 @@ struct i2c_test_param_t { int offset; int data; /* Non-negative represents data to write. -1 to read. */ } i2c_test_params[] = { -#ifdef BOARD_SPRING - {8, 0, 0x60, 0x0, -1}, - {8, 0, 0x60, 0x0, 0x40}, - {8, 0, 0x4a, 0x1, -1}, -#elif defined(BOARD_LINK) - {8, 0, 0x16, 0x8, -1}, - {8, 0, 0x16, 0x9, -1}, - {8, 0, 0x16, 0xa, -1}, -#elif defined(BOARD_PIT) +#if defined(BOARD_PIT) {8, 0, 0x90, 0x19, -1}, -#elif defined(BOARD_SNOW) - {8, 1, 0x90, 0x19, -1}, #endif }; /* Disable I2C test for boards without test configuration */ -#if defined(BOARD_BDS) || defined(BOARD_MCCROSKEY) || \ - defined(BOARD_FALCO) || defined(BOARD_PEPPY) || defined(BOARD_AURON) +#if defined(BOARD_BDS) || defined(BOARD_AURON) #undef CONFIG_I2C #endif diff --git a/test/test_config.h b/test/test_config.h index 39746787b5..88382c89c8 100644 --- a/test/test_config.h +++ b/test/test_config.h @@ -14,11 +14,6 @@ /* Don't compile vboot hash support unless specifically testing for it */ #undef CONFIG_VBOOT_HASH -#ifdef TEST_ADAPTER -#define CONFIG_CHIPSET_CAN_THROTTLE -#define CONFIG_EXTPOWER_FALCO -#endif - #ifdef TEST_BKLIGHT_LID #define CONFIG_BACKLIGHT_LID #endif @@ -40,16 +35,6 @@ #define CONFIG_KEYBOARD_PROTOCOL_MKBP #endif -#ifdef TEST_LED_SPRING -#define CONFIG_BATTERY_MOCK -#define CONFIG_BATTERY_SMART -#define CONFIG_CHARGER_INPUT_CURRENT 4032 -#define CONFIG_LED_DRIVER_LP5562 -#define I2C_PORT_MASTER 1 -#define I2C_PORT_BATTERY 1 -#define I2C_PORT_CHARGER 1 -#endif - #ifdef TEST_MOTION_LID #define CONFIG_LID_ANGLE #define CONFIG_LID_ANGLE_SENSOR_BASE 0 @@ -89,21 +74,6 @@ int board_discharge_on_ac(int enabled); #define CONFIG_TEMP_SENSOR #endif -#ifdef TEST_THERMAL_FALCO -#define CONFIG_BATTERY_MOCK -#define CONFIG_BATTERY_SMART -#define CONFIG_CHARGER -#define CONFIG_CHARGER_V1 -#define CONFIG_CHARGER_INPUT_CURRENT 4032 -#define CONFIG_CHIPSET_CAN_THROTTLE -#define CONFIG_EXTPOWER_FALCO -#define CONFIG_FANS 1 -#define CONFIG_TEMP_SENSOR -#define I2C_PORT_BATTERY 1 -#define I2C_PORT_CHARGER 1 -#define I2C_PORT_MASTER 1 -#endif - #ifdef TEST_FAN #define CONFIG_FANS 1 #endif |