summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci
diff options
context:
space:
mode:
authorNicolas Kaiser <nikai@nikai.net>2010-10-25 14:41:18 +0200
committerKevin Hilman <khilman@deeprootsystems.com>2010-12-10 07:33:50 -0800
commit1a07bfb5215e11227403f121097ed72187dc3241 (patch)
tree9edb1ef9bcda79f9fc6d688d6f485d76b8cc1fed /arch/arm/mach-davinci
parentced98628bf6ca7705b2d06df9c71a80cd1cd49bb (diff)
downloadblackbird-op-linux-1a07bfb5215e11227403f121097ed72187dc3241.tar.gz
blackbird-op-linux-1a07bfb5215e11227403f121097ed72187dc3241.zip
davinci: psc: simplify if-statement
A common do-while loop can be factored out from the end of the branches. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r--arch/arm/mach-davinci/psc.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/arm/mach-davinci/psc.c b/arch/arm/mach-davinci/psc.c
index 1b15dbd0a77b..a41580400701 100644
--- a/arch/arm/mach-davinci/psc.c
+++ b/arch/arm/mach-davinci/psc.c
@@ -83,21 +83,16 @@ void davinci_psc_config(unsigned int domain, unsigned int ctlr,
pdctl1 = __raw_readl(psc_base + PDCTL1);
pdctl1 |= 0x100;
__raw_writel(pdctl1, psc_base + PDCTL1);
-
- do {
- ptstat = __raw_readl(psc_base +
- PTSTAT);
- } while (!(((ptstat >> domain) & 1) == 0));
} else {
ptcmd = 1 << domain;
__raw_writel(ptcmd, psc_base + PTCMD);
-
- do {
- ptstat = __raw_readl(psc_base + PTSTAT);
- } while (!(((ptstat >> domain) & 1) == 0));
}
do {
+ ptstat = __raw_readl(psc_base + PTSTAT);
+ } while (!(((ptstat >> domain) & 1) == 0));
+
+ do {
mdstat = __raw_readl(psc_base + MDSTAT + 4 * id);
} while (!((mdstat & MDSTAT_STATE_MASK) == next_state));
OpenPOWER on IntegriCloud