From 74118aa768ebac34f0c6123eb152fdcd8681bae0 Mon Sep 17 00:00:00 2001 From: Jingchang Lu Date: Mon, 23 Jun 2014 09:50:16 +0800 Subject: clk: ppc-corenet: Add CLK_OF_DECLARE support Signed-off-by: Jingchang Lu diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 279407a..60c0a01 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -88,7 +88,7 @@ config COMMON_CLK_AXI_CLKGEN config CLK_PPC_CORENET bool "Clock driver for PowerPC corenet platforms" - depends on PPC_E500MC && OF + depends on (PPC_E500MC || FSL_SOC) && OF ---help--- This adds the clock driver support for Freescale PowerPC corenet platforms using common clock framework. diff --git a/drivers/clk/clk-ppc-corenet.c b/drivers/clk/clk-ppc-corenet.c index 6f968f1..358dd4a 100644 --- a/drivers/clk/clk-ppc-corenet.c +++ b/drivers/clk/clk-ppc-corenet.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -238,6 +239,7 @@ err_clks: static const struct of_device_id clk_match[] __initconst = { { .compatible = "fixed-clock", .data = of_fixed_clk_setup, }, + { .compatible = "fsl,sys-clock", .data = of_fixed_clk_setup, }, { .compatible = "fsl,core-pll-clock", .data = core_pll_init, }, { .compatible = "fsl,core-mux-clock", .data = core_mux_init, }, {} @@ -278,3 +280,13 @@ static int __init ppc_corenet_clk_init(void) return platform_driver_register(&ppc_corenet_clk_driver); } subsys_initcall(ppc_corenet_clk_init); + +static void __init ls1021a_clocks_init(struct device_node *np) +{ + base = of_iomap(np, 0); + if (!base) + return; + + of_clk_init(clk_match); +} +CLK_OF_DECLARE(ls1021a, "fsl,ls1021a-clockgen", ls1021a_clocks_init); -- cgit v0.10.2