[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1329746160-1152-1-git-send-email-weber@corscience.de>
Date: Mon, 20 Feb 2012 14:56:00 +0100
From: Thomas Weber <weber@...science.de>
To: NeilBrown <neil.brown@...e.de>
Cc: Paul Walmsley <paul@...an.com>, Evgeniy Polyakov <zbr@...emap.net>,
Greg KH <greg@...ah.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] OMAP: hdq: software-supervised control of HDQ_ICLK
From: Paul Walmsley <paul@...an.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists