From patchwork Fri Apr 26 12:41:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jamie Iles X-Patchwork-Id: 2493541 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id F21B73FC64 for ; Fri, 26 Apr 2013 12:41:43 +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 1UVhy6-00072y-QY; Fri, 26 Apr 2013 12:41:39 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UVhy4-0003Dg-1r; Fri, 26 Apr 2013 12:41:36 +0000 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UVhy1-0003Cv-JI for linux-arm-kernel@lists.infradead.org; Fri, 26 Apr 2013 12:41:34 +0000 Received: by mail-wi0-f173.google.com with SMTP id c10so552287wiw.0 for ; Fri, 26 Apr 2013 05:41:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent:x-gm-message-state; bh=/AhnHdIoif60j/pCHwTSRR+WvjUDP17L7pD9jQKQGUY=; b=W+n2gkB+isplqhpcpwyp04tSAhGuM6LyN4k1Nz/v3x5F/drkiZ02e29gyR8F3LBYgg lzMgk6Bzt7cVpjYyRPpAdc+g5wAcnvmkDF7ndc3ziVOFj8pLao75SCArVcF54ubuZX+d naYRErefzeaNYkkvbIdfoMSRPJEdgGgddNhCbkkp1SuwkxXSn/J1Js+SiGNzyKbNyaLY 9VlzIDlAlACN1Ic3INHSB99svpZlxPYfC2Wd37urmxaigh3u+XeANKubAIdiVL/oD4Q7 zorpc583/HSrkAu+uzeApAOjcX03I1XBEzS5lUKnOTBIiM6X5nPpJ1eaX5wJ3pTOP5pq NX2A== X-Received: by 10.180.13.166 with SMTP id i6mr3768349wic.21.1366980091127; Fri, 26 Apr 2013 05:41:31 -0700 (PDT) Received: from localhost ([94.12.249.33]) by mx.google.com with ESMTPSA id er1sm3256307wib.5.2013.04.26.05.41.28 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 26 Apr 2013 05:41:30 -0700 (PDT) Date: Fri, 26 Apr 2013 13:41:28 +0100 From: Jamie Iles To: Pavel Machek Subject: Re: dw_apb_timer_of.c: remove parts that were picoxcell-specific Message-ID: <20130426124128.GB6946@page> References: <20130426121433.GA16249@amd.pavel.ucw.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20130426121433.GA16249@amd.pavel.ucw.cz> User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQkZ8DsxMl8h9wl4elAhSLSRxg/uQmDlgOz6Ai2NfxVt6n9yBAbRuqp5KjIUaFL0lYZz2NgC X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130426_084133_752257_EE1C78BD X-CRM114-Status: GOOD ( 16.51 ) 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: wd@denx.de, arnd@arndb.de, johnstul@us.ibm.com, kernel list , dinguyen@altera.com, olof@lixom.net, jamie@jamieiles.com, tglx@linutronix.de, linux-arm-kernel@lists.infradead.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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hi Pavel, On Fri, Apr 26, 2013 at 02:14:34PM +0200, Pavel Machek wrote: > diff --git a/arch/arm/mach-picoxcell/common.c b/arch/arm/mach-picoxcell/common.c > index 70b441a..22759f5 100644 > --- a/arch/arm/mach-picoxcell/common.c > +++ b/arch/arm/mach-picoxcell/common.c > @@ -84,11 +84,39 @@ static void picoxcell_wdt_restart(char mode, const char *cmd) > } > } > > +static const struct of_device_id picochip_rtc_ids[] __initconst = { > + { .compatible = "picochip,pc3x2-rtc" }, > + { /* Sentinel */ }, > +}; > + > +static void __iomem *sched_io_base; > + > +static u32 read_sched_clock(void) > +{ > + return __raw_readl(sched_io_base); > +} > + > +static void __init timer_init(void) > +{ > + u32 rate; > + > + dw_apb_timer_init(0); > + > + sched_timer = of_find_matching_node(timer, osctimer_ids); > + if (!sched_timer) > + panic("No suitable timer for scheduler clock\n"); > + > + timer_get_base_and_rate(sched_timer, &sched_io_base, &rate); > + of_node_put(sched_timer); This doesn't work as osctimer_ids is private to the dw_apb_timer files as is timer_get_base_and_rate. The other timer is unused in picoxcell though so dw_apb_timer_init(1), something like the patch below on top of yours. Thanks, Jamie diff --git i/arch/arm/mach-picoxcell/common.c w/arch/arm/mach-picoxcell/common.c index 1484841..a92d203 100644 --- i/arch/arm/mach-picoxcell/common.c +++ w/arch/arm/mach-picoxcell/common.c @@ -82,32 +82,9 @@ static void picoxcell_wdt_restart(char mode, const char *cmd) } } -static const struct of_device_id picochip_rtc_ids[] __initconst = { - { .compatible = "picochip,pc3x2-rtc" }, - { /* Sentinel */ }, -}; - -static void __iomem *sched_io_base; - -static u32 read_sched_clock(void) -{ - return __raw_readl(sched_io_base); -} - static void __init timer_init(void) { - u32 rate; - - dw_apb_timer_init(0); - - sched_timer = of_find_matching_node(timer, osctimer_ids); - if (!sched_timer) - panic("No suitable timer for scheduler clock\n"); - - timer_get_base_and_rate(sched_timer, &sched_io_base, &rate); - of_node_put(sched_timer); - - setup_sched_clock(read_sched_clock, 32, rate); + dw_apb_timer_init(1); } DT_MACHINE_START(PICOXCELL, "Picochip picoXcell")