diff options
author | Vic Yang <victoryang@chromium.org> | 2012-07-11 17:23:19 +0800 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-07-13 01:13:20 -0700 |
commit | 1bd61468929bdd4907d02d56b9144d654b6ad272 (patch) | |
tree | 60aedd1514f33865d5bceeb2bb0a607301d8fb5b /test/flash.c | |
parent | 23d031343f00b88a900c701aa59636ea3b64aa33 (diff) | |
download | chrome-ec-1bd61468929bdd4907d02d56b9144d654b6ad272.tar.gz |
Add a test of flash read/write/erase test
This test checks physical read/write/erase functions are called
correctly.
BUG=chrome-os-partner:10261
TEST=Test passed.
Change-Id: Iff58f352bd732a0da9b7b7fe68c4bf87c84906a8
Reviewed-on: https://gerrit.chromium.org/gerrit/27144
Reviewed-by: Yung-Chieh Lo <yjlou%chromium.org@gtempaccount.com>
Tested-by: Vic Yang <victoryang@chromium.org>
Commit-Ready: Vic Yang <victoryang@chromium.org>
Diffstat (limited to 'test/flash.c')
-rw-r--r-- | test/flash.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/flash.c b/test/flash.c index c7e8d94365..6f822d88ec 100644 --- a/test/flash.c +++ b/test/flash.c @@ -30,7 +30,7 @@ static int hc_flash_info(int argc, char **argv) struct ec_response_flash_info *r = (struct ec_response_flash_info *)data; - res = host_command_process(0, EC_CMD_FLASH_INFO, data, &resp_size); + res = host_command_process(EC_CMD_FLASH_INFO, data, &resp_size); if (res != EC_RES_SUCCESS) return EC_ERROR_UNKNOWN; uart_printf("flash_size = %d\n", r->flash_size); @@ -66,7 +66,7 @@ static int hc_flash_read(int argc, char **argv) if (*e) return EC_ERROR_PARAM2; - res = host_command_process(0, EC_CMD_FLASH_READ, data, &resp_size); + res = host_command_process(EC_CMD_FLASH_READ, data, &resp_size); if (res != EC_RES_SUCCESS) return EC_ERROR_UNKNOWN; for (i = 0; i < size; ++i) { @@ -115,7 +115,7 @@ static int hc_flash_write(int argc, char **argv) seed = seed * mult + add; } - res = host_command_process(0, EC_CMD_FLASH_WRITE, data, &resp_size); + res = host_command_process(EC_CMD_FLASH_WRITE, data, &resp_size); if (res != EC_RES_SUCCESS) return EC_ERROR_UNKNOWN; return EC_SUCCESS; @@ -144,7 +144,7 @@ static int hc_flash_erase(int argc, char **argv) if (*e) return EC_ERROR_PARAM2; - res = host_command_process(0, EC_CMD_FLASH_ERASE, data, &resp_size); + res = host_command_process(EC_CMD_FLASH_ERASE, data, &resp_size); if (res != EC_RES_SUCCESS) return EC_ERROR_UNKNOWN; return EC_SUCCESS; |