File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ const static uint32_t clock_control_bl60x_crystal_SDMIN_table[5] = {
91
91
92
92
static inline void clock_control_bl60x_clock_settle (void )
93
93
{
94
- __asm__ volatile (".rept 15 ; nop ; .endr" );
94
+ __asm__ volatile (".rept 20 ; nop ; .endr" );
95
95
}
96
96
97
97
/* 32 Mhz Oscillator: 0
@@ -848,6 +848,8 @@ static int clock_control_bl60x_init(const struct device *dev)
848
848
849
849
clock_control_bl60x_peripheral_clock_init ();
850
850
851
+ clock_control_bl60x_clock_settle ();
852
+
851
853
irq_unlock (key );
852
854
853
855
return 0 ;
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ struct efuse_bflb_config {
29
29
30
30
static inline void efuse_bflb_clock_settle (void )
31
31
{
32
- __asm__ volatile (".rept 15 ; nop ; .endr" );
32
+ __asm__ volatile (".rept 20 ; nop ; .endr" );
33
33
}
34
34
35
35
/* 32 Mhz Oscillator: 0
@@ -173,6 +173,9 @@ static void efuse_bflb_cache(const struct device *dev)
173
173
const struct efuse_bflb_config * config = dev -> config ;
174
174
uint32_t tmp ;
175
175
uint8_t old_clock_root ;
176
+ uint32_t key ;
177
+
178
+ key = irq_lock ();
176
179
177
180
tmp = sys_read32 (HBN_BASE + HBN_GLB_OFFSET );
178
181
old_clock_root = (tmp & HBN_ROOT_CLK_SEL_MSK ) >> HBN_ROOT_CLK_SEL_POS ;
@@ -193,6 +196,8 @@ static void efuse_bflb_cache(const struct device *dev)
193
196
efuse_bflb_set_root_clock (old_clock_root );
194
197
efuse_bflb_clock_settle ();
195
198
data -> cached = true;
199
+
200
+ irq_unlock (key );
196
201
}
197
202
198
203
static int efuse_bflb_read (const struct device * dev , uint16_t reg , uint32_t * val )
You can’t perform that action at this time.
0 commit comments