diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-03-30 09:33:52 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-03-30 09:33:52 +0000 |
commit | 9350639c6da6dc1a57ad746c3f452b936e2e5374 (patch) | |
tree | 69329a5c4192a6c241ea1a3278e91cd8a2c719d2 /sys/dev/pci/ami_pci.c | |
parent | 836faf5416a873bddbe1fbace4ad7bab6eb7726f (diff) |
map only first page of whatever is given to us in the bar,
apparetnyl sometimes we get whole lots of space there.
also map it 32bit.
Diffstat (limited to 'sys/dev/pci/ami_pci.c')
-rw-r--r-- | sys/dev/pci/ami_pci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/ami_pci.c b/sys/dev/pci/ami_pci.c index 07bbcbf48a6..f5fc9d62b69 100644 --- a/sys/dev/pci/ami_pci.c +++ b/sys/dev/pci/ami_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami_pci.c,v 1.9 2002/03/14 01:26:58 millert Exp $ */ +/* $OpenBSD: ami_pci.c,v 1.10 2002/03/30 09:33:51 mickey Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -50,6 +50,7 @@ #include <dev/ic/amivar.h> #define AMI_BAR 0x10 +#define AMI_PCI_MEMSIZE 0x1000 #define AMI_SUBSYSID 0x2c #define PCI_EBCR 0x40 #define AMI_WAKEUP 0x64 @@ -156,8 +157,9 @@ ami_pci_attach(parent, self, aux) pci_conf_write(pa->pa_pc, pa->pa_tag, AMI_WAKEUP, 0); #endif csr = pci_mapreg_type(pa->pa_pc, pa->pa_tag, AMI_BAR); + csr |= PCI_MAPREG_MEM_TYPE_32BIT; if (pci_mapreg_map(pa, AMI_BAR, csr, 0, - &sc->iot, &sc->ioh, NULL, &size, 0)) { + &sc->iot, &sc->ioh, NULL, &size, AMI_PCI_MEMSIZE)) { printf(": can't map controller pci space\n"); return; } |