mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 18:41:11 +00:00
The LPC is not stable enough to test. Kodus Rong. He creates this idea to checksum the partial content of flash for read/write/erase. This can improve the robustness of flashrom. BUG=none TEST=Tested with flashrom. Change-Id: I2a2f7b698a94674c03cbd8e3f15caf34f8986399
32 lines
1001 B
C
32 lines
1001 B
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.
|
|
*/
|
|
|
|
/* Flash memory commands for Chrome EC */
|
|
|
|
#ifndef __CROS_EC_FLASH_COMMANDS_H
|
|
#define __CROS_EC_FLASH_COMMANDS_H
|
|
|
|
#include "common.h"
|
|
#include "lpc_commands.h"
|
|
|
|
/* Initializes the module. */
|
|
int flash_commands_init(void);
|
|
|
|
/* Host command handlers. */
|
|
enum lpc_status flash_command_get_info(uint8_t *data);
|
|
enum lpc_status flash_command_read(uint8_t *data);
|
|
enum lpc_status flash_command_write(uint8_t *data);
|
|
enum lpc_status flash_command_erase(uint8_t *data);
|
|
enum lpc_status flash_command_wp_enable(uint8_t *data);
|
|
enum lpc_status flash_command_wp_get_state(uint8_t *data);
|
|
enum lpc_status flash_command_wp_set_range(uint8_t *data);
|
|
enum lpc_status flash_command_wp_get_range(uint8_t *data);
|
|
#ifdef SUPPORT_CHECKSUM
|
|
enum lpc_status flash_command_checksum(uint8_t *data);
|
|
#endif
|
|
|
|
|
|
#endif /* __CROS_EC_FLASH_COMMANDS_H */
|