linux-mips
[Top] [All Lists]

Re: [PATCH 2/2] [loongson] fuloong: add RTC_LIB Support

To: Wu Zhangjin <wuzhangjin@gmail.com>
Subject: Re: [PATCH 2/2] [loongson] fuloong: add RTC_LIB Support
From: Arnaud Patard <apatard@mandriva.com>
Date: Wed, 04 Nov 2009 17:03:35 +0100
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org, rtc-linux@googlegroups.com
In-reply-to: <1257349784-21444-1-git-send-email-wuzhangjin@gmail.com> (Wu Zhangjin's message of "Wed, 4 Nov 2009 23:49:44 +0800")
Organization: Mandriva
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1257349784-21444-1-git-send-email-wuzhangjin@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.1 (gnu/linux)
Wu Zhangjin <wuzhangjin@gmail.com> writes:
Hi,

> + *  Registration of Cobalt RTC platform device.

Of Cobalt platform device ? I thought we were on loongson :)

> + *
> + *  Copyright (C) 2007  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
> + *  Copyright (C) 2009  Wu Zhangjin <wuzj@lemote.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/ioport.h>
> +#include <linux/mc146818rtc.h>
> +#include <linux/platform_device.h>
> +
> +static struct resource rtc_cmos_resource[] = {
> +     {
> +             .start  = RTC_PORT(0),
> +             .end    = RTC_PORT(1),
> +             .flags  = IORESOURCE_IO,
> +     },
> +     {
> +             .start  = RTC_IRQ,
> +             .end    = RTC_IRQ,
> +             .flags  = IORESOURCE_IRQ,
> +     },
> +};
> +
> +static struct platform_device rtc_cmos_device = {
> +     .name           = "rtc_cmos",
> +     .id             = -1,
> +     .num_resources  = ARRAY_SIZE(rtc_cmos_resource),
> +     .resource       = rtc_cmos_resource
> +};
> +
> +static __init int rtc_cmos_init(void)
> +{
> +     platform_device_register(&rtc_cmos_device);
> +
> +     return 0;

what about return platform_device_register(&rtc_cmos_device); ?


Arnaud

<Prev in Thread] Current Thread [Next in Thread>