summaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-05-27 21:20:17 -0700
committerOlof Johansson <olof@lixom.net>2013-05-27 21:20:17 -0700
commitff753f43dab762db2d177e0b0be029e4b111289d (patch)
tree1144b64d069619f307230d31df3f486c8c25c08b /drivers/clk
parente4aa937ec75df0eea0bee03bffa3303ad36c986b (diff)
parent49932f5ef13fa6a5a8bd71cf2f0b721d0e0b495d (diff)
Merge tag 'nomadik-dt-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into next/dt
From Linus Walleij: Device tree patches for the Nomadik machine: - Move clock registration to the device tree - Support probing the MTU timer from the device tree - Register user LED and user key in the device tree - Update defconfig to account for user LED and user key - Move pin control mappings to the device tree * tag 'nomadik-dt-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: nomadik: move the pin configuration to DT ARM: nomadik: add led and key for S8815 ARM: nomadik: register clocksource from device tree ARM: nomadik: convert all clocks except timer to dt clocksource: nomadik-mtu: support of probe Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/clk-nomadik.c41
1 files changed, 7 insertions, 34 deletions
diff --git a/drivers/clk/clk-nomadik.c b/drivers/clk/clk-nomadik.c
index 6b4c70f7d23d..4a1ab27ee87f 100644
--- a/drivers/clk/clk-nomadik.c
+++ b/drivers/clk/clk-nomadik.c
@@ -3,46 +3,19 @@
#include <linux/err.h>
#include <linux/io.h>
#include <linux/clk-provider.h>
+#include <linux/of.h>
/*
* The Nomadik clock tree is described in the STN8815A12 DB V4.2
* reference manual for the chip, page 94 ff.
*/
+static const __initconst struct of_device_id cpu8815_clk_match[] = {
+ { .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
+ { /* sentinel */ }
+};
+
void __init nomadik_clk_init(void)
{
- struct clk *clk;
-
- clk = clk_register_fixed_rate(NULL, "apb_pclk", NULL, CLK_IS_ROOT, 0);
- clk_register_clkdev(clk, "apb_pclk", NULL);
- clk_register_clkdev(clk, NULL, "gpio.0");
- clk_register_clkdev(clk, NULL, "gpio.1");
- clk_register_clkdev(clk, NULL, "gpio.2");
- clk_register_clkdev(clk, NULL, "gpio.3");
- clk_register_clkdev(clk, NULL, "rng");
- clk_register_clkdev(clk, NULL, "fsmc-nand");
-
- /*
- * The 2.4 MHz TIMCLK reference clock is active at boot time, this is
- * actually the MXTALCLK @19.2 MHz divided by 8. This clock is used
- * by the timers and watchdog. See page 105 ff.
- */
- clk = clk_register_fixed_rate(NULL, "TIMCLK", NULL, CLK_IS_ROOT,
- 2400000);
- clk_register_clkdev(clk, NULL, "mtu0");
- clk_register_clkdev(clk, NULL, "mtu1");
-
- /*
- * At boot time, PLL2 is set to generate a set of fixed clocks,
- * one of them is CLK48, the 48 MHz clock, routed to the UART, MMC/SD
- * I2C, IrDA, USB and SSP blocks.
- */
- clk = clk_register_fixed_rate(NULL, "CLK48", NULL, CLK_IS_ROOT,
- 48000000);
- clk_register_clkdev(clk, NULL, "uart0");
- clk_register_clkdev(clk, NULL, "uart1");
- clk_register_clkdev(clk, NULL, "mmci");
- clk_register_clkdev(clk, NULL, "ssp");
- clk_register_clkdev(clk, NULL, "nmk-i2c.0");
- clk_register_clkdev(clk, NULL, "nmk-i2c.1");
+ of_clk_init(cpu8815_clk_match);
}