Files
OpenCellular/include/port80.h
Kevin K Wong 5a18413ff5 mec1322: Added task-based Port80 POST code support.
With mec1322's EMI set to decode IO 0x800, it does not have any other
interfaces to support POST code via IO 0x80.

This change is to enable Port80 POST code support via polling method.

Limitation:
- POST Code 0xFF will be ignored.
- POST Code frequency is greater than 1 msec.

BUG=chrome-os-partner:39386
TEST=Verified Port80 POST code is captured in EC console.
     Verified "port80 task" console command will disable/enable Port80 task.
     Verified "port80 poll" will get the last Port80 POST code.
BRANCH=none

Change-Id: I27e53e84b5be1fd98464a44407dd58b93d8c798d
Signed-off-by: Kevin K Wong <kevin.k.wong@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/266783
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2015-04-27 23:29:30 +00:00

37 lines
873 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);
#ifdef HAS_TASK_PORT80
/**
* 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
#endif /* __CROS_EC_PORT80_H */