Merge git://git.infradead.org/mtd-2.6
[pandora-kernel.git] / arch / arm / mach-davinci / devices-da8xx.c
index 0a96791..8cda729 100644 (file)
@@ -326,7 +326,7 @@ static struct resource da8xx_watchdog_resources[] = {
        },
 };
 
-struct platform_device davinci_wdt_device = {
+struct platform_device da8xx_wdt_device = {
        .name           = "watchdog",
        .id             = -1,
        .num_resources  = ARRAY_SIZE(da8xx_watchdog_resources),
@@ -335,7 +335,7 @@ struct platform_device davinci_wdt_device = {
 
 int __init da8xx_register_watchdog(void)
 {
-       return platform_device_register(&davinci_wdt_device);
+       return platform_device_register(&da8xx_wdt_device);
 }
 
 static struct resource da8xx_emac_resources[] = {
@@ -584,10 +584,17 @@ static struct platform_device da8xx_rtc_device = {
 int da8xx_register_rtc(void)
 {
        int ret;
+       void __iomem *base;
+
+       base = ioremap(DA8XX_RTC_BASE, SZ_4K);
+       if (WARN_ON(!base))
+               return -ENOMEM;
 
        /* Unlock the rtc's registers */
-       __raw_writel(0x83e70b13, IO_ADDRESS(DA8XX_RTC_BASE + 0x6c));
-       __raw_writel(0x95a4f1e0, IO_ADDRESS(DA8XX_RTC_BASE + 0x70));
+       __raw_writel(0x83e70b13, base + 0x6c);
+       __raw_writel(0x95a4f1e0, base + 0x70);
+
+       iounmap(base);
 
        ret = platform_device_register(&da8xx_rtc_device);
        if (!ret)