mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
Note that this is a big security hole and should be removed after we complete the EC autoupdate mechanism and vboot code. To full update EC firmware on proto 1.0, we need a manual way to switch EC running on RO/RW. This CL implements the LPC command. BUG=chrome-os-partner:8415 TEST=on proto 0.5. ectool reboot_ec RW_A # EC boots to RW A ectool reboot_ec RO # EC boots to RO Change-Id: Ibf050328bc4e3d2c6d72bfc478d6334f11f0eb46
45 lines
1.2 KiB
C
45 lines
1.2 KiB
C
/* Copyright (c) 2011 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.
|
|
*/
|
|
|
|
/* common.h - Common includes for Chrome EC */
|
|
|
|
#ifndef __CROS_EC_COMMON_H
|
|
#define __CROS_EC_COMMON_H
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
/* TODO: This is a serious security hole and should be removed in mass
|
|
* production. We add this to allow manual firmware update.
|
|
* Once we complete the vboot and autoupdate, we should remove this.
|
|
* https://code.google.com/p/chrome-os-partner/issues/detail?id=8391
|
|
*/
|
|
#define CONFIG_REBOOT_EC
|
|
|
|
|
|
/* List of common error codes that can be returned */
|
|
enum ec_error_list {
|
|
/* Success - no error */
|
|
EC_SUCCESS = 0,
|
|
/* Unknown error */
|
|
EC_ERROR_UNKNOWN = 1,
|
|
/* Function not implemented yet */
|
|
EC_ERROR_UNIMPLEMENTED = 2,
|
|
/* Overflow error; too much input provided. */
|
|
EC_ERROR_OVERFLOW = 3,
|
|
/* Timeout */
|
|
EC_ERROR_TIMEOUT = 4,
|
|
/* Invalid argument */
|
|
EC_ERROR_INVAL = 5,
|
|
/* Already in use */
|
|
EC_ERROR_BUSY = 6,
|
|
|
|
/* Module-internal error codes may use this range. */
|
|
EC_ERROR_INTERNAL_FIRST = 0x10000,
|
|
EC_ERROR_INTERNAL_LAST = 0x1FFFF
|
|
};
|
|
|
|
#endif /* __CROS_EC_COMMON_H */
|