From 47e370f01d274f516cf1ad449eaf15266b262485 Mon Sep 17 00:00:00 2001 From: Fancy Fang Date: Fri, 15 Apr 2016 18:11:51 +0800 Subject: [PATCH] MLK-12699-1 ARM: imx7d: clk: add two clocks definition for pxp The pxp require two clocks to enable when it works, and they are 'ipg' and 'axi' clocks. Besides, the two clocks share the same CCGR to control clock gating. Signed-off-by: Fancy Fang --- drivers/clk/imx/clk-imx7d.c | 3 +++ include/dt-bindings/clock/imx7d-clock.h | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c index 362ae49ab786..f4e82b97fcfe 100644 --- a/drivers/clk/imx/clk-imx7d.c +++ b/drivers/clk/imx/clk-imx7d.c @@ -26,6 +26,7 @@ static u32 share_count_sai1; static u32 share_count_sai2; static u32 share_count_sai3; +static u32 share_count_pxp; static struct clk_div_table test_div_table[] = { { .val = 3, .div = 1, }, @@ -875,6 +876,8 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node) clks[IMX7D_USB_PHY1_CLK] = imx_clk_gate4("usb_phy1_clk", "pll_usb1_main_clk", base + 0x46a0, 0); clks[IMX7D_USB_PHY2_CLK] = imx_clk_gate4("usb_phy2_clk", "pll_usb_main_clk", base + 0x46b0, 0); clks[IMX7D_ADC_ROOT_CLK] = imx_clk_gate4("adc_root_clk", "ipg_root_clk", base + 0x4200, 0); + clks[IMX7D_PXP_IPG_CLK] = imx_clk_gate2_shared2("pxp_ipg_clk", "ipg_root_clk", base + 0x44c0, 0, &share_count_pxp); + clks[IMX7D_PXP_AXI_CLK] = imx_clk_gate2_shared2("pxp_axi_clk", "main_axi_root_clk", base + 0x44c0, 0, &share_count_pxp); clks[IMX7D_GPT_3M_CLK] = imx_clk_fixed_factor("gpt_3m", "osc", 1, 8); diff --git a/include/dt-bindings/clock/imx7d-clock.h b/include/dt-bindings/clock/imx7d-clock.h index f09e890f832d..4fce0647b97c 100644 --- a/include/dt-bindings/clock/imx7d-clock.h +++ b/include/dt-bindings/clock/imx7d-clock.h @@ -451,5 +451,8 @@ #define IMX7D_CKIL 438 #define IMX7D_OCOTP_CLK 439 #define IMX7D_CAAM_CLK 440 -#define IMX7D_CLK_END 441 +#define IMX7D_PXP_IPG_CLK 441 +#define IMX7D_PXP_AXI_CLK 442 +#define IMX7D_CLK_END 443 + #endif /* __DT_BINDINGS_CLOCK_IMX7D_H */ -- 2.17.1