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] = {
9191
9292static inline void clock_control_bl60x_clock_settle (void )
9393{
94- __asm__ volatile (".rept 15 ; nop ; .endr" );
94+ __asm__ volatile (".rept 20 ; nop ; .endr" );
9595}
9696
9797/* 32 Mhz Oscillator: 0
@@ -848,6 +848,8 @@ static int clock_control_bl60x_init(const struct device *dev)
848848
849849 clock_control_bl60x_peripheral_clock_init ();
850850
851+ clock_control_bl60x_clock_settle ();
852+
851853 irq_unlock (key );
852854
853855 return 0 ;
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ struct efuse_bflb_config {
2929
3030static inline void efuse_bflb_clock_settle (void )
3131{
32- __asm__ volatile (".rept 15 ; nop ; .endr" );
32+ __asm__ volatile (".rept 20 ; nop ; .endr" );
3333}
3434
3535/* 32 Mhz Oscillator: 0
@@ -173,6 +173,9 @@ static void efuse_bflb_cache(const struct device *dev)
173173 const struct efuse_bflb_config * config = dev -> config ;
174174 uint32_t tmp ;
175175 uint8_t old_clock_root ;
176+ uint32_t key ;
177+
178+ key = irq_lock ();
176179
177180 tmp = sys_read32 (HBN_BASE + HBN_GLB_OFFSET );
178181 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)
193196 efuse_bflb_set_root_clock (old_clock_root );
194197 efuse_bflb_clock_settle ();
195198 data -> cached = true;
199+
200+ irq_unlock (key );
196201}
197202
198203static 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