• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/arch/mips/loongson/common/
1/*
2 *  Lemote Fuloong platform support
3 *
4 *  Copyright(c) 2010 Arnaud Patard <apatard@mandriva.com>
5 *
6 *  This program is free software; you can redistribute it and/or modify
7 *  it under the terms of the GNU General Public License as published by
8 *  the Free Software Foundation; either version 2 of the License, or
9 *  (at your option) any later version.
10 */
11
12#include <linux/init.h>
13#include <linux/kernel.h>
14#include <linux/platform_device.h>
15#include <linux/mc146818rtc.h>
16
17struct resource loongson_rtc_resources[] = {
18	{
19		.start	= RTC_PORT(0),
20		.end	= RTC_PORT(1),
21		.flags	= IORESOURCE_IO,
22	}, {
23		.start	= RTC_IRQ,
24		.end	= RTC_IRQ,
25		.flags	= IORESOURCE_IRQ,
26	}
27};
28
29static struct platform_device loongson_rtc_device = {
30	.name		= "rtc_cmos",
31	.id		= -1,
32	.resource	= loongson_rtc_resources,
33	.num_resources	= ARRAY_SIZE(loongson_rtc_resources),
34};
35
36
37static int __init loongson_rtc_platform_init(void)
38{
39	platform_device_register(&loongson_rtc_device);
40	return 0;
41}
42
43device_initcall(loongson_rtc_platform_init);
44