Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb015134 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "clk: qcom: clock-gcc-8909: replace clock lookup table with DT for MCD"

parents e88d6641 0f000fbe
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1643,6 +1643,19 @@
		qcom,gpio-force-stop = <&smp2pgpio_ssr_smp2p_1_out 0 0>;
		linux,contiguous-region = <&modem_adsp_mem>;
	};

	mcd {
		compatible = "qcom,mcd";
		qcom,ce-hw-instance = <0>;
		qcom,ce-device = <0>;
		clocks = <&clock_gcc clk_crypto_clk_src>,
			 <&clock_gcc clk_gcc_crypto_clk>,
			 <&clock_gcc clk_gcc_crypto_ahb_clk>,
			 <&clock_gcc clk_gcc_crypto_axi_clk>;
		clock-names = "core_clk_src", "core_clk",
				"iface_clk", "bus_clk";
		qcom,ce-opp-freq = <100000000>;
	};
};

&gdsc_venus {
+0 −16
Original line number Diff line number Diff line
@@ -2566,14 +2566,6 @@ static void register_opp_for_dev(struct platform_device *pdev)
		"Failed to add OPP levels for dev\n");
}

static struct clk_lookup msm_clocks_mcd[] = {
	/* Add crypto driver clocks */
	CLK_LOOKUP_OF("core_clk",     gcc_crypto_clk,         "mcd"),
	CLK_LOOKUP_OF("iface_clk",    gcc_crypto_ahb_clk,     "mcd"),
	CLK_LOOKUP_OF("bus_clk",      gcc_crypto_axi_clk,     "mcd"),
	CLK_LOOKUP_OF("core_clk_src", crypto_clk_src,         "mcd"),
};

static int msm_gcc_probe(struct platform_device *pdev)
{
	struct resource *res;
@@ -2660,14 +2652,6 @@ static int msm_gcc_probe(struct platform_device *pdev)
	if (ret)
		return ret;

	ret =  of_msm_clock_register(pdev->dev.of_node, msm_clocks_mcd,
					ARRAY_SIZE(msm_clocks_mcd));
	if (ret) {
		dev_err(&pdev->dev,
			"Failed to register crypto clocks for mcd\n");
		return ret;
	}

	clk_set_rate(&apss_ahb_clk_src.c, 19200000);
	clk_prepare_enable(&apss_ahb_clk_src.c);