summaryrefslogtreecommitdiffstats
path: root/drivers/clk/versatile/clk-icst.c
Commit message (Collapse)AuthorAgeFilesLines
* clk: versatile: Remove CLK_IS_ROOTStephen Boyd2016-03-151-1/+1
| | | | | | | | This flag is a no-op now. Remove usage of the flag. Cc: Pawel Moll <pawel.moll@arm.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
* clk: versatile: mask VCO bits before writingLinus Walleij2016-02-101-0/+3
| | | | | | | | | | | | | | | | The Versatile syscon ICST driver OR:s the bits into place but forgets to mask the previous value, making the code only work if the register is zero or giving haphazard results. Mask the 19 bits used by the Versatile syscon interface register. Regression caused and now fixed by yours truly. Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: linux-clk@vger.kernel.org Fixes: 179c8fb3c2a6 ("clk: versatile-icst: convert to use regmap") Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
* clk: versatile-icst: add device tree supportLinus Walleij2015-12-151-1/+88
| | | | | | | | | | | This adds support for the ARM syscon ICST clocks to initialized directly from the device tree syscon node on ARM Integrator, Versatile and RealView reference designs. Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: linux-clk@vger.kernel.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* clk: versatile-icst: refactor to allocate regmap separatelyLinus Walleij2015-12-151-19/+28
| | | | | | | | | | | Break out the registration function so it creates a regmap and pass to the setup function, so the latter can be shared with a device tree probe function that already has a regmap. Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: linux-clk@vger.kernel.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* clk: versatile-icst: convert to use regmapLinus Walleij2015-12-151-28/+60
| | | | | | | | | | | Instead of passing around register bases, pass around a regmap in this driver. This refactoring make things so much easier when we later want to manage an ICST that is part of a syscon. Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: linux-clk@vger.kernel.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* clk: versatile-icst: fix memory leakLinus Walleij2015-10-231-1/+3
| | | | | | | | | | A static code checker found a memory leak in the Versatile ICST code. Fix it. Fixes: a183da637c52 "clk: versatile: respect parent rate in ICST clock" Reported-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
* clk: versatile: Remove clk.h and clkdev.h includesStephen Boyd2015-07-201-2/+3
| | | | | | | | | | | Clock provider drivers generally shouldn't include clk.h because it's the consumer API. Remove the include here because this is a provider driver. Also remove clkdev.h in files that aren't using it and replace them with slab.h in files that were relying on the implicit include of slab.h in clkdev.h. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
* clk: versatile: free icst on error returnColin Ian King2014-05-301-0/+1
| | | | | | | | | commit a183da63 introduced a new error return path that does not kfree icst if the kmemdup of desc->params fails. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mike Turquette <mturquette@linaro.org>
* clk/versatile: export symbols for impd1Arnd Bergmann2014-05-141-0/+1
| | | | | | | | | | The impd1 code on mach-integrator can be a loadable module, so we have to export icst_clk_register, integrator_impd1_clk_init and integrator_impd1_clk_exit. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mike Turquette <mturquette@linaro.org>
* clk: versatile: respect parent rate in ICST clockLinus Walleij2014-02-131-4/+16
| | | | | | | | | | | | | | If the ICST clock has a parent, respect the rate of the parent when calculating the clock frequency. As this involves modifying the ICST parameter struct, make a cloned copy (the divisor arrays should be safe) so we can update the .ref field. Do not define the reference clock on the Integrator as we have the reference clock from the device tree. Keep it everywhere else. Cc: Mike Turquette <mturquette@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* clk: versatile: pass a parent to the ICST clockLinus Walleij2014-02-131-0/+1
| | | | | | | | | As we want to actually define the parent frequency in the device tree for the ICST clocks, modify the clock registration function to take a parent argument. Cc: Mike Turquette <mturquette@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* clk: versatile: pass a name to ICST clock providerLinus Walleij2014-01-031-1/+2
| | | | | | | | | When we have more than one of these clocks in a system (such as on the IM-PD1) we need a mechanism to pass a name for the clock. Refactor to add this as an argument. Acked-by: Mike Turquette <mturquette@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* clk: fixup argument order when setting VCO parametersJonathan Austin2013-10-071-1/+1
| | | | | | | | | | | | | | The order of arguments in the call to vco_set() for the ICST clocks appears to have been switched in error, which results in the VCO not being initialised correctly. This in turn stops the integrated LCD on things like Integrator/CP from working correctly. This patch fixes the order and restores the expected functionality. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Austin <jonathan.austin@arm.com> Signed-off-by: Mike Turquette <mturquette@linaro.org> Cc: stable@vger.kernel.org
* clk: make ICST driver handle the VCO registersLinus Walleij2012-11-211-9/+51
| | | | | | | | | | | | | It turns out that all platforms using the ICST VCO are really just touching two registers, and in the same way as well: one register with the VCO configuration as such, and one lock register that makes it possible to write to the VCO. Factor this register read/write into the ICST driver so we can reuse it in the IM-PD1 driver. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mike Turquette <mturquette@linaro.org>
* clk: add GPLv2 headers to the Versatile clock filesLinus Walleij2012-11-211-0/+6
| | | | | | | | | | The GPLv2 headers were missing and the subsystem maintainer likes them so put them in. I am the copyright holder, so explicitly licensing these under the GPLv2. Reported-by: Mike Turquette <mturquette@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mike Turquette <mturquette@linaro.org>
* clk: add versatile ICST307 driverLinus Walleij2012-07-111-0/+100
The ICST307 VCO clock has a shared driver in the ARM architecture. This patch provides a wrapper into the common clock framework so we can use the implementation in the ARM architecture without duplicating the code until all ARM platforms using this VCO are moved over. At that point we can merge the driver from the ARM platform into the generic file altogether. Cc: Russell King <linux@arm.linux.org.uk> Cc: Mike Turquette <mturquette@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> [mturquette@linaro.org: removed versatile Kconfig] Signed-off-by: Mike Turquette <mturquette@linaro.org>
OpenPOWER on IntegriCloud