Fix warning in file included from chip/sam_clockconfig.c:34:
chip/sam_clockconfig.c: In function 'sam_usbclockconfig': Error: /github/workspace/sources/nuttx/arch/arm/src/common/arm_internal.h:135:51: error: 'regval' is used uninitialized [-Werror=uninitialized] 135 | #define putreg32(v,a) (*(volatile uint32_t *)(a) = (v)) | ^ chip/sam_clockconfig.c:422:12: note: 'regval' was declared here 422 | uint32_t regval; | ^~~~~~ Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
2ec117b3ca
commit
62c5afe655
|
@ -466,10 +466,10 @@ static inline void sam_usbclockconfig(void)
|
||||||
regval |= SFR_UTMICKTRIM_FREQ_48MHZ;
|
regval |= SFR_UTMICKTRIM_FREQ_48MHZ;
|
||||||
#else
|
#else
|
||||||
# error Board oscillator frequency not compatible with use of UPLL
|
# error Board oscillator frequency not compatible with use of UPLL
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
putreg32(regval, (SAM_SFR_VBASE + SAM_SFR_UTMICKTRIM_OFFSET));
|
putreg32(regval, (SAM_SFR_VBASE + SAM_SFR_UTMICKTRIM_OFFSET));
|
||||||
|
#endif
|
||||||
|
|
||||||
regval = PMC_CKGR_UCKR_UPLLCOUNT(BOARD_CKGR_UCKR_UPLLCOUNT);
|
regval = PMC_CKGR_UCKR_UPLLCOUNT(BOARD_CKGR_UCKR_UPLLCOUNT);
|
||||||
putreg32(regval, SAM_PMC_CKGR_UCKR);
|
putreg32(regval, SAM_PMC_CKGR_UCKR);
|
||||||
|
|
Loading…
Reference in New Issue