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: 5944831 Return-Path: X-Original-To: patchwork-linux-pm@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 ADB4F9F691 for ; Thu, 5 Mar 2015 10:58:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E5C1220381 for ; Thu, 5 Mar 2015 10:58:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EDDED20389 for ; Thu, 5 Mar 2015 10:58:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755210AbbCEK6a (ORCPT ); Thu, 5 Mar 2015 05:58:30 -0500 Received: from mail-ie0-f173.google.com ([209.85.223.173]:37922 "EHLO mail-ie0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755066AbbCEK63 (ORCPT ); Thu, 5 Mar 2015 05:58:29 -0500 Received: by iecrd18 with SMTP id rd18so75331898iec.5 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=eN89gNsQqo2IWldAm+2H6C0blhoXYioN7OMG4uaLCTO2VaR50xPzesbT8LT0Hdi/fy mCzc70zj1ssWVfYVooFeJGks0nfRimgJpqS0n1rGe+aBimauLGnc/DEVZN9FzjFSGJXZ DwQ4+sVTxMyzK9+hRyarwUQuxDazytfd+g5DdZ9SteVXXGFGfP6OcTSQdluNClyGJb/o 8cOCN5LDNJohxU+H47bfwlZjpNPeNi/WYeluCo0kz6Rbx12CB3zHIawQ4rufB15BcYS4 ee/Q0TUMd3ra9yxy86h6pmfQ86BV0HRJx1tOfeKGfFlN+v6Xtd4rWE3+ozoK8LHwsCu0 KYgQ== X-Gm-Message-State: ALoCoQkXWQ1Vjzur0+cmYWRC1nBYvAwwWK8xJcL6lHBNKOggSUspe0KIH+7ZJ5w9rdelsmyv27Zq 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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 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);