Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Frank Li and committed by
Will Deacon
037e8cf6 66db99ff

+7
+7
drivers/perf/fsl_imx8_ddr_perf.c
··· 5 5 */ 6 6 7 7 #include <linux/bitfield.h> 8 + #include <linux/clk.h> 8 9 #include <linux/init.h> 9 10 #include <linux/interrupt.h> 10 11 #include <linux/io.h> ··· 733 732 734 733 static int ddr_perf_probe(struct platform_device *pdev) 735 734 { 735 + struct clk_bulk_data *clks; 736 736 struct ddr_pmu *pmu; 737 737 struct device_node *np; 738 738 void __iomem *base; 739 739 char *name; 740 + int nclks; 740 741 int num; 741 742 int ret; 742 743 int irq; ··· 756 753 ddr_perf_init(pmu, base, &pdev->dev); 757 754 758 755 platform_set_drvdata(pdev, pmu); 756 + 757 + nclks = devm_clk_bulk_get_all_enabled(&pdev->dev, &clks); 758 + if (nclks < 0) 759 + return dev_err_probe(&pdev->dev, nclks, "Failure get clks\n"); 759 760 760 761 num = ida_alloc(&ddr_ida, GFP_KERNEL); 761 762 if (num < 0)