From patchwork Thu Aug 1 18:37:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 2837207 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 378EFC0319 for ; Thu, 1 Aug 2013 18:37:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 26C712026C for ; Thu, 1 Aug 2013 18:37:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2A55E20260 for ; Thu, 1 Aug 2013 18:37:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752691Ab3HAShv (ORCPT ); Thu, 1 Aug 2013 14:37:51 -0400 Received: from smtp.codeaurora.org ([198.145.11.231]:39239 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752050Ab3HAShu (ORCPT ); Thu, 1 Aug 2013 14:37:50 -0400 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 82E1913EC5D; Thu, 1 Aug 2013 18:37:50 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 7506113EF02; Thu, 1 Aug 2013 18:37:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from [10.46.166.8] (i-global252.qualcomm.com [199.106.103.252]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id E290F13EC5D; Thu, 1 Aug 2013 18:37:49 +0000 (UTC) Message-ID: <51FAAAFD.6000706@codeaurora.org> Date: Thu, 01 Aug 2013 11:37:49 -0700 From: Stephen Boyd User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Santosh Shilimkar CC: Russell King - ARM Linux , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: Re: [FAILURE] omap4430-sdp allnoconfig References: <20130801175214.GA23053@n2100.arm.linux.org.uk> <51FAA4C6.10203@ti.com> <20130801182707.GB23053@n2100.arm.linux.org.uk> <51FAA985.3000809@ti.com> <51FAAA31.6020903@codeaurora.org> In-Reply-To: <51FAAA31.6020903@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 08/01/13 11:34, Stephen Boyd wrote: > On 08/01/13 11:31, Santosh Shilimkar wrote: >> On Thursday 01 August 2013 02:27 PM, Russell King - ARM Linux wrote: >>> On Thu, Aug 01, 2013 at 02:11:18PM -0400, Santosh Shilimkar wrote: >>>> On Thursday 01 August 2013 01:52 PM, Russell King - ARM Linux wrote: >>>>> My allnoconfig fails with this error: >>>>> >>>>> arch/arm/mach-omap2/built-in.o: In function `omap4_local_timer_init': >>>>> dss-common.c:(.init.text+0x1d90): undefined reference to `twd_local_timer_register' >>>>> >>>>> Might be worth looking into whatever's missing? >>>> Looks like coming from below snippet but am just wondering how ? >>> Well, looking at the config allnoconfig generated, it doesn't have SMP >>> and therefore it doesn't have local timers. >>> >>> The build tree has this in it: >>> >>> #ifdef CONFIG_ARCH_OMAP4 >>> static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29); >>> void __init omap4_local_timer_init(void) >>> { >>> omap4_sync32k_timer_init(); >>> /* Local timers are not supprted on OMAP4430 ES1.0 */ >>> if (omap_rev() != OMAP4430_REV_ES1_0) { >>> int err; >>> >>> if (of_have_populated_dt()) { >>> clocksource_of_init(); >>> return; >>> } >>> >>> err = twd_local_timer_register(&twd_local_timer); >>> if (err) >>> pr_err("twd_local_timer_register failed %d\n", err); >>> } >>> } >>> #endif /* CONFIG_ARCH_OMAP4 */ >>> >> Now it make sense. >> >>> which is changed from your version thanks to this commit: >>> >>> commit ef3160cd2f0a400751f2cf6fd2811225fee1d5a7 >>> Author: Stephen Boyd >>> Date: Mon Mar 4 19:24:35 2013 -0800 >>> >>> ARM: OMAP2+: Divorce from local timer API >>> >>> Now that the TWD doesn't rely on the local timer API, OMAP can >>> stop selecting it in Kconfig and relying on the config option to >>> decide if it should call smp_twd functions. >>> >>> Acked-by: Santosh Shilimkar >>> Acked-by: Tony Lindgren >>> Acked-by: Marc Zyngier >>> Signed-off-by: Stephen Boyd >>> >>> So it seems LOCAL_TIMER is still actually required... >>> >> yep. Lets see what Stephen has to say. > Hmm.. Looks like you can either wrap this up in a CONFIG_HAVE_ARM_TWD > check or just compile in TWD all the time on omap4. The latter is > simpler but not a direct conversion. Here's the other version (probably whitespace damaged): ---8<---- > > ---8<---- > > diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig > index 4e0049a..c9e9b2c 100644 > --- a/arch/arm/mach-omap2/Kconfig > +++ b/arch/arm/mach-omap2/Kconfig > @@ -90,7 +90,7 @@ config ARCH_OMAP4 > select CACHE_L2X0 > select CPU_V7 > select HAVE_ARM_SCU if SMP > - select HAVE_ARM_TWD if SMP > + select HAVE_ARM_TWD > select HAVE_SMP > select OMAP_INTERCONNECT > select PL310_ERRATA_588369 > diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 3b7caba..00dc53e 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -600,6 +600,7 @@ static OMAP_SYS_32K_TIMER_INIT(4, 1, "timer_32k_ck", "ti,timer-alwon", #endif #ifdef CONFIG_ARCH_OMAP4 +#ifdef CONFIG_HAVE_ARM_TWD static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29); void __init omap4_local_timer_init(void) { @@ -618,6 +619,12 @@ void __init omap4_local_timer_init(void) pr_err("twd_local_timer_register failed %d\n", err); } } +#else +void __init omap4_local_timer_init(void) +{ + omap4_sync32k_timer_init(); +} +#endif /* CONFIG_HAVE_ARM_TWD */ #endif /* CONFIG_ARCH_OMAP4 */ #ifdef CONFIG_SOC_OMAP5