From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tero Kristo Subject: Re: [PATCH 05/11] ARM: OMAP2+: hwmod code/data: fix 32K sync timer Date: Fri, 8 Jun 2012 16:22:53 +0300 Message-ID: <1339161773.2091.49.camel@sokoban> References: <20120607060901.25532.68354.stgit@dusk> <20120607061309.25532.13430.stgit@dusk> Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from arroyo.ext.ti.com ([192.94.94.40]:42356 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751090Ab2FHNXB (ORCPT ); Fri, 8 Jun 2012 09:23:01 -0400 In-Reply-To: <20120607061309.25532.13430.stgit@dusk> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Paul Walmsley Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tony Lindgren , Kevin Hilman , =?ISO-8859-1?Q?Beno=EEt?= Cousson , Vaibhav Hiremath Hi Paul, There's a bug in this patch, see below. > { > @@ -1141,8 +1143,26 @@ static void _enable_sysc(struct omap_hwmod *oh) > sf = oh->class->sysc->sysc_flags; > > if (sf & SYSC_HAS_SIDLEMODE) { > - idlemode = (oh->flags & HWMOD_SWSUP_SIDLE) ? > - HWMOD_IDLEMODE_NO : HWMOD_IDLEMODE_SMART; > + if (oh->flags & HWMOD_SWSUP_SIDLE) { > + /* > + * IP blocks without smart idle should be left > + * in force-idle. Currently this only applies > + * to 32k sync "timer" which is guaranteed to > + * be accessible when the kernel is running. > + * HWMOD_SWSUP_IDLE must also be set on these > + * IP blocks to indicate a hardware problem. > + * XXX Not an ideal workaround. > + */ > + if (oh->class->sysc->idlemodes & > + (SIDLE_NO | SIDLE_FORCE) && > + !(oh->class->sysc->idlemodes & > + (SIDLE_SMART || SIDLE_SMART_WKUP))) There should by binary or, not logical here. -Tero From mboxrd@z Thu Jan 1 00:00:00 1970 From: t-kristo@ti.com (Tero Kristo) Date: Fri, 8 Jun 2012 16:22:53 +0300 Subject: [PATCH 05/11] ARM: OMAP2+: hwmod code/data: fix 32K sync timer In-Reply-To: <20120607061309.25532.13430.stgit@dusk> References: <20120607060901.25532.68354.stgit@dusk> <20120607061309.25532.13430.stgit@dusk> Message-ID: <1339161773.2091.49.camel@sokoban> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Paul, There's a bug in this patch, see below. > { > @@ -1141,8 +1143,26 @@ static void _enable_sysc(struct omap_hwmod *oh) > sf = oh->class->sysc->sysc_flags; > > if (sf & SYSC_HAS_SIDLEMODE) { > - idlemode = (oh->flags & HWMOD_SWSUP_SIDLE) ? > - HWMOD_IDLEMODE_NO : HWMOD_IDLEMODE_SMART; > + if (oh->flags & HWMOD_SWSUP_SIDLE) { > + /* > + * IP blocks without smart idle should be left > + * in force-idle. Currently this only applies > + * to 32k sync "timer" which is guaranteed to > + * be accessible when the kernel is running. > + * HWMOD_SWSUP_IDLE must also be set on these > + * IP blocks to indicate a hardware problem. > + * XXX Not an ideal workaround. > + */ > + if (oh->class->sysc->idlemodes & > + (SIDLE_NO | SIDLE_FORCE) && > + !(oh->class->sysc->idlemodes & > + (SIDLE_SMART || SIDLE_SMART_WKUP))) There should by binary or, not logical here. -Tero