Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754080AbbG0OBb (ORCPT ); Mon, 27 Jul 2015 10:01:31 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:4337 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753291AbbG0OB0 (ORCPT ); Mon, 27 Jul 2015 10:01:26 -0400 From: Govindraj Raja To: , , "Daniel Lezcano" , CC: Thomas Gleixner , Andrew Bresticker , James Hartley , "Govindraj Raja" , Damien Horsley , James Hogan , Ezequiel Garcia , Ezequiel Garcia Subject: [PATCH v4 3/7] clocksource: mips-gic: Split clocksource and clockevent initialization Date: Mon, 27 Jul 2015 15:00:14 +0100 Message-ID: <1438005618-27003-4-git-send-email-govindraj.raja@imgtec.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438005618-27003-1-git-send-email-govindraj.raja@imgtec.com> References: <1438005618-27003-1-git-send-email-govindraj.raja@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.167.141] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1934 Lines: 59 From: Ezequiel Garcia This is preparation work for the introduction of clockevent frequency update with a clock notifier. This is only possible when the device is passed a clk struct, so let's split the legacy and devicetree initialization. Reviewed-by: Andrew Bresticker Signed-off-by: Ezequiel Garcia --- drivers/clocksource/mips-gic-timer.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c index c4352f0..22a4daf 100644 --- a/drivers/clocksource/mips-gic-timer.c +++ b/drivers/clocksource/mips-gic-timer.c @@ -142,11 +142,6 @@ static void __init __gic_clocksource_init(void) ret = clocksource_register_hz(&gic_clocksource, gic_frequency); if (ret < 0) pr_warn("GIC: Unable to register clocksource\n"); - - gic_clockevent_init(); - - /* And finally start the counter */ - gic_start_count(); } void __init gic_clocksource_init(unsigned int frequency) @@ -156,6 +151,10 @@ void __init gic_clocksource_init(unsigned int frequency) GIC_LOCAL_TO_HWIRQ(GIC_LOCAL_INT_COMPARE); __gic_clocksource_init(); + gic_clockevent_init(); + + /* And finally start the counter */ + gic_start_count(); } static void __init gic_clocksource_of_init(struct device_node *node) @@ -187,6 +186,10 @@ static void __init gic_clocksource_of_init(struct device_node *node) } __gic_clocksource_init(); + gic_clockevent_init(); + + /* And finally start the counter */ + gic_start_count(); } CLOCKSOURCE_OF_DECLARE(mips_gic_timer, "mti,gic-timer", gic_clocksource_of_init); -- 1.9.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/