From patchwork Thu Mar 5 10:58:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Nazzareno Trimarchi X-Patchwork-Id: 5944821 Return-Path: X-Original-To: patchwork-linux-omap@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 7BEEC9F36A for ; Thu, 5 Mar 2015 10:58:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 90F7220380 for ; Thu, 5 Mar 2015 10:58:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 898CA20382 for ; Thu, 5 Mar 2015 10:58:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755202AbbCEK6a (ORCPT ); Thu, 5 Mar 2015 05:58:30 -0500 Received: from mail-ig0-f177.google.com ([209.85.213.177]:34200 "EHLO mail-ig0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754624AbbCEK63 (ORCPT ); Thu, 5 Mar 2015 05:58:29 -0500 Received: by igal13 with SMTP id l13so40936725iga.1 for ; Thu, 05 Mar 2015 02:58:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=h1mtfF+7lSWrA+1Aq2oDJMWKfdJdu4+6XUrKrkcfJpU=; b=a5fJrHXle8lvS9VjKs3Ik9kLzXwx04b9vFXN3v8kLfsMWCxG0ZV/ACkruxFuadAuTg x9UZZFV66JoAV3gQV++f8iuKVzcu8oximD7cXtyPScyBYi71Zt2TNkndt0GeNZn31SLY AtCi5mteRHzSHyWZmBUtYp8rwl2P7itr2U5It4FlBLO4GH0nMfQhJPUIMAO/HyXt5NjR zExbGbQ94Lw7Mg/rGm4GTuNyCIi+r/oS2PnW4o7WNT2+a8DMoZHq0ASvP+vIZDmiALGx IbhkcHmxOM1+V2WMLtz6IOCa8kZZJRSRTz4SGAjAITb/w3wN5FmHfQ8KLzGWVID6i+ZA gy4Q== X-Gm-Message-State: ALoCoQluCuZxKXO3UyZU91thODLcgBFs63agy/u65z32sEcPMbx5FVxR+DrcITNtYrm5TTOZt9sM MIME-Version: 1.0 X-Received: by 10.107.9.88 with SMTP id j85mr9461973ioi.60.1425553108627; Thu, 05 Mar 2015 02:58:28 -0800 (PST) Received: by 10.64.21.231 with HTTP; Thu, 5 Mar 2015 02:58:28 -0800 (PST) In-Reply-To: References: Date: Thu, 5 Mar 2015 11:58:28 +0100 Message-ID: Subject: Re: reboot command fails with low frequency From: Michael Trimarchi To: Ran Shalit Cc: Linux OMAP Mailing List , linux-pm@vger.kernel.org Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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=ham 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 Hi You should find the twl4030 power script and you should have something like this static struct twl4030_ins wrst_seq[] __initdata = { {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2}, {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15}, {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15}, {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60}, {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2}, {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2}, }; static struct twl4030_script wrst_script __initdata = { .script = wrst_seq, .size = ARRAY_SIZE(wrst_seq), .flags = TWL4030_WRST_SCRIPT, }; static struct twl4030_script *omap3_power_scripts[] __initdata = { &wrst_script, }; If I remember it was solved by some change here. In my old kernel I have this commit Fix the reboot at lower frequency Signed-off-by: Michael Trimarchi But this apply on an old device with a newer kernel and I don't remember now the reason ;) Sorry. Is this an android device? (2.6.37??? is really old) Michael On Thu, Mar 5, 2015 at 10:29 AM, Ran Shalit wrote: >>> We observer that with highest available frequency (600000) reboot >>> command is OK, but when frequency is changed to lower value, the >>> reboot command fails. >>> Has anyone observed such behaviour ? >> >> I remember some commit for this problem. What version of the linux are >> you running? > > I use Linux version 2.6.37 #36 PREEMPT Thu Mar 5 10:56:04 IST 2015 > armv7l GNU/Linux > > Do you know how I can find this fix ? > > Thanks! > Ran diff --git a/arch/arm/mach-omap2/board-panther.c b/arch/arm/mach-omap2/board-panther.c index ad2adf3..c71fdd9 100644 --- a/arch/arm/mach-omap2/board-panther.c +++ b/arch/arm/mach-omap2/board-panther.c @@ -368,7 +368,7 @@ static int __init panther_i2c_init(void) { omap3_pmic_get_config(&panther_twldata, TWL_COMMON_PDATA_MADC | - TWL_COMMON_PDATA_AUDIO, + TWL_COMMON_PDATA_AUDIO | TWL_COMMON_PDATA_POWER, TWL_COMMON_REGULATOR_VDAC); omap3_pmic_init("twl4030", &panther_twldata);