|
@@ -52,6 +52,12 @@ static u32 __init axp_get_tclk_freq(void __iomem *sar)
|
|
|
return 250000000;
|
|
|
}
|
|
|
|
|
|
+/* MV98DX3236 TCLK frequency is fixed to 200MHz */
|
|
|
+static u32 __init mv98dx3236_get_tclk_freq(void __iomem *sar)
|
|
|
+{
|
|
|
+ return 200000000;
|
|
|
+}
|
|
|
+
|
|
|
static const u32 axp_cpu_freqs[] __initconst = {
|
|
|
1000000000,
|
|
|
1066000000,
|
|
@@ -89,6 +95,12 @@ static u32 __init axp_get_cpu_freq(void __iomem *sar)
|
|
|
return cpu_freq;
|
|
|
}
|
|
|
|
|
|
+/* MV98DX3236 CLK frequency is fixed to 800MHz */
|
|
|
+static u32 __init mv98dx3236_get_cpu_freq(void __iomem *sar)
|
|
|
+{
|
|
|
+ return 800000000;
|
|
|
+}
|
|
|
+
|
|
|
static const int axp_nbclk_ratios[32][2] __initconst = {
|
|
|
{0, 1}, {1, 2}, {2, 2}, {2, 2},
|
|
|
{1, 2}, {1, 2}, {1, 1}, {2, 3},
|
|
@@ -158,6 +170,11 @@ static const struct coreclk_soc_desc axp_coreclks = {
|
|
|
.num_ratios = ARRAY_SIZE(axp_coreclk_ratios),
|
|
|
};
|
|
|
|
|
|
+static const struct coreclk_soc_desc mv98dx3236_coreclks = {
|
|
|
+ .get_tclk_freq = mv98dx3236_get_tclk_freq,
|
|
|
+ .get_cpu_freq = mv98dx3236_get_cpu_freq,
|
|
|
+};
|
|
|
+
|
|
|
/*
|
|
|
* Clock Gating Control
|
|
|
*/
|
|
@@ -195,6 +212,15 @@ static const struct clk_gating_soc_desc axp_gating_desc[] __initconst = {
|
|
|
{ }
|
|
|
};
|
|
|
|
|
|
+static const struct clk_gating_soc_desc mv98dx3236_gating_desc[] __initconst = {
|
|
|
+ { "ge1", NULL, 3, 0 },
|
|
|
+ { "ge0", NULL, 4, 0 },
|
|
|
+ { "pex00", NULL, 5, 0 },
|
|
|
+ { "sdio", NULL, 17, 0 },
|
|
|
+ { "xor0", NULL, 22, 0 },
|
|
|
+ { }
|
|
|
+};
|
|
|
+
|
|
|
static void __init axp_clk_init(struct device_node *np)
|
|
|
{
|
|
|
struct device_node *cgnp =
|
|
@@ -206,3 +232,16 @@ static void __init axp_clk_init(struct device_node *np)
|
|
|
mvebu_clk_gating_setup(cgnp, axp_gating_desc);
|
|
|
}
|
|
|
CLK_OF_DECLARE(axp_clk, "marvell,armada-xp-core-clock", axp_clk_init);
|
|
|
+
|
|
|
+static void __init mv98dx3236_clk_init(struct device_node *np)
|
|
|
+{
|
|
|
+ struct device_node *cgnp =
|
|
|
+ of_find_compatible_node(NULL, NULL, "marvell,armada-xp-gating-clock");
|
|
|
+
|
|
|
+ mvebu_coreclk_setup(np, &mv98dx3236_coreclks);
|
|
|
+
|
|
|
+ if (cgnp)
|
|
|
+ mvebu_clk_gating_setup(cgnp, mv98dx3236_gating_desc);
|
|
|
+}
|
|
|
+CLK_OF_DECLARE(mv98dx3236_clk, "marvell,mv98dx3236-core-clock",
|
|
|
+ mv98dx3236_clk_init);
|