diff options
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r-- | arch/arm/plat-samsung/Kconfig | 5 | ||||
-rw-r--r-- | arch/arm/plat-samsung/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-samsung/dev-rtc.c | 43 |
3 files changed, 49 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index d552c65fa1b0..f4a017df29a1 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
@@ -185,6 +185,11 @@ config S3C_DEV_NAND | |||
185 | help | 185 | help |
186 | Compile in platform device definition for NAND controller | 186 | Compile in platform device definition for NAND controller |
187 | 187 | ||
188 | config S3C_DEV_RTC | ||
189 | bool | ||
190 | help | ||
191 | Complie in platform device definition for RTC | ||
192 | |||
188 | config S3C64XX_DEV_SPI | 193 | config S3C64XX_DEV_SPI |
189 | bool | 194 | bool |
190 | help | 195 | help |
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index 22c89d08f6e5..4326c1be4936 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile | |||
@@ -40,6 +40,7 @@ obj-y += dev-uart.o | |||
40 | obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o | 40 | obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o |
41 | obj-$(CONFIG_S3C_DEV_USB_HSOTG) += dev-usb-hsotg.o | 41 | obj-$(CONFIG_S3C_DEV_USB_HSOTG) += dev-usb-hsotg.o |
42 | obj-$(CONFIG_S3C_DEV_NAND) += dev-nand.o | 42 | obj-$(CONFIG_S3C_DEV_NAND) += dev-nand.o |
43 | obj-$(CONFIG_S3C_DEV_RTC) += dev-rtc.o | ||
43 | 44 | ||
44 | # DMA support | 45 | # DMA support |
45 | 46 | ||
diff --git a/arch/arm/plat-samsung/dev-rtc.c b/arch/arm/plat-samsung/dev-rtc.c new file mode 100644 index 000000000000..bf4e2267333c --- /dev/null +++ b/arch/arm/plat-samsung/dev-rtc.c | |||
@@ -0,0 +1,43 @@ | |||
1 | /* linux/arch/arm/plat-samsung/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 = S3C_PA_RTC, | ||
22 | .end = S3C_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); | ||