Sat Jan 11 01:43:22 2014 UTC ()
Use the same address as LUNA to probe LANCE on LUNA-II.

It looks the device is mapped at both regions.
4.4BSD/luna68k probes it at 0xf1000000, but UniOS-Mach for LUNA-II
attaches the lance at 0xf0000000.  It is probably because
the UniOS needs to map DS1220 NVRAM (mapped at 0xf1000004 and
used to store the MAC address) to the different kernel page,
but there is no reason for us to use different addresses.
(Note our bootloader already use the same address for both machines.)

This change will make (forthcoming) booted device check easier.


(tsutsui)
diff -r1.12 -r1.13 src/sys/arch/luna68k/luna68k/mainbus.c

cvs diff -r1.12 -r1.13 src/sys/arch/luna68k/luna68k/mainbus.c (expand / switch to unified diff)

--- src/sys/arch/luna68k/luna68k/mainbus.c 2013/09/23 17:11:22 1.12
+++ src/sys/arch/luna68k/luna68k/mainbus.c 2014/01/11 01:43:22 1.13
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mainbus.c,v 1.12 2013/09/23 17:11:22 tsutsui Exp $ */ 1/* $NetBSD: mainbus.c,v 1.13 2014/01/11 01:43:22 tsutsui Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2000 The NetBSD Foundation, Inc. 4 * Copyright (c) 2000 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 Tohru Nishimura. 8 * by Tohru Nishimura.
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.
@@ -21,46 +21,46 @@ @@ -21,46 +21,46 @@
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 33
34__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.12 2013/09/23 17:11:22 tsutsui Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.13 2014/01/11 01:43:22 tsutsui Exp $");
35 35
36#include <sys/param.h> 36#include <sys/param.h>
37#include <sys/systm.h> 37#include <sys/systm.h>
38#include <sys/device.h> 38#include <sys/device.h>
39 39
40#include <machine/cpu.h> 40#include <machine/cpu.h>
41#include <machine/autoconf.h> 41#include <machine/autoconf.h>
42 42
43static const struct mainbus_attach_args luna_devs[] = { 43static const struct mainbus_attach_args luna_devs[] = {
44 { "clock", 0x45000000, -1 }, /* Mostek TimeKeeper */ 44 { "clock", 0x45000000, -1 }, /* Mostek TimeKeeper */
45 { "le", 0xf1000000, 3 }, /* Am7990 */ 45 { "le", 0xf1000000, 3 }, /* Am7990 */
46 { "sio", 0x51000000, 6 }, /* uPD7201A */ 46 { "sio", 0x51000000, 6 }, /* uPD7201A */
47 { "fb", 0xc1100000, -1 }, /* BrookTree RAMDAC */ 47 { "fb", 0xc1100000, -1 }, /* BrookTree RAMDAC */
48 { "spc", 0xe1000000, 2 }, /* MB89352 */ 48 { "spc", 0xe1000000, 2 }, /* MB89352 */
49}; 49};
50 50
51static const struct mainbus_attach_args luna2_devs[] = { 51static const struct mainbus_attach_args luna2_devs[] = {
52 { "clock", 0x45000000, -1 }, /* Dallas TimeKeeper */ 52 { "clock", 0x45000000, -1 }, /* Dallas TimeKeeper */
53 { "le", 0xf0000000, 3 }, /* Am7990 */ 53 { "le", 0xf1000000, 3 }, /* Am7990 */
54 { "sio", 0x51000000, 6 }, /* uPD7201A */ 54 { "sio", 0x51000000, 6 }, /* uPD7201A */
55 { "fb", 0xc1100000, -1 }, /* BrookTree RAMDAC */ 55 { "fb", 0xc1100000, -1 }, /* BrookTree RAMDAC */
56 { "spc", 0xe1000000, 2 }, /* internal MB89352 */ 56 { "spc", 0xe1000000, 2 }, /* internal MB89352 */
57 { "spc", 0xe1000040, 2 }, /* external MB89352 */ 57 { "spc", 0xe1000040, 2 }, /* external MB89352 */
58}; 58};
59 59
60static void mainbus_attach(device_t, device_t, void *); 60static void mainbus_attach(device_t, device_t, void *);
61static int mainbus_match(device_t, cfdata_t, void *); 61static int mainbus_match(device_t, cfdata_t, void *);
62static int mainbus_print(void *, const char *); 62static int mainbus_print(void *, const char *);
63 63
64CFATTACH_DECL_NEW(mainbus, 0, 64CFATTACH_DECL_NEW(mainbus, 0,
65 mainbus_match, mainbus_attach, NULL, NULL); 65 mainbus_match, mainbus_attach, NULL, NULL);
66 66