From 66e0c3991c5a1735dd8add77ab8aff5005f57681 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Wed, 15 Apr 2009 12:39:23 -0700 Subject: davinci: Add clock init call to common init routine All of the davinci SoCs need to call davinci_clk_init() so put the call in the common init routine. Signed-off-by: Mark A. Greer Signed-off-by: Kevin Hilman --- arch/arm/mach-davinci/common.c | 9 +++++++++ arch/arm/mach-davinci/dm355.c | 2 +- arch/arm/mach-davinci/dm644x.c | 2 +- arch/arm/mach-davinci/dm646x.c | 2 +- arch/arm/mach-davinci/include/mach/common.h | 1 + 5 files changed, 13 insertions(+), 3 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c index 29b3a8d5121..2e5b888e6ca 100644 --- a/arch/arm/mach-davinci/common.c +++ b/arch/arm/mach-davinci/common.c @@ -17,6 +17,8 @@ #include #include +#include "clock.h" + struct davinci_soc_info davinci_soc_info; EXPORT_SYMBOL(davinci_soc_info); @@ -75,6 +77,13 @@ void __init davinci_common_init(struct davinci_soc_info *soc_info) davinci_soc_info.cpu_id = dip->cpu_id; pr_info("DaVinci %s variant 0x%x\n", dip->name, dip->variant); + if (davinci_soc_info.cpu_clks) { + ret = davinci_clk_init(davinci_soc_info.cpu_clks); + + if (ret != 0) + goto err; + } + return; err: diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index 0f724c06008..e93840a814e 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c @@ -551,12 +551,12 @@ static struct davinci_soc_info davinci_soc_info_dm355 = { .jtag_id_base = IO_ADDRESS(0x01c40028), .ids = dm355_ids, .ids_num = ARRAY_SIZE(dm355_ids), + .cpu_clks = dm355_clks, }; void __init dm355_init(void) { davinci_common_init(&davinci_soc_info_dm355); - davinci_clk_init(dm355_clks); davinci_mux_register(dm355_pins, ARRAY_SIZE(dm355_pins));; } diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 9bcd98c6820..648160c2960 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c @@ -491,12 +491,12 @@ static struct davinci_soc_info davinci_soc_info_dm644x = { .jtag_id_base = IO_ADDRESS(0x01c40028), .ids = dm644x_ids, .ids_num = ARRAY_SIZE(dm644x_ids), + .cpu_clks = dm644x_clks, }; void __init dm644x_init(void) { davinci_common_init(&davinci_soc_info_dm644x); - davinci_clk_init(dm644x_clks); davinci_mux_register(dm644x_pins, ARRAY_SIZE(dm644x_pins)); } diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index cd86bb78e0c..7cf9705be9c 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c @@ -471,12 +471,12 @@ static struct davinci_soc_info davinci_soc_info_dm646x = { .jtag_id_base = IO_ADDRESS(0x01c40028), .ids = dm646x_ids, .ids_num = ARRAY_SIZE(dm646x_ids), + .cpu_clks = dm646x_clks, }; void __init dm646x_init(void) { davinci_common_init(&davinci_soc_info_dm646x); - davinci_clk_init(dm646x_clks); davinci_mux_register(dm646x_pins, ARRAY_SIZE(dm646x_pins)); } diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h index ece1cd42738..97782a76588 100644 --- a/arch/arm/mach-davinci/include/mach/common.h +++ b/arch/arm/mach-davinci/include/mach/common.h @@ -33,6 +33,7 @@ struct davinci_soc_info { void __iomem *jtag_id_base; struct davinci_id *ids; unsigned long ids_num; + struct davinci_clk *cpu_clks; }; extern struct davinci_soc_info davinci_soc_info; -- cgit v1.2.3