Davinci: psc - use ioremap()
This patch modifies the psc and clock control code to use ioremap()ed registers. Signed-off-by: Cyril Chemparathy <cyril@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
This commit is contained in:
committed by
Kevin Hilman
parent
1bcd38ad2d
commit
e4c822c7e9
@@ -38,8 +38,9 @@ int __init davinci_psc_is_clk_active(unsigned int ctlr, unsigned int id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
psc_base = soc_info->psc_bases[ctlr];
|
||||
psc_base = ioremap(soc_info->psc_bases[ctlr], SZ_4K);
|
||||
mdstat = __raw_readl(psc_base + MDSTAT + 4 * id);
|
||||
iounmap(psc_base);
|
||||
|
||||
/* if clocked, state can be "Enable" or "SyncReset" */
|
||||
return mdstat & BIT(12);
|
||||
@@ -59,7 +60,7 @@ void davinci_psc_config(unsigned int domain, unsigned int ctlr,
|
||||
return;
|
||||
}
|
||||
|
||||
psc_base = soc_info->psc_bases[ctlr];
|
||||
psc_base = ioremap(soc_info->psc_bases[ctlr], SZ_4K);
|
||||
|
||||
mdctl = __raw_readl(psc_base + MDCTL + 4 * id);
|
||||
mdctl &= ~MDSTAT_STATE_MASK;
|
||||
@@ -99,4 +100,6 @@ void davinci_psc_config(unsigned int domain, unsigned int ctlr,
|
||||
do {
|
||||
mdstat = __raw_readl(psc_base + MDSTAT + 4 * id);
|
||||
} while (!((mdstat & MDSTAT_STATE_MASK) == next_state));
|
||||
|
||||
iounmap(psc_base);
|
||||
}
|
||||
|
Reference in New Issue
Block a user