summaryrefslogtreecommitdiffstats
path: root/arch/unicore32/kernel/puv3-core.c
diff options
context:
space:
mode:
authorGuanXuetao <gxt@mprc.pku.edu.cn>2011-02-26 21:21:18 +0800
committerGuanXuetao <gxt@mprc.pku.edu.cn>2011-03-17 09:19:19 +0800
commite5abf78b57199a417eb01ff922a5ea6ff9e10b61 (patch)
tree6f72a13d44c0dc8c4d575d84885f5694c16ed1da /arch/unicore32/kernel/puv3-core.c
parent4517366d870b89d6fb8c0c90deb6c73d975908af (diff)
downloadop-kernel-dev-e5abf78b57199a417eb01ff922a5ea6ff9e10b61.zip
op-kernel-dev-e5abf78b57199a417eb01ff922a5ea6ff9e10b61.tar.gz
unicore32 io: redefine __REG(x) and re-use readl/writel funcs
-- by advice of Arnd Bergmann Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/unicore32/kernel/puv3-core.c')
-rw-r--r--arch/unicore32/kernel/puv3-core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/unicore32/kernel/puv3-core.c b/arch/unicore32/kernel/puv3-core.c
index 26cc52b..6edf928 100644
--- a/arch/unicore32/kernel/puv3-core.c
+++ b/arch/unicore32/kernel/puv3-core.c
@@ -36,7 +36,7 @@
*/
unsigned long long sched_clock(void)
{
- unsigned long long v = cnt32_to_63(OST_OSCR);
+ unsigned long long v = cnt32_to_63(readl(OST_OSCR));
/* original conservative method, but overflow frequently
* v *= NSEC_PER_SEC >> 12;
@@ -187,15 +187,15 @@ static void puv3_cpu_pm_restore(unsigned long *sleep_save)
static int puv3_cpu_pm_prepare(void)
{
/* set resume return address */
- PM_DIVCFG = virt_to_phys(puv3_cpu_resume);
+ writel(virt_to_phys(puv3_cpu_resume), PM_DIVCFG);
return 0;
}
static void puv3_cpu_pm_enter(suspend_state_t state)
{
/* Clear reset status */
- RESETC_RSSR = RESETC_RSSR_HWR | RESETC_RSSR_WDR
- | RESETC_RSSR_SMR | RESETC_RSSR_SWR;
+ writel(RESETC_RSSR_HWR | RESETC_RSSR_WDR
+ | RESETC_RSSR_SMR | RESETC_RSSR_SWR, RESETC_RSSR);
switch (state) {
/* case PM_SUSPEND_ON:
@@ -242,7 +242,7 @@ void puv3_ps2_init(void)
struct clk *bclk32;
bclk32 = clk_get(NULL, "BUS32_CLK");
- PS2_CNT = clk_get_rate(bclk32) / 200000; /* should > 5us */
+ writel(clk_get_rate(bclk32) / 200000, PS2_CNT); /* should > 5us */
}
void __init puv3_core_init(void)
OpenPOWER on IntegriCloud