linux-mips
[Top] [All Lists]

Re: [PATCH] M48T35: new RTC driver

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: [PATCH] M48T35: new RTC driver
From: tsbogend@alpha.franken.de (Thomas Bogendoerfer)
Date: Mon, 4 Aug 2008 09:49:09 +0200
Cc: rtc-linux@googlegroups.com, linux-mips@linux-mips.org, a.zummo@towertech.it, ralf@linux-mips.org
In-reply-to: <20080804.105151.213759441.nemoto@toshiba-tops.co.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20080803174140.797B51DA6F4@solo.franken.de> <20080804.105151.213759441.nemoto@toshiba-tops.co.jp>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.13 (2006-08-11)
On Mon, Aug 04, 2008 at 10:51:51AM +0900, Atsushi Nemoto wrote:
> On Sun,  3 Aug 2008 19:41:40 +0200 (CEST), Thomas Bogendoerfer 
> <tsbogend@alpha.franken.de> wrote:
> > This driver replaces the broken ip27-rtc driver in drivers/char and
> > gives back RTC support for SGI IP27 machines.
> ...
> > +config RTC_DRV_M48T35
> > +   tristate "ST M48T35"
> > +   depends on SGI_IP27
> 
> Is this driver really IP27 specific?  Let's make drivers generic as
> possible.

ok, will change that.

> > +   if ((hrs >= 24) || (min >= 60) || (sec >= 60))
> > +           return -EINVAL;
> 
> rtc_valid_tm() can be used?

good idea.

> > +   priv->baseaddr = res->start;
> > +   priv->reg = (struct m48t35_rtc __iomem *)res->start;
> 
> It seems priv->baseaddr is a physical address and priv->reg is a
> virtual address.  ioremap() is not needed?

I've misued res->start to pass the pointer, which was used by the old
rtc driver. I'll switch over to pass a physical address and add ioremap
code.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea.                                                [ RFC1925, 2.3 ]

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