diff options
| author | tsutsui <tsutsui@NetBSD.org> | 2018-01-20 19:33:53 +0000 |
|---|---|---|
| committer | tsutsui <tsutsui@NetBSD.org> | 2018-01-20 19:33:53 +0000 |
| commit | 9e81856522178fcfd856c5e2b5c83455f989422d (patch) | |
| tree | fe6f54e6c945eb29eb4bac642d4206894edb349c /sys/arch/atari/dev | |
| parent | 0b234f53f58d8cf95303333e00b841db5ac8d60f (diff) | |
Skip NVRAM checksum check and re-initialization on Milan.
Milan's firmware seems to use different check method.
Diffstat (limited to 'sys/arch/atari/dev')
| -rw-r--r-- | sys/arch/atari/dev/nvram.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sys/arch/atari/dev/nvram.c b/sys/arch/atari/dev/nvram.c index 021e5075bf5..d5c1409bc93 100644 --- a/sys/arch/atari/dev/nvram.c +++ b/sys/arch/atari/dev/nvram.c @@ -1,4 +1,4 @@ -/* $NetBSD: nvram.c,v 1.20 2015/03/06 12:41:05 christos Exp $ */ +/* $NetBSD: nvram.c,v 1.21 2018/01/20 19:33:53 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nvram.c,v 1.20 2015/03/06 12:41:05 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvram.c,v 1.21 2018/01/20 19:33:53 tsutsui Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -92,11 +92,15 @@ nvr_attach(device_t parent, device_t self, void *aux) /* * Check the validity of the NVram contents */ - if (!nvram_csum_valid(nvram_csum())) { - printf(": Invalid checksum - re-initialized"); - for (nreg = MC_NVRAM_START; nreg < MC_NVRAM_CSUM; nreg++) - mc146818_write(RTC, nreg, 0); - nvram_set_csum(nvram_csum()); + /* XXX: Milan's firmware seems to use different check method */ + if ((machineid & ATARI_MILAN) == 0) { + if (!nvram_csum_valid(nvram_csum())) { + printf(": Invalid checksum - re-initialized"); + for (nreg = MC_NVRAM_START; nreg < MC_NVRAM_CSUM; + nreg++) + mc146818_write(RTC, nreg, 0); + nvram_set_csum(nvram_csum()); + } } sc = device_private(self); sc->sc_dev = self; |
