Skip to content

Commit ef09b1e

Browse files
khoa-nguyen-18KhiemNguyenT
authored andcommitted
hal: renesas: Modify to use BSP_ICU_VECTOR_MAX_ENTRIES macro
Since FSP has changed to use the BSP_ICU_VECTOR_NUM_ENTRIES macro, but Zephyr does not have an automatically allocated IRQ number table to support BSP_ICU_VECTOR_NUM_ENTRIES. As a solution, we will continue using BSP_ICU_VECTOR_MAX_ENTRIES. Signed-off-by: Khoa Nguyen <[email protected]>
1 parent bbb2aa4 commit ef09b1e

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

drivers/ra/README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,8 @@ Patch List:
154154
* Add bsp_linker_info.h in portable
155155
Impacted files:
156156
zephyr/ra/portable/bsp_linker_info.h
157+
158+
* Modify to use BSP_ICU_VECTOR_MAX_ENTRIES macro instead BSP_ICU_VECTOR_NUM_ENTRIES
159+
Impacted files:
160+
drivers/ra/fsp/src/bsp/mcu/all/bsp_irq.c
161+
drivers/ra/fsp/src/r_dtc/r_dtc.c

drivers/ra/fsp/src/bsp/mcu/all/bsp_irq.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
**********************************************************************************************************************/
3232

3333
/* This table is used to store the context in the ISR. */
34-
void * gp_renesas_isr_context[BSP_ICU_VECTOR_NUM_ENTRIES];
34+
void * gp_renesas_isr_context[BSP_ICU_VECTOR_MAX_ENTRIES];
3535

3636
/***********************************************************************************************************************
3737
* Private global variables and functions
3838
**********************************************************************************************************************/
39-
const bsp_interrupt_event_t g_interrupt_event_link_select[BSP_ICU_VECTOR_NUM_ENTRIES] BSP_WEAK_REFERENCE =
39+
const bsp_interrupt_event_t g_interrupt_event_link_select[BSP_ICU_VECTOR_MAX_ENTRIES] BSP_WEAK_REFERENCE =
4040
{
4141
(bsp_interrupt_event_t) 0
4242
};
@@ -227,7 +227,7 @@ void bsp_irq_cfg (void)
227227
uint32_t interrupt_security_state[BSP_ICU_VECTOR_MAX_ENTRIES / BSP_PRV_BITS_PER_WORD];
228228
memset(&interrupt_security_state, UINT8_MAX, sizeof(interrupt_security_state));
229229

230-
for (uint32_t i = 0U; i < BSP_ICU_VECTOR_NUM_ENTRIES; i++)
230+
for (uint32_t i = 0U; i < BSP_ICU_VECTOR_MAX_ENTRIES; i++)
231231
{
232232
if (0U != g_interrupt_event_link_select[i])
233233
{
@@ -256,9 +256,9 @@ void bsp_irq_cfg (void)
256256

257257
/* Calculate the number of IELSR registers that need to be initialized. */
258258
uint32_t ielsr_count = BSP_ICU_VECTOR_MAX_ENTRIES - BSP_FEATURE_ICU_FIXED_IELSR_COUNT;
259-
if (ielsr_count > BSP_ICU_VECTOR_NUM_ENTRIES)
259+
if (ielsr_count > BSP_ICU_VECTOR_MAX_ENTRIES)
260260
{
261-
ielsr_count = BSP_ICU_VECTOR_NUM_ENTRIES;
261+
ielsr_count = BSP_ICU_VECTOR_MAX_ENTRIES;
262262
}
263263

264264
for (uint32_t i = 0U; i < ielsr_count; i++)

drivers/ra/fsp/src/r_dtc/r_dtc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#define DTC_OPEN (0x44544300)
1919

2020
/** Size of vector table is based on number of vectors defined in BSP. */
21-
#define DTC_VECTOR_TABLE_ENTRIES (BSP_ICU_VECTOR_NUM_ENTRIES)
21+
#define DTC_VECTOR_TABLE_ENTRIES (BSP_ICU_VECTOR_MAX_ENTRIES)
2222

2323
/** The size of transfer_info_t is defined in the Hardware Manual therefore it must be 16 bytes. */
2424
#define DTC_TRANSFER_INFO_SIZE (16U)

0 commit comments

Comments
 (0)