boards/hifive1b: change clock Kconfig parameter to always have a value
As clock.c uses C conditionals for its code, the configuration macros should always be defined. This is done by moving the dependencies to a condition in the prompt, making them configurable only when applicable.
This commit is contained in:
parent
5d96a6383d
commit
3829963c73
@ -40,32 +40,29 @@ config USE_CLOCK_HFROSC
|
|||||||
bool "Direct High frequency internal oscillator (HFROSC)"
|
bool "Direct High frequency internal oscillator (HFROSC)"
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
if USE_CLOCK_HFXOSC_PLL
|
# the configuration macros must always be defined for clock.c to compile
|
||||||
config CLOCK_PLL_F
|
config CLOCK_PLL_F
|
||||||
int "F: REFR multiply factor"
|
int "F: REFR multiply factor" if USE_CLOCK_HFXOSC_PLL
|
||||||
default 39
|
default 39
|
||||||
|
|
||||||
config CLOCK_PLL_Q
|
config CLOCK_PLL_Q
|
||||||
int "Q: VCO divide factor"
|
int "Q: VCO divide factor" if USE_CLOCK_HFXOSC_PLL
|
||||||
default 1
|
default 1
|
||||||
endif
|
|
||||||
|
|
||||||
config CLOCK_DESIRED_FREQUENCY
|
config CLOCK_DESIRED_FREQUENCY
|
||||||
int "Desired clock frequency"
|
int
|
||||||
|
prompt "Desired clock frequency" if USE_CLOCK_HFROSC_PLL
|
||||||
default 320000000
|
default 320000000
|
||||||
range 1000000 320000000
|
range 1000000 320000000
|
||||||
depends on USE_CLOCK_HFROSC_PLL
|
|
||||||
|
|
||||||
if USE_CLOCK_HFROSC
|
|
||||||
config CLOCK_HFROSC_TRIM
|
config CLOCK_HFROSC_TRIM
|
||||||
int "TRIM: input frequency multiplier"
|
int "TRIM: input frequency multiplier" if USE_CLOCK_HFROSC
|
||||||
default 6
|
default 6
|
||||||
range 0 31
|
range 0 31
|
||||||
|
|
||||||
config CLOCK_HFROSC_DIV
|
config CLOCK_HFROSC_DIV
|
||||||
int "DIV: output frequency divider"
|
int "DIV: output frequency divider" if USE_CLOCK_HFROSC
|
||||||
default 1
|
default 1
|
||||||
range 0 63
|
range 0 63
|
||||||
endif
|
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user