linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: matthias.bgg@gmail.com (Matthias Brugger)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] omap2: twl-common: Add default power configuration
Date: Wed, 23 Jan 2013 19:21:45 +0100	[thread overview]
Message-ID: <1358965305-5989-1-git-send-email-matthias.bgg@gmail.com> (raw)
In-Reply-To: <CABuKBeLUXMiTXotS=JJ1P-dGUr2m-_2JmrSgjDGU=49HLA3bCA@mail.gmail.com>

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 <matthias.bgg@gmail.com>
---
 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"),
 };
-- 
1.7.11.7

       reply	other threads:[~2013-01-23 18:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CABuKBeLUXMiTXotS=JJ1P-dGUr2m-_2JmrSgjDGU=49HLA3bCA@mail.gmail.com>
2013-01-23 18:21 ` Matthias Brugger [this message]
2013-01-23 18:50 [PATCH] omap2: twl-common: Add default power configuration Matthias Brugger
2013-01-24 15:54 ` Robert Nelson
2013-02-01 22:42   ` Tony Lindgren
2013-02-15 15:59     ` Matthias Brugger
2013-02-19 10:37       ` Peter Ujfalusi
2013-03-08 18:58         ` Matthias Brugger
2013-03-12 16:57           ` Tony Lindgren
2013-03-15  9:11             ` Peter Ujfalusi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358965305-5989-1-git-send-email-matthias.bgg@gmail.com \
    --to=matthias.bgg@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).