aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorCyril Chemparathy <cyril@ti.com>2010-05-07 17:06:33 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2010-05-13 13:05:23 -0400
commitdb6db5d8474b16811566e0e919d060e2856d5ad9 (patch)
tree68e8d3d9668d0a0740635f01a221a95e2829aca6 /arch/arm
parentb8d44293952e4b32b8595d924a377351f3cd1565 (diff)
Davinci: da8xx: rtc - use ioremap
This patch modifies the RTC unlock code to use ioremap() maps instead of IO_ADDRESS() translation. Signed-off-by: Cyril Chemparathy <cyril@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-davinci/devices-da8xx.c11
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 = {
584int da8xx_register_rtc(void) 584int 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)