]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: mvebu: dynamically allocate resources in Armada CP110 system controller
authorMarcin Wojtas <mw@semihalf.com>
Wed, 21 Sep 2016 09:05:58 +0000 (11:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Oct 2016 10:06:47 +0000 (12:06 +0200)
commit74589581898e4df964dceacc73aa887169085ba8
tree1c6196f4ba95ced440871e1a3b94e473eee4d604
parentb39e0f1c6a6aa89891eafbbf7799b5bcd100a2c4
clk: mvebu: dynamically allocate resources in Armada CP110 system controller

commit a0245eb76ad0f652f1eb14f48ca2d3c4391aef66 upstream.

Original commit, which added support for Armada CP110 system controller
used global variables for storing all clock information. It worked
fine for Armada 7k SoC, with single CP110 block. After dual-CP110 Armada 8k
was introduced, the data got overwritten and corrupted.

This patch fixes the issue by allocating resources dynamically in the
driver probe and storing it as platform drvdata.

Fixes: d3da3eaef7f4 ("clk: mvebu: new driver for Armada CP110 system ...")
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/mvebu/cp110-system-controller.c