Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: mvebu: Support Armada 380 SoC on the core divider clock

This commit adds support for the Core Divider clocks of the Armada
380 SoCs. Similarly to Armada 370 and XP, the Core Divider clocks of
the 380 have gate capabilities. The only difference is the register layout.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Link: https://lkml.kernel.org/r/1394742273-5113-2-git-send-email-ezequiel.garcia@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>

authored by

Ezequiel Garcia and committed by
Jason Cooper
0737c15f 8230a5ab

+23
+23
drivers/clk/mvebu/clk-corediv.c
··· 204 204 .ratio_offset = 0x8, 205 205 }; 206 206 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 + 207 223 static const struct clk_corediv_soc_desc armada375_corediv_soc = { 208 224 .descs = mvebu_corediv_desc, 209 225 .ndescs = ARRAY_SIZE(mvebu_corediv_desc), ··· 306 290 } 307 291 CLK_OF_DECLARE(armada375_corediv_clk, "marvell,armada-375-corediv-clock", 308 292 armada375_corediv_clk_init); 293 + 294 + static void __init armada380_corediv_clk_init(struct device_node *node) 295 + { 296 + return mvebu_corediv_clk_init(node, &armada380_corediv_soc); 297 + } 298 + CLK_OF_DECLARE(armada380_corediv_clk, "marvell,armada-380-corediv-clock", 299 + armada380_corediv_clk_init);