* [PATCH 1/3] clk: imx7d: Add the clock for SDMA
@ 2016-08-12 18:26 Fabio Estevam
2016-08-12 18:26 ` [PATCH 2/3] clk: imx: Introduce clk_register_gate2() Fabio Estevam
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Fabio Estevam @ 2016-08-12 18:26 UTC (permalink / raw)
To: sboyd; +Cc: shawnguo, stefan, festevam, linux-clk, Fabio Estevam
Add IMX7D_SDMA_CORE_CLK clock so that SDMA can be functional.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
drivers/clk/imx/clk-imx7d.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c
index 9257972..c24677d 100644
--- a/drivers/clk/imx/clk-imx7d.c
+++ b/drivers/clk/imx/clk-imx7d.c
@@ -779,6 +779,7 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node)
clks[IMX7D_DRAM_PHYM_ALT_ROOT_CLK] = imx_clk_gate4("dram_phym_alt_root_clk", "dram_phym_alt_post_div", base + 0x4130, 0);
clks[IMX7D_DRAM_ALT_ROOT_CLK] = imx_clk_gate4("dram_alt_root_clk", "dram_alt_post_div", base + 0x4130, 0);
clks[IMX7D_USB_HSIC_ROOT_CLK] = imx_clk_gate4("usb_hsic_root_clk", "usb_hsic_post_div", base + 0x4420, 0);
+ clks[IMX7D_SDMA_CORE_CLK] = imx_clk_gate4("sdma_root_clk", "ahb_root_clk", base + 0x4480, 0);
clks[IMX7D_PCIE_CTRL_ROOT_CLK] = imx_clk_gate4("pcie_ctrl_root_clk", "pcie_ctrl_post_div", base + 0x4600, 0);
clks[IMX7D_PCIE_PHY_ROOT_CLK] = imx_clk_gate4("pcie_phy_root_clk", "pcie_phy_post_div", base + 0x4600, 0);
clks[IMX7D_EPDC_PIXEL_ROOT_CLK] = imx_clk_gate4("epdc_pixel_root_clk", "epdc_pixel_post_div", base + 0x44a0, 0);
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/3] clk: imx: Introduce clk_register_gate2()
2016-08-12 18:26 [PATCH 1/3] clk: imx7d: Add the clock for SDMA Fabio Estevam
@ 2016-08-12 18:26 ` Fabio Estevam
2016-08-19 19:54 ` Stephen Boyd
2016-08-12 18:26 ` [PATCH 3/3] clk: imx7d: Add SAI IPG clocks Fabio Estevam
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2016-08-12 18:26 UTC (permalink / raw)
To: sboyd; +Cc: shawnguo, stefan, festevam, linux-clk, Fabio Estevam
Introduce imx_clk_gate2_shared2() which is similar to the existing
imx_clk_gate2_shared() and passes CLK_OPS_PARENT_ENABLE flag, which
is useful for i.MX7 shared clocks.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
drivers/clk/imx/clk.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
index a81c038..3799ff8 100644
--- a/drivers/clk/imx/clk.h
+++ b/drivers/clk/imx/clk.h
@@ -134,6 +134,15 @@ static inline struct clk *imx_clk_gate2_shared(const char *name,
shift, 0x3, 0, &imx_ccm_lock, share_count);
}
+static inline struct clk *imx_clk_gate2_shared2(const char *name,
+ const char *parent, void __iomem *reg, u8 shift,
+ unsigned int *share_count)
+{
+ return clk_register_gate2(NULL, name, parent, CLK_SET_RATE_PARENT |
+ CLK_OPS_PARENT_ENABLE, reg, shift, 0x3, 0,
+ &imx_ccm_lock, share_count);
+}
+
static inline struct clk *imx_clk_gate2_cgr(const char *name,
const char *parent, void __iomem *reg, u8 shift, u8 cgr_val)
{
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/3] clk: imx7d: Add SAI IPG clocks
2016-08-12 18:26 [PATCH 1/3] clk: imx7d: Add the clock for SDMA Fabio Estevam
2016-08-12 18:26 ` [PATCH 2/3] clk: imx: Introduce clk_register_gate2() Fabio Estevam
@ 2016-08-12 18:26 ` Fabio Estevam
2016-08-19 19:54 ` Stephen Boyd
2016-08-19 4:52 ` [PATCH 1/3] clk: imx7d: Add the clock for SDMA Fabio Estevam
2016-08-19 19:54 ` Stephen Boyd
3 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2016-08-12 18:26 UTC (permalink / raw)
To: sboyd; +Cc: shawnguo, stefan, festevam, linux-clk, Fabio Estevam
The SAI_IPG clocks are enabled by the same bits that control SAI_ROOT_CLK
clocks, so represent them as shared clocks.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
drivers/clk/imx/clk-imx7d.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c
index 6631ff5..c7f3655 100644
--- a/drivers/clk/imx/clk-imx7d.c
+++ b/drivers/clk/imx/clk-imx7d.c
@@ -22,6 +22,10 @@
#include "clk.h"
+static u32 share_count_sai1;
+static u32 share_count_sai2;
+static u32 share_count_sai3;
+
static struct clk *clks[IMX7D_CLK_END];
static const char *arm_a7_sel[] = { "osc", "pll_arm_main_clk",
"pll_enet_500m_clk", "pll_dram_main_clk",
@@ -787,9 +791,12 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node)
clks[IMX7D_MIPI_DSI_ROOT_CLK] = imx_clk_gate4("mipi_dsi_root_clk", "mipi_dsi_post_div", base + 0x4650, 0);
clks[IMX7D_MIPI_CSI_ROOT_CLK] = imx_clk_gate4("mipi_csi_root_clk", "mipi_csi_post_div", base + 0x4640, 0);
clks[IMX7D_MIPI_DPHY_ROOT_CLK] = imx_clk_gate4("mipi_dphy_root_clk", "mipi_dphy_post_div", base + 0x4660, 0);
- clks[IMX7D_SAI1_ROOT_CLK] = imx_clk_gate4("sai1_root_clk", "sai1_post_div", base + 0x48c0, 0);
- clks[IMX7D_SAI2_ROOT_CLK] = imx_clk_gate4("sai2_root_clk", "sai2_post_div", base + 0x48d0, 0);
- clks[IMX7D_SAI3_ROOT_CLK] = imx_clk_gate4("sai3_root_clk", "sai3_post_div", base + 0x48e0, 0);
+ clks[IMX7D_SAI1_ROOT_CLK] = imx_clk_gate2_shared2("sai1_root_clk", "sai1_post_div", base + 0x48c0, 0, &share_count_sai1);
+ clks[IMX7D_SAI1_IPG_CLK] = imx_clk_gate2_shared2("sai1_ipg_clk", "ipg_root_clk", base + 0x48c0, 0, &share_count_sai1);
+ clks[IMX7D_SAI2_ROOT_CLK] = imx_clk_gate2_shared2("sai2_root_clk", "sai2_post_div", base + 0x48d0, 0, &share_count_sai2);
+ clks[IMX7D_SAI2_IPG_CLK] = imx_clk_gate2_shared2("sai2_ipg_clk", "ipg_root_clk", base + 0x48d0, 0, &share_count_sai2);
+ clks[IMX7D_SAI3_ROOT_CLK] = imx_clk_gate2_shared2("sai3_root_clk", "sai3_post_div", base + 0x48e0, 0, &share_count_sai3);
+ clks[IMX7D_SAI3_IPG_CLK] = imx_clk_gate2_shared2("sai3_ipg_clk", "ipg_root_clk", base + 0x48e0, 0, &share_count_sai3);
clks[IMX7D_SPDIF_ROOT_CLK] = imx_clk_gate4("spdif_root_clk", "spdif_post_div", base + 0x44d0, 0);
clks[IMX7D_ENET1_REF_ROOT_CLK] = imx_clk_gate4("enet1_ref_root_clk", "enet1_ref_post_div", base + 0x44e0, 0);
clks[IMX7D_ENET1_TIME_ROOT_CLK] = imx_clk_gate4("enet1_time_root_clk", "enet1_time_post_div", base + 0x44f0, 0);
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] clk: imx7d: Add the clock for SDMA
2016-08-12 18:26 [PATCH 1/3] clk: imx7d: Add the clock for SDMA Fabio Estevam
2016-08-12 18:26 ` [PATCH 2/3] clk: imx: Introduce clk_register_gate2() Fabio Estevam
2016-08-12 18:26 ` [PATCH 3/3] clk: imx7d: Add SAI IPG clocks Fabio Estevam
@ 2016-08-19 4:52 ` Fabio Estevam
2016-08-19 19:53 ` Stephen Boyd
2016-08-19 19:54 ` Stephen Boyd
3 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2016-08-19 4:52 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Stephen Boyd, Shawn Guo, Stefan Agner, linux-clk
Hi Stephen,
On Fri, Aug 12, 2016 at 3:26 PM, Fabio Estevam <fabio.estevam@nxp.com> wrote:
> Add IMX7D_SDMA_CORE_CLK clock so that SDMA can be functional.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Are you happy with this series?
I have some more patches for the clk-imx7d driver that I would like to
send for 4.9.
Thanks
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] clk: imx7d: Add the clock for SDMA
2016-08-19 4:52 ` [PATCH 1/3] clk: imx7d: Add the clock for SDMA Fabio Estevam
@ 2016-08-19 19:53 ` Stephen Boyd
2016-08-19 19:58 ` Fabio Estevam
0 siblings, 1 reply; 9+ messages in thread
From: Stephen Boyd @ 2016-08-19 19:53 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Fabio Estevam, Shawn Guo, Stefan Agner, linux-clk
On 08/19, Fabio Estevam wrote:
> Hi Stephen,
>
> On Fri, Aug 12, 2016 at 3:26 PM, Fabio Estevam <fabio.estevam@nxp.com> wrote:
> > Add IMX7D_SDMA_CORE_CLK clock so that SDMA can be functional.
> >
> > Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
>
> Are you happy with this series?
>
> I have some more patches for the clk-imx7d driver that I would like to
> send for 4.9.
Patches look fine. It sounds like you want me to apply them
directly so I'll do that now.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] clk: imx7d: Add the clock for SDMA
2016-08-12 18:26 [PATCH 1/3] clk: imx7d: Add the clock for SDMA Fabio Estevam
` (2 preceding siblings ...)
2016-08-19 4:52 ` [PATCH 1/3] clk: imx7d: Add the clock for SDMA Fabio Estevam
@ 2016-08-19 19:54 ` Stephen Boyd
3 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2016-08-19 19:54 UTC (permalink / raw)
To: Fabio Estevam; +Cc: shawnguo, stefan, festevam, linux-clk
On 08/12, Fabio Estevam wrote:
> Add IMX7D_SDMA_CORE_CLK clock so that SDMA can be functional.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] clk: imx: Introduce clk_register_gate2()
2016-08-12 18:26 ` [PATCH 2/3] clk: imx: Introduce clk_register_gate2() Fabio Estevam
@ 2016-08-19 19:54 ` Stephen Boyd
0 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2016-08-19 19:54 UTC (permalink / raw)
To: Fabio Estevam; +Cc: shawnguo, stefan, festevam, linux-clk
On 08/12, Fabio Estevam wrote:
> Introduce imx_clk_gate2_shared2() which is similar to the existing
> imx_clk_gate2_shared() and passes CLK_OPS_PARENT_ENABLE flag, which
> is useful for i.MX7 shared clocks.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] clk: imx7d: Add SAI IPG clocks
2016-08-12 18:26 ` [PATCH 3/3] clk: imx7d: Add SAI IPG clocks Fabio Estevam
@ 2016-08-19 19:54 ` Stephen Boyd
0 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2016-08-19 19:54 UTC (permalink / raw)
To: Fabio Estevam; +Cc: shawnguo, stefan, festevam, linux-clk
On 08/12, Fabio Estevam wrote:
> The SAI_IPG clocks are enabled by the same bits that control SAI_ROOT_CLK
> clocks, so represent them as shared clocks.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] clk: imx7d: Add the clock for SDMA
2016-08-19 19:53 ` Stephen Boyd
@ 2016-08-19 19:58 ` Fabio Estevam
0 siblings, 0 replies; 9+ messages in thread
From: Fabio Estevam @ 2016-08-19 19:58 UTC (permalink / raw)
To: Stephen Boyd; +Cc: Fabio Estevam, Shawn Guo, Stefan Agner, linux-clk
On Fri, Aug 19, 2016 at 4:53 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> Patches look fine. It sounds like you want me to apply them
> directly so I'll do that now.
Excellent, thanks! Will prepare and submit a few more next week.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-08-19 19:58 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-12 18:26 [PATCH 1/3] clk: imx7d: Add the clock for SDMA Fabio Estevam
2016-08-12 18:26 ` [PATCH 2/3] clk: imx: Introduce clk_register_gate2() Fabio Estevam
2016-08-19 19:54 ` Stephen Boyd
2016-08-12 18:26 ` [PATCH 3/3] clk: imx7d: Add SAI IPG clocks Fabio Estevam
2016-08-19 19:54 ` Stephen Boyd
2016-08-19 4:52 ` [PATCH 1/3] clk: imx7d: Add the clock for SDMA Fabio Estevam
2016-08-19 19:53 ` Stephen Boyd
2016-08-19 19:58 ` Fabio Estevam
2016-08-19 19:54 ` Stephen Boyd
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.