mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
perf/imx_ddr: Get and enable optional clks
Get and enable optional clks because fsl,imx8dxl-db-pmu have two clocks. Signed-off-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/bitfield.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/io.h>
|
||||
@@ -732,10 +733,12 @@ static int ddr_perf_offline_cpu(unsigned int cpu, struct hlist_node *node)
|
||||
|
||||
static int ddr_perf_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk_bulk_data *clks;
|
||||
struct ddr_pmu *pmu;
|
||||
struct device_node *np;
|
||||
void __iomem *base;
|
||||
char *name;
|
||||
int nclks;
|
||||
int num;
|
||||
int ret;
|
||||
int irq;
|
||||
@@ -754,6 +757,10 @@ static int ddr_perf_probe(struct platform_device *pdev)
|
||||
|
||||
platform_set_drvdata(pdev, pmu);
|
||||
|
||||
nclks = devm_clk_bulk_get_all_enabled(&pdev->dev, &clks);
|
||||
if (nclks < 0)
|
||||
return dev_err_probe(&pdev->dev, nclks, "Failure get clks\n");
|
||||
|
||||
num = ida_alloc(&ddr_ida, GFP_KERNEL);
|
||||
if (num < 0)
|
||||
return num;
|
||||
|
||||
Reference in New Issue
Block a user