From patchwork Fri Feb 14 10:29:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 3651741 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3FD8F9F382 for ; Fri, 14 Feb 2014 10:34:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6FBD62020E for ; Fri, 14 Feb 2014 10:34:28 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 68E47201CE for ; Fri, 14 Feb 2014 10:34:27 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WEG42-0008Hy-4C; Fri, 14 Feb 2014 10:32:11 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WEG3U-0004m2-1l; Fri, 14 Feb 2014 10:31:36 +0000 Received: from mail-wi0-f180.google.com ([209.85.212.180]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WEG2V-0004c8-EF for linux-arm-kernel@lists.infradead.org; Fri, 14 Feb 2014 10:30:40 +0000 Received: by mail-wi0-f180.google.com with SMTP id hm4so311029wib.7 for ; Fri, 14 Feb 2014 02:30:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xlOGsh47MdMQeXfTgXKvyhbl/WP2lqtVD5zQQZnfFj0=; b=UvDaxnvogG7YZKgB7y5QtwZEnQ+0VL7GO3A7IYH9hVWtoa0P8H2/YJXVinpcDnNWXA 12adrYSzDGN/p0yLaZoKdJVqsduafTOswQN6dHR4aKA+DwT7WbIKtBwV/WDoj90VUuAP VBsbPlDS3yItKSOuGVueLsFSSM6ycASEFFjZsP3q+2g2JZIjiqvpQEgLFgcMobN5qT7t uaey3vJ+0+D4JN6C3NBbSL4guI/ZYPVB0ij+BDdVTwtNh6iPp6mTRQ73nGPRTX8wCCNZ VHwyTeyVTV0kZS9reFp49GNtyyHgfizxYEKl2G1okRDqJJSrfOfLCGKaAnUZHFFr/4e6 l/xg== X-Gm-Message-State: ALoCoQkfBVEd++/p1+ZGIAOysjOMmF/V/8CoO16cpnvnmjF05akC3E+9hzu9enStqxfYOKOaUVJO X-Received: by 10.180.89.225 with SMTP id br1mr1590507wib.38.1392373808566; Fri, 14 Feb 2014 02:30:08 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id t6sm3227388wix.4.2014.02.14.02.30.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Feb 2014 02:30:07 -0800 (PST) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Will Deacon , Jonathan Austin Subject: [PATCH 5/6] ARM: integrator: register sched_clock directly Date: Fri, 14 Feb 2014 11:29:30 +0100 Message-Id: <1392373771-17303-6-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1392373771-17303-1-git-send-email-linus.walleij@linaro.org> References: <1392373771-17303-1-git-send-email-linus.walleij@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140214_053035_781557_3F1B5C2F X-CRM114-Status: GOOD ( 12.00 ) X-Spam-Score: -2.6 (--) Cc: Linus Walleij , Russell King , Arnd Bergmann 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 X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The detour through plat-versatile/sched-clock.c is hard to migrate to multiplatform set-up and it's very little code being duplicated so let's just inline the sched_clock registration and cut one more dependency to plat-versatile. This also makes this sched_clock implementation compulsory. Cc: Will Deacon Cc: Jonathan Austin Cc: Russell King Signed-off-by: Linus Walleij --- arch/arm/mach-integrator/integrator_cp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index c97ab88897cf..a938242b0c95 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -36,7 +37,6 @@ #include #include -#include #include "hardware.h" #include "cm.h" @@ -225,11 +225,14 @@ static struct clcd_board clcd_data = { #define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28) +static u64 notrace intcp_read_sched_clock(void) +{ + return readl(REFCOUNTER); +} + static void __init intcp_init_early(void) { -#ifdef CONFIG_PLAT_VERSATILE_SCHED_CLOCK - versatile_sched_clock_init(REFCOUNTER, 24000000); -#endif + sched_clock_register(intcp_read_sched_clock, 32, 24000000); } static const struct of_device_id fpga_irq_of_match[] __initconst = {