Tue Apr 26 08:08:40 2011 UTC ()
Priority of QNAP board detection was still too high. It should be lowest,
because a Realtek chip at pci device 15 is used on several boards. Now
NH230/All6250 detection should work again.


(phx)
diff -r1.16 -r1.17 src/sys/arch/sandpoint/stand/altboot/brdsetup.c

cvs diff -r1.16 -r1.17 src/sys/arch/sandpoint/stand/altboot/brdsetup.c (expand / switch to unified diff)

--- src/sys/arch/sandpoint/stand/altboot/brdsetup.c 2011/04/25 18:28:47 1.16
+++ src/sys/arch/sandpoint/stand/altboot/brdsetup.c 2011/04/26 08:08:39 1.17
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: brdsetup.c,v 1.16 2011/04/25 18:28:47 phx Exp $ */ 1/* $NetBSD: brdsetup.c,v 1.17 2011/04/26 08:08:39 phx Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 2008 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.
@@ -219,40 +219,40 @@ brdsetup(void) @@ -219,40 +219,40 @@ brdsetup(void)
219 } 219 }
220 else if (PCI_CLASS(pcicfgread(dev11, PCI_CLASS_REG)) == PCI_CLASS_ETH) { 220 else if (PCI_CLASS(pcicfgread(dev11, PCI_CLASS_REG)) == PCI_CLASS_ETH) {
221 /* ADMtek AN985 (tlp) or RealTek 8169S (re) at dev 11 */ 221 /* ADMtek AN985 (tlp) or RealTek 8169S (re) at dev 11 */
222 brdtype = BRD_KUROBOX; 222 brdtype = BRD_KUROBOX;
223 } 223 }
224 else if (PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x11ab) { 224 else if (PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x11ab) {
225 /* SKnet/Marvell (sk) at dev 15 */ 225 /* SKnet/Marvell (sk) at dev 15 */
226 brdtype = BRD_SYNOLOGY; 226 brdtype = BRD_SYNOLOGY;
227 } 227 }
228 else if (PCI_VENDOR(pcicfgread(dev13, PCI_ID_REG)) == 0x1106) { 228 else if (PCI_VENDOR(pcicfgread(dev13, PCI_ID_REG)) == 0x1106) {
229 /* VIA 6410 (viaide) at dev 13 */ 229 /* VIA 6410 (viaide) at dev 13 */
230 brdtype = BRD_STORCENTER; 230 brdtype = BRD_STORCENTER;
231 } 231 }
232 else if (PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x8086 
233 || PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x10ec) { 
234 /* Intel (wm) or RealTek (re) at dev 15 */ 
235 brdtype = BRD_QNAPTS; 
236 } 
237 else if (PCI_VENDOR(pcicfgread(dev16, PCI_ID_REG)) == 0x1191) { 232 else if (PCI_VENDOR(pcicfgread(dev16, PCI_ID_REG)) == 0x1191) {
238 /* ACARD ATP865 (acardide) at dev 16 */ 233 /* ACARD ATP865 (acardide) at dev 16 */
239 brdtype = BRD_DLINKDSM; 234 brdtype = BRD_DLINKDSM;
240 } 235 }
241 else if (PCI_VENDOR(pcicfgread(dev16, PCI_ID_REG)) == 0x1283 236 else if (PCI_VENDOR(pcicfgread(dev16, PCI_ID_REG)) == 0x1283
242 || PCI_VENDOR(pcicfgread(dev16, PCI_ID_REG)) == 0x1095) { 237 || PCI_VENDOR(pcicfgread(dev16, PCI_ID_REG)) == 0x1095) {
243 /* ITE (iteide) or SiI (satalink) at dev 16 */ 238 /* ITE (iteide) or SiI (satalink) at dev 16 */
244 brdtype = BRD_NH230NAS; 239 brdtype = BRD_NH230NAS;
245 } 240 }
 241 else if (PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x8086
 242 || PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x10ec) {
 243 /* Intel (wm) or RealTek (re) at dev 15 */
 244 brdtype = BRD_QNAPTS;
 245 }
246 246
247 brdprop = brd_lookup(brdtype); 247 brdprop = brd_lookup(brdtype);
248 248
249 /* brd dependent adjustments */ 249 /* brd dependent adjustments */
250 setup(); 250 setup();
251 251
252 /* determine clock frequencies */ 252 /* determine clock frequencies */
253 if (brdprop->extclk != 0) 253 if (brdprop->extclk != 0)
254 extclk = brdprop->extclk; 254 extclk = brdprop->extclk;
255 if (busclock == 0) { 255 if (busclock == 0) {
256 if (cputype() == MPC8245) { 256 if (cputype() == MPC8245) {
257 /* PLL_CFG from PCI host bridge register 0xe2 */ 257 /* PLL_CFG from PCI host bridge register 0xe2 */
258 val = pcicfgread(pchb, 0xe0); 258 val = pcicfgread(pchb, 0xe0);