summaryrefslogtreecommitdiff
path: root/zephyr/test/system/test_system.c
diff options
context:
space:
mode:
authorTim Lin <tim2.lin@ite.corp-partner.google.com>2021-09-10 10:29:44 +0800
committerCommit Bot <commit-bot@chromium.org>2021-09-13 05:33:52 +0000
commit9365aa2ef2773e764655774e07230681297ed026 (patch)
tree9623e4653d5b948cb6a011dcd6f5445bf7eee322 /zephyr/test/system/test_system.c
parente7de2313be106dc09fdc2c67eda7c190be5fa3e4 (diff)
downloadchrome-ec-9365aa2ef2773e764655774e07230681297ed026.tar.gz
zephyr: shim/system: fix APIs of call BBRAM read and writestabilize-14217.B-main
The APIs of BBRAM read and write have been renamed and moved to drivers/bbram. The related call routines of shim/system.c need to be fixed. BUG=b:195843756 BRANCH=none TEST=the board of asurada and it8xxx2_evb can boot EC and access bbram successfully after adding this CL. zmake testall --> pass Change-Id: I98e51a278a24eeb4bbc92343fe6fc97e3e758e8a Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3153117 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/test/system/test_system.c')
-rw-r--r--zephyr/test/system/test_system.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/zephyr/test/system/test_system.c b/zephyr/test/system/test_system.c
index bb4f245644..e8eba44fc8 100644
--- a/zephyr/test/system/test_system.c
+++ b/zephyr/test/system/test_system.c
@@ -4,7 +4,7 @@
*/
#include <device.h>
-#include <drivers/cros_bbram.h>
+#include <drivers/bbram.h>
#include <logging/log.h>
#include <ztest.h>
@@ -21,8 +21,8 @@ LOG_MODULE_REGISTER(test);
static char mock_data[64] =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@";
-static int mock_bbram_read(const struct device *unused, int offset, int size,
- uint8_t *data)
+static int mock_bbram_read(const struct device *unused, size_t offset,
+ size_t size, uint8_t *data)
{
if (offset < 0 || offset + size >= ARRAY_SIZE(mock_data))
return -1;
@@ -30,15 +30,8 @@ static int mock_bbram_read(const struct device *unused, int offset, int size,
return EC_SUCCESS;
}
-static const struct cros_bbram_driver_api bbram_api = {
- .ibbr = NULL,
- .reset_ibbr = NULL,
- .vsby = NULL,
- .reset_vsby = NULL,
- .vcc1 = NULL,
- .reset_vcc1 = NULL,
+static const struct bbram_driver_api bbram_api = {
.read = mock_bbram_read,
- .write = NULL,
};
static const struct device bbram_dev_instance = {