Re: RTC todr for mips/alchemy

"Garrett D'Amore" <[email protected]>
Newsgroups gmane.os.netbsd.ports.evbmips
Message-ID <[email protected]>
Shigeyuki Fukushima wrote:
> Hi,
>
> OMS-AL400 has a I2C RTC chip (which is connected PSC0 SMBus).
> Now I have committed a driver for this one.
>
> Then, I want to configure OMS-AL400 kernel, but can't build.
> Therefore, there is no code implemented todr*
> (todr_attach/inittodr/resettodr) functions
> under mips/alchemy source tree.
>
> IMHO, we can use sys/arch/powerpc/ibm4xx/dev/rtc.c as is.
> (Perhaps this should be used on all platform.)
>
> Just copy it to sys/arch/mips/alchemy/dev/rtc.c?
>
>   
No, please.

Take a look at sys/arch/evbmips/clock.c

There is also sys/arch/mips/alchemy/aurtc.c

You should probably create a custom evbmips/omsal400 directory and stick
your RTC driver there.  You should probably model it after the aurrtc code.

In your kernel config, you must *only* have one of aurrtc or your rtc. 
multiple devices trying to clockattach() will panic.

-- 
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134  Fax: 951 325-2191
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.