aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci
diff options
context:
space:
mode:
authorSekhar Nori <nsekhar@ti.com>2011-07-06 02:01:22 -0400
committerSekhar Nori <nsekhar@ti.com>2011-07-08 01:40:09 -0400
commitaad70de20fc69970a3080e7e8f02b54a4a3fe3e6 (patch)
tree2b6564f263d1741d2824e7b8af2d22be6e4a23c8 /arch/arm/mach-davinci
parenta51ca38b6330e463cc1a7adf64502ff735452915 (diff)
davinci: enable forced transitions on PSC
Some DaVinci modules like the SATA on DA850 need forced module state transitions. Define a "force" flag which can be passed to the PSC config function to enable it to make forced transitions. Forced transitions shouldn't normally be attempted, unless the TRM explicitly specifies its usage. ChangeLog: v2: Modified to take care of the fact that davinci_psc_config() now takes the flags directly. Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r--arch/arm/mach-davinci/clock.h1
-rw-r--r--arch/arm/mach-davinci/include/mach/psc.h1
-rw-r--r--arch/arm/mach-davinci/psc.c2
3 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/clock.h b/arch/arm/mach-davinci/clock.h
index 0dd22031ec62..48ee4627e188 100644
--- a/arch/arm/mach-davinci/clock.h
+++ b/arch/arm/mach-davinci/clock.h
@@ -111,6 +111,7 @@ struct clk {
111#define CLK_PLL BIT(4) /* PLL-derived clock */ 111#define CLK_PLL BIT(4) /* PLL-derived clock */
112#define PRE_PLL BIT(5) /* source is before PLL mult/div */ 112#define PRE_PLL BIT(5) /* source is before PLL mult/div */
113#define PSC_SWRSTDISABLE BIT(6) /* Disable state is SwRstDisable */ 113#define PSC_SWRSTDISABLE BIT(6) /* Disable state is SwRstDisable */
114#define PSC_FORCE BIT(7) /* Force module state transtition */
114 115
115#define CLK(dev, con, ck) \ 116#define CLK(dev, con, ck) \
116 { \ 117 { \
diff --git a/arch/arm/mach-davinci/include/mach/psc.h b/arch/arm/mach-davinci/include/mach/psc.h
index 215fcca6bbdc..6213f0d4211d 100644
--- a/arch/arm/mach-davinci/include/mach/psc.h
+++ b/arch/arm/mach-davinci/include/mach/psc.h
@@ -244,6 +244,7 @@
244#define PSC_STATE_ENABLE 3 244#define PSC_STATE_ENABLE 3
245 245
246#define MDSTAT_STATE_MASK 0x1f 246#define MDSTAT_STATE_MASK 0x1f
247#define MDCTL_FORCE BIT(31)
247 248
248#ifndef __ASSEMBLER__ 249#ifndef __ASSEMBLER__
249 250
diff --git a/arch/arm/mach-davinci/psc.c b/arch/arm/mach-davinci/psc.c
index 823cb1b9e484..1fb6bdff38c1 100644
--- a/arch/arm/mach-davinci/psc.c
+++ b/arch/arm/mach-davinci/psc.c
@@ -75,6 +75,8 @@ void davinci_psc_config(unsigned int domain, unsigned int ctlr,
75 mdctl = __raw_readl(psc_base + MDCTL + 4 * id); 75 mdctl = __raw_readl(psc_base + MDCTL + 4 * id);
76 mdctl &= ~MDSTAT_STATE_MASK; 76 mdctl &= ~MDSTAT_STATE_MASK;
77 mdctl |= next_state; 77 mdctl |= next_state;
78 if (flags & PSC_FORCE)
79 mdctl |= MDCTL_FORCE;
78 __raw_writel(mdctl, psc_base + MDCTL + 4 * id); 80 __raw_writel(mdctl, psc_base + MDCTL + 4 * id);
79 81
80 pdstat = __raw_readl(psc_base + PDSTAT); 82 pdstat = __raw_readl(psc_base + PDSTAT);