* [PATCH v3 0/2] clk: ingenic: Add MDMA and BDMA clocks @ 2021-12-20 19:33 Paul Cercueil 2021-12-20 19:33 ` [PATCH v3 1/2] dt-bindings: clk/ingenic: " Paul Cercueil 2021-12-20 19:33 ` [PATCH v3 2/2] clk: ingenic: " Paul Cercueil 0 siblings, 2 replies; 6+ messages in thread From: Paul Cercueil @ 2021-12-20 19:33 UTC (permalink / raw) To: Michael Turquette, Stephen Boyd, Rob Herring Cc: list, linux-mips, linux-clk, linux-kernel, devicetree, Paul Cercueil Hi Michael & Stephen, Only the first patch (a tree-wide patch to rename include files) of my v2 was merged, so I thought I'd send the second patch again. Since checkpatch complained that DT includes must be in their own patch, I just did that and decided to send a V3 instead of a RESEND. Changes from v2: - Previous patch [1/2] was merged - Split previous patch [2/2] into two patches Cheers, -Paul Paul Cercueil (2): dt-bindings: clk/ingenic: Add MDMA and BDMA clocks clk: ingenic: Add MDMA and BDMA clocks drivers/clk/ingenic/jz4760-cgu.c | 10 ++++++++++ drivers/clk/ingenic/jz4770-cgu.c | 5 +++++ include/dt-bindings/clock/ingenic,jz4760-cgu.h | 2 ++ include/dt-bindings/clock/ingenic,jz4770-cgu.h | 1 + 4 files changed, 18 insertions(+) -- 2.34.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 1/2] dt-bindings: clk/ingenic: Add MDMA and BDMA clocks 2021-12-20 19:33 [PATCH v3 0/2] clk: ingenic: Add MDMA and BDMA clocks Paul Cercueil @ 2021-12-20 19:33 ` Paul Cercueil 2021-12-22 18:11 ` Rob Herring 2022-01-07 1:51 ` Stephen Boyd 2021-12-20 19:33 ` [PATCH v3 2/2] clk: ingenic: " Paul Cercueil 1 sibling, 2 replies; 6+ messages in thread From: Paul Cercueil @ 2021-12-20 19:33 UTC (permalink / raw) To: Michael Turquette, Stephen Boyd, Rob Herring Cc: list, linux-mips, linux-clk, linux-kernel, devicetree, Paul Cercueil The Ingenic JZ4760 and JZ4770 both have an extra DMA core named BDMA dedicated to the NAND and BCH controller, but which can also do memory-to-memory transfers. The JZ4760 additionally has a DMA core named MDMA dedicated to memory-to-memory transfers. The programming manual for the JZ4770 does have a bit for a MDMA clock, but does not seem to have the hardware wired in. Add macros for the MDMA and BDMA clocks to the dt-bindings include files, so that they can be used within Device Tree files. Signed-off-by: Paul Cercueil <paul@crapouillou.net> --- Notes: v3: New patch include/dt-bindings/clock/ingenic,jz4760-cgu.h | 2 ++ include/dt-bindings/clock/ingenic,jz4770-cgu.h | 1 + 2 files changed, 3 insertions(+) diff --git a/include/dt-bindings/clock/ingenic,jz4760-cgu.h b/include/dt-bindings/clock/ingenic,jz4760-cgu.h index 4bb2e19c4743..9fb04ebac6de 100644 --- a/include/dt-bindings/clock/ingenic,jz4760-cgu.h +++ b/include/dt-bindings/clock/ingenic,jz4760-cgu.h @@ -50,5 +50,7 @@ #define JZ4760_CLK_LPCLK_DIV 41 #define JZ4760_CLK_TVE 42 #define JZ4760_CLK_LPCLK 43 +#define JZ4760_CLK_MDMA 44 +#define JZ4760_CLK_BDMA 45 #endif /* __DT_BINDINGS_CLOCK_JZ4760_CGU_H__ */ diff --git a/include/dt-bindings/clock/ingenic,jz4770-cgu.h b/include/dt-bindings/clock/ingenic,jz4770-cgu.h index d68a7695a1f8..0b475e8ae321 100644 --- a/include/dt-bindings/clock/ingenic,jz4770-cgu.h +++ b/include/dt-bindings/clock/ingenic,jz4770-cgu.h @@ -54,5 +54,6 @@ #define JZ4770_CLK_OTG_PHY 45 #define JZ4770_CLK_EXT512 46 #define JZ4770_CLK_RTC 47 +#define JZ4770_CLK_BDMA 48 #endif /* __DT_BINDINGS_CLOCK_JZ4770_CGU_H__ */ -- 2.34.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/2] dt-bindings: clk/ingenic: Add MDMA and BDMA clocks 2021-12-20 19:33 ` [PATCH v3 1/2] dt-bindings: clk/ingenic: " Paul Cercueil @ 2021-12-22 18:11 ` Rob Herring 2022-01-07 1:51 ` Stephen Boyd 1 sibling, 0 replies; 6+ messages in thread From: Rob Herring @ 2021-12-22 18:11 UTC (permalink / raw) To: Paul Cercueil Cc: linux-clk, Michael Turquette, devicetree, linux-mips, list, linux-kernel, Stephen Boyd, Rob Herring On Mon, 20 Dec 2021 19:33:18 +0000, Paul Cercueil wrote: > The Ingenic JZ4760 and JZ4770 both have an extra DMA core named BDMA > dedicated to the NAND and BCH controller, but which can also do > memory-to-memory transfers. The JZ4760 additionally has a DMA core named > MDMA dedicated to memory-to-memory transfers. The programming manual for > the JZ4770 does have a bit for a MDMA clock, but does not seem to have > the hardware wired in. > > Add macros for the MDMA and BDMA clocks to the dt-bindings include > files, so that they can be used within Device Tree files. > > Signed-off-by: Paul Cercueil <paul@crapouillou.net> > --- > > Notes: > v3: New patch > > include/dt-bindings/clock/ingenic,jz4760-cgu.h | 2 ++ > include/dt-bindings/clock/ingenic,jz4770-cgu.h | 1 + > 2 files changed, 3 insertions(+) > Acked-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/2] dt-bindings: clk/ingenic: Add MDMA and BDMA clocks 2021-12-20 19:33 ` [PATCH v3 1/2] dt-bindings: clk/ingenic: " Paul Cercueil 2021-12-22 18:11 ` Rob Herring @ 2022-01-07 1:51 ` Stephen Boyd 1 sibling, 0 replies; 6+ messages in thread From: Stephen Boyd @ 2022-01-07 1:51 UTC (permalink / raw) To: Michael Turquette, Paul Cercueil, Rob Herring Cc: list, linux-mips, linux-clk, linux-kernel, devicetree, Paul Cercueil Quoting Paul Cercueil (2021-12-20 11:33:18) > The Ingenic JZ4760 and JZ4770 both have an extra DMA core named BDMA > dedicated to the NAND and BCH controller, but which can also do > memory-to-memory transfers. The JZ4760 additionally has a DMA core named > MDMA dedicated to memory-to-memory transfers. The programming manual for > the JZ4770 does have a bit for a MDMA clock, but does not seem to have > the hardware wired in. > > Add macros for the MDMA and BDMA clocks to the dt-bindings include > files, so that they can be used within Device Tree files. > > Signed-off-by: Paul Cercueil <paul@crapouillou.net> > --- Applied to clk-next ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 2/2] clk: ingenic: Add MDMA and BDMA clocks 2021-12-20 19:33 [PATCH v3 0/2] clk: ingenic: Add MDMA and BDMA clocks Paul Cercueil 2021-12-20 19:33 ` [PATCH v3 1/2] dt-bindings: clk/ingenic: " Paul Cercueil @ 2021-12-20 19:33 ` Paul Cercueil 2022-01-07 1:52 ` Stephen Boyd 1 sibling, 1 reply; 6+ messages in thread From: Paul Cercueil @ 2021-12-20 19:33 UTC (permalink / raw) To: Michael Turquette, Stephen Boyd, Rob Herring Cc: list, linux-mips, linux-clk, linux-kernel, devicetree, Paul Cercueil The Ingenic JZ4760 and JZ4770 both have an extra DMA core named BDMA dedicated to the NAND and BCH controller, but which can also do memory-to-memory transfers. The JZ4760 additionally has a DMA core named MDMA dedicated to memory-to-memory transfers. The programming manual for the JZ4770 does have a bit for a MDMA clock, but does not seem to have the hardware wired in. Add the BDMA and MDMA clocks to the JZ4760 CGU code, and the BDMA clock to the JZ4770 code, so that the BDMA and MDMA controllers can be used. Signed-off-by: Paul Cercueil <paul@crapouillou.net> --- Notes: v2: No change v3: Split off dt-bindings include changes to its own patch drivers/clk/ingenic/jz4760-cgu.c | 10 ++++++++++ drivers/clk/ingenic/jz4770-cgu.c | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/drivers/clk/ingenic/jz4760-cgu.c b/drivers/clk/ingenic/jz4760-cgu.c index 080d492ac95c..8fdd383560fb 100644 --- a/drivers/clk/ingenic/jz4760-cgu.c +++ b/drivers/clk/ingenic/jz4760-cgu.c @@ -313,6 +313,16 @@ static const struct ingenic_cgu_clk_info jz4760_cgu_clocks[] = { .parents = { JZ4760_CLK_H2CLK, }, .gate = { CGU_REG_CLKGR0, 21 }, }, + [JZ4760_CLK_MDMA] = { + "mdma", CGU_CLK_GATE, + .parents = { JZ4760_CLK_HCLK, }, + .gate = { CGU_REG_CLKGR0, 25 }, + }, + [JZ4760_CLK_BDMA] = { + "bdma", CGU_CLK_GATE, + .parents = { JZ4760_CLK_HCLK, }, + .gate = { CGU_REG_CLKGR1, 0 }, + }, [JZ4760_CLK_I2C0] = { "i2c0", CGU_CLK_GATE, .parents = { JZ4760_CLK_EXT, }, diff --git a/drivers/clk/ingenic/jz4770-cgu.c b/drivers/clk/ingenic/jz4770-cgu.c index 8c6c1208f462..7ef91257630e 100644 --- a/drivers/clk/ingenic/jz4770-cgu.c +++ b/drivers/clk/ingenic/jz4770-cgu.c @@ -329,6 +329,11 @@ static const struct ingenic_cgu_clk_info jz4770_cgu_clocks[] = { .parents = { JZ4770_CLK_H2CLK, }, .gate = { CGU_REG_CLKGR0, 21 }, }, + [JZ4770_CLK_BDMA] = { + "bdma", CGU_CLK_GATE, + .parents = { JZ4770_CLK_H2CLK, }, + .gate = { CGU_REG_CLKGR1, 0 }, + }, [JZ4770_CLK_I2C0] = { "i2c0", CGU_CLK_GATE, .parents = { JZ4770_CLK_EXT, }, -- 2.34.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/2] clk: ingenic: Add MDMA and BDMA clocks 2021-12-20 19:33 ` [PATCH v3 2/2] clk: ingenic: " Paul Cercueil @ 2022-01-07 1:52 ` Stephen Boyd 0 siblings, 0 replies; 6+ messages in thread From: Stephen Boyd @ 2022-01-07 1:52 UTC (permalink / raw) To: Michael Turquette, Paul Cercueil, Rob Herring Cc: list, linux-mips, linux-clk, linux-kernel, devicetree, Paul Cercueil Quoting Paul Cercueil (2021-12-20 11:33:19) > The Ingenic JZ4760 and JZ4770 both have an extra DMA core named BDMA > dedicated to the NAND and BCH controller, but which can also do > memory-to-memory transfers. The JZ4760 additionally has a DMA core named > MDMA dedicated to memory-to-memory transfers. The programming manual for > the JZ4770 does have a bit for a MDMA clock, but does not seem to have > the hardware wired in. > > Add the BDMA and MDMA clocks to the JZ4760 CGU code, and the BDMA clock > to the JZ4770 code, so that the BDMA and MDMA controllers can be used. > > Signed-off-by: Paul Cercueil <paul@crapouillou.net> > --- Applied to clk-next ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-01-07 1:52 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-12-20 19:33 [PATCH v3 0/2] clk: ingenic: Add MDMA and BDMA clocks Paul Cercueil 2021-12-20 19:33 ` [PATCH v3 1/2] dt-bindings: clk/ingenic: " Paul Cercueil 2021-12-22 18:11 ` Rob Herring 2022-01-07 1:51 ` Stephen Boyd 2021-12-20 19:33 ` [PATCH v3 2/2] clk: ingenic: " Paul Cercueil 2022-01-07 1:52 ` Stephen Boyd
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).