From patchwork Wed Jan 23 18:21:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Brugger X-Patchwork-Id: 2026451 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 0623FDF23E for ; Wed, 23 Jan 2013 18:26:06 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Ty4xb-0006lb-6w; Wed, 23 Jan 2013 18:22:07 +0000 Received: from we-in-x0233.1e100.net ([2a00:1450:400c:c03::233] helo=mail-we0-x233.google.com) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Ty4xY-0006lJ-2K for linux-arm-kernel@lists.infradead.org; Wed, 23 Jan 2013 18:22:04 +0000 Received: by mail-we0-f179.google.com with SMTP id x43so840712wey.38 for ; Wed, 23 Jan 2013 10:21:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=w6SY482xAu0Cs+BORkeZorf6dEiYrq8qdpH+dCLHdvg=; b=pCBJ91yLDwRHvW+8t3kQeChxGy4iEpaWk39ugP3tiVl4iUkV5wv96pf9JN35Q3Hp0f PX3AapbP7/3B0VfCTDhhKcVkfgA3Ap4lfvUAnfap73asodOAW+VVuDgUc8tzfvdligqR WX8j9DwMuHVkMQf8TzICWDuGbMmqFwNhNuQKerCYqPKZx5Si8DQpdIzR41Y+P87ydlZE VDhzm6j3CpAjuQvmL8H08F2/qlC9mrv2DY3oo2CGw39rNN7dMy7SxMnPbGFL1/3b0G5m DJzPB+4x9T6dSSyGsTs8zIu7lLD1gvKWD/0aS3w5fLDjhAc8ZIfPGI2FiYy8SkKjLwkL jtOg== X-Received: by 10.194.238.5 with SMTP id vg5mr4345006wjc.40.1358965319230; Wed, 23 Jan 2013 10:21:59 -0800 (PST) Received: from ubi.home (206.Red-83-33-115.dynamicIP.rima-tde.net. [83.33.115.206]) by mx.google.com with ESMTPS id p3sm27943040wic.8.2013.01.23.10.21.55 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 23 Jan 2013 10:21:57 -0800 (PST) From: Matthias Brugger To: Tony Lindgren , Russell King , martinez.javier@gmail.com, eballetbo@iseebcn.com, ezequiel.garcia@free-electrons.com, robertcnelson@gmail.com, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] omap2: twl-common: Add default power configuration Date: Wed, 23 Jan 2013 19:21:45 +0100 Message-Id: <1358965305-5989-1-git-send-email-matthias.bgg@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130123_132204_231727_6548B646 X-CRM114-Status: GOOD ( 12.08 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (matthias.bgg[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Matthias Brugger X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch adds a generic power script configuration. When rebooting an OMAP3530 at 125 MHz, the reboot hangs. With the generic power script, TWL4030 will be reset when a warm reset occures. This way the OMAP3530 does not hang on reboot. Signed-off-by: Matthias Brugger --- arch/arm/mach-omap2/twl-common.c | 41 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index d78180c..f096beb 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c @@ -121,41 +121,40 @@ static struct twl4030_audio_data omap3_audio_pdata = { }; 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}, + {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, + .script = wrst_seq, + .size = ARRAY_SIZE(wrst_seq), + .flags = TWL4030_WRST_SCRIPT, }; static struct twl4030_script *omap3_power_scripts[] __initdata = { - &wrst_script, + &wrst_script, }; static struct twl4030_resconfig omap3_rconfig[] = { - { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1, - .type2 = -1 }, - { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1, - .type2 = -1 }, - { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1, - .type2 = -1 }, - { 0, 0}, + { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1, + .type2 = -1 }, + { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1, + .type2 = -1 }, + { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1, + .type2 = -1 }, + { 0, 0}, }; static struct twl4030_power_data omap3_power_pdata = { - .scripts = omap3_power_scripts, - .num = ARRAY_SIZE(omap3_power_scripts), - .resource_config = omap3_rconfig, + .scripts = omap3_power_scripts, + .num = ARRAY_SIZE(omap3_power_scripts), + .resource_config = omap3_rconfig, }; - static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = { REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), };