mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
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>
30 lines
826 B
Python
30 lines
826 B
Python
# 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.
|
|
#
|
|
# Flash read/write/erase test
|
|
#
|
|
|
|
from flash_test_util import test_erase
|
|
from flash_test_util import test_read
|
|
from flash_test_util import test_write
|
|
import time
|
|
|
|
def test(helper):
|
|
helper.wait_output("--- UART initialized")
|
|
|
|
# Jump to RW-A
|
|
helper.ec_command("sysjump a")
|
|
helper.wait_output("idle task started") # jump completed
|
|
time.sleep(0.5)
|
|
|
|
# We are in RW now. Read/write/erase on RO should all succeed.
|
|
test_erase(helper, 0, 0x1000)
|
|
test_erase(helper, 0x1000, 0x2000)
|
|
test_read(helper, 0, 0x40)
|
|
test_read(helper, 0x130, 0x40)
|
|
test_write(helper, 0, 0x30)
|
|
test_write(helper, 0x130, 0x30)
|
|
|
|
return True
|