summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/arm926ejs/davinci/psc.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2011-09-23 04:29:15 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-10-27 21:56:34 +0200
commit9e2538e11fc87fb51cfde707fd5ffae086f1b467 (patch)
tree75cc65e733760507bdbdf2632dad4649d3e4a640 /arch/arm/cpu/arm926ejs/davinci/psc.c
parent53430a4f251eacc32ada54b56258cc18856d0d8e (diff)
downloadu-boot-imx-9e2538e11fc87fb51cfde707fd5ffae086f1b467.zip
u-boot-imx-9e2538e11fc87fb51cfde707fd5ffae086f1b467.tar.gz
u-boot-imx-9e2538e11fc87fb51cfde707fd5ffae086f1b467.tar.bz2
DaVinci: correct MDSTAT.STATE mask
MDSTAT.STATE occupies bits 0..5 according to all available documentation, so fix the mask which previously was leaving out the intermediate state indicator bit. While at it, introduce two #define's for that mask -- unfortunately, we can't use a single #define as the assembly code can't include <asm/arch/hardware.h> due to C-specfic constructs in it. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Diffstat (limited to 'arch/arm/cpu/arm926ejs/davinci/psc.c')
-rw-r--r--arch/arm/cpu/arm926ejs/davinci/psc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/cpu/arm926ejs/davinci/psc.c b/arch/arm/cpu/arm926ejs/davinci/psc.c
index 8273a7f..707fa47 100644
--- a/arch/arm/cpu/arm926ejs/davinci/psc.c
+++ b/arch/arm/cpu/arm926ejs/davinci/psc.c
@@ -83,7 +83,7 @@ void lpsc_on(unsigned int id)
while (readl(ptstat) & 0x01)
continue;
- if ((readl(mdstat) & 0x1f) == 0x03)
+ if ((readl(mdstat) & PSC_MDSTAT_STATE) == 0x03)
return; /* Already on and enabled */
writel(readl(mdctl) | 0x03, mdctl);
@@ -114,7 +114,7 @@ void lpsc_on(unsigned int id)
while (readl(ptstat) & 0x01)
continue;
- while ((readl(mdstat) & 0x1f) != 0x03)
+ while ((readl(mdstat) & PSC_MDSTAT_STATE) != 0x03)
continue;
}