Re: RTC (real time clock) question about sh4 7760

Paul Mundt <[email protected]> Thu, 7 Oct 2004 12:33:31 +0300
Newsgroups gmane.linux.ports.sh.devel,gmane.linux.ports.sh.general
Message-ID <[email protected]>
On Thu, Oct 07, 2004 at 10:29:56AM +0000, Fabio Giovagnini wrote:
> I'm porting linux sh onLogic PD lsh7760-10 board.
> The sh4 7760 doesn't have an on chip RTC (while other sh4 processors does), 

There are already plenty of boards that don't have the SH RTC. The Dreamcast
is an example, the SH7300 and the SH73180 solution engines are another (this
is why CONFIG_SH_RTC is selectable).

> and the board I'm working on seems to have no RTC (maybe I2C bus connected).
> So in such application I think there is no RTC available; what is the best way 
> to describe this? I think to write rtc.c rtc.h modules and write the related 
> funcions doing nothing.
> Is it correct?
> 
No. If you have your own rtc, you can wrap into rtc_get_time/rtc_set_time. The
dreamcast does this in arch/sh/boards/dreamcast/rtc.c for instance. Otherwise
if you have a higher level rtc (such as via i2c), you can do this in
drivers/char once you have established the necessary i2c work elsewhere.

Note that CONFIG_RTC will still apply in this case, but CONFIG_SH_RTC will
not.

Also, as has been noted previously. Do _not_ start a new thread by replying to
an old one. You've just cross posted the entire linux-kernel mailing list as a
result of this.
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFBZQ1rvfgmmv+NIDsRAnbZAKCCZ6Np34Fj1VqfA1aTGR3ZG2xfOwCglTKh
ubfIeQQ8ag89qIQviqaBvvY=
=u59H
-----END PGP SIGNATURE-----