|
15 | 15 | */
|
16 | 16 |
|
17 | 17 | #define __OFS_MDE __attribute__((section(".ofs_mde")))
|
| 18 | +#define __OFS0 __attribute__((section(".ofs0"))) |
| 19 | +#define __OFS1 __attribute__((section(".ofs1"))) |
18 | 20 |
|
19 | 21 | /* Endian Select Register (MDE) at 0xFE7F5D00
|
20 | 22 | *
|
|
28 | 30 | */
|
29 | 31 | const unsigned long __OFS_MDE __MDEreg = 0xffffffff; /* little */
|
30 | 32 |
|
31 |
| -struct st_ofs0 { |
32 |
| - unsigned long res0: 1; |
33 |
| - unsigned long IWDTSTRT: 1; |
34 |
| - unsigned long IWDTTOPS: 2; |
35 |
| - unsigned long IWDTCKS: 4; |
36 |
| - unsigned long IWDTRPES: 2; |
37 |
| - unsigned long IWDTRPSS: 2; |
38 |
| - unsigned long IWDTRSTIRQS: 1; |
39 |
| - unsigned long res1: 1; |
40 |
| - unsigned long IWDTSLCSTP: 1; |
41 |
| - unsigned long res2: 16; |
| 33 | +#ifdef CONFIG_IWDT_RENESAS_RX_AUTO_START_MODE |
| 34 | +/* Option Function Select Register 0 (OFS0) |
| 35 | + * This section sets the IWDT (Independent Watchdog Timer) behavior immediately after reset |
| 36 | + * by programming the OFS0 register. When enabled, IWDT starts counting automatically |
| 37 | + * starts after a reset. |
| 38 | + */ |
| 39 | +struct st_ofs0 __OFS0 __OFS0reg = { |
| 40 | + .res0 = 1, |
| 41 | + .IWDTSTRT = CONFIG_IWDT_RENESAS_RX_IWDTSTRT, |
| 42 | + .IWDTTOPS = CONFIG_IWDT_RENESAS_RX_OFS0_IWDTTOPS, |
| 43 | + .IWDTCKS = CONFIG_IWDT_RENESAS_RX_OFS0_IWDTCKS, |
| 44 | + .IWDTRPES = CONFIG_IWDT_RENESAS_RX_OFS0_IWDTRPES, |
| 45 | + .IWDTRPSS = CONFIG_IWDT_RENESAS_RX_OFS0_IWDTRPSS, |
| 46 | + .IWDTRSTIRQS = CONFIG_IWDT_RENESAS_RX_OFS0_IWDTRSTIRQS, |
| 47 | + .res1 = 1, |
| 48 | + .IWDTSLCSTP = CONFIG_IWDT_RENESAS_RX_OFS0_IWDTSLCSTP, |
| 49 | + .res2 = 0xFFFF, |
42 | 50 | };
|
43 |
| - |
44 |
| -const unsigned long __OFS_MDE __OFS0reg = 0xffffffff; |
| 51 | +#else |
| 52 | +const unsigned long __OFS0 __OFS0reg = 0xffffffff; |
| 53 | +#endif |
45 | 54 |
|
46 | 55 | /* Option Function Select Register 1 (OFS1) at 0xFE7F5D08 (Voltage detection and
|
47 | 56 | * HOCO)
|
48 | 57 | */
|
49 |
| -const unsigned long __OFS_MDE __OFS1reg = 0xffffffff; |
| 58 | +const unsigned long __OFS1 __OFS1reg = 0xffffffff; |
0 commit comments