Skip to content

Commit f1f3506

Browse files
quytranpzzKhiemNguyenT
authored andcommitted
hal: renesas: ra: Remove static definition in flash driver
This commit is to remove the statis definition of some internal funtions which used for Zephyr driver to avoid duplicate implement Signed-off-by: Quy Tran <[email protected]>
1 parent 3861c81 commit f1f3506

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

drivers/ra/README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,7 @@ Patch List:
4646
* Add bug fix for CANFD setting wrong value of acepptance filtering rule number
4747
Impacted files:
4848
drivers/ra/fsp/src/r_canfd/r_canfd.c
49+
50+
* Remove the static definition in FLASH HP
51+
Impacted files:
52+
drivers/ra/fsp/src/r_flash_hp/r_flash_hp.c

drivers/ra/fsp/src/r_flash_hp/r_flash_hp.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ typedef BSP_CMSE_NONSECURE_CALL void (*volatile flash_hp_prv_ns_callback)(flash_
190190
**********************************************************************************************************************/
191191

192192
#if (FLASH_HP_CFG_CODE_FLASH_PROGRAMMING_ENABLE == 1)
193-
static uint16_t g_configuration_area_data[FLASH_HP_CONFIG_SET_ACCESS_WORD_CNT] = {UINT16_MAX};
193+
uint16_t g_configuration_area_data[FLASH_HP_CONFIG_SET_ACCESS_WORD_CNT] = {UINT16_MAX};
194194
#endif
195195

196196
#define FLASH_HP_DF_START_ADDRESS (BSP_FEATURE_FLASH_DATA_FLASH_START)
@@ -248,11 +248,11 @@ static fsp_err_t flash_hp_init(flash_hp_instance_ctrl_t * p_ctrl);
248248

249249
static fsp_err_t flash_hp_enter_pe_df_mode(flash_hp_instance_ctrl_t * const p_ctrl);
250250

251-
static fsp_err_t flash_hp_pe_mode_exit() PLACE_IN_RAM_SECTION;
251+
fsp_err_t flash_hp_pe_mode_exit() PLACE_IN_RAM_SECTION;
252252

253253
static fsp_err_t flash_hp_reset(flash_hp_instance_ctrl_t * p_ctrl) PLACE_IN_RAM_SECTION;
254254

255-
static fsp_err_t flash_hp_stop(void) PLACE_IN_RAM_SECTION;
255+
fsp_err_t flash_hp_stop(void) PLACE_IN_RAM_SECTION;
256256

257257
static fsp_err_t flash_hp_status_clear() PLACE_IN_RAM_SECTION;
258258

@@ -262,7 +262,7 @@ static fsp_err_t flash_hp_erase_block(flash_hp_instance_ctrl_t * const p_ctrl, u
262262
static fsp_err_t flash_hp_write_data(flash_hp_instance_ctrl_t * const p_ctrl, uint32_t write_size,
263263
uint32_t timeout) PLACE_IN_RAM_SECTION;
264264

265-
static fsp_err_t flash_hp_check_errors(fsp_err_t previous_error, uint32_t error_bits,
265+
fsp_err_t flash_hp_check_errors(fsp_err_t previous_error, uint32_t error_bits,
266266
fsp_err_t return_error) PLACE_IN_RAM_SECTION;
267267

268268
static void r_flash_hp_call_callback(flash_hp_instance_ctrl_t * p_ctrl, flash_event_t event);
@@ -282,7 +282,7 @@ static fsp_err_t flash_hp_df_erase(flash_hp_instance_ctrl_t * p_ctrl, uint32_t b
282282

283283
#if (FLASH_HP_CFG_CODE_FLASH_PROGRAMMING_ENABLE == 1)
284284

285-
static fsp_err_t flash_hp_configuration_area_write(flash_hp_instance_ctrl_t * p_ctrl,
285+
fsp_err_t flash_hp_configuration_area_write(flash_hp_instance_ctrl_t * p_ctrl,
286286
uint32_t fsaddr) PLACE_IN_RAM_SECTION;
287287

288288
static void flash_hp_configuration_area_data_setup(uint32_t btflg_swap, uint32_t start_addr,
@@ -299,7 +299,7 @@ static uint32_t flash_hp_banksel_bankswp_addr_get(void);
299299
static fsp_err_t flash_hp_cf_erase(flash_hp_instance_ctrl_t * p_ctrl, uint32_t block_address,
300300
uint32_t num_blocks) PLACE_IN_RAM_SECTION;
301301

302-
static fsp_err_t flash_hp_enter_pe_cf_mode(flash_hp_instance_ctrl_t * const p_ctrl) PLACE_IN_RAM_SECTION;
302+
fsp_err_t flash_hp_enter_pe_cf_mode(flash_hp_instance_ctrl_t * const p_ctrl) PLACE_IN_RAM_SECTION;
303303

304304
static fsp_err_t flash_hp_access_window_set(flash_hp_instance_ctrl_t * p_ctrl,
305305
uint32_t const start_addr,
@@ -1288,7 +1288,7 @@ static fsp_err_t flash_hp_write_data (flash_hp_instance_ctrl_t * const p_ctrl, u
12881288
* @retval FSP_SUCCESS Command completed succesfully
12891289
* @retval FSP_ERR_CMD_LOCKED Flash entered command locked state
12901290
**********************************************************************************************************************/
1291-
static fsp_err_t flash_hp_check_errors (fsp_err_t previous_error, uint32_t error_bits, fsp_err_t return_error)
1291+
fsp_err_t flash_hp_check_errors (fsp_err_t previous_error, uint32_t error_bits, fsp_err_t return_error)
12921292
{
12931293
/* See "Recovery from the Command-Locked State": Section 47.9.3.6 of the RA6M4 manual R01UH0890EJ0100.*/
12941294
fsp_err_t err = FSP_SUCCESS;
@@ -1986,7 +1986,7 @@ static fsp_err_t flash_hp_df_erase (flash_hp_instance_ctrl_t * p_ctrl, uint32_t
19861986
* @retval FSP_ERR_PE_FAILURE Failed to exited P/E mode
19871987
* @retval FSP_ERR_CMD_LOCKED Flash entered command locked state.
19881988
**********************************************************************************************************************/
1989-
static fsp_err_t flash_hp_pe_mode_exit (void)
1989+
fsp_err_t flash_hp_pe_mode_exit (void)
19901990
{
19911991
/* See "Transition to Read Mode": Section 47.9.3.5 of the RA6M4 manual R01UH0890EJ0100. */
19921992
/* FRDY and CMDLK are checked after the previous commands complete and do not need to be checked again. */
@@ -2108,7 +2108,7 @@ static fsp_err_t flash_hp_reset (flash_hp_instance_ctrl_t * p_ctrl)
21082108
* @retval FSP_ERR_TIMEOUT Timeout executing flash_stop.
21092109
* @retval FSP_ERR_CMD_LOCKED Peripheral in command locked state.
21102110
**********************************************************************************************************************/
2111-
static fsp_err_t flash_hp_stop (void)
2111+
fsp_err_t flash_hp_stop (void)
21122112
{
21132113
/* See "Forced Stop Command": Section 47.9.3.13 of the RA6M4 manual R01UH0890EJ0100. If the CMDLK bit
21142114
* is still set after issuing the force stop command return an error. */
@@ -2401,7 +2401,7 @@ static fsp_err_t flash_hp_set_id_code (flash_hp_instance_ctrl_t * p_ctrl,
24012401
* @retval FSP_SUCCESS Set Configuration successful
24022402
* @retval FSP_ERR_TIMEOUT Timed out waiting for the FCU to become ready.
24032403
**********************************************************************************************************************/
2404-
static fsp_err_t flash_hp_configuration_area_write (flash_hp_instance_ctrl_t * p_ctrl, uint32_t fsaddr)
2404+
fsp_err_t flash_hp_configuration_area_write (flash_hp_instance_ctrl_t * p_ctrl, uint32_t fsaddr)
24052405
{
24062406
volatile uint32_t timeout = p_ctrl->timeout_write_config;
24072407

@@ -2693,7 +2693,7 @@ static fsp_err_t flash_hp_enter_pe_df_mode (flash_hp_instance_ctrl_t * const p_c
26932693
* @retval FSP_SUCCESS Successfully entered Code Flash P/E mode.
26942694
* @retval FSP_ERR_PE_FAILURE Failed to enter Code Flash P/E mode.
26952695
**********************************************************************************************************************/
2696-
static fsp_err_t flash_hp_enter_pe_cf_mode (flash_hp_instance_ctrl_t * const p_ctrl)
2696+
fsp_err_t flash_hp_enter_pe_cf_mode (flash_hp_instance_ctrl_t * const p_ctrl)
26972697
{
26982698
fsp_err_t err = FSP_SUCCESS;
26992699

zephyr/ra/ra_cfg/fsp_cfg/r_flash_hp_cfg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#endif
1212

1313
#define FLASH_HP_CFG_PARAM_CHECKING_ENABLE (BSP_CFG_PARAM_CHECKING_ENABLE)
14-
#define FLASH_HP_CFG_CODE_FLASH_PROGRAMMING_ENABLE ((DT_PROP(DT_NODELABEL(flash0), programming_enable)))
15-
#define FLASH_HP_CFG_DATA_FLASH_PROGRAMMING_ENABLE ((DT_PROP(DT_NODELABEL(flash1), programming_enable)))
14+
#define FLASH_HP_CFG_CODE_FLASH_PROGRAMMING_ENABLE ((DT_PROP(DT_NODELABEL(flash0), renesas_programming_enable)))
15+
#define FLASH_HP_CFG_DATA_FLASH_PROGRAMMING_ENABLE ((DT_PROP(DT_NODELABEL(flash1), renesas_programming_enable)))
1616

1717
#ifdef __cplusplus
1818
}

0 commit comments

Comments
 (0)