lkml.org 
[lkml]   [2012]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] OMAP: hdq: software-supervised control of HDQ_ICLK
Date
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


\
 
 \ /
  Last update: 2012-02-20 14:59    [from the cache]
©2003-2011 Jasper Spaans