endmenu
choice
- prompt "StarFive JH SOCs board type"
- depends on SOC_STARFIVE
- default STARFIVE_FPGA
+ prompt "StarFive JH SOCs board type"
+ depends on SOC_STARFIVE
+ default STARFIVE_BOARD_FPGA
help
- choice StarFive JH7110 SOC board type
+ choice StarFive JH7110 SOC board type
- config STARFIVE_BOARD_FPGA
- bool "FPGA"
- help
- This enables support for StarFive SoC FPGA board type Hardware.
+ config STARFIVE_BOARD_FPGA
+ bool "FPGA"
+ help
+ This enables support for StarFive SoC FPGA board type Hardware.
- config STARFIVE_BOARD_EVB
- bool "EVB"
- help
- This enables support for StarFive SoC EVB board type Hardware.
+ config STARFIVE_BOARD_EVB
+ bool "EVB"
+ help
+ This enables support for StarFive SoC EVB board type Hardware.
config STARFIVE_BOARD_VISIONFIVE
- bool "Visionfive"
- help
- This enables support for StarFive SoC Visionfive board type Hardware.
+ bool "Visionfive"
+ help
+ This enables support for StarFive SoC Visionfive board type Hardware.
endchoice
config SOC_VIRT
static int si5wdt_get_clock_rate(struct stf_si5_wdt *wdt)
{
+#ifdef CONFIG_STARFIVE_BOARD_FPGA
int ret;
u32 freq;
- if (!IS_ERR(wdt->core_clk)) {
- wdt->freq = clk_get_rate(wdt->core_clk);
- return 0;
- }
-
/* Next we try to get clock-frequency from dts.*/
ret = of_property_read_u32(wdt->dev->of_node, "clock-frequency", &freq);
if (!ret) {
}
else
dev_err(wdt->dev, "get rate failed, need clock-frequency define in dts.\n");
+#else
+ if (!IS_ERR(wdt->core_clk)) {
+ wdt->freq = clk_get_rate(wdt->core_clk);
+ return 0;
+ }
+#endif
return -ENOENT;
}