Skip to content

Commit 9d6f340

Browse files
thenguyenyfKhiemNguyenT
authored andcommitted
hal: renesas: ra: add ofs setting for WDT
Reflect OFS setting for WDT from Zephyr Kconfig value Signed-off-by: The Nguyen <[email protected]>
1 parent aebb08f commit 9d6f340

19 files changed

+149
-19
lines changed

drivers/ra/README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,7 @@ Patch List:
127127
* Add new implementation for R_BSP_SecurityInit on Zephyr.
128128
Impacted files:
129129
zephyr/ra/portable/bsp_security.h
130+
131+
* Reflect OFS setting for WDT from Zephyr Kconfig value
132+
Impacted files:
133+
zephyr/ra/ra_cfg/fsp_cfg/bsp/**/bsp_mcu_family_cfg.h

zephyr/ra/ra_cfg/fsp_cfg/bsp/ra2a1/bsp_mcu_family_cfg.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,16 @@ extern "C" {
3535
#define BSP_VECTOR_TABLE_MAX_ENTRIES (48U)
3636
#define BSP_CFG_INLINE_IRQ_FUNCTIONS (0)
3737

38+
/* OFS0 WDT configurations */
39+
#ifdef CONFIG_WDT_RENESAS_RA_START_IN_BOOT
40+
#define WDTSTRT (0)
41+
#else
42+
#define WDTSTRT (1)
43+
#endif
44+
3845
#define OFS_SEQ1 0xA001A001 | (1 << 1) | (3 << 2)
3946
#define OFS_SEQ2 (15 << 4) | (3 << 8) | (3 << 10)
40-
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (1 << 17)
47+
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (WDTSTRT << 17)
4148
#define OFS_SEQ4 (3 << 18) | (15 << 20) | (3 << 24) | (3 << 26)
4249
#define OFS_SEQ5 (1 << 28) | (1 << 30)
4350
#define BSP_CFG_USE_LOW_VOLTAGE_MODE ((0))

zephyr/ra/ra_cfg/fsp_cfg/bsp/ra2l1/bsp_mcu_family_cfg.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,17 @@ extern "C" {
3434
#define BSP_VECTOR_TABLE_MAX_ENTRIES (48U)
3535
#define BSP_CFG_INLINE_IRQ_FUNCTIONS (0)
3636

37+
/* OFS0 WDT configurations */
38+
#ifdef CONFIG_WDT_RENESAS_RA_START_IN_BOOT
39+
#define WDTSTRT (0)
40+
#else
41+
#define WDTSTRT (1)
42+
#endif
43+
3744
#define OFS_SEQ1 0xA001A001 | (1 << 1) | (3 << 2)
3845
#define OFS_SEQ2 (15 << 4) | (3 << 8) | (3 << 10)
39-
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (1 << 17)
40-
#define OFS_SEQ4 (3 << 18) |(15 << 20) | (3 << 24) | (3 << 26)
46+
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (WDTSTRT << 17)
47+
#define OFS_SEQ4 (3 << 18) | (15 << 20) | (3 << 24) | (3 << 26)
4148
#define OFS_SEQ5 (1 << 28) | (1 << 30)
4249
#define BSP_CFG_USE_LOW_VOLTAGE_MODE (0)
4350
#define BSP_CFG_ROM_REG_OFS0 (OFS_SEQ1 | OFS_SEQ2 | OFS_SEQ3 | OFS_SEQ4 | OFS_SEQ5)

zephyr/ra/ra_cfg/fsp_cfg/bsp/ra4e1/bsp_mcu_family_cfg.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,16 @@ extern "C" {
304304
#define BSP_TZ_CFG_NON_SECURE_APPLICATION_FALLBACK (1U)
305305
#endif
306306

307+
/* OFS0 WDT configurations */
308+
#ifdef CONFIG_WDT_RENESAS_RA_START_IN_BOOT
309+
#define WDTSTRT (0)
310+
#else
311+
#define WDTSTRT (1)
312+
#endif
313+
307314
#define OFS_SEQ1 0xA001A001 | (1 << 1) | (3 << 2)
308315
#define OFS_SEQ2 (15 << 4) | (3 << 8) | (3 << 10)
309-
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (1 << 17)
316+
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (WDTSTRT << 17)
310317
#define OFS_SEQ4 (3 << 18) | (15 << 20) | (3 << 24) | (3 << 26)
311318
#define OFS_SEQ5 (1 << 28) | (1 << 30)
312319
#define BSP_CFG_ROM_REG_OFS0 \

zephyr/ra/ra_cfg/fsp_cfg/bsp/ra4e2/bsp_mcu_family_cfg.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,16 @@ extern "C" {
287287
#define BSP_TZ_CFG_NON_SECURE_APPLICATION_FALLBACK (1U)
288288
#endif
289289

290+
/* OFS0 WDT configurations */
291+
#ifdef CONFIG_WDT_RENESAS_RA_START_IN_BOOT
292+
#define WDTSTRT (0)
293+
#else
294+
#define WDTSTRT (1)
295+
#endif
296+
290297
#define OFS_SEQ1 0xA001A001 | (1 << 1) | (3 << 2)
291298
#define OFS_SEQ2 (15 << 4) | (3 << 8) | (3 << 10)
292-
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (1 << 17)
299+
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (WDTSTRT << 17)
293300
#define OFS_SEQ4 (3 << 18) | (15 << 20) | (3 << 24) | (3 << 26)
294301
#define OFS_SEQ5 (1 << 28) | (1 << 30)
295302
#define BSP_CFG_ROM_REG_OFS0 \

zephyr/ra/ra_cfg/fsp_cfg/bsp/ra4l1/bsp_mcu_family_cfg.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,16 @@ extern "C" {
290290
#define BSP_TZ_CFG_NON_SECURE_APPLICATION_FALLBACK (1U)
291291
#endif
292292

293+
/* OFS0 WDT configurations */
294+
#ifdef CONFIG_WDT_RENESAS_RA_START_IN_BOOT
295+
#define WDTSTRT (0)
296+
#else
297+
#define WDTSTRT (1)
298+
#endif
299+
293300
#define OFS_SEQ1 0xA001A001 | (1 << 1) | (3 << 2)
294301
#define OFS_SEQ2 (15 << 4) | (3 << 8) | (3 << 10)
295-
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (1 << 17)
302+
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (WDTSTRT << 17)
296303
#define OFS_SEQ4 (3 << 18) | (15 << 20) | (3 << 24) | (3 << 26)
297304
#define OFS_SEQ5 (1 << 28) | (1 << 30)
298305
#define BSP_CFG_ROM_REG_OFS0 \

zephyr/ra/ra_cfg/fsp_cfg/bsp/ra4m2/bsp_mcu_family_cfg.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,16 @@ extern "C" {
307307
#define BSP_TZ_CFG_NON_SECURE_APPLICATION_FALLBACK (1U)
308308
#endif
309309

310+
/* OFS0 WDT configurations */
311+
#ifdef CONFIG_WDT_RENESAS_RA_START_IN_BOOT
312+
#define WDTSTRT (0)
313+
#else
314+
#define WDTSTRT (1)
315+
#endif
316+
310317
#define OFS_SEQ1 0xA001A001 | (1 << 1) | (3 << 2)
311318
#define OFS_SEQ2 (15 << 4) | (3 << 8) | (3 << 10)
312-
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (1 << 17)
319+
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (WDTSTRT << 17)
313320
#define OFS_SEQ4 (3 << 18) | (15 << 20) | (3 << 24) | (3 << 26)
314321
#define OFS_SEQ5 (1 << 28) | (1 << 30)
315322
#define BSP_CFG_ROM_REG_OFS0 \

zephyr/ra/ra_cfg/fsp_cfg/bsp/ra4m3/bsp_mcu_family_cfg.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,16 @@ extern "C" {
314314
#define BSP_TZ_CFG_NON_SECURE_APPLICATION_FALLBACK (1U)
315315
#endif
316316

317+
/* OFS0 WDT configurations */
318+
#ifdef CONFIG_WDT_RENESAS_RA_START_IN_BOOT
319+
#define WDTSTRT (0)
320+
#else
321+
#define WDTSTRT (1)
322+
#endif
323+
317324
#define OFS_SEQ1 0xA001A001 | (1 << 1) | (3 << 2)
318325
#define OFS_SEQ2 (15 << 4) | (3 << 8) | (3 << 10)
319-
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (1 << 17)
326+
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (WDTSTRT << 17)
320327
#define OFS_SEQ4 (3 << 18) | (15 << 20) | (3 << 24) | (3 << 26)
321328
#define OFS_SEQ5 (1 << 28) | (1 << 30)
322329
#define BSP_CFG_ROM_REG_OFS0 \

zephyr/ra/ra_cfg/fsp_cfg/bsp/ra4w1/bsp_mcu_family_cfg.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,16 @@ extern "C" {
3434
#define BSP_VECTOR_TABLE_MAX_ENTRIES (48U)
3535
#define BSP_CFG_INLINE_IRQ_FUNCTIONS (1)
3636

37+
/* OFS0 WDT configurations */
38+
#ifdef CONFIG_WDT_RENESAS_RA_START_IN_BOOT
39+
#define WDTSTRT (0)
40+
#else
41+
#define WDTSTRT (1)
42+
#endif
43+
3744
#define OFS_SEQ1 0xA001A001 | (1 << 1) | (3 << 2)
3845
#define OFS_SEQ2 (15 << 4) | (3 << 8) | (3 << 10)
39-
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (1 << 17)
46+
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (WDTSTRT << 17)
4047
#define OFS_SEQ4 (3 << 18) | (15 << 20) | (3 << 24) | (3 << 26)
4148
#define OFS_SEQ5 (1 << 28) | (1 << 30)
4249
#define BSP_CFG_ROM_REG_OFS0 \

zephyr/ra/ra_cfg/fsp_cfg/bsp/ra6e1/bsp_mcu_family_cfg.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,16 @@ extern "C" {
313313
#define BSP_TZ_CFG_NON_SECURE_APPLICATION_FALLBACK (1U)
314314
#endif
315315

316+
/* OFS0 WDT configurations */
317+
#ifdef CONFIG_WDT_RENESAS_RA_START_IN_BOOT
318+
#define WDTSTRT (0)
319+
#else
320+
#define WDTSTRT (1)
321+
#endif
322+
316323
#define OFS_SEQ1 0xA001A001 | (1 << 1) | (3 << 2)
317324
#define OFS_SEQ2 (15 << 4) | (3 << 8) | (3 << 10)
318-
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (1 << 17)
325+
#define OFS_SEQ3 (1 << 12) | (1 << 14) | (WDTSTRT << 17)
319326
#define OFS_SEQ4 (3 << 18) | (15 << 20) | (3 << 24) | (3 << 26)
320327
#define OFS_SEQ5 (1 << 28) | (1 << 30)
321328
#define BSP_CFG_ROM_REG_OFS0 \

0 commit comments

Comments
 (0)