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

Commit 0b9ddcc8 authored by Stephen Boyd's avatar Stephen Boyd
Browse files

Merge branch 'clk-msm8996' into clk-next

* clk-msm8996:
  clk: qcom: Add MSM8996 Multimedia Clock Controller (MMCC) driver
  clk: qcom: Add gfx3d ping-pong PLL frequency switching
  clk: qcom: Add MSM8996 Global Clock Control (GCC) driver
  clk: qcom: Add Alpha PLL support
  clk: divider: Cap table divider values to 'width' member
parents 64dfbe24 c2526597
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ Required properties :
			"qcom,gcc-msm8974"
			"qcom,gcc-msm8974pro"
			"qcom,gcc-msm8974pro-ac"
			"qcom,gcc-msm8996"

- reg : shall contain base register location and length
- #clock-cells : shall contain 1
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ Required properties :
			"qcom,mmcc-msm8660"
			"qcom,mmcc-msm8960"
			"qcom,mmcc-msm8974"
			"qcom,mmcc-msm8996"

- reg : shall contain base register location and length
- #clock-cells : shall contain 1
+5 −4
Original line number Diff line number Diff line
@@ -32,13 +32,14 @@

#define div_mask(width)	((1 << (width)) - 1)

static unsigned int _get_table_maxdiv(const struct clk_div_table *table)
static unsigned int _get_table_maxdiv(const struct clk_div_table *table,
				      u8 width)
{
	unsigned int maxdiv = 0;
	unsigned int maxdiv = 0, mask = div_mask(width);
	const struct clk_div_table *clkt;

	for (clkt = table; clkt->div; clkt++)
		if (clkt->div > maxdiv)
		if (clkt->div > maxdiv && clkt->val <= mask)
			maxdiv = clkt->div;
	return maxdiv;
}
@@ -62,7 +63,7 @@ static unsigned int _get_maxdiv(const struct clk_div_table *table, u8 width,
	if (flags & CLK_DIVIDER_POWER_OF_TWO)
		return 1 << div_mask(width);
	if (table)
		return _get_table_maxdiv(table);
		return _get_table_maxdiv(table, width);
	return div_mask(width) + 1;
}

+17 −0
Original line number Diff line number Diff line
@@ -106,3 +106,20 @@ config MSM_MMCC_8974
	  Support for the multimedia clock controller on msm8974 devices.
	  Say Y if you want to support multimedia devices such as display,
	  graphics, video encode/decode, camera, etc.

config MSM_GCC_8996
	tristate "MSM8996 Global Clock Controller"
	depends on COMMON_CLK_QCOM
	help
	  Support for the global clock controller on msm8996 devices.
	  Say Y if you want to use peripheral devices such as UART, SPI,
	  i2c, USB, UFS, SD/eMMC, PCIe, etc.

config MSM_MMCC_8996
	tristate "MSM8996 Multimedia Clock Controller"
	select MSM_GCC_8996
	depends on COMMON_CLK_QCOM
	help
	  Support for the multimedia clock controller on msm8996 devices.
	  Say Y if you want to support multimedia devices such as display,
	  graphics, video encode/decode, camera, etc.
+3 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ obj-$(CONFIG_COMMON_CLK_QCOM) += clk-qcom.o

clk-qcom-y += common.o
clk-qcom-y += clk-regmap.o
clk-qcom-y += clk-alpha-pll.o
clk-qcom-y += clk-pll.o
clk-qcom-y += clk-rcg.o
clk-qcom-y += clk-rcg2.o
@@ -20,5 +21,7 @@ obj-$(CONFIG_MSM_GCC_8916) += gcc-msm8916.o
obj-$(CONFIG_MSM_GCC_8960) += gcc-msm8960.o
obj-$(CONFIG_MSM_LCC_8960) += lcc-msm8960.o
obj-$(CONFIG_MSM_GCC_8974) += gcc-msm8974.o
obj-$(CONFIG_MSM_GCC_8996) += gcc-msm8996.o
obj-$(CONFIG_MSM_MMCC_8960) += mmcc-msm8960.o
obj-$(CONFIG_MSM_MMCC_8974) += mmcc-msm8974.o
obj-$(CONFIG_MSM_MMCC_8996) += mmcc-msm8996.o
Loading