atsamd: Use CONFIG_USB instead of CONFIG_USBSERIAL during clock init
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
6aec6efcc9
commit
2357221bb4
|
@ -89,7 +89,7 @@ clock_init_internal(void)
|
||||||
uint32_t fine = GET_FUSE(FUSES_DFLL48M_FINE_CAL);
|
uint32_t fine = GET_FUSE(FUSES_DFLL48M_FINE_CAL);
|
||||||
SYSCTRL->DFLLVAL.reg = (SYSCTRL_DFLLVAL_COARSE(coarse)
|
SYSCTRL->DFLLVAL.reg = (SYSCTRL_DFLLVAL_COARSE(coarse)
|
||||||
| SYSCTRL_DFLLVAL_FINE(fine));
|
| SYSCTRL_DFLLVAL_FINE(fine));
|
||||||
if (CONFIG_USBSERIAL) {
|
if (CONFIG_USB) {
|
||||||
// Enable USB clock recovery mode
|
// Enable USB clock recovery mode
|
||||||
uint32_t mul = DIV_ROUND_CLOSEST(FREQ_MAIN, 1000);
|
uint32_t mul = DIV_ROUND_CLOSEST(FREQ_MAIN, 1000);
|
||||||
SYSCTRL->DFLLMUL.reg = (SYSCTRL_DFLLMUL_FSTEP(10)
|
SYSCTRL->DFLLMUL.reg = (SYSCTRL_DFLLMUL_FSTEP(10)
|
||||||
|
|
|
@ -157,7 +157,7 @@ static void
|
||||||
clock_init_internal(void)
|
clock_init_internal(void)
|
||||||
{
|
{
|
||||||
// Enable USB clock recovery mode if applicable
|
// Enable USB clock recovery mode if applicable
|
||||||
if (CONFIG_USBSERIAL) {
|
if (CONFIG_USB) {
|
||||||
// Temporarily switch main clock to internal 32K clock
|
// Temporarily switch main clock to internal 32K clock
|
||||||
gen_clock(CLKGEN_MAIN, GCLK_GENCTRL_SRC_OSCULP32K);
|
gen_clock(CLKGEN_MAIN, GCLK_GENCTRL_SRC_OSCULP32K);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue