#include <linux/arm-smccc.h>
#include <linux/bitfield.h>
+#include <linux/clk.h>
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/of.h>
struct dvfsrc_soc_data;
struct mtk_dvfsrc {
struct device *dev;
+ struct clk *clk;
struct platform_device *icc;
struct platform_device *regulator;
const struct dvfsrc_soc_data *dvd;
if (IS_ERR(dvfsrc->regs))
return PTR_ERR(dvfsrc->regs);
+ dvfsrc->clk = devm_clk_get_enabled(&pdev->dev, NULL);
+ if (IS_ERR(dvfsrc->clk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(dvfsrc->clk),
+ "Couldn't get and enable DVFSRC clock\n");
+
arm_smccc_smc(MTK_SIP_DVFSRC_VCOREFS_CONTROL, MTK_SIP_DVFSRC_INIT,
0, 0, 0, 0, 0, 0, &ares);
if (ares.a0)