From patchwork Tue Mar 12 17:08:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 2257461 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 3A2CADF23A for ; Tue, 12 Mar 2013 17:15:33 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFSk2-00060j-Aq; Tue, 12 Mar 2013 17:11:58 +0000 Received: from mail-ia0-x229.google.com ([2607:f8b0:4001:c02::229]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFShg-0004zb-1e for linux-arm-kernel@lists.infradead.org; Tue, 12 Mar 2013 17:09:33 +0000 Received: by mail-ia0-f169.google.com with SMTP id j5so64514iaf.28 for ; Tue, 12 Mar 2013 10:09:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=o1Cy9/E9cZd05hM59ECIqClbx+yxL8zP8djWZyWTNbo=; b=FWouSkYruw9SeApTZWIBV8QCC1FfuQM8HSyuZgFM3jZTWxoTdQftid1WmpustMh3ML MfUTqwtWaDKizwpW7W0Q/fRP0sBTc+IYEIk+omTJcaBSzAf1DMQhYFR07zwlNgs5lkBy 9yw2mz9oZahAX7fdNBB3M81KopkePor23wATdLKFwI5D3aecHjNzaVG2dVOfr10RMDrN IGkwHMKALkz4116kbPlf7UzIlk5AEYUZOD/N47EjP4hsMYsNLJSsxjgvhjl3tV9NmxQW UHbIGgbAUmNJrHU7m2559nP7zGgmlr+dUrNi+CkDWv7tYjoMzKACqtd/bQPHbuZX6Vlt er4A== X-Received: by 10.42.155.136 with SMTP id u8mr13184815icw.26.1363108162766; Tue, 12 Mar 2013 10:09:22 -0700 (PDT) Received: from localhost.localdomain ([140.206.155.72]) by mx.google.com with ESMTPS id xc3sm20593825igb.10.2013.03.12.10.09.18 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 10:09:22 -0700 (PDT) From: Haojian Zhuang To: linux@arm.linux.org.uk, linus.walleij@linaro.org, arnd@arndb.de, olof@lixom.net, rob.herring@calxeda.com, linux-arm-kernel@lists.infradead.org, pawel.moll@arm.com, swarren@nvidia.com, john.stultz@linaro.org, tglx@linutronix.de, mturquette@linaro.org Subject: [PATCH v2 06/14] ARM: vexpress: use clocksource_of_init for sp804 Date: Wed, 13 Mar 2013 01:08:35 +0800 Message-Id: <1363108124-17484-7-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1363108124-17484-1-git-send-email-haojian.zhuang@linaro.org> References: <1363108124-17484-1-git-send-email-haojian.zhuang@linaro.org> X-Gm-Message-State: ALoCoQlw7e3LIPtQQvRhED/I/1nYai32O069AGN6rMHuK2SCnqWKyo8sjbJ1o5pWoYbQTiDgnUIT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130312_130932_200081_78390E7B X-CRM114-Status: GOOD ( 12.66 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Haojian Zhuang , patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Remove all code to parse sp804. Use clocksource_of_init() instead since all these code are implemented in sp804 driver already. Signed-off-by: Haojian Zhuang --- arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 2 ++ arch/arm/boot/dts/vexpress-v2m.dtsi | 2 ++ arch/arm/boot/dts/vexpress-v2p-ca9.dts | 2 ++ arch/arm/mach-vexpress/Kconfig | 1 + arch/arm/mach-vexpress/v2m.c | 13 ++----------- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi index ac870fb..3fa798f 100644 --- a/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +++ b/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi @@ -183,6 +183,8 @@ interrupts = <2>; clocks = <&v2m_sysctl 0>, <&v2m_sysctl 1>, <&smbclk>; clock-names = "timclken1", "timclken2", "apb_pclk"; + arm,sp804-clocksource = <0x20>; + arm,sp804-clockevent = <0>; }; v2m_timer23: timer@120000 { diff --git a/arch/arm/boot/dts/vexpress-v2m.dtsi b/arch/arm/boot/dts/vexpress-v2m.dtsi index f142036..86e4046 100644 --- a/arch/arm/boot/dts/vexpress-v2m.dtsi +++ b/arch/arm/boot/dts/vexpress-v2m.dtsi @@ -182,6 +182,8 @@ interrupts = <2>; clocks = <&v2m_sysctl 0>, <&v2m_sysctl 1>, <&smbclk>; clock-names = "timclken1", "timclken2", "apb_pclk"; + arm,sp804-clocksource = <0x20>; + arm,sp804-clockevent = <0>; }; v2m_timer23: timer@12000 { diff --git a/arch/arm/boot/dts/vexpress-v2p-ca9.dts b/arch/arm/boot/dts/vexpress-v2p-ca9.dts index 1420bb1..a2eba95 100644 --- a/arch/arm/boot/dts/vexpress-v2p-ca9.dts +++ b/arch/arm/boot/dts/vexpress-v2p-ca9.dts @@ -98,6 +98,8 @@ <0 49 4>; clocks = <&oscclk2>, <&oscclk2>; clock-names = "timclk", "apb_pclk"; + arm,sp804-clocksource = <0x20>; + arm,sp804-clockevent = <0>; }; watchdog@100e5000 { diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index 52d315b..ff78c15 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig @@ -5,6 +5,7 @@ config ARCH_VEXPRESS select ARM_GIC select ARM_TIMER_SP804 select CLKDEV_LOOKUP + select CLKSRC_OF select COMMON_CLK select COMMON_CLK_VERSATILE select CPU_V7 diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 51e8701..bb599d3 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -431,19 +432,9 @@ void __init v2m_dt_init_early(void) static void __init v2m_dt_timer_init(void) { - struct device_node *node = NULL; - vexpress_clk_of_init(); - do { - node = of_find_compatible_node(node, NULL, "arm,sp804"); - } while (node && vexpress_get_site_by_node(node) != VEXPRESS_SITE_MB); - if (node) { - pr_info("Using SP804 '%s' as a clock & events source\n", - node->full_name); - v2m_sp804_init(of_iomap(node, 0), - irq_of_parse_and_map(node, 0)); - } + clocksource_of_init(); if (arch_timer_of_register() != 0) twd_local_timer_of_register();