aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHartley Sweeten <hartleys@visionengravers.com>2009-04-15 18:18:26 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-04-26 08:57:29 -0400
commit38f7b009a6ae1708fcf0f208aba9a9a4364bcfcf (patch)
treef90f5394715db2714da7a9d80e76c7d4b566d2d8 /arch
parent924a158a12c7e732179dd85ddd20848039e7bd71 (diff)
[ARM] 5452/1: ep93x: rtc: use ioremap'ed addresses
Update the rtc-ep93xx driver to use ioremap'ed addresses. This removes the dependency on <mach/hardware.h> and properly reports the memory addresses used by the driver in /proc/iomem. In addition, ep93xx_rtc_init() is updated to use platform_driver_probe() instead of platform_driver_register(). Also, the device_create_file() calls are now properly checked for error conditions. The created sysfs files are also now removed when the driver is removed. The version number for the driver has been bumped at the request of Alessandro Zummo. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ep93xx/core.c15
-rw-r--r--arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h1
2 files changed, 13 insertions, 3 deletions
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index ae24486f858a..c535e8805a3b 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -450,10 +450,19 @@ static struct amba_device uart3_device = {
450}; 450};
451 451
452 452
453static struct resource ep93xx_rtc_resource[] = {
454 {
455 .start = EP93XX_RTC_PHYS_BASE,
456 .end = EP93XX_RTC_PHYS_BASE + 0x10c - 1,
457 .flags = IORESOURCE_MEM,
458 },
459};
460
453static struct platform_device ep93xx_rtc_device = { 461static struct platform_device ep93xx_rtc_device = {
454 .name = "ep93xx-rtc", 462 .name = "ep93xx-rtc",
455 .id = -1, 463 .id = -1,
456 .num_resources = 0, 464 .num_resources = ARRAY_SIZE(ep93xx_rtc_resource),
465 .resource = ep93xx_rtc_resource,
457}; 466};
458 467
459 468
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
index f66be12b856e..78ac1bddc8bc 100644
--- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
+++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
@@ -147,6 +147,7 @@
147#define EP93XX_PWM_BASE (EP93XX_APB_VIRT_BASE + 0x00110000) 147#define EP93XX_PWM_BASE (EP93XX_APB_VIRT_BASE + 0x00110000)
148 148
149#define EP93XX_RTC_BASE (EP93XX_APB_VIRT_BASE + 0x00120000) 149#define EP93XX_RTC_BASE (EP93XX_APB_VIRT_BASE + 0x00120000)
150#define EP93XX_RTC_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x00120000)
150 151
151#define EP93XX_SYSCON_BASE (EP93XX_APB_VIRT_BASE + 0x00130000) 152#define EP93XX_SYSCON_BASE (EP93XX_APB_VIRT_BASE + 0x00130000)
152#define EP93XX_SYSCON_REG(x) (EP93XX_SYSCON_BASE + (x)) 153#define EP93XX_SYSCON_REG(x) (EP93XX_SYSCON_BASE + (x))