From 0574818bfb2b61051f28d8a6a30c76b502882250 Mon Sep 17 00:00:00 2001 From: Josie Nordrum Date: Sun, 6 Dec 2020 12:32:14 -0700 Subject: stm32: Add helper function for H7 flash ctrl regs Add helper function definitions for H7 to API added in chromium:2220735. This should enable flash_physical test to run on Dartmonkey. Refactor code to pull flash registers function declarations from flash-reg.h instead of flash-f.h BRANCH=None BUG=b:157692395 TEST=On dartmonkey ./test/run_device_tests.py -t flash_physical => pass Signed-off-by: Josie Nordrum Change-Id: I76846938748cbe77d534915856af0ebb7211d247 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2576799 Reviewed-by: Tom Hughes --- test/flash_physical.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'test/flash_physical.c') diff --git a/test/flash_physical.c b/test/flash_physical.c index e5430f4bd0..06dd495254 100644 --- a/test/flash_physical.c +++ b/test/flash_physical.c @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -#include "chip/stm32/flash-f.h" +#include "chip/stm32/flash-regs.h" #include "flash.h" #include "panic.h" #include "test_util.h" @@ -123,15 +123,10 @@ void run_test(int argc, char **argv) { ccprintf("Running flash physical test\n"); RUN_TEST(test_flash_config); - /* - * TODO(b/157692395): These should be implemented for the STM32H743 as - * well. - */ -#if defined(CHIP_VARIANT_STM32F412) + RUN_TEST(test_lock_option_bytes); RUN_TEST(test_disable_option_bytes); RUN_TEST(test_lock_flash_control_register); RUN_TEST(test_disable_flash_control_register); -#endif test_print_result(); } -- cgit v1.2.1