forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
ced98628bf
commit
1a07bfb521
|
@ -83,20 +83,15 @@ 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));
|
||||
|
|
Loading…
Reference in New Issue
Block a user