sunxi: clk: fix N formula for CPUX clocks
authorQuentin Schulz <quentin.schulz@free-electrons.com>
Tue, 26 Sep 2017 14:02:47 +0000 (16:02 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 25 Oct 2017 08:05:05 +0000 (10:05 +0200)
commitc96f598be7dd075bd0c6bda73b7819c1a6a2016a
treeacd319992f1c4baf28fc4e1279c31ccd8a154a2c
parenta722359de4e1f68ad2392b2eb88cfca55f129637
sunxi: clk: fix N formula for CPUX clocks

As explained in arch/arm/mach-sunxi/clock_sun8i_a83t.c, clk for CPU
clusters is computed as clk = 24*n. However, the current formula is clk
= 24*(n-1).

This results in a clock set to a frequency that isn't specified as
possible for CPUs.

Let's use the correct formula.

Fixes: f542948b1e8c ("sunxi: clk: add basic clocks for A83T")

Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h