Fix use pci clock for siop(4), set value "use_pciclock" is 1 by

prop_dictionary_set_bool().
This commit is contained in:
kiyohara 2008-06-11 02:14:29 +00:00
parent c3b43ec571
commit 064d2af81d
1 changed files with 14 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.20 2008/05/30 15:54:50 kiyohara Exp $ */
/* $NetBSD: autoconf.c,v 1.21 2008/06/11 02:14:29 kiyohara Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.20 2008/05/30 15:54:50 kiyohara Exp $");
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.21 2008/06/11 02:14:29 kiyohara Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -144,6 +144,18 @@ device_register(struct device *dev, void *aux)
prop_dictionary_set_uint32(dict, "depth", 8);
prop_dictionary_set_uint32(dict, "address", fbaddr);
}
if (device_is_a(dev, "siop") &&
device_is_a(device_parent(dev), "pci")) {
prop_dictionary_t dict = device_properties(dev);
struct pci_attach_args *pa = aux;
int bus, device;
pci_decompose_tag(pa->pa_pc, pa->pa_tag, &bus, &device, NULL);
if (bus == 0 && device == 12)
/* Internal SCSI uses PCI clock as SCSI clock */
prop_dictionary_set_bool(dict, "use_pciclock", 1);
}
#endif
}