diff options
| author | Ingo Molnar <mingo@elte.hu> | 2010-07-21 21:45:02 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2010-07-21 21:45:08 +0200 |
| commit | dca45ad8af54963c005393a484ad117b8ba6150f (patch) | |
| tree | 7c9a6966283a6bb12b54e5680a67d203be292930 /arch/mips/loongson/common/rtc.c | |
| parent | 68c38fc3cb4e5a60f502ee9c45f3dfe70e5165ad (diff) | |
| parent | cd5b8f8755a89a57fc8c408d284b8b613f090345 (diff) | |
Merge branch 'linus' into sched/core
Merge reason: Move from the -rc3 to the almost-rc6 base.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/mips/loongson/common/rtc.c')
| -rw-r--r-- | arch/mips/loongson/common/rtc.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/mips/loongson/common/rtc.c b/arch/mips/loongson/common/rtc.c new file mode 100644 index 00000000000..a90d87c0155 --- /dev/null +++ b/arch/mips/loongson/common/rtc.c @@ -0,0 +1,43 @@ +/* + * Lemote Fuloong platform support + * + * Copyright(c) 2010 Arnaud Patard <apatard@mandriva.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/mc146818rtc.h> + +struct resource loongson_rtc_resources[] = { + { + .start = RTC_PORT(0), + .end = RTC_PORT(1), + .flags = IORESOURCE_IO, + }, { + .start = RTC_IRQ, + .end = RTC_IRQ, + .flags = IORESOURCE_IRQ, + } +}; + +static struct platform_device loongson_rtc_device = { + .name = "rtc_cmos", + .id = -1, + .resource = loongson_rtc_resources, + .num_resources = ARRAY_SIZE(loongson_rtc_resources), +}; + + +static int __init loongson_rtc_platform_init(void) +{ + platform_device_register(&loongson_rtc_device); + return 0; +} + +device_initcall(loongson_rtc_platform_init); |
