Thu Dec 20 21:38:23 2018 UTC ()
set base_year_is_2k on dsrtc so we're compatible with RISC OS


(macallan)
diff -r1.16 -r1.17 src/sys/arch/iyonix/iyonix/autoconf.c

cvs diff -r1.16 -r1.17 src/sys/arch/iyonix/iyonix/autoconf.c (expand / switch to unified diff)

--- src/sys/arch/iyonix/iyonix/autoconf.c 2018/11/21 20:36:41 1.16
+++ src/sys/arch/iyonix/iyonix/autoconf.c 2018/12/20 21:38:23 1.17
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: autoconf.c,v 1.16 2018/11/21 20:36:41 macallan Exp $ */ 1/* $NetBSD: autoconf.c,v 1.17 2018/12/20 21:38:23 macallan Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc. 4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Matt Thomas <matt@3am-software.com>. 8 * by Matt Thomas <matt@3am-software.com>.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -20,27 +20,27 @@ @@ -20,27 +20,27 @@
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.16 2018/11/21 20:36:41 macallan Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.17 2018/12/20 21:38:23 macallan Exp $");
34 34
35#include "opt_md.h" 35#include "opt_md.h"
36 36
37#include <sys/param.h> 37#include <sys/param.h>
38#include <sys/systm.h> 38#include <sys/systm.h>
39#include <sys/reboot.h> 39#include <sys/reboot.h>
40#include <sys/disklabel.h> 40#include <sys/disklabel.h>
41#include <sys/device.h> 41#include <sys/device.h>
42#include <sys/conf.h> 42#include <sys/conf.h>
43#include <sys/kernel.h> 43#include <sys/kernel.h>
44#include <sys/malloc.h> 44#include <sys/malloc.h>
45 45
46#include <net/if.h> 46#include <net/if.h>
@@ -177,14 +177,18 @@ device_register(device_t dev, void *aux) @@ -177,14 +177,18 @@ device_register(device_t dev, void *aux)
177 prop_dictionary_set_uint32(dict, "height", 177 prop_dictionary_set_uint32(dict, "height",
178 bootconfig.height + 1); 178 bootconfig.height + 1);
179 prop_dictionary_set_uint32(dict, "depth", 179 prop_dictionary_set_uint32(dict, "depth",
180 1 << bootconfig.log2_bpp); 180 1 << bootconfig.log2_bpp);
181 /* 181 /*
182 * XXX 182 * XXX
183 * at least RISC OS 5.28 seems to use the graphics hardware in 183 * at least RISC OS 5.28 seems to use the graphics hardware in
184 * BGR mode when in 32bit colour, so take that into account 184 * BGR mode when in 32bit colour, so take that into account
185 */ 185 */
186 if (bootconfig.log2_bpp == 5) 186 if (bootconfig.log2_bpp == 5)
187 prop_dictionary_set_bool(dict, "is_bgr", 1); 187 prop_dictionary_set_bool(dict, "is_bgr", 1);
188 prop_dictionary_set_uint32(dict, "address", fbaddr); 188 prop_dictionary_set_uint32(dict, "address", fbaddr);
189 } 189 }
 190 if (device_is_a(dev, "dsrtc")) {
 191 prop_dictionary_t dict = device_properties(dev);
 192 prop_dictionary_set_bool(dict, "base_year_is_2000", 1);
 193 }
190} 194}