aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/at91/sama5d2.c
diff options
context:
space:
mode:
authorMatthias Wieloch <matthias.wieloch@few-bauer.de>2019-03-18 11:50:45 +0100
committerStephen Boyd <sboyd@kernel.org>2019-03-18 12:50:31 -0700
commit45b06682113b102bdf38678311da93a689b0b78d (patch)
tree5ddda237917be7a68ecae23df0780ad40f5f0f36 /drivers/clk/at91/sama5d2.c
parentLinux 5.1-rc1 (diff)
downloadlinux-dev-45b06682113b102bdf38678311da93a689b0b78d.tar.xz
linux-dev-45b06682113b102bdf38678311da93a689b0b78d.zip
clk: at91: fix programmable clock for sama5d2
The prescaler formula of the programmable clock has changed for sama5d2. Update the driver accordingly. Fixes: a2038077de9a ("clk: at91: add sama5d2 PMC driver") Cc: <stable@vger.kernel.org> # v4.20+ Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com> [nicolas.ferre@microchip.com: adapt the prescaler range, fix clk_programmable_recalc_rate, split patch] Signed-off-by: Matthias Wieloch <matthias.wieloch@few-bauer.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/at91/sama5d2.c')
-rw-r--r--drivers/clk/at91/sama5d2.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c
index 1f70cb164b06..81943fac4537 100644
--- a/drivers/clk/at91/sama5d2.c
+++ b/drivers/clk/at91/sama5d2.c
@@ -125,6 +125,14 @@ static const struct {
.pll = true },
};
+static const struct clk_programmable_layout sama5d2_programmable_layout = {
+ .pres_mask = 0xff,
+ .pres_shift = 4,
+ .css_mask = 0x7,
+ .have_slck_mck = 0,
+ .is_pres_direct = 1,
+};
+
static void __init sama5d2_pmc_setup(struct device_node *np)
{
struct clk_range range = CLK_RANGE(0, 0);
@@ -249,7 +257,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
hw = at91_clk_register_programmable(regmap, name,
parent_names, 6, i,
- &at91sam9x5_programmable_layout);
+ &sama5d2_programmable_layout);
if (IS_ERR(hw))
goto err_free;
}