From patchwork Wed Jan 21 18:36:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 5680341 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 14EDB9F358 for ; Wed, 21 Jan 2015 20:01:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 358A12046F for ; Wed, 21 Jan 2015 20:01:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B64D204DF for ; Wed, 21 Jan 2015 20:01:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753131AbbAUUBX (ORCPT ); Wed, 21 Jan 2015 15:01:23 -0500 Received: from smtp5.ore.mailhop.org ([54.186.10.118]:57385 "EHLO smtp5.ore.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753080AbbAUUBW (ORCPT ); Wed, 21 Jan 2015 15:01:22 -0500 X-Greylist: delayed 4866 seconds by postgrey-1.27 at vger.kernel.org; Wed, 21 Jan 2015 15:01:22 EST Received: from [104.193.169.186] (helo=atomide.com) by smtp5.ore.mailhop.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1YE0Bz-0007E5-4H; Wed, 21 Jan 2015 18:39:51 +0000 X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 104.193.169.186 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX19pOVgqi8QZbgcBrzUptPV1 Date: Wed, 21 Jan 2015 10:36:16 -0800 From: Tony Lindgren To: Marc Zyngier Cc: Stephen Warren , Thierry Reding , Alexandre Courbot , Benoit Cousson , Nishanth Menon , Santosh Shilimkar , Shawn Guo , Sascha Hauer , Kukjin Kim , Pankaj Dubey , Simon Horman , Magnus Damm , Linus Walleij , Michal Simek , Rob Herring , Mark Rutland , Jason Cooper , Thomas Gleixner , Stefan Agner , "linux-arm-kernel@lists.infradead.org" , "linux-samsung-soc@vger.kernel.org" , "linux-omap@vger.kernel.org" , Felipe Balbi Subject: Re: [PATCH v4 13/21] ARM: omap: convert wakeupgen to stacked domains Message-ID: <20150121183615.GS7718@atomide.com> References: <1421660655-21394-1-git-send-email-marc.zyngier@arm.com> <1421660655-21394-14-git-send-email-marc.zyngier@arm.com> <20150121163031.GR7718@atomide.com> <54BFE05E.9080403@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <54BFE05E.9080403@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 * Marc Zyngier [150121 09:25]: > On 21/01/15 16:30, Tony Lindgren wrote: > > > I gave this a quick boot test on am437x-gp-evm and the > > interrupts look OK with the fix also applied: > > > > # cat /proc/interrupts > > CPU0 > > 16: 657 WUGEN 68 gp_timer > > 18: 0 WUGEN 9 l3-dbg-irq > > 19: 0 WUGEN 10 l3-app-irq > > 20: 5 WUGEN 12 edma > > 22: 0 WUGEN 14 edma_error > > 23: 96 WUGEN 72 OMAP UART0 > > 33: 0 44e07000.gpio 6 mmc0 > > 158: 52 WUGEN 70 44e0b000.i2c > > 159: 0 WUGEN 71 4802a000.i2c > > 160: 35 WUGEN 64 mmc0 > > 161: 0 WUGEN 40 4a100000.ethernet > > 162: 7739 WUGEN 41 4a100000.ethernet > > 163: 7608 WUGEN 42 4a100000.ethernet > > 164: 0 WUGEN 43 4a100000.ethernet > > 170: 0 WUGEN 100 gpmc > > 180: 0 WUGEN 7 tps65218 > > IPI0: 0 CPU wakeup interrupts > > IPI1: 0 Timer broadcast interrupts > > IPI2: 0 Rescheduling interrupts > > IPI3: 0 Function call interrupts > > IPI4: 0 Single function call interrupts > > IPI5: 0 CPU stop interrupts > > IPI6: 0 IRQ work interrupts > > IPI7: 0 completion interrupts > > Err: 0 > > Interesting. No TWD timer on this one? Good question, adding Felipe to cc. It eems to be there in the TRM in "Table 2-3. L4_PER Peripheral Memory Map" as MPU_PRV_TIMERS. Also seems to actually work with the attached patch: # cat /proc/interrupts CPU0 16: 0 WUGEN 67 gp_timer 17: 529 GIC 29 twd 18: 0 WUGEN 9 l3-dbg-irq 19: 0 WUGEN 10 l3-app-irq 20: 5 WUGEN 12 edma 22: 0 WUGEN 14 edma_error 23: 130 WUGEN 72 OMAP UART0 34: 0 44e07000.gpio 6 mmc0 159: 52 WUGEN 70 44e0b000.i2c 160: 0 WUGEN 71 4802a000.i2c 161: 35 WUGEN 64 mmc0 162: 0 WUGEN 40 4a100000.ethernet 163: 8033 WUGEN 41 4a100000.ethernet 164: 7769 WUGEN 42 4a100000.ethernet 165: 0 WUGEN 43 4a100000.ethernet 171: 0 WUGEN 100 gpmc 181: 0 WUGEN 7 tps65218 IPI0: 0 CPU wakeup interrupts IPI1: 0 Timer broadcast interrupts IPI2: 0 Rescheduling interrupts IPI3: 0 Function call interrupts IPI4: 0 Single function call interrupts IPI5: 0 CPU stop interrupts IPI6: 0 IRQ work interrupts IPI7: 0 completion interrupts Err: 0 Hmm I wonder why we have the !is_smp() check in the TWD timer? Regards, Tony 8< ------------------- --- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/arch/arm/boot/dts/am4372.dtsi +++ b/arch/arm/boot/dts/am4372.dtsi @@ -51,6 +51,14 @@ interrupt-parent = <&gic>; }; + local-timer@48240600 { + compatible = "arm,cortex-a9-twd-timer"; + clocks = <&dpll_mpu_m2_ck>; + reg = <0x48240600 0x20>; + interrupts = ; + interrupt-parent = <&gic>; + }; + wakeupgen: interrupt-controller@48281000 { compatible = "ti,omap4-wugen-mpu"; interrupt-controller; --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c @@ -388,7 +388,7 @@ static void __init twd_local_timer_of_register(struct device_node *np) { int err; - if (!is_smp() || !setup_max_cpus) + if (!setup_max_cpus) return; twd_ppi = irq_of_parse_and_map(np, 0); --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -237,7 +237,7 @@ DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)") .init_late = am43xx_init_late, .init_irq = omap_gic_of_init, .init_machine = omap_generic_init, - .init_time = omap3_gptimer_timer_init, + .init_time = omap4_local_timer_init, .dt_compat = am43_boards_compat, .restart = omap44xx_restart, MACHINE_END