diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2010-01-11 19:40:14 -0500 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-01-17 18:47:21 -0500 |
commit | 206090913d0d6ad3506e3e2693a696fc1626993e (patch) | |
tree | 8c0a1c0714b884dc951dedcdc1182f6e5ff5e572 /arch | |
parent | 501dae90b3ae4dd3d8efdacfcb072c3d65eb5a33 (diff) |
ARM: S3C64XX: Add S3C64XX RTC platform driver
Add S3C64XX RTC platform driver
Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-s3c6400/include/mach/map.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-s3c64xx/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-s3c64xx/dev-rtc.c | 43 |
3 files changed, 45 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c6400/include/mach/map.h b/arch/arm/mach-s3c6400/include/mach/map.h index d4cd3abe3cba..0552716d6bb2 100644 --- a/arch/arm/mach-s3c6400/include/mach/map.h +++ b/arch/arm/mach-s3c6400/include/mach/map.h | |||
@@ -42,6 +42,7 @@ | |||
42 | #define S3C64XX_PA_FB (0x77100000) | 42 | #define S3C64XX_PA_FB (0x77100000) |
43 | #define S3C64XX_PA_USB_HSOTG (0x7C000000) | 43 | #define S3C64XX_PA_USB_HSOTG (0x7C000000) |
44 | #define S3C64XX_PA_WATCHDOG (0x7E004000) | 44 | #define S3C64XX_PA_WATCHDOG (0x7E004000) |
45 | #define S3C64XX_PA_RTC (0x7E005000) | ||
45 | #define S3C64XX_PA_SYSCON (0x7E00F000) | 46 | #define S3C64XX_PA_SYSCON (0x7E00F000) |
46 | #define S3C64XX_PA_AC97 (0x7F001000) | 47 | #define S3C64XX_PA_AC97 (0x7F001000) |
47 | #define S3C64XX_PA_IIS0 (0x7F002000) | 48 | #define S3C64XX_PA_IIS0 (0x7F002000) |
diff --git a/arch/arm/plat-s3c64xx/Makefile b/arch/arm/plat-s3c64xx/Makefile index b85b4359e935..e66dbd7ce9d6 100644 --- a/arch/arm/plat-s3c64xx/Makefile +++ b/arch/arm/plat-s3c64xx/Makefile | |||
@@ -13,6 +13,7 @@ obj- := | |||
13 | # Core files | 13 | # Core files |
14 | 14 | ||
15 | obj-y += dev-uart.o | 15 | obj-y += dev-uart.o |
16 | obj-y += dev-rtc.o | ||
16 | obj-y += cpu.o | 17 | obj-y += cpu.o |
17 | obj-y += irq.o | 18 | obj-y += irq.o |
18 | obj-y += irq-eint.o | 19 | obj-y += irq-eint.o |
diff --git a/arch/arm/plat-s3c64xx/dev-rtc.c b/arch/arm/plat-s3c64xx/dev-rtc.c new file mode 100644 index 000000000000..b9e7a05f0129 --- /dev/null +++ b/arch/arm/plat-s3c64xx/dev-rtc.c | |||
@@ -0,0 +1,43 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/dev-rtc.c | ||
2 | * | ||
3 | * Copyright 2009 by Maurus Cuelenaere <mcuelenaere@gmail.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/string.h> | ||
12 | #include <linux/platform_device.h> | ||
13 | |||
14 | #include <mach/irqs.h> | ||
15 | #include <mach/map.h> | ||
16 | |||
17 | #include <plat/devs.h> | ||
18 | |||
19 | static struct resource s3c_rtc_resource[] = { | ||
20 | [0] = { | ||
21 | .start = S3C64XX_PA_RTC, | ||
22 | .end = S3C64XX_PA_RTC + 0xff, | ||
23 | .flags = IORESOURCE_MEM, | ||
24 | }, | ||
25 | [1] = { | ||
26 | .start = IRQ_RTC_ALARM, | ||
27 | .end = IRQ_RTC_ALARM, | ||
28 | .flags = IORESOURCE_IRQ, | ||
29 | }, | ||
30 | [2] = { | ||
31 | .start = IRQ_RTC_TIC, | ||
32 | .end = IRQ_RTC_TIC, | ||
33 | .flags = IORESOURCE_IRQ | ||
34 | } | ||
35 | }; | ||
36 | |||
37 | struct platform_device s3c_device_rtc = { | ||
38 | .name = "s3c64xx-rtc", | ||
39 | .id = -1, | ||
40 | .num_resources = ARRAY_SIZE(s3c_rtc_resource), | ||
41 | .resource = s3c_rtc_resource, | ||
42 | }; | ||
43 | EXPORT_SYMBOL(s3c_device_rtc); | ||