Skip to content

Commit 3ec1008

Browse files
committed
soc: renesas: ra: ra4m1: Adapts the Option Setting Memory to FSP.
Since the Option Setting Memory area is set in FSP, the Kconfig value switches between using the FSP implementation or the existing Option Setting Memory implementation. Signed-off-by: TOKITA Hiroshi <[email protected]>
1 parent 0fcfa30 commit 3ec1008

File tree

3 files changed

+25
-54
lines changed

3 files changed

+25
-54
lines changed

soc/renesas/ra/ra4m1/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ zephyr_include_directories(.)
55

66
zephyr_library_sources(soc.c)
77

8-
zephyr_linker_sources_ifdef(CONFIG_SOC_OPTION_SETTING_MEMORY
9-
ROM_START
10-
${CMAKE_CURRENT_SOURCE_DIR}/opt_set_mem.ld
11-
)
12-
138
zephyr_linker_sources(SECTIONS sections.ld)
149
zephyr_linker_sources(DATA_SECTIONS data_sections.ld)
1510
zephyr_linker_sources(RAM_SECTIONS ram_sections.ld)

soc/renesas/ra/ra4m1/opt_set_mem.ld

Lines changed: 0 additions & 11 deletions
This file was deleted.

soc/renesas/ra/ra4m1/soc.c

Lines changed: 25 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
2323
#include "bsp_cfg.h"
2424
#include <bsp_api.h>
2525

26-
#define HOCO_FREQ DT_PROP(DT_PATH(clocks, hoco), clock_frequency)
26+
#define HOCO_FREQ DT_PROP(DT_PATH(clocks, clock_hoco), clock_frequency)
2727

2828
#if HOCO_FREQ == MHZ(24)
2929
#define OFS1_HOCO_FREQ 0
@@ -93,43 +93,31 @@ struct opt_set_mem {
9393
};
9494

9595
#ifdef CONFIG_SOC_OPTION_SETTING_MEMORY
96-
const struct opt_set_mem ops __attribute__((section(".opt_set_mem"))) = {
96+
const struct opt_set_mem ops __attribute__((section(".rom_registers"))) = {
9797
.ofs0 = {
98-
/*
99-
* Initial settings for watchdog timers. Set all fields to 1,
100-
* disabling watchdog functionality as config options have not
101-
* yet been implemented.
102-
*/
103-
.RSVD1 = 0x1,
104-
.IWDTSTRT = 0x1, /* Disable independent watchdog timer */
105-
.IWDTTOPS = 0x3,
106-
.IWDTCKS = 0xf,
107-
.IWDTRPES = 0x3,
108-
.IWDTRPSS = 0x3,
109-
.IWDTRSTIRQS = 0x1,
110-
.RSVD2 = 0x1,
111-
.IWDTSTPCTL = 0x1,
112-
.RSVD3 = 0x3,
113-
.WDTSTRT = 0x1, /* Stop watchdog timer following reset */
114-
.WDTTOPS = 0x3,
115-
.WDTCKS = 0xf,
116-
.WDTRPES = 0x3,
117-
.WDTRPSS = 0x3,
118-
.WDTRSTIRQS = 0x1,
119-
.RSVD4 = 0x1,
120-
.WDTSTPCTL = 0x1,
121-
.RSVD5 = 0x1,
122-
},
98+
/*
99+
* Initial settings for watchdog timers. Set all fields to 1,
100+
* disabling watchdog functionality as config options have not
101+
* yet been implemented.
102+
*/
103+
.RSVD1 = 0x1, .IWDTSTRT = 0x1, /* Disable independent watchdog timer
104+
*/
105+
.IWDTTOPS = 0x3, .IWDTCKS = 0xf, .IWDTRPES = 0x3, .IWDTRPSS = 0x3,
106+
.IWDTRSTIRQS = 0x1, .RSVD2 = 0x1, .IWDTSTPCTL = 0x1, .RSVD3 = 0x3,
107+
.WDTSTRT = 0x1, /* Stop watchdog timer following reset */
108+
.WDTTOPS = 0x3, .WDTCKS = 0xf, .WDTRPES = 0x3, .WDTRPSS = 0x3,
109+
.WDTRSTIRQS = 0x1, .RSVD4 = 0x1, .WDTSTPCTL = 0x1, .RSVD5 = 0x1,
110+
},
123111
.ofs1 = {
124-
.RSVD1 = 0x3,
125-
.LVDAS = 0x1, /* Disable voltage monitor 0 following reset */
126-
.VDSEL1 = 0x3,
127-
.RSVD2 = 0x3,
128-
.HOCOEN = !DT_NODE_HAS_STATUS_OKAY(DT_PATH(clocks, hoco)),
129-
.RSVD3 = 0x7,
130-
.HOCOFRQ1 = OFS1_HOCO_FREQ,
131-
.RSVD4 = 0x1ffff,
132-
},
112+
.RSVD1 = 0x3,
113+
.LVDAS = 0x1, /* Disable voltage monitor 0 following reset */
114+
.VDSEL1 = 0x3,
115+
.RSVD2 = 0x3,
116+
.HOCOEN = !DT_NODE_HAS_STATUS(DT_PATH(clocks, clock_hoco), okay),
117+
.RSVD3 = 0x7,
118+
.HOCOFRQ1 = OFS1_HOCO_FREQ,
119+
.RSVD4 = 0x1ffff,
120+
},
133121
.mpu = {
134122
/*
135123
* Initial settings for MPU. Set all areas to maximum values
@@ -149,8 +137,7 @@ const struct opt_set_mem ops __attribute__((section(".opt_set_mem"))) = {
149137
.SECMPUS3 = 0x40dffffc,
150138
.SECMPUE3 = 0x40dfffff,
151139
.SECMPUAC = 0xffffffff,
152-
}
153-
};
140+
}};
154141
#endif
155142

156143
uint32_t SystemCoreClock BSP_SECTION_EARLY_INIT;

0 commit comments

Comments
 (0)