Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752152AbbEXPYJ (ORCPT ); Sun, 24 May 2015 11:24:09 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:48316 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751556AbbEXPYG (ORCPT ); Sun, 24 May 2015 11:24:06 -0400 From: Paul Burton To: CC: Paul Burton , Lars-Peter Clausen , Ralf Baechle , Deng-Cheng Zhu , Subject: [PATCH v5 22/37] MIPS: JZ4740: call jz4740_clock_init earlier Date: Sun, 24 May 2015 16:11:32 +0100 Message-ID: <1432480307-23789-23-git-send-email-paul.burton@imgtec.com> X-Mailer: git-send-email 2.4.1 In-Reply-To: <1432480307-23789-1-git-send-email-paul.burton@imgtec.com> References: <1432480307-23789-1-git-send-email-paul.burton@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.159.140] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2425 Lines: 82 Call jz4740_clock_init before any uses of jz4740_clock_bdata occur. This is in preparation for replacing uses of that struct with calls to clk_get_rate, which will allow the clocks to be migrated towards common clock framework & devicetree. Signed-off-by: Paul Burton Cc: Lars-Peter Clausen Cc: Ralf Baechle Cc: linux-mips@linux-mips.org --- Changes in v5: None Changes in v4: None Changes in v3: - Rebase. Changes in v2: None arch/mips/include/asm/mach-jz4740/clock.h | 2 ++ arch/mips/jz4740/clock.c | 3 +-- arch/mips/jz4740/time.c | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/asm/mach-jz4740/clock.h b/arch/mips/include/asm/mach-jz4740/clock.h index 16659cd..01d8468 100644 --- a/arch/mips/include/asm/mach-jz4740/clock.h +++ b/arch/mips/include/asm/mach-jz4740/clock.h @@ -20,6 +20,8 @@ enum jz4740_wait_mode { JZ4740_WAIT_MODE_SLEEP, }; +int jz4740_clock_init(void); + void jz4740_clock_set_wait_mode(enum jz4740_wait_mode mode); void jz4740_clock_udc_enable_auto_suspend(void); diff --git a/arch/mips/jz4740/clock.c b/arch/mips/jz4740/clock.c index 1b5f554..c257073 100644 --- a/arch/mips/jz4740/clock.c +++ b/arch/mips/jz4740/clock.c @@ -889,7 +889,7 @@ void jz4740_clock_resume(void) JZ_CLOCK_GATE_TCU | JZ_CLOCK_GATE_DMAC | JZ_CLOCK_GATE_UART0); } -static int jz4740_clock_init(void) +int jz4740_clock_init(void) { uint32_t val; @@ -921,4 +921,3 @@ static int jz4740_clock_init(void) return 0; } -arch_initcall(jz4740_clock_init); diff --git a/arch/mips/jz4740/time.c b/arch/mips/jz4740/time.c index 72b0cecb..78ed765 100644 --- a/arch/mips/jz4740/time.c +++ b/arch/mips/jz4740/time.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -115,6 +116,7 @@ void __init plat_time_init(void) uint32_t clk_rate; uint16_t ctrl; + jz4740_clock_init(); jz4740_timer_init(); clk_rate = jz4740_clock_bdata.ext_rate >> 4; -- 2.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/