Avoid setting clock parameter twice

pull/11888/head
Osamu Koizumi 2019-05-14 14:01:27 +09:00 committed by fred.li
parent 33f59b426f
commit 0c8196168a
1 changed files with 6 additions and 0 deletions

View File

@ -78,6 +78,12 @@ static inline void rda_ccfg_ck(void)
cfg = (RDA_SCU->CORECFG >> 11) & 0x07U;
rd_rf_usb_reg(0xA4, &val, 0);
// If i2c_wakeup_en is already set, do nothing and return
if((val & 0x01U) == 0x00U) {
return;
}
#if ((SYS_CPU_CLK == CLK_FREQ_160M) && (AHB_BUS_CLK == CLK_FREQ_80M))
/* HCLK inv */
if(((CLK_FREQ_40M << 1) | CLK_FREQ_40M) == cfg) {