Subject: CATS todclock reorganization (Re: CVS commit: syssrc/sys/arch)
To: None <port-cats@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-cats
Date: 02/10/2002 22:09:45
In article <20020210122604.7437CB004@cvs.netbsd.org>
chris@netbsd.org wrote:

> Added Files:
> 	syssrc/sys/arch/arm/footbridge: todclock.c todclockvar.h
> 	syssrc/sys/arch/arm/footbridge/isa: ds1687reg.h dsrtc.c icu.h isa_io.c
> 	    isa_io_asm.S isadma_machdep.c isapnp_machdep.c joy_timer.c
> 	    sysbeep_isa.c
 :
> Following the demise of arch/arm32 update cats, and restore
>the isa files to a more sane location.

It seems todclock.c does not have footbridge-specific functions.
Anyway, I think we should reorganize todclock attachment on cats port.
My idea is:

- use todr(9) functions in sys/dev/clock_subr.[ch]
- split files into:
 * device dependent todr(9) functions
  (dev/ic/ds1687.c, like dev/ic/mk48txx.c)
 * machine (or bus) dependent attachments
  (arch/cats/isa/dsrtc.c, or arm/footbridge/isa/dsrtc.c)
 * device independent inittodr(9) and resettodr(9) functions
  (arch/cats/cats/todclock.c)

Currently hp300, mvme68k and news68k take this approach.

Comments?
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp