expo: cedit: Support reading settings from CMOS RAM
Add a command to read edit settings from CMOS RAM, using the cedit
definition to indicate which registers and bits are used.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/test/boot/cedit.c b/test/boot/cedit.c
index 010aae6..ab2b8a1 100644
--- a/test/boot/cedit.c
+++ b/test/boot/cedit.c
@@ -182,6 +182,17 @@
ut_assert_nextlinen("Write 2 bytes from offset 80 to 84");
ut_assert_console_end();
+ /* reset the expo */
+ menu->cur_item_id = ID_CPU_SPEED_1;
+ menu2->cur_item_id = ID_AC_OFF;
+
+ ut_assertok(run_command("cedit read_cmos -v", 0));
+ ut_assert_nextlinen("Read 2 bytes from offset 80 to 84");
+ ut_assert_console_end();
+
+ ut_asserteq(ID_CPU_SPEED_2, menu->cur_item_id);
+ ut_asserteq(ID_AC_MEMORY, menu2->cur_item_id);
+
return 0;
}
BOOTSTD_TEST(cedit_cmos, 0);