Skip to content

Commit 8b50aa6

Browse files
khoa-nguyen-18KhiemNguyenT
authored andcommitted
hal: renesas: Migrate RA FSP to version 6.0.0
Migrate RA FSP from version 5.8.0 to version 6.0.0 Signed-off-by: Khoa Nguyen <[email protected]>
1 parent 1ac809b commit 8b50aa6

File tree

500 files changed

+34634
-34145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

500 files changed

+34634
-34145
lines changed

drivers/ra/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ if(CONFIG_USE_RA_FSP_SCE)
103103

104104
if(CONFIG_HAS_RENESAS_RA_RSIP_E51A)
105105
zephyr_include_directories(
106-
fsp/src/r_sce/crypto_procedures/src/rsip7/plainkey/public/inc
107-
fsp/src/r_sce/crypto_procedures/src/rsip7/plainkey/private/inc)
108-
file(GLOB rsip7_srcs
109-
"fsp/src/r_sce/crypto_procedures/src/rsip7/plainkey/adaptors/*.c"
110-
"fsp/src/r_sce/crypto_procedures/src/rsip7/plainkey/primitive/*.c")
111-
zephyr_library_sources(${rsip7_srcs})
106+
fsp/src/r_sce/crypto_procedures/src/rsip_e51a/plainkey/public/inc
107+
fsp/src/r_sce/crypto_procedures/src/rsip_e51a/plainkey/private/inc)
108+
file(GLOB rsip_e51a_srcs
109+
"fsp/src/r_sce/crypto_procedures/src/rsip_e51a/plainkey/adaptors/*.c"
110+
"fsp/src/r_sce/crypto_procedures/src/rsip_e51a/plainkey/primitive/*.c")
111+
zephyr_library_sources(${rsip_e51a_srcs})
112112
endif()
113113

114114
if (CONFIG_HAS_RENESAS_RA_SCE5)

drivers/ra/README

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Origin:
66
https://www.renesas.com/us/en/software-tool/flexible-software-package-fsp
77

88
Status:
9-
version v5.8.0
9+
version v6.0.0
1010

1111
Purpose:
1212
Flexible Software Package (FSP) for Renesas RA MCU Family.
@@ -139,13 +139,8 @@ Patch List:
139139
drivers/ra/fsp/src/bsp/cmsis/Device/RENESAS/Include/R7FA8D1BH.h
140140
drivers/ra/fsp/src/bsp/cmsis/Device/RENESAS/Include/R7FA8T1AH.h
141141

142-
* Keep a backport for UCK, OCTA, U60CK clock marcro in bsp_clocks.c
142+
* Keep OSPI_B at fsp 5.8.0 since it need big change for OSPI driver in zephyr
143143
Impacted files:
144-
drivers/ra/fsp/src/bsp/mcu/all/bsp_clocks.c
145-
Note: This will be remove in next FSP version
146-
147-
* Keep a backport for BSP_FEATURE_LPM_HAS_LDO_CONTROL macro in r_lpm
148-
Impacted files:
149-
drivers/ra/fsp/inc/api/r_lpm_api.h
150-
drivers/ra/fsp/src/r_lpm/r_lpm.c
151-
Note: This will be remove in next FSP version.
144+
drivers/ra/fsp/src/r_ospi_b/r_ospi_b.c
145+
drivers/ra/fsp/inc/api/r_spi_flash_api.h
146+
drivers/ra/fsp/inc/instances/r_ospi_b.h

drivers/ra/fsp/inc/api/fsp_common_api.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ typedef enum e_fsp_err
138138
FSP_ERR_FCLK = 502, ///< FCLK must be >= 4 MHz
139139
FSP_ERR_INVALID_LINKED_ADDRESS = 503, ///< Function or data are linked at an invalid region of memory
140140
FSP_ERR_BLANK_CHECK_FAILED = 504, ///< Blank check operation failed
141+
FSP_ERR_HUK_ZEROIZATION = 505, ///< W-HUK zeroization is in progress
141142

142143
/* Start of CAC Specific */
143144
FSP_ERR_INVALID_CAC_REF_CLOCK = 600, ///< Measured clock rate < reference clock rate
@@ -339,13 +340,17 @@ typedef enum e_fsp_err
339340
FSP_ERR_CRYPTO_SCE_PARAMETER = 0x10014, ///< Input date is illegal.
340341
FSP_ERR_CRYPTO_SCE_PROHIBIT_FUNCTION = 0x10015, ///< An invalid function call occurred.
341342

343+
FSP_ERR_CRYPTO_SCE_LBIST_CHECK_BUSY = 0x100ff, ///< LBIST Check BUSY
344+
342345
/* Start of Crypto RSIP specific (0x10100) */
343346
FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT = 0x10100, ///< Hardware resource is busy
344347
FSP_ERR_CRYPTO_RSIP_FATAL = 0x10101, ///< Hardware fatal error or unexpected return
345348
FSP_ERR_CRYPTO_RSIP_FAIL = 0x10102, ///< Internal error
346349
FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL = 0x10103, ///< Input key type is illegal
347350
FSP_ERR_CRYPTO_RSIP_AUTHENTICATION = 0x10104, ///< Authentication failed
348351

352+
FSP_ERR_CRYPTO_RSIP_LBIST_CHECK_BUSY = 0x101ff, ///< LBIST Check BUSY
353+
349354
/* Start of SF_CRYPTO specific */
350355
FSP_ERR_CRYPTO_COMMON_NOT_OPENED = 0x20000, ///< Crypto Framework Common is not opened
351356
FSP_ERR_CRYPTO_HAL_ERROR = 0x20001, ///< Cryoto HAL module returned an error

drivers/ra/fsp/inc/api/r_adc_api.h

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
#endif
3434
#include "r_transfer_api.h"
3535

36+
#if __has_include("r_adc_device_types.h")
37+
#include "r_adc_device_types.h"
38+
#endif
39+
3640
/* Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
3741
FSP_HEADER
3842

@@ -203,7 +207,7 @@ typedef struct st_adc_callback_args
203207
{
204208
uint16_t unit; ///< ADC device in use
205209
adc_event_t event; ///< ADC callback event
206-
void const * p_context; ///< Placeholder for user data
210+
void * p_context; ///< Placeholder for user data
207211
adc_channel_t channel; ///< Channel of conversion result
208212
uint64_t channel_mask; ///< Channel mask for conversion result. Only valid for r_adc_b and r_sdadc_b
209213
adc_group_mask_t group_mask; ///< Group Mask
@@ -214,14 +218,16 @@ typedef struct st_adc_callback_args
214218
/** ADC Information Structure for Transfer Interface */
215219
typedef struct st_adc_info
216220
{
217-
__I void * p_address; ///< The address to start reading the data from
218-
uint32_t length; ///< The total number of transfers to read
219-
220-
transfer_size_t transfer_size; ///< The size of each transfer
221-
elc_peripheral_t elc_peripheral; ///< Name of the peripheral in the ELC list
222-
elc_event_t elc_event; ///< Name of the ELC event for the peripheral
223-
uint32_t calibration_data; ///< Temperature sensor calibration data (0xFFFFFFFF if unsupported) for reference voltage
224-
int16_t slope_microvolts; ///< Temperature sensor slope in microvolts/degrees C
221+
__I void * p_address; ///< The address to start reading the data from
222+
uint32_t length; ///< The total number of transfers to read
223+
224+
transfer_size_t transfer_size; ///< The size of each transfer
225+
elc_peripheral_t elc_peripheral; ///< Name of the peripheral in the ELC list
226+
elc_event_t elc_event; ///< Name of the ELC event for the peripheral
227+
uint32_t calibration_data; ///< Temperature sensor calibration data (0xFFFFFFFF if unsupported) for reference voltage
228+
uint16_t room_calibration_data; ///< Room temperature sensor calibration data (0xFFFFFFFF if unsupported) for reference voltage
229+
uint16_t low_calibration_data; ///< Low temperature sensor calibration data (0xFFFFFFFF if unsupported) for reference voltage
230+
int16_t slope_microvolts; ///< Temperature sensor slope in microvolts/degrees C
225231
} adc_info_t;
226232

227233
#endif
@@ -241,7 +247,7 @@ typedef struct st_adc_cfg
241247
uint8_t scan_end_b_ipl; ///< Scan end group B interrupt priority
242248
uint8_t scan_end_c_ipl; ///< Scan end group C interrupt priority
243249
void (* p_callback)(adc_callback_args_t * p_args); ///< Callback function; set to NULL for none
244-
void const * p_context; ///< Placeholder for user data. Passed to the user callback in @ref adc_callback_args_t.
250+
void * p_context; ///< Placeholder for user data. Passed to the user callback in @ref adc_callback_args_t.
245251
void const * p_extend; ///< Extension parameter for hardware specific settings
246252
} adc_cfg_t;
247253

@@ -338,7 +344,7 @@ typedef struct st_adc_api
338344
* Callback arguments allocated here are only valid during the callback.
339345
*/
340346
fsp_err_t (* callbackSet)(adc_ctrl_t * const p_ctrl, void (* p_callback)(adc_callback_args_t *),
341-
void const * const p_context, adc_callback_args_t * const p_callback_memory);
347+
void * const p_context, adc_callback_args_t * const p_callback_memory);
342348

343349
/** Close the specified ADC unit by ending any scan in progress, disabling interrupts, and removing power to the
344350
* specified A/D unit.

drivers/ra/fsp/inc/api/r_can_api.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ typedef struct st_can_callback_args
166166
uint32_t mailbox; ///< Mailbox number of interrupt source.
167167
uint32_t buffer; ///< Buffer number of interrupt source.
168168
};
169-
void const * p_context; ///< Context provided to user during callback.
170-
can_frame_t frame; ///< Received frame data.
169+
void * p_context; ///< Context provided to user during callback.
170+
can_frame_t frame; ///< Received frame data.
171171
} can_callback_args_t;
172172

173173
#endif
@@ -181,7 +181,7 @@ typedef struct st_can_cfg
181181

182182
/* Configuration for CAN Event processing */
183183
void (* p_callback)(can_callback_args_t * p_args); ///< Pointer to callback function
184-
void const * p_context; ///< User defined callback context.
184+
void * p_context; ///< User defined callback context.
185185

186186
/* Pointer to CAN peripheral specific configuration */
187187
void const * p_extend; ///< CAN hardware dependent configuration
@@ -249,7 +249,7 @@ typedef struct st_can_api
249249
* Callback arguments allocated here are only valid during the callback.
250250
*/
251251
fsp_err_t (* callbackSet)(can_ctrl_t * const p_ctrl, void (* p_callback)(can_callback_args_t *),
252-
void const * const p_context, can_callback_args_t * const p_callback_memory);
252+
void * const p_context, can_callback_args_t * const p_callback_memory);
253253
} can_api_t;
254254

255255
/** This structure encompasses everything that is needed to use an instance of this interface. */

0 commit comments

Comments
 (0)