linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Weber <weber@corscience.de>
To: NeilBrown <neil.brown@suse.de>
Cc: Paul Walmsley <paul@pwsan.com>,
	Evgeniy Polyakov <zbr@ioremap.net>, Greg KH <greg@kroah.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] OMAP: hdq: software-supervised control of HDQ_ICLK
Date: Mon, 20 Feb 2012 14:56:00 +0100	[thread overview]
Message-ID: <1329746160-1152-1-git-send-email-weber@corscience.de> (raw)
In-Reply-To: <4F422C2B.9030908@gmail.com>

From: Paul Walmsley <paul@pwsan.com>

Hello Neil, hello Paul,

the patch below fixes the communication between omap3 and
bq27000 battery.

I got the patch from Neil's git tree and removed the part for hdq1w.

Regards,
Thomas

Do not automatically enable interface clock autoidle on
HDQ_ICLK. Require the hwmod layer to use software gating on
HDQ_ICLK. This is because the CM FSM that handles HDQ_FCLK
appears to not be working as expected.
---
 arch/arm/mach-omap2/clock3xxx_data.c    |    1 +
 arch/arm/plat-omap/clock.c              |    4 +++-
 arch/arm/plat-omap/include/plat/clock.h |    1 +
 3 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index d75e5f6..ac95afd 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -1882,6 +1882,7 @@ static struct clk hdq_ick = {
 	.enable_bit	= OMAP3430_EN_HDQ_SHIFT,
 	.clkdm_name	= "core_l4_clkdm",
 	.recalc		= &followparent_recalc,
+	.flags		= SWSUP_ICLK_IDLE,
 };
 
 static struct clk mcspi4_ick = {
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 567e4b5..3fce16a 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -348,7 +348,9 @@ int omap_clk_enable_autoidle_all(void)
 	spin_lock_irqsave(&clockfw_lock, flags);
 
 	list_for_each_entry(c, &clocks, node)
-		if (c->ops->allow_idle)
+		if (c->flags & SWSUP_ICLK_IDLE && c->ops->deny_idle)
+			c->ops->deny_idle(c);
+		else if (c->ops->allow_idle)
 			c->ops->allow_idle(c);
 
 	spin_unlock_irqrestore(&clockfw_lock, flags);
diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h
index 240a7b9..f4f6e7b 100644
--- a/arch/arm/plat-omap/include/plat/clock.h
+++ b/arch/arm/plat-omap/include/plat/clock.h
@@ -191,6 +191,7 @@ struct dpll_data {
 #define ENABLE_ON_INIT		(1 << 3)	/* Enable upon framework init */
 #define INVERT_ENABLE		(1 << 4)	/* 0 enables, 1 disables */
 #define CLOCK_CLKOUTX2		(1 << 5)
+#define SWSUP_ICLK_IDLE		(1 << 6)
 
 /**
  * struct clk - OMAP struct clk
-- 
1.7.8.4


  reply	other threads:[~2012-02-20 13:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-19  2:10 [PATCH 0/3] Small fixes for w1_bq27000 driver NeilBrown
2012-02-19  2:10 ` [PATCH 3/3] w1_bq27000: Only one thread can access the bq27000 at a time NeilBrown
2012-02-19  2:10 ` [PATCH 1/3] w1_bq27000: remove unnecessary NULL test NeilBrown
2012-02-19  2:10 ` [PATCH 2/3] w1_bq27000 - remove w1_bq27000_write NeilBrown
2012-02-19  6:50 ` [PATCH 0/3] Small fixes for w1_bq27000 driver Thomas Weber
2012-02-19  7:06   ` NeilBrown
2012-02-20 11:19     ` Thomas Weber
2012-02-20 13:56       ` Thomas Weber [this message]
2012-02-20 15:22         ` [PATCH] OMAP: hdq: software-supervised control of HDQ_ICLK Evgeniy Polyakov
2012-02-20 12:04 ` [PATCH 0/3] Small fixes for w1_bq27000 driver Evgeniy Polyakov

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=1329746160-1152-1-git-send-email-weber@corscience.de \
    --to=weber@corscience.de \
    --cc=dan.carpenter@oracle.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil.brown@suse.de \
    --cc=paul@pwsan.com \
    --cc=zbr@ioremap.net \
    /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).