mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 18:11:05 +00:00
The port 80 task just polls every 1ms until disabled when the system goes into suspend. Therefore, this commit configures a 1ms timer interrupt that will be used for the port 80 writes instead of using an entire task. This saves task stack space as well as context switches. BUG=chrome-os-partner:46062 BUG=chrome-os-partner:46063 BRANCH=None TEST=Flash GLaDOS and verify using the `port80' console comamnd that there are bytes in the port80 history. TEST=make -j buildall tests Change-Id: I65b48217a638c1f6ae1ac86471f9a98e0ec4533a Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/305591 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>
35 lines
843 B
C
35 lines
843 B
C
/* 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.
|
|
*/
|
|
|
|
/* Port 80 module for Chrome EC */
|
|
|
|
#ifndef __CROS_EC_PORT80_H
|
|
#define __CROS_EC_PORT80_H
|
|
|
|
#include "common.h"
|
|
|
|
enum port_80_event {
|
|
PORT_80_EVENT_RESUME = 0x1001, /* S3->S0 transition */
|
|
PORT_80_EVENT_RESET = 0x1002, /* RESET transition */
|
|
PORT_80_IGNORE = 0xffff, /* Invalid POST CODE */
|
|
};
|
|
|
|
/**
|
|
* Store data from a LPC write to port 80, or a port_80_event code.
|
|
*
|
|
* @param data Data written to port 80.
|
|
*/
|
|
void port_80_write(int data);
|
|
|
|
/**
|
|
* Chip specific function to read from port 80.
|
|
*
|
|
* @return data from the last LPC write to port 80,
|
|
* or PORT_80_IGNORE if no data is available.
|
|
*/
|
|
int port_80_read(void);
|
|
|
|
#endif /* __CROS_EC_PORT80_H */
|