Skip to content

Commit 06fa5ab

Browse files
author
Mike Turquette
committed
Merge tag 'clk-mvebu-3xx-3.15-2' of git://git.infradead.org/linux-mvebu into clk-next-mvebu
clock: mvebu new SoC changes for v3.15 (incremental pull #2) - mvebu (Armada 375) - fix ratio register offest - mvebu (Armada 380) - expand core divider clock driver to support 380 SoC (enables nand support)
2 parents e8e6b84 + e69a854 commit 06fa5ab

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

Documentation/devicetree/bindings/clock/mvebu-corediv-clock.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ The following is a list of provided IDs and clock names on Armada 370/XP:
44
0 = nand (NAND clock)
55

66
Required properties:
7-
- compatible : must be "marvell,armada-370-corediv-clock"
7+
- compatible : must be "marvell,armada-370-corediv-clock",
8+
"marvell,armada-375-corediv-clock",
9+
"marvell,armada-380-corediv-clock",
10+
811
- reg : must be the register address of Core Divider control register
912
- #clock-cells : from common clock binding; shall be set to 1
1013
- clocks : must be set to the parent's phandle

drivers/clk/mvebu/clk-corediv.c

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,22 @@ static const struct clk_corediv_soc_desc armada370_corediv_soc = {
204204
.ratio_offset = 0x8,
205205
};
206206

207+
static const struct clk_corediv_soc_desc armada380_corediv_soc = {
208+
.descs = mvebu_corediv_desc,
209+
.ndescs = ARRAY_SIZE(mvebu_corediv_desc),
210+
.ops = {
211+
.enable = clk_corediv_enable,
212+
.disable = clk_corediv_disable,
213+
.is_enabled = clk_corediv_is_enabled,
214+
.recalc_rate = clk_corediv_recalc_rate,
215+
.round_rate = clk_corediv_round_rate,
216+
.set_rate = clk_corediv_set_rate,
217+
},
218+
.ratio_reload = BIT(8),
219+
.enable_bit_offset = 16,
220+
.ratio_offset = 0x4,
221+
};
222+
207223
static const struct clk_corediv_soc_desc armada375_corediv_soc = {
208224
.descs = mvebu_corediv_desc,
209225
.ndescs = ARRAY_SIZE(mvebu_corediv_desc),
@@ -213,7 +229,7 @@ static const struct clk_corediv_soc_desc armada375_corediv_soc = {
213229
.set_rate = clk_corediv_set_rate,
214230
},
215231
.ratio_reload = BIT(8),
216-
.ratio_offset = 0x8,
232+
.ratio_offset = 0x4,
217233
};
218234

219235
static void __init
@@ -290,3 +306,10 @@ static void __init armada375_corediv_clk_init(struct device_node *node)
290306
}
291307
CLK_OF_DECLARE(armada375_corediv_clk, "marvell,armada-375-corediv-clock",
292308
armada375_corediv_clk_init);
309+
310+
static void __init armada380_corediv_clk_init(struct device_node *node)
311+
{
312+
return mvebu_corediv_clk_init(node, &armada380_corediv_soc);
313+
}
314+
CLK_OF_DECLARE(armada380_corediv_clk, "marvell,armada-380-corediv-clock",
315+
armada380_corediv_clk_init);

0 commit comments

Comments
 (0)