1414#include "sw/device/lib/runtime/ibex.h"
1515#include "sw/device/lib/runtime/log.h"
1616#include "sw/device/lib/runtime/print.h"
17- #include "sw/device/lib/testing/flash_ctrl_testutils.h"
1817#include "sw/device/lib/testing/otp_ctrl_testutils.h"
1918#include "sw/device/lib/testing/pinmux_testutils.h"
2019#include "sw/device/lib/testing/test_framework/check.h"
2423#include "sw/device/silicon_creator/lib/drivers/ibex.h"
2524#include "sw/device/silicon_creator/lib/drivers/rstmgr.h"
2625#include "sw/device/silicon_creator/manuf/base/flash_info_permissions.h"
27- #include "sw/device/silicon_creator/manuf/lib/flash_info_fields.h"
2826#include "sw/device/silicon_creator/manuf/lib/individualize.h"
2927#include "sw/device/silicon_creator/manuf/lib/individualize_sw_cfg.h"
3028#include "sw/device/silicon_creator/manuf/lib/otp_fields.h"
@@ -43,8 +41,6 @@ static dif_otp_ctrl_t otp_ctrl;
4341static dif_pinmux_t pinmux ;
4442
4543static manuf_ft_individualize_data_t in_data ;
46- static uint32_t cp_device_id [kFlashInfoFieldCpDeviceIdSizeIn32BitWords ];
47- static uint32_t ast_cfg_data [kFlashInfoAstCalibrationDataSizeIn32BitWords ];
4844
4945// Switching to external clocks causes the clocks to be unstable for some time.
5046// This is used to delay further action when the switch happens.
@@ -81,43 +77,6 @@ static status_t peripheral_handles_init(void) {
8177 return OK_STATUS ();
8278}
8379
84- /**
85- * Print data stored in flash info page 0 to console for manual verification
86- * purposes during silicon bring-up.
87- */
88- static status_t read_and_print_flash_and_ast_data (void ) {
89- uint32_t byte_address = 0 ;
90- TRY (flash_ctrl_testutils_info_region_setup_properties (
91- & flash_ctrl_state , kFlashInfoFieldCpDeviceId .page ,
92- kFlashInfoFieldCpDeviceId .bank , kFlashInfoFieldCpDeviceId .partition ,
93- kFlashInfoPage0Permissions , & byte_address ));
94-
95- LOG_INFO ("CP Device ID:" );
96- TRY (manuf_flash_info_field_read (& flash_ctrl_state , kFlashInfoFieldCpDeviceId ,
97- cp_device_id ,
98- kFlashInfoFieldCpDeviceIdSizeIn32BitWords ));
99- for (size_t i = 0 ; i < kHwCfgDeviceIdSizeIn32BitWords ; ++ i ) {
100- LOG_INFO ("0x%08x" , cp_device_id [i ]);
101- }
102-
103- LOG_INFO ("AST Calibration Values (in flash):" );
104- TRY (manuf_flash_info_field_read (
105- & flash_ctrl_state , kFlashInfoFieldAstCalibrationData , ast_cfg_data ,
106- kFlashInfoAstCalibrationDataSizeIn32BitWords ));
107- for (size_t i = 0 ; i < kFlashInfoAstCalibrationDataSizeIn32BitWords ; ++ i ) {
108- LOG_INFO ("Word %d = 0x%08x" , i , ast_cfg_data [i ]);
109- }
110-
111- LOG_INFO ("AST Calibration Values (in CSRs):" );
112- for (size_t i = 0 ; i < kFlashInfoAstCalibrationDataSizeIn32BitWords ; ++ i ) {
113- LOG_INFO (
114- "Word %d = 0x%08x" , i ,
115- abs_mmio_read32 (TOP_EARLGREY_AST_BASE_ADDR + i * sizeof (uint32_t )));
116- }
117-
118- return OK_STATUS ();
119- }
120-
12180// For passing into `IBEX_SPIN_FOR`.
12281static bool did_extclk_settle (const dif_clkmgr_t * clkmgr ) {
12382 bool status ;
@@ -248,10 +207,6 @@ bool test_main(void) {
248207 // Clear the reset reasons.
249208 rstmgr_reason_clear (UINT8_MAX );
250209
251- // Read and log flash and AST data to console (for manual verification
252- // purposes), and perform provisioning operations.
253- CHECK_STATUS_OK (read_and_print_flash_and_ast_data ());
254-
255210 // Perform provisioning operations.
256211 CHECK_STATUS_OK (provision (& uj ));
257212
0 commit comments