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

Commit 0a5ad9ff authored by Taniya Das's avatar Taniya Das Committed by Gerrit - the friendly Code Review server
Browse files

clk: qcom: osm: Add support for OSM clocks for SDMMAGPIE



SDMMAGPIE has 6-2 cores configuration, add the necessary clock changes to
support 6-2 core configuration using the new compatible.

Change-Id: I16228fb3f9a1bbafba547d05b2e2205bdc6c76a1
Signed-off-by: default avatarTaniya Das <tdas@codeaurora.org>
parent 786e83fb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -10,7 +10,8 @@ Properties:
	Usage:      required
	Value type: <string>
	Definition: must be "qcom,clk-cpu-osm" or "qcom,clk-cpu-osm-sdmshrike"
				or "qcom,clk-cpu-osm-sm6150".
			or "qcom,clk-cpu-osm-sm6150" or
			"qcom,clk-cpu-osm-sdmmagpie".

- reg
	Usage:      required
+8 −3
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ struct clk_osm {

static bool is_sdmshrike;
static bool is_sm6150;
static bool is_sdmmagpie;

static inline struct clk_osm *to_clk_osm(struct clk_hw *_hw)
{
@@ -1007,7 +1008,7 @@ static int clk_osm_resources_init(struct platform_device *pdev)
		return -ENOMEM;
	}

	if (is_sdmshrike || is_sm6150)
	if (is_sdmshrike || is_sm6150 || is_sdmmagpie)
		return 0;

	res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
@@ -1068,6 +1069,9 @@ static int clk_cpu_osm_driver_probe(struct platform_device *pdev)
		.get_cpu_cycle_counter = clk_osm_get_cpu_cycle_counter,
	};

	is_sdmmagpie = of_device_is_compatible(pdev->dev.of_node,
				"qcom,clk-cpu-osm-sdmmagpie");

	is_sm6150 = of_device_is_compatible(pdev->dev.of_node,
				"qcom,clk-cpu-osm-sm6150");

@@ -1075,7 +1079,7 @@ static int clk_cpu_osm_driver_probe(struct platform_device *pdev)
				"qcom,clk-cpu-osm-sdmshrike");
	if (is_sdmshrike)
		clk_cpu_osm_driver_sdmshrike_fixup();
	else if (is_sm6150)
	else if (is_sm6150 || is_sdmmagpie)
		clk_cpu_osm_driver_sm6150_fixup();

	clk_data = devm_kzalloc(&pdev->dev, sizeof(struct clk_onecell_data),
@@ -1128,7 +1132,7 @@ static int clk_cpu_osm_driver_probe(struct platform_device *pdev)
		return rc;
	}

	if (!is_sdmshrike && !is_sm6150) {
	if (!is_sdmshrike && !is_sm6150 && !is_sdmmagpie) {
		rc = clk_osm_read_lut(pdev, &perfpcl_clk);
		if (rc) {
			dev_err(&pdev->dev, "Unable to read OSM LUT for perf plus cluster, rc=%d\n",
@@ -1201,6 +1205,7 @@ static int clk_cpu_osm_driver_probe(struct platform_device *pdev)
static const struct of_device_id match_table[] = {
	{ .compatible = "qcom,clk-cpu-osm" },
	{ .compatible = "qcom,clk-cpu-osm-sm6150" },
	{ .compatible = "qcom,clk-cpu-osm-sdmmagpie" },
	{ .compatible = "qcom,clk-cpu-osm-sdmshrike" },
	{}
};