From patchwork Wed Mar 13 05:05:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 2261521 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 1FBC53FD8C for ; Wed, 13 Mar 2013 05:12:06 +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 1UFdvm-0005cq-0y; Wed, 13 Mar 2013 05:08:50 +0000 Received: from mail-pb0-f45.google.com ([209.85.160.45]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFduM-00054V-9U for linux-arm-kernel@lists.infradead.org; Wed, 13 Mar 2013 05:07:23 +0000 Received: by mail-pb0-f45.google.com with SMTP id ro8so615595pbb.18 for ; Tue, 12 Mar 2013 22:07:20 -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=EQqfBkr/WhckK/BaffBxwy5HoaETq4sG6+w9aeLgSiwdcL463mPFpXlr9yDcYCxsni xG3tO1kMt07hVqHmgbEYNdj6v+CLZVNOv31uNQltm4em8NJA8OfptpmHrhTZLwDVxeYa Gtz9XXc6hS0wREN/N3pIr7pRNoZyq/erk5h90xvMQIepJWwS69NgPrwfazXj3tDUgc3I bs1WxVq3HYtULONpcnM6i/kYnrTCA4iEKF98uQt3b08Sp4yquwwT2MGdivEKAbIHMzPD FpYjLCgLAwcP2KyGS9MNaf1ajc5B8ol0s+A3htxb/eGzB6MZR3tE+UaePO9ZrX0p2bSP w6+Q== X-Received: by 10.68.25.138 with SMTP id c10mr43050137pbg.133.1363151240465; Tue, 12 Mar 2013 22:07:20 -0700 (PDT) Received: from localhost.localdomain ([67.198.145.34]) by mx.google.com with ESMTPS id ab1sm27947630pbd.37.2013.03.12.22.07.15 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 22:07:19 -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 v3 05/11] ARM: highbank: use clocksource_of_init for sp804 Date: Wed, 13 Mar 2013 13:05:36 +0800 Message-Id: <1363151142-32162-6-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1363151142-32162-1-git-send-email-haojian.zhuang@linaro.org> References: <1363151142-32162-1-git-send-email-haojian.zhuang@linaro.org> X-Gm-Message-State: ALoCoQnK1Frk0qAh/cbsOz158k6wT6ojbRzN5JBstijDbzUdvQ5UzzdVxcRAcnOn0xxrdEUIU+lM X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130313_010722_469001_376B5A71 X-CRM114-Status: GOOD ( 10.73 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.45 listed in list.dnswl.org] -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();