Deleted Added
full compact
mk48txxreg.h (135486) mk48txxreg.h (137813)
1/*-
2 * Copyright (c) 2000 The NetBSD Foundation, Inc.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to The NetBSD Foundation
6 * by Paul Kranenburg.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 19 unchanged lines hidden (view full) ---

28 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 * POSSIBILITY OF SUCH DAMAGE.
35 *
1/*-
2 * Copyright (c) 2000 The NetBSD Foundation, Inc.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to The NetBSD Foundation
6 * by Paul Kranenburg.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 19 unchanged lines hidden (view full) ---

28 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 * POSSIBILITY OF SUCH DAMAGE.
35 *
36 * $NetBSD: mk48txxreg.h,v 1.4 2000/11/11 11:59:42 pk Exp $
36 * from: NetBSD: mk48txxreg.h,v 1.7 2003/11/01 22:41:42 tsutsui Exp
37 *
37 *
38 * $FreeBSD: head/sys/dev/mk48txx/mk48txxreg.h 135486 2004-09-20 00:09:32Z marius $
38 * $FreeBSD: head/sys/dev/mk48txx/mk48txxreg.h 137813 2004-11-17 12:54:12Z marius $
39 */
40
41/*
42 * Mostek MK48Txx clocks.
43 *
44 * The MK48T02 has 2KB of non-volatile memory. The time-of-day clock
45 * registers start at offset 0x7f8.
46 *
39 */
40
41/*
42 * Mostek MK48Txx clocks.
43 *
44 * The MK48T02 has 2KB of non-volatile memory. The time-of-day clock
45 * registers start at offset 0x7f8.
46 *
47 * The MK48T08 has 8KB of non-volatile memory
47 * The MK48T08 and MK48T18 have 8KB of non-volatile memory
48 *
49 * The MK48T59 also has 8KB of non-volatile memory but in addition it
50 * has a battery low detection bit and a power supply wakeup alarm for
51 * power management. It's at offset 0x1ff0 in the NVRAM.
52 */
53
54/*
55 * Mostek MK48TXX register definitions

--- 93 unchanged lines hidden (view full) ---

149
150/* Model specific NVRAM sizes and clock offsets */
151#define MK48T02_CLKSZ 2048
152#define MK48T02_CLKOFF 0x7f0
153
154#define MK48T08_CLKSZ 8192
155#define MK48T08_CLKOFF 0x1ff0
156
48 *
49 * The MK48T59 also has 8KB of non-volatile memory but in addition it
50 * has a battery low detection bit and a power supply wakeup alarm for
51 * power management. It's at offset 0x1ff0 in the NVRAM.
52 */
53
54/*
55 * Mostek MK48TXX register definitions

--- 93 unchanged lines hidden (view full) ---

149
150/* Model specific NVRAM sizes and clock offsets */
151#define MK48T02_CLKSZ 2048
152#define MK48T02_CLKOFF 0x7f0
153
154#define MK48T08_CLKSZ 8192
155#define MK48T08_CLKOFF 0x1ff0
156
157#define MK48T18_CLKSZ 8192
158#define MK48T18_CLKOFF 0x1ff0
159
157#define MK48T59_CLKSZ 8192
158#define MK48T59_CLKOFF 0x1ff0
160#define MK48T59_CLKSZ 8192
161#define MK48T59_CLKOFF 0x1ff0
159
160/* Chip attach function */
161int mk48txx_attach(device_t, bus_space_tag_t, bus_space_handle_t, const char *,
162 int);
163
164/* Retrieve size of the on-chip NVRAM area */
165int mk48txx_get_nvram_size(device_t, bus_size_t *);
166
167/* Methods for the clock interface. */
168int mk48txx_gettime(device_t, struct timespec *);
169int mk48txx_settime(device_t, struct timespec *);