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

Commit 9adb03c3 authored by Shefali Jain's avatar Shefali Jain Committed by Gerrit - the friendly Code Review server
Browse files

clk: qcom: Add CPU clock measurement support for QCS405



Add CPU debug mux with inputs for measuring the CPU
clocks on QCS405.

Change-Id: I0bbb1c1f63fd7ea97a0393eb178dcb9a6e6bf742
Signed-off-by: default avatarShefali Jain <shefjain@codeaurora.org>
parent 32dc47b1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ static const char *const debug_mux_parent_names[] = {
	"gcc_usb_hs_inactivity_timers_clk",
	"gcc_usb_hs_phy_cfg_ahb_clk",
	"gcc_usb_hs_system_clk",
	"apcs_mux_clk",
};

static struct clk_debug_mux gcc_debug_mux = {
@@ -277,6 +278,7 @@ static struct clk_debug_mux gcc_debug_mux = {
		0x64, 0x1FF, 0, 0xF000, 12, 4, 0x74000, 0x74000, 0x74000 },
		{ "gcc_usb_hs_system_clk", 0x60, 4, GCC,
		0x60, 0x1FF, 0, 0xF000, 12, 4, 0x74000, 0x74000, 0x74000 },
		{ "apcs_mux_clk", 0x16A, CPU_CC, 0x000, 0x3, 8, 0x0FF },
	),
	.hw.init = &(struct clk_init_data){
		.name = "gcc_debug_mux",
@@ -331,6 +333,10 @@ static int clk_debug_qcs405_probe(struct platform_device *pdev)
	if (ret)
		return ret;

	ret = map_debug_bases(pdev, "qcom,cpucc", CPU_CC);
	if (ret)
		return ret;

	clk = devm_clk_register(&pdev->dev, &gcc_debug_mux.hw);
	if (IS_ERR(clk)) {
		dev_err(&pdev->dev, "Unable to register GCC debug mux\n");