From patchwork Tue Mar 12 17:08:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 2257421 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 C8767DF23A for ; Tue, 12 Mar 2013 17:13:57 +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 1UFSim-0005LX-Qy; Tue, 12 Mar 2013 17:10:41 +0000 Received: from mail-ia0-x22d.google.com ([2607:f8b0:4001:c02::22d]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFShO-0004wb-7x for linux-arm-kernel@lists.infradead.org; Tue, 12 Mar 2013 17:09:15 +0000 Received: by mail-ia0-f173.google.com with SMTP id h37so62223iak.32 for ; Tue, 12 Mar 2013 10:09:13 -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=WaL8R1Idn5U4u+Kyod21pCgk3ItuORjnwi3m2JJi8hw=; b=Zv8ARc9gseuofUHwFTaP7HQmLpk+8wUr6xhVs/NtY7xAMFOnR4Mf+Dpy2lqzhsYzu8 9ki+zOwsmrK3U5Xoe0TjTG6GEcvVN0+ukhmFlu2n3VC0x7fSK7+qrs7Ft5i4Ib5p2VK5 Y+IYBtB+RG1I9hwrSssohACn3JLJJNWISrbeP9d4MSojmDjtF+6vz5Q2gzR7w2ec4VsG Kl5Hq38dWWTIOT7knq2TOEED8Vny2haSCfLlxtw9ls62eiz5JV8GV8KcjOceEYvUYNjl 82G3lljNj8LeM275DsH00binE0o2AJ3UxK6D+MswngnfIgpjHUHTAHRCn+3hEgpWawwf 01rQ== X-Received: by 10.50.212.105 with SMTP id nj9mr12463762igc.17.1363108153193; Tue, 12 Mar 2013 10:09:13 -0700 (PDT) Received: from localhost.localdomain ([140.206.155.72]) by mx.google.com with ESMTPS id xc3sm20593825igb.10.2013.03.12.10.09.08 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 10:09:12 -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 04/14] ARM: highbank: use clocksource_of_init for sp804 Date: Wed, 13 Mar 2013 01:08:33 +0800 Message-Id: <1363108124-17484-5-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: ALoCoQlZylwhqNmmPBvmO/CcPvLvf0utAXa51Rhcn47TX8F2iZx1IxLVZ0SRQgwDAiOMOZvQklNO X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130312_130914_926383_2190FB4B X-CRM114-Status: GOOD ( 10.95 ) 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 Since sp804 hardware information could be stored in DTS file, remove those ioremap operations. Use clocksource_of_init() instead. Signed-off-by: Haojian Zhuang --- arch/arm/boot/dts/ecx-common.dtsi | 4 +++- arch/arm/mach-highbank/highbank.c | 19 +------------------ 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/arch/arm/boot/dts/ecx-common.dtsi b/arch/arm/boot/dts/ecx-common.dtsi index d61b535..7ae5b2d 100644 --- a/arch/arm/boot/dts/ecx-common.dtsi +++ b/arch/arm/boot/dts/ecx-common.dtsi @@ -105,8 +105,10 @@ compatible = "arm,sp804", "arm,primecell"; reg = <0xfff34000 0x1000>; interrupts = <0 18 4>; - clocks = <&pclk>; + clocks = <&pclk &pclk>; clock-names = "apb_pclk"; + arm,sp804-clocksource = <0x20>; + arm,sp804-clockevent = <0>; }; rtc@fff35000 { diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index cfd843b..7829c2d 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c @@ -91,33 +91,16 @@ static void __init highbank_init_irq(void) #endif } -static struct clk_lookup lookup = { - .dev_id = "sp804", - .con_id = NULL, -}; - static void __init highbank_timer_init(void) { - int irq; struct device_node *np; - void __iomem *timer_base; /* Map system registers */ np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); sregs_base = of_iomap(np, 0); WARN_ON(!sregs_base); - np = of_find_compatible_node(NULL, NULL, "arm,sp804"); - timer_base = of_iomap(np, 0); - WARN_ON(!timer_base); - irq = irq_of_parse_and_map(np, 0); - - of_clk_init(NULL); - lookup.clk = of_clk_get(np, 0); - clkdev_add(&lookup); - - sp804_clocksource_and_sched_clock_init(timer_base + 0x20, "timer1"); - sp804_clockevents_init(timer_base, irq, "timer0"); + clocksource_of_init(); twd_local_timer_of_register();