aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/include/mach/psc.h
diff options
context:
space:
mode:
authorCyril Chemparathy <cyril@ti.com>2010-03-25 17:43:47 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2010-05-06 18:02:04 -0400
commit52958be3ad6e2b72a5943718f339ed4e11685739 (patch)
treedcb17c4491930a31f98701e2e2879877780908d3 /arch/arm/mach-davinci/include/mach/psc.h
parent449ef7f6a9c732657938b222f8804d3e34a3603e (diff)
Davinci: support LPSC SwRstDisable state
The current clock control code always gates the clock (PSC state Disable = 2) on clk_disable(). Some on-chip peripherals (e.g. LCD controller on TNETV107X) need to be put into SwRstDisable = 0 on clock disable, to maintain hardware sanity. This patch extends the davinci_psc_config() arguments to pass in the desired module state instead of a boolean enable/disable. Further, clk_disable() now checks for the PSC_SWRSTDISABLE clk flag before selecting the target state. Signed-off-by: Cyril Chemparathy <cyril@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/include/mach/psc.h')
-rw-r--r--arch/arm/mach-davinci/include/mach/psc.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mach-davinci/include/mach/psc.h b/arch/arm/mach-davinci/include/mach/psc.h
index 651f6d8158fa..7dd2962ad586 100644
--- a/arch/arm/mach-davinci/include/mach/psc.h
+++ b/arch/arm/mach-davinci/include/mach/psc.h
@@ -189,13 +189,19 @@
189#define MDSTAT 0x800 189#define MDSTAT 0x800
190#define MDCTL 0xA00 190#define MDCTL 0xA00
191 191
192/* PSC module states */
193#define PSC_STATE_SWRSTDISABLE 0
194#define PSC_STATE_SYNCRST 1
195#define PSC_STATE_DISABLE 2
196#define PSC_STATE_ENABLE 3
197
192#define MDSTAT_STATE_MASK 0x1f 198#define MDSTAT_STATE_MASK 0x1f
193 199
194#ifndef __ASSEMBLER__ 200#ifndef __ASSEMBLER__
195 201
196extern int davinci_psc_is_clk_active(unsigned int ctlr, unsigned int id); 202extern int davinci_psc_is_clk_active(unsigned int ctlr, unsigned int id);
197extern void davinci_psc_config(unsigned int domain, unsigned int ctlr, 203extern void davinci_psc_config(unsigned int domain, unsigned int ctlr,
198 unsigned int id, char enable); 204 unsigned int id, u32 next_state);
199 205
200#endif 206#endif
201 207