diff options
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r-- | arch/arm/mach-davinci/devices-da8xx.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index 67a6fbcb2e0..8cda729be27 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
@@ -584,10 +584,17 @@ static struct platform_device da8xx_rtc_device = { | |||
584 | int da8xx_register_rtc(void) | 584 | int da8xx_register_rtc(void) |
585 | { | 585 | { |
586 | int ret; | 586 | int ret; |
587 | void __iomem *base; | ||
588 | |||
589 | base = ioremap(DA8XX_RTC_BASE, SZ_4K); | ||
590 | if (WARN_ON(!base)) | ||
591 | return -ENOMEM; | ||
587 | 592 | ||
588 | /* Unlock the rtc's registers */ | 593 | /* Unlock the rtc's registers */ |
589 | __raw_writel(0x83e70b13, IO_ADDRESS(DA8XX_RTC_BASE + 0x6c)); | 594 | __raw_writel(0x83e70b13, base + 0x6c); |
590 | __raw_writel(0x95a4f1e0, IO_ADDRESS(DA8XX_RTC_BASE + 0x70)); | 595 | __raw_writel(0x95a4f1e0, base + 0x70); |
596 | |||
597 | iounmap(base); | ||
591 | 598 | ||
592 | ret = platform_device_register(&da8xx_rtc_device); | 599 | ret = platform_device_register(&da8xx_rtc_device); |
593 | if (!ret) | 600 | if (!ret) |