Fix DS1672 suppport: need to provide dm_ch_reg to avoid a KASSERT
on write. For consistency set dm_ch_value too, even if it's unused.
This commit is contained in:
parent
b7639842cb
commit
7bdb4633da
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ds1307.c,v 1.21 2014/11/20 16:34:26 christos Exp $ */
|
||||
/* $NetBSD: ds1307.c,v 1.22 2016/04/05 10:53:16 bouyer Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Wasabi Systems, Inc.
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ds1307.c,v 1.21 2014/11/20 16:34:26 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ds1307.c,v 1.22 2016/04/05 10:53:16 bouyer Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -86,6 +86,8 @@ static const struct dsrtc_model dsrtc_models[] = {
|
||||
.dm_model = 1672,
|
||||
.dm_rtc_start = DS1672_RTC_START,
|
||||
.dm_rtc_size = DS1672_RTC_SIZE,
|
||||
.dm_ch_reg = DS1672_CONTROL,
|
||||
.dm_ch_value = DS1672_CONTROL_CH,
|
||||
.dm_flags = 0,
|
||||
}, {
|
||||
.dm_model = 3231,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ds1307reg.h,v 1.5 2014/10/12 01:23:23 macallan Exp $ */
|
||||
/* $NetBSD: ds1307reg.h,v 1.6 2016/04/05 10:53:16 bouyer Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Wasabi Systems, Inc.
|
||||
@ -70,6 +70,7 @@
|
||||
#define DS1672_CNTR3 0x02
|
||||
#define DS1672_CNTR4 0x03
|
||||
#define DS1672_CONTROL 0x04
|
||||
#define DS1672_CONTROL_CH (1 << 7) /* clock hold */
|
||||
#define DS1672_TRICKLE 0x05
|
||||
|
||||
#define DS1672_RTC_START 0
|
||||
|
Loading…
Reference in New Issue
Block a user