From patchwork Tue Jul 29 16:33:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 34488 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oi0-f70.google.com (mail-oi0-f70.google.com [209.85.218.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1BF9E20DCC for ; Tue, 29 Jul 2014 16:35:05 +0000 (UTC) Received: by mail-oi0-f70.google.com with SMTP id u20sf48425065oif.1 for ; Tue, 29 Jul 2014 09:35:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:message-id :reply-to:references:mime-version:content-type:content-disposition :in-reply-to:user-agent:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=uUVPRcIdHBTwM4dswPkbE64s23OzxKB2YBkiacmY/DQ=; b=MEj3Z82KyK7flL3THfGWhFcJXs2laKTLa8oYxLFLAbmgCnLYvWn8GsxaeHOxRApZHW h7Uk+1BTtfA1e6OqGFtJ1y9isuaMNHuIsnDDKy47B80q7tPpM16PFiWxnKO1LS9JiK/e 9X1LLFJW65VAbWVvsTxczTyYtE827PBD0jmwix+dQi9BbeOiL/4biHhIkWomLU4fyN3U YoTPFmK1FGtcGeWDyhuc9BU/hNiHFtWVYE6ulNxoIyZNrpgX3ubvTocT1uieCSFqIErL DWuRtmcXM3E7noguSahpkQOXwP4L9atzssO61cTTUwFi7A5J+P3vMSUMZQIInnAK7N3z Vs7Q== X-Gm-Message-State: ALoCoQmiEP/wczOJVocnY1IrEuGitQNFzrPwdtXfF7wl2C2QeRk0OlP4TRiQghptzXaPryw9Hl8J X-Received: by 10.182.241.229 with SMTP id wl5mr1153928obc.45.1406651704583; Tue, 29 Jul 2014 09:35:04 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.102.18 with SMTP id v18ls164004qge.51.gmail; Tue, 29 Jul 2014 09:35:04 -0700 (PDT) X-Received: by 10.220.192.129 with SMTP id dq1mr2999547vcb.57.1406651704464; Tue, 29 Jul 2014 09:35:04 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id lz6si14943213vec.15.2014.07.29.09.35.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Jul 2014 09:35:04 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id le20so5205149vcb.0 for ; Tue, 29 Jul 2014 09:35:04 -0700 (PDT) X-Received: by 10.221.34.13 with SMTP id sq13mr3129540vcb.16.1406651704331; Tue, 29 Jul 2014 09:35:04 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp257630vcb; Tue, 29 Jul 2014 09:35:02 -0700 (PDT) X-Received: by 10.66.180.141 with SMTP id do13mr3096801pac.93.1406651701840; Tue, 29 Jul 2014 09:35:01 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zm3si21668337pac.97.2014.07.29.09.35.01 for ; Tue, 29 Jul 2014 09:35:01 -0700 (PDT) Received-SPF: none (google.com: devicetree-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751575AbaG2QfA (ORCPT + 6 others); Tue, 29 Jul 2014 12:35:00 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:49300 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751321AbaG2Qe7 (ORCPT ); Tue, 29 Jul 2014 12:34:59 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s6TGY7Ak001375; Tue, 29 Jul 2014 11:34:07 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s6TGY73h002040; Tue, 29 Jul 2014 11:34:07 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Tue, 29 Jul 2014 11:34:06 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s6TGY6dc015387; Tue, 29 Jul 2014 11:34:06 -0500 Date: Tue, 29 Jul 2014 11:33:45 -0500 From: Felipe Balbi To: Felipe Balbi CC: Tony Lindgren , Linux OMAP Mailing List , Linux ARM Kernel Mailing List , , , , , , , Linux Kernel Mailing List Subject: Re: [PATCH 29/35] arm: omap: intc: switch over to linear irq domain Message-ID: <20140729163345.GF17808@saruman.home> Reply-To: References: <1406582183-696-1-git-send-email-balbi@ti.com> <1406582183-696-30-git-send-email-balbi@ti.com> <20140729121425.GR29045@atomide.com> <20140729141522.GB17808@saruman.home> <20140729152052.GV29045@atomide.com> <20140729154057.GE17808@saruman.home> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140729154057.GE17808@saruman.home> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Hi, On Tue, Jul 29, 2014 at 10:40:57AM -0500, Felipe Balbi wrote: > On Tue, Jul 29, 2014 at 08:20:52AM -0700, Tony Lindgren wrote: > > * Felipe Balbi [140729 07:18]: > > > Hi, > > > > > > On Tue, Jul 29, 2014 at 05:14:25AM -0700, Tony Lindgren wrote: > > > > * Felipe Balbi [140728 14:19]: > > > > > now that we don't need to support legacy board-files, > > > > > we can completely switch over to a linear irq domain > > > > > and make use of irq_alloc_domain_generic_chips() to > > > > > allocate all generic irq chips for us. > > > > > > > > This patch seems to somehow break off-idle for omap3 > > > > where it no longer wakes up. > > > > > > Sure your bisection is correct ? This patch just switches from legacy > > > irq domain to linear irq domain. > > > > Yes, I tried it a few times. Just enabling > > retention idle hangs too with this patch. > > > > Maybe it's omap3_prcm_irq_setup that relies on > > 11 + OMAP_INTC_START? There may be other such issues > > lol. > > OMAP4 has the same nonsense. made me think why (if) OMAP4 works with that same setup. Does wake from OFF work with OMAP4 ? Anyway, here's a quick little hack to check if that's the reason for the regression: diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index ff953c9..c234b98 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -97,6 +97,7 @@ prm: prm@48306000 { compatible = "ti,omap3-prm"; reg = <0x48306000 0x4000>; + interrupts = <11>; prm_clocks: clocks { #address-cells = <1>; diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c index 25e8b82..3d11377 100644 --- a/arch/arm/mach-omap2/prm_common.c +++ b/arch/arm/mach-omap2/prm_common.c @@ -242,6 +242,11 @@ void omap_prcm_irq_complete(void) prcm_irq_setup->restore_irqen(prcm_irq_setup->saved_mask); } +static struct of_device_id tmp[] = { + { .compatible = "ti,omap3-prm" }, + { } +}; + /** * omap_prcm_register_chain_handler - initializes the prcm chained interrupt * handler based on provided parameters @@ -254,17 +259,24 @@ void omap_prcm_irq_complete(void) */ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup) { + struct device_node *node; int nr_regs; u32 mask[OMAP_PRCM_MAX_NR_PENDING_REG]; int offset, i; + int irq; struct irq_chip_generic *gc; struct irq_chip_type *ct; if (!irq_setup) return -EINVAL; + irq = irq_setup->irq; nr_regs = irq_setup->nr_regs; + node = of_find_matching_node(NULL, tmp); + if (node) + irq = of_irq_get(node, 0); + if (prcm_irq_setup) { pr_err("PRCM: already initialized; won't reinitialize\n"); return -EINVAL; @@ -298,7 +310,7 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup) 1 << (offset & 0x1f); } - irq_set_chained_handler(irq_setup->irq, omap_prcm_irq_handler); + irq_set_chained_handler(irq, omap_prcm_irq_handler); irq_setup->base_irq = irq_alloc_descs(-1, 0, irq_setup->nr_regs * 32, 0);