@@ -124,7 +124,7 @@ struct freq_multiplier_t {
124
124
uint8_t hfcgml ;
125
125
};
126
126
127
- static struct freq_multiplier_t freq_multiplier [] = {
127
+ static const struct freq_multiplier_t freq_multiplier [] = {
128
128
{.ofmclk = 100000000 , .hfcgn = 0x82 , .hfcgmh = 0x0B , .hfcgml = 0xEC },
129
129
{.ofmclk = 96000000 , .hfcgn = 0x82 , .hfcgmh = 0x0B , .hfcgml = 0x72 },
130
130
{.ofmclk = 80000000 , .hfcgn = 0x82 , .hfcgmh = 0x09 , .hfcgml = 0x89 },
@@ -139,7 +139,7 @@ struct clk_cfg_t {
139
139
uint16_t bus ;
140
140
};
141
141
142
- static struct clk_cfg_t clk_cfg [] = {
142
+ static const struct clk_cfg_t clk_cfg [] = {
143
143
{.clock_id = NPCM_CLOCK_PWM_I , .bus = NPCM_CLOCK_BUS_LFCLK },
144
144
{.clock_id = NPCM_CLOCK_PWM_J , .bus = NPCM_CLOCK_BUS_LFCLK },
145
145
{.clock_id = NPCM_CLOCK_I3CI , .bus = NPCM_CLOCK_BUS_APB3 },
@@ -193,7 +193,7 @@ static struct clk_cfg_t clk_cfg[] = {
193
193
#define DRV_CONFIG (dev ) ((const struct npcm_pcc_config *)(dev)->config)
194
194
195
195
/* Clock controller local functions */
196
- static struct clk_cfg_t * npcm_get_cfg (clock_control_subsys_t sub_system )
196
+ static const struct clk_cfg_t * npcm_get_cfg (clock_control_subsys_t sub_system )
197
197
{
198
198
uint32_t clk_id = (uint32_t )sub_system ;
199
199
uint32_t i ;
@@ -210,7 +210,7 @@ static struct clk_cfg_t *npcm_get_cfg(clock_control_subsys_t sub_system)
210
210
static inline int npcm_clock_control_on (const struct device * dev , clock_control_subsys_t sub_system )
211
211
{
212
212
uint32_t clk_id = (uint32_t )sub_system ;
213
- struct clk_cfg_t * priv ;
213
+ const struct clk_cfg_t * priv ;
214
214
const uint32_t pmc_base = DRV_CONFIG (dev )-> base_pmc ;
215
215
216
216
priv = npcm_get_cfg (sub_system );
@@ -229,7 +229,7 @@ static inline int npcm_clock_control_off(const struct device *dev,
229
229
clock_control_subsys_t sub_system )
230
230
{
231
231
uint32_t clk_id = (uint32_t )sub_system ;
232
- struct clk_cfg_t * priv ;
232
+ const struct clk_cfg_t * priv ;
233
233
const uint32_t pmc_base = DRV_CONFIG (dev )-> base_pmc ;
234
234
235
235
priv = npcm_get_cfg (sub_system );
@@ -249,7 +249,7 @@ static int npcm_clock_control_get_subsys_rate(const struct device *dev,
249
249
{
250
250
ARG_UNUSED (dev );
251
251
uint32_t clk_id = (uint32_t )sub_system ;
252
- struct clk_cfg_t * priv ;
252
+ const struct clk_cfg_t * priv ;
253
253
254
254
priv = npcm_get_cfg (sub_system );
255
255
if (!priv ) {
@@ -310,7 +310,7 @@ static DEVICE_API(clock_control, npcm_clock_control_api) = {
310
310
static int npcm_clock_control_init (const struct device * dev )
311
311
{
312
312
struct cdcg_reg * const priv = (struct cdcg_reg * )(DRV_CONFIG (dev )-> base_cdcg );
313
- struct freq_multiplier_t * freq_p ;
313
+ const struct freq_multiplier_t * freq_p ;
314
314
int i ;
315
315
316
316
for (i = 0 ; i < ARRAY_SIZE (freq_multiplier ); i ++ ) {
0 commit comments