Loading drivers/clk/qcom/clock-a7.c +41 −1 Original line number Diff line number Diff line Loading @@ -153,6 +153,39 @@ static void get_speed_bin(struct platform_device *pdev, int *bin, int *version) return; } static void get_speed_bin_b(struct platform_device *pdev, int *bin, int *version) { struct resource *res; void __iomem *base; u32 pte_efuse; *bin = 0; *version = 0; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "efuse"); if (!res) { dev_info(&pdev->dev, "No speed/PVS binning available. Defaulting to 0!\n"); return; } base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); if (!base) { dev_warn(&pdev->dev, "Unable to read efuse data. Defaulting to 0!\n"); return; } pte_efuse = readl_relaxed(base); devm_iounmap(&pdev->dev, base); *bin = (pte_efuse >> 2) & 0x7; dev_info(&pdev->dev, "Speed bin: %d PVS Version: %d\n", *bin, *version); } static int of_get_clk_src(struct platform_device *pdev, struct clk_src *parents) { struct device_node *of = pdev->dev.of_node; Loading Loading @@ -195,6 +228,10 @@ static int clock_a7_probe(struct platform_device *pdev) struct clk *aux_clk, *main_pll; char prop_name[] = "qcom,speedX-bin-vX"; const void *prop; bool compat_bin = false; compat_bin = of_device_is_compatible(pdev->dev.of_node, "qcom,clock-a53-8916"); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "rcg-base"); if (!res) { Loading Loading @@ -225,6 +262,9 @@ static int clock_a7_probe(struct platform_device *pdev) if (prop) a7ssmux.safe_freq = of_read_ulong(prop, 1); if (compat_bin) get_speed_bin_b(pdev, &speed_bin, &version); else get_speed_bin(pdev, &speed_bin, &version); snprintf(prop_name, ARRAY_SIZE(prop_name), Loading Loading
drivers/clk/qcom/clock-a7.c +41 −1 Original line number Diff line number Diff line Loading @@ -153,6 +153,39 @@ static void get_speed_bin(struct platform_device *pdev, int *bin, int *version) return; } static void get_speed_bin_b(struct platform_device *pdev, int *bin, int *version) { struct resource *res; void __iomem *base; u32 pte_efuse; *bin = 0; *version = 0; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "efuse"); if (!res) { dev_info(&pdev->dev, "No speed/PVS binning available. Defaulting to 0!\n"); return; } base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); if (!base) { dev_warn(&pdev->dev, "Unable to read efuse data. Defaulting to 0!\n"); return; } pte_efuse = readl_relaxed(base); devm_iounmap(&pdev->dev, base); *bin = (pte_efuse >> 2) & 0x7; dev_info(&pdev->dev, "Speed bin: %d PVS Version: %d\n", *bin, *version); } static int of_get_clk_src(struct platform_device *pdev, struct clk_src *parents) { struct device_node *of = pdev->dev.of_node; Loading Loading @@ -195,6 +228,10 @@ static int clock_a7_probe(struct platform_device *pdev) struct clk *aux_clk, *main_pll; char prop_name[] = "qcom,speedX-bin-vX"; const void *prop; bool compat_bin = false; compat_bin = of_device_is_compatible(pdev->dev.of_node, "qcom,clock-a53-8916"); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "rcg-base"); if (!res) { Loading Loading @@ -225,6 +262,9 @@ static int clock_a7_probe(struct platform_device *pdev) if (prop) a7ssmux.safe_freq = of_read_ulong(prop, 1); if (compat_bin) get_speed_bin_b(pdev, &speed_bin, &version); else get_speed_bin(pdev, &speed_bin, &version); snprintf(prop_name, ARRAY_SIZE(prop_name), Loading