Skip to content

Commit 916b165

Browse files
committed
soc: renesas: rx: enable option function select register 0
Enables OSF0 register select for IWDT driver setting on start mode Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
1 parent 963d1f1 commit 916b165

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

soc/renesas/rx/rx130/ofsm.c

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616

1717
#define __OFS_MDE __attribute__((section(".ofs_mde")))
18+
#define __OFS0 __attribute__((section(".ofs0")))
19+
#define __OFS1 __attribute__((section(".ofs1")))
1820

1921
/* Endian Select Register (MDE) at 0xFE7F5D00
2022
*
@@ -41,9 +43,23 @@ struct st_ofs0 {
4143
unsigned long res2: 16;
4244
};
4345

44-
const unsigned long __OFS_MDE __OFS0reg = 0xffffffff;
46+
/* Option Function Select Register 0 (OFS0) */
47+
const struct st_ofs0 __OFS0 __OFS0reg = {
48+
.res0 = 1,
49+
.IWDTSTRT = CONFIG_IWDT_RENESAS_RX_IWDTSTRT,
50+
#ifdef CONFIG_IWDT_RENESAS_RX_AUTO_START_MODE
51+
.IWDTTOPS = CONFIG_IWDT_RENESAS_RX_OFS0_IWDTTOPS,
52+
.IWDTCKS = CONFIG_IWDT_RENESAS_RX_OFS0_IWDTCKS,
53+
.IWDTRPES = CONFIG_IWDT_RENESAS_RX_OFS0_IWDTRPES,
54+
.IWDTRPSS = CONFIG_IWDT_RENESAS_RX_OFS0_IWDTRPSS,
55+
.IWDTRSTIRQS = CONFIG_IWDT_RENESAS_RX_OFS0_IWDTRSTIRQS,
56+
.res1 = 1,
57+
.IWDTSLCSTP = CONFIG_IWDT_RENESAS_RX_OFS0_IWDTSLCSTP,
58+
#endif
59+
.res2 = 0xFFFF
60+
};
4561

4662
/* Option Function Select Register 1 (OFS1) at 0xFE7F5D08 (Voltage detection and
4763
* HOCO)
4864
*/
49-
const unsigned long __OFS_MDE __OFS1reg = 0xffffffff;
65+
const unsigned long __OFS1 __OFS1reg = 0xffffffff;

0 commit comments

Comments
 (0)