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

Commit f160677a 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: gcc-sdm845: Add debug mux measurement support for shared clocks" into msm-4.9

parents a1d5be22 d075ba38
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -113,6 +113,10 @@ static const char *const debug_mux_parent_names[] = {
	"disp_cc_mdss_spdm_pclk1_clk",
	"disp_cc_mdss_spdm_rot_clk",
	"disp_cc_mdss_vsync_clk",
	"measure_only_snoc_clk",
	"measure_only_cnoc_clk",
	"measure_only_bimc_clk",
	"measure_only_ipa_2x_clk",
	"gcc_aggre_noc_pcie_tbu_clk",
	"gcc_aggre_ufs_card_axi_clk",
	"gcc_aggre_ufs_phy_axi_clk",
@@ -444,6 +448,14 @@ static struct clk_debug_mux gcc_debug_mux = {
			0x1C, 0xFF, 0, 0x3, 0, 1, 0x6000, 0x6008, 0x600C },
		{ "disp_cc_mdss_vsync_clk", 0x47, 4, DISP_CC,
			0x6, 0xFF, 0, 0x3, 0, 1, 0x6000, 0x6008, 0x600C },
		{ "measure_only_snoc_clk", 0x7, 4, GCC,
			0x7, 0x3FFF, 0, 0xF, 0, 4, 0x62008, 0x62000, 0x62004 },
		{ "measure_only_cnoc_clk", 0x15, 4, GCC,
			0x7, 0x3FFF, 0, 0xF, 0, 4, 0x62008, 0x62000, 0x62004 },
		{ "measure_only_bimc_clk", 0xc2, 4, GCC,
			0x7, 0x3FFF, 0, 0xF, 0, 4, 0x62008, 0x62000, 0x62004 },
		{ "measure_only_ipa_2x_clk", 0x128, 4, GCC,
			0x7, 0x3FFF, 0, 0xF, 0, 4, 0x62008, 0x62000, 0x62004 },
		{ "gcc_aggre_noc_pcie_tbu_clk", 0x2D, 4, GCC,
			0x2D, 0x3FF, 0, 0xF, 0, 4, 0x62008, 0x62000, 0x62004 },
		{ "gcc_aggre_ufs_card_axi_clk", 0x11E, 4, GCC,
+48 −1
Original line number Diff line number Diff line
@@ -151,6 +151,38 @@ static const char * const gcc_parent_names_6[] = {
	"core_bi_pll_test_se",
};

static struct clk_dummy measure_only_snoc_clk = {
	.rrate = 1000,
	.hw.init = &(struct clk_init_data){
		.name = "measure_only_snoc_clk",
		.ops = &clk_dummy_ops,
	},
};

static struct clk_dummy measure_only_cnoc_clk = {
	.rrate = 1000,
	.hw.init = &(struct clk_init_data){
		.name = "measure_only_cnoc_clk",
		.ops = &clk_dummy_ops,
	},
};

static struct clk_dummy measure_only_bimc_clk = {
	.rrate = 1000,
	.hw.init = &(struct clk_init_data){
		.name = "measure_only_bimc_clk",
		.ops = &clk_dummy_ops,
	},
};

static struct clk_dummy measure_only_ipa_2x_clk = {
	.rrate = 1000,
	.hw.init = &(struct clk_init_data){
		.name = "measure_only_ipa_2x_clk",
		.ops = &clk_dummy_ops,
	},
};

static struct pll_vco fabia_vco[] = {
	{ 250000000, 2000000000, 0 },
	{ 125000000, 1000000000, 1 },
@@ -3147,6 +3179,13 @@ static struct clk_branch gcc_video_xo_clk = {
	},
};

struct clk_hw *gcc_sdm845_hws[] = {
	[MEASURE_ONLY_SNOC_CLK] = &measure_only_snoc_clk.hw,
	[MEASURE_ONLY_CNOC_CLK] = &measure_only_cnoc_clk.hw,
	[MEASURE_ONLY_BIMC_CLK] = &measure_only_bimc_clk.hw,
	[MEASURE_ONLY_IPA_2X_CLK] = &measure_only_ipa_2x_clk.hw,
};

static struct clk_regmap *gcc_sdm845_clocks[] = {
	[GCC_AGGRE_NOC_PCIE_TBU_CLK] = &gcc_aggre_noc_pcie_tbu_clk.clkr,
	[GCC_AGGRE_UFS_CARD_AXI_CLK] = &gcc_aggre_ufs_card_axi_clk.clkr,
@@ -3385,8 +3424,9 @@ MODULE_DEVICE_TABLE(of, gcc_sdm845_match_table);

static int gcc_sdm845_probe(struct platform_device *pdev)
{
	struct clk *clk;
	struct regmap *regmap;
	int ret = 0;
	int i, ret = 0;

	regmap = qcom_cc_map(pdev, &gcc_sdm845_desc);
	if (IS_ERR(regmap))
@@ -3416,6 +3456,13 @@ static int gcc_sdm845_probe(struct platform_device *pdev)
		return PTR_ERR(vdd_cx_ao.regulator[0]);
	}

	/* Register the dummy measurement clocks */
	for (i = 0; i < ARRAY_SIZE(gcc_sdm845_hws); i++) {
		clk = devm_clk_register(&pdev->dev, gcc_sdm845_hws[i]);
		if (IS_ERR(clk))
			return PTR_ERR(clk);
	}

	ret = qcom_cc_really_probe(pdev, &gcc_sdm845_desc, regmap);
	if (ret) {
		dev_err(&pdev->dev, "Failed to register GCC clocks\n");
+6 −0
Original line number Diff line number Diff line
@@ -224,4 +224,10 @@
#define GCC_USB3_DP_PHY_SEC_BCR					23
#define GCC_USB_PHY_CFG_AHB2PHY_BCR				24

/* Dummy clocks for rate measurement */
#define MEASURE_ONLY_SNOC_CLK					0
#define MEASURE_ONLY_CNOC_CLK					1
#define MEASURE_ONLY_BIMC_CLK					2
#define MEASURE_ONLY_IPA_2X_CLK					3

#endif