diff options
author | Aseda Aboagye <aaboagye@google.com> | 2015-10-14 12:37:35 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-10-19 18:21:23 -0700 |
commit | b9c53b162d2f8eb3f47c6585f18458513866329a (patch) | |
tree | 1a9d69105f1f2933ec786dcdf3082dd8e3a0e656 | |
parent | 590caace95a27322f4729913ec041a582c1ea88b (diff) | |
download | chrome-ec-b9c53b162d2f8eb3f47c6585f18458513866329a.tar.gz |
port80: Remove HAS_TASK_PORT80.
The only boards that had a port 80 task were the ones using the MEC1322.
Since that EC now has a dedicated timer interrupt configured for port80
writes, we can remove this code that was providing the port 80 task.
Additionally, the config option CONFIG_PORT80_TASK_EN is removed.
BUG=chrome-os-partner:46062
BRANCH=None
TEST=make -j buildall tests
CQ-DEPEND=CL:305591
Change-Id: I145d989b8872240e749ef77aabe0ae76fc94d443
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/305791
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Kevin K Wong <kevin.k.wong@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r-- | common/port80.c | 58 | ||||
-rw-r--r-- | include/config.h | 10 |
2 files changed, 0 insertions, 68 deletions
diff --git a/common/port80.c b/common/port80.c index 35723f878a..0523fe35b1 100644 --- a/common/port80.c +++ b/common/port80.c @@ -24,10 +24,6 @@ static int writes; /* Number of port 80 writes so far */ static int last_boot; /* Last code from previous boot */ static int scroll; static int print_in_int = 1; -#ifdef HAS_TASK_PORT80 -static int task_en; /* Port 80 task control */ -static int task_timeout = -1; -#endif void port_80_write(int data) { @@ -51,46 +47,6 @@ void port_80_write(int data) writes++; } -#ifdef HAS_TASK_PORT80 -/* - * Port80 POST code polling limitation: - * - POST code 0xFF is ignored. - * - POST code frequency is greater than 1 msec. - */ -void port80_task(void) -{ - while (1) { - int data = port_80_read(); - - if (data != PORT_80_IGNORE) - port_80_write(data); - - task_wait_event(task_timeout); - } -} - -static void port_80_task_enable(void) -{ - task_en = 1; - task_timeout = PORT80_POLL_PERIOD; - task_wake(TASK_ID_PORT80); -} - -static void port_80_task_disable(void) -{ - task_en = 0; - task_timeout = -1; -} - -#ifdef CONFIG_PORT80_TASK_EN - -/* Only enable the port80 task when the AP is started, to save power */ -DECLARE_HOOK(HOOK_CHIPSET_RESUME, port_80_task_enable, HOOK_PRIO_DEFAULT); -DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, port_80_task_disable, HOOK_PRIO_DEFAULT); - -#endif /* PORT80_TASK_EN */ -#endif /* HAS_TASK_PORT80 */ - /*****************************************************************************/ /* Console commands */ @@ -117,20 +73,6 @@ static int command_port80(int argc, char **argv) } else if (!strcasecmp(argv[1], "flush")) { writes = 0; return EC_SUCCESS; -#ifdef HAS_TASK_PORT80 - } else if (!strcasecmp(argv[1], "task")) { - task_en = !task_en; - ccprintf("task %sabled\n", task_en ? "en" : "dis"); - task_en ? port_80_task_enable() : - port_80_task_disable(); - - return EC_SUCCESS; - } else if (!strcasecmp(argv[1], "poll")) { - i = port_80_read(); - if (i != PORT_80_IGNORE) - port_80_write(i); - /* continue on to print the port 80 history */ -#endif } else { return EC_ERROR_PARAM1; } diff --git a/include/config.h b/include/config.h index 74d7ebf264..e93001087c 100644 --- a/include/config.h +++ b/include/config.h @@ -1365,16 +1365,6 @@ */ #undef CONFIG_POLLING_UART -/*****************************************************************************/ - -/* - * Enable polling at boot by port 80 task. - * Ignored if port 80 is handled by interrupt - */ -#undef CONFIG_PORT80_TASK_EN - -/*****************************************************************************/ - /* Compile common code to support power button debouncing */ #undef CONFIG_POWER_BUTTON |