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: 15293 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3A53123E3E for ; Tue, 12 Mar 2013 17:09:15 +0000 (UTC) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by fiordland.canonical.com (Postfix) with ESMTP id E6967A18777 for ; Tue, 12 Mar 2013 17:09:14 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id fr13so343vbb.3 for ; Tue, 12 Mar 2013 10:09:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=WaL8R1Idn5U4u+Kyod21pCgk3ItuORjnwi3m2JJi8hw=; b=PqBJTYV6WOwXxK37mATEJMCCXNPf35/wQqzDqFuKzL9ZUQJhe6m+tu9sWoDdrwRgl5 5j4HY69hFiS3jt1kTGiPPAIDvW5eSi7C89o2Y7IlhyjUBIkjlhZFOxC2xc7tRD84WDeO PWnw7ELQyKUQYRnXRfqwYPdPWDzsGW1fHI8GvsEYC5R1bupim+4LMzI+mB8dDdTryRb+ unX6NcDyFyECKhC7LcJklAd4MVAVRMv+yZbnkXf2xHBxzkzeUiGQWjXn5VjRkm2ypQc2 xk2ycW3nnALD0qeEdy8/dsd1+2/Hnn1Lrl0Vi6hd0x8iGlgdwNm35e1eKX2lHhIGOFn+ Ga3A== X-Received: by 10.58.48.166 with SMTP id m6mr6851387ven.59.1363108154294; Tue, 12 Mar 2013 10:09:14 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp138387veb; Tue, 12 Mar 2013 10:09:13 -0700 (PDT) X-Received: by 10.50.12.229 with SMTP id b5mr12123784igc.105.1363108153605; Tue, 12 Mar 2013 10:09:13 -0700 (PDT) Received: from mail-ie0-x22d.google.com (mail-ie0-x22d.google.com [2607:f8b0:4001:c03::22d]) by mx.google.com with ESMTPS id yh4si22993615igb.39.2013.03.12.10.09.13 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 10:09:13 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:4001:c03::22d is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=2607:f8b0:4001:c03::22d; Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:4001:c03::22d is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) smtp.mail=haojian.zhuang@linaro.org Received: by mail-ie0-f173.google.com with SMTP id 9so104499iec.18 for ; Tue, 12 Mar 2013 10:09:13 -0700 (PDT) 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 Cc: patches@linaro.org, Haojian Zhuang 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: ALoCoQmHhbozMWvLceoHHH8A3jIGTXJD+meBgGRzgXTLTOOJRDwbqR9uVMN5IgEpRGbN3sCUHLsP 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();