Subject: mk48txx(4) tod clock driver cleanup
To: None <>
From: Izumi Tsutsui <>
List: port-mvmeppc
Date: 11/01/2003 02:45:59

I'd like to commit the following changes to cleanup
MI mk48txx(4) tod clock driver:

Current mk48txx(4) defines struct mk48txx in mk48txx.c and
allocate memory for the struct mk48txx and struct todr_chip_handle
in mk48txx_attach() by malloc(9) with ALIGN() macro,
and current mk48txx_attach() takes many args to register
todr(9) interface.

In my changes, struct mk48txx_softc are defined in mk48txxvar.h
like usual device drivers and all necessary values like struct
todr_chip_handle and members in old struct mk48txx are allocated
in it. mk48txx_allock() now only takes struct mk48txx_softc for arg,
and mk48txx_nvwr() and mk48txx_nvrd() functions are also changed
to take struct mk48txx_softc instead of bus space tag and handle.

Additionally, this patch also contains changes for prep and sparc64
to use MI mc146818(4) todclock driver.
(BTW, clock attachments on sparc64 should be split into each devices..)

I have checked news68k, newsmips, sparc and sparc64 (with mkclock) are
working and I confirm that all GENERIC kernels using mk48txx compile.
mvme68k, mvmeppc and prep are not tested (I don't have these machines),
but all changes are trivial anyway.

If there is no objection, I'll commit it in this weekend.
Izumi Tsutsui