Skip to content

Commit b5bc83b

Browse files
pcercueibebarino
authored andcommitted
clk: ingenic: Add MDMA and BDMA clocks
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> Link: https://lore.kernel.org/r/20211220193319.114974-3-paul@crapouillou.net Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 51d04bc commit b5bc83b

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

drivers/clk/ingenic/jz4760-cgu.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,16 @@ static const struct ingenic_cgu_clk_info jz4760_cgu_clocks[] = {
313313
.parents = { JZ4760_CLK_H2CLK, },
314314
.gate = { CGU_REG_CLKGR0, 21 },
315315
},
316+
[JZ4760_CLK_MDMA] = {
317+
"mdma", CGU_CLK_GATE,
318+
.parents = { JZ4760_CLK_HCLK, },
319+
.gate = { CGU_REG_CLKGR0, 25 },
320+
},
321+
[JZ4760_CLK_BDMA] = {
322+
"bdma", CGU_CLK_GATE,
323+
.parents = { JZ4760_CLK_HCLK, },
324+
.gate = { CGU_REG_CLKGR1, 0 },
325+
},
316326
[JZ4760_CLK_I2C0] = {
317327
"i2c0", CGU_CLK_GATE,
318328
.parents = { JZ4760_CLK_EXT, },

drivers/clk/ingenic/jz4770-cgu.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,11 @@ static const struct ingenic_cgu_clk_info jz4770_cgu_clocks[] = {
329329
.parents = { JZ4770_CLK_H2CLK, },
330330
.gate = { CGU_REG_CLKGR0, 21 },
331331
},
332+
[JZ4770_CLK_BDMA] = {
333+
"bdma", CGU_CLK_GATE,
334+
.parents = { JZ4770_CLK_H2CLK, },
335+
.gate = { CGU_REG_CLKGR1, 0 },
336+
},
332337
[JZ4770_CLK_I2C0] = {
333338
"i2c0", CGU_CLK_GATE,
334339
.parents = { JZ4770_CLK_EXT, },

0 commit comments

Comments
 (0)