Subject: Re: USB support in Qube2?
To: None <port-cobalt@NetBSD.org>
From: KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
List: port-cobalt
Date: 01/10/2004 17:07:38
----Next_Part(Sat_Jan_10_17:07:38_2004_708)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi

I have USB2.0 & IEEE1394 PCI card. I tried...


From: Andreas Yankopolus <andreas@yank.to>
Date: 01/09/2004 14:19:11

> crash. The boot log (appended below) indicates that NetBSD is having 
> problems mapping the i/o space of the USB card.

Me too.

I found the reason. CSR & BAR register not configured for PCI
multifunction card, after func 1.

func  reg   val
----  ---   ---
  0: 0x 0: 30381106
  0: 0x 4:  2100007
  0: 0x 8:  c030061
  0: 0x c:   801600
  0: 0x10:        0
  0: 0x14:        0
  0: 0x18:        0
  0: 0x1c:        0
  0: 0x20: 10108001
  0: 0x24:        0
  0: 0x28:        0
  0: 0x2c:  2161154
  1: 0x 0: 30381106
  1: 0x 4:  2100000
  1: 0x 8:  c030061
  1: 0x c:   801600
  1: 0x10:        0
  1: 0x14:        0
  1: 0x18:        0
  1: 0x1c:        0
  1: 0x20:     fce1
  1: 0x24:        0
  1: 0x28:        0
  1: 0x2c:  2161154
  2: 0x 0: 31041106
  2: 0x 4:  2100000
  2: 0x 8:  c032062
  2: 0x c:   801600
  2: 0x10:        0
  2: 0x14:        0
  2: 0x18:        0
  2: 0x1c:        0
  2: 0x20:        0
  2: 0x24:        0
  2: 0x28:        0
  2: 0x2c:  2171154
  3: 0x 0: 30441106
  3: 0x 4:  2100080
  3: 0x 8:  c001046
  3: 0x c:        0
  3: 0x10:        0
  3: 0x14:        1
  3: 0x18:        0
  3: 0x1c:        0
  3: 0x20:        0
  3: 0x24:        0
  3: 0x28:        0
  3: 0x2c:  2151154



I think need PCI_NETBSD_CONFIGURE. I wrote PCI_NETBSD_CONFIGURE patch.
You write 'options PCI_NETBSD_CONFIGURE' at your GENERIC. after config
& make depend, make.


OK ?
--
kiyohara


----Next_Part(Sat_Jan_10_17:07:38_2004_708)--
Content-Type: Text/Plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline; filename="cobalt_log2"

connected

=ECCobalt Microserver Diagnostics - 'We serve it, you surf it'
Built Wed Mar  3 21:26:25 PST 1999=0D

 1.LCD Test................................PASS
 2.Controller Test.........................PASS
 5.Bank 0:.................................64M
 6.Bank 1:.................................0M
 7.Bank 2:.................................64M
 8.Bank 3:.................................0M
 9.Serial Test.............................PASS
10.PCI Expansion Slot....................**Unknown Card**
12.IDE Test................................PASS
13.Ethernet Test...........................PASS
16.RTC Test................................PASS
BOOTLOADER: trying to boot from partition /dev/hda1
Decompressing - done
Decompressing - done.

>> NetBSD/cobalt 1.6ZG Bootloader, Revision 0.1 [@0x81000000]
>> (lance@highpriestess.fool, Mon Jan  5 01:23:36 JST 2004)
>> Memory:		131072 k
>> PROM boot string:	root=3D/dev/hda1 ro
Loading: wd0a:netbsd
Starting at 0x80001000

[ Kernel symbol table missing! ]
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.6ZG (MAGICIAN) #15: Sat Jan 10 00:14:27 JST 2004
	lance@highpriestess.fool:/usr/src/sys/arch/cobalt/compile/MAGICIAN
128 MB memory, 115 MB free, 6656 KB in 1664 buffers
mainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
cpu0 at mainbus0: QED RM5200 CPU (0x28a0) Rev. 10.0 with built-in FPU R=
ev. 10.0
cpu0: 32KB/32B 2-way set-associative L1 Instruction cache, 48 TLB entri=
es
cpu0: 32KB/32B 2-way set-associative write-back L1 Data cache
panel0 at mainbus0 addr 0x1f000000
gt0 at mainbus0 addr 0x14000000
PCI: bus 0, device 0, function 0: id=3D414611ab: Vendor=3D11ab, Product=
=3D4146
PCI: bus 0, device 0, function 0: Found dev 0x11ab 0x4146 -- really pro=
bing.
PCI: bus 0, device 1, function 0: id=3Dffffffff: Vendor=3Dffff, Product=
=3Dffff
PCI: bus 0, device 2, function 0: id=3Dffffffff: Vendor=3Dffff, Product=
=3Dffff
PCI: bus 0, device 3, function 0: id=3Dffffffff: Vendor=3Dffff, Product=
=3Dffff
PCI: bus 0, device 4, function 0: id=3Dffffffff: Vendor=3Dffff, Product=
=3Dffff
PCI: bus 0, device 5, function 0: id=3Dffffffff: Vendor=3Dffff, Product=
=3Dffff
PCI: bus 0, device 6, function 0: id=3D0: Vendor=3D0, Product=3D0
PCI: bus 0, device 6, function 0: Found dev 0x0000 0x0000 -- really pro=
bing.
PCI: bus 0, device 6, function 0: MEM32 BAR 0x10 is void
PCI: bus 0, device 6, function 0: MEM32 BAR 0x14 is void
PCI: bus 0, device 6, function 0: MEM32 BAR 0x18 is void
PCI: bus 0, device 6, function 0: MEM32 BAR 0x1c is void
PCI: bus 0, device 6, function 0: MEM32 BAR 0x20 is void
PCI: bus 0, device 6, function 0: MEM32 BAR 0x24 is void
PCI: bus 0, device 7, function 0: id=3D191011: Vendor=3D1011, Product=3D=
19
PCI: bus 0, device 7, function 0: Found dev 0x1011 0x0019 -- really pro=
bing.
PCI: bus 0, device 7, function 0: Register 0x10, I/O size 128
PCI: bus 0, device 7, function 0: MEM32 BAR 0x14 has size 400
PCI: bus 0, device 7, function 0: Register 0x14, memory size 1024
PCI: bus 0, device 7, function 0: MEM32 BAR 0x18 is void
PCI: bus 0, device 7, function 0: MEM32 BAR 0x1c is void
PCI: bus 0, device 7, function 0: MEM32 BAR 0x20 is void
PCI: bus 0, device 7, function 0: MEM32 BAR 0x24 is void
PCI: bus 0, device 8, function 0: id=3Dffffffff: Vendor=3Dffff, Product=
=3Dffff
PCI: bus 0, device 9, function 0: id=3D5861106: Vendor=3D1106, Product=3D=
586
PCI: bus 0, device 9, function 0: Found dev 0x1106 0x0586 -- really pro=
bing.
PCI: bus 0, device 9, function 0: device is a bridge; not clearing enab=
les
PCI: bus 0, device 9, function 0: MEM32 BAR 0x10 is void
PCI: bus 0, device 9, function 0: MEM32 BAR 0x14 is void
PCI: bus 0, device 9, function 0: MEM32 BAR 0x18 is void
PCI: bus 0, device 9, function 0: MEM32 BAR 0x1c is void
PCI: bus 0, device 9, function 0: MEM32 BAR 0x20 is void
PCI: bus 0, device 9, function 0: MEM32 BAR 0x24 is void
PCI: bus 0, device 9, function 1: Found dev 0x1106 0x0571 -- really pro=
bing.
PCI: bus 0, device 9, function 1: MEM32 BAR 0x10 is void
PCI: bus 0, device 9, function 1: MEM32 BAR 0x14 is void
PCI: bus 0, device 9, function 1: MEM32 BAR 0x18 is void
PCI: bus 0, device 9, function 1: MEM32 BAR 0x1c is void
PCI: bus 0, device 9, function 1: Register 0x20, I/O size 16
PCI: bus 0, device 9, function 1: MEM32 BAR 0x24 is void
PCI: bus 0, device 9, function 2: Found dev 0x1106 0x3038 -- really pro=
bing.
PCI: bus 0, device 10, function 0: id=3D30381106: Vendor=3D1106, Produc=
t=3D3038
PCI: bus 0, device 10, function 0: Found dev 0x1106 0x3038 -- really pr=
obing.
PCI: bus 0, device 10, function 0: MEM32 BAR 0x10 is void
PCI: bus 0, device 10, function 0: MEM32 BAR 0x14 is void
PCI: bus 0, device 10, function 0: MEM32 BAR 0x18 is void
PCI: bus 0, device 10, function 0: MEM32 BAR 0x1c is void
PCI: bus 0, device 10, function 0: Register 0x20, I/O size 32
PCI: bus 0, device 10, function 0: MEM32 BAR 0x24 is void
PCI: bus 0, device 10, function 1: Found dev 0x1106 0x3038 -- really pr=
obing.
PCI: bus 0, device 10, function 1: MEM32 BAR 0x10 is void
PCI: bus 0, device 10, function 1: MEM32 BAR 0x14 is void
PCI: bus 0, device 10, function 1: MEM32 BAR 0x18 is void
PCI: bus 0, device 10, function 1: MEM32 BAR 0x1c is void
PCI: bus 0, device 10, function 1: Register 0x20, I/O size 32
PCI: bus 0, device 10, function 1: MEM32 BAR 0x24 is void
PCI: bus 0, device 10, function 2: Found dev 0x1106 0x3104 -- really pr=
obing.
PCI: bus 0, device 10, function 2: MEM32 BAR 0x10 has size 100
PCI: bus 0, device 10, function 2: Register 0x10, memory size 256
PCI: bus 0, device 10, function 2: MEM32 BAR 0x14 is void
PCI: bus 0, device 10, function 2: MEM32 BAR 0x18 is void
PCI: bus 0, device 10, function 2: MEM32 BAR 0x1c is void
PCI: bus 0, device 10, function 2: MEM32 BAR 0x20 is void
PCI: bus 0, device 10, function 2: MEM32 BAR 0x24 is void
PCI: bus 0, device 10, function 3: Found dev 0x1106 0x3044 -- really pr=
obing.
PCI: bus 0, device 10, function 3: MEM32 BAR 0x10 has size 800
PCI: bus 0, device 10, function 3: Register 0x10, memory size 2048
PCI: bus 0, device 10, function 3: Register 0x14, I/O size 128
PCI: bus 0, device 10, function 3: MEM32 BAR 0x18 is void
PCI: bus 0, device 10, function 3: MEM32 BAR 0x1c is void
PCI: bus 0, device 10, function 3: MEM32 BAR 0x20 is void
PCI: bus 0, device 10, function 3: MEM32 BAR 0x24 is void
PCI: bus 0, device 11, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 12, function 0: id=3D191011: Vendor=3D1011, Product=3D=
19
PCI: bus 0, device 12, function 0: Found dev 0x1011 0x0019 -- really pr=
obing.
PCI: bus 0, device 12, function 0: Register 0x10, I/O size 128
PCI: bus 0, device 12, function 0: MEM32 BAR 0x14 has size 400
PCI: bus 0, device 12, function 0: Register 0x14, memory size 1024
PCI: bus 0, device 12, function 0: MEM32 BAR 0x18 is void
PCI: bus 0, device 12, function 0: MEM32 BAR 0x1c is void
PCI: bus 0, device 12, function 0: MEM32 BAR 0x20 is void
PCI: bus 0, device 12, function 0: MEM32 BAR 0x24 is void
PCI: bus 0, device 13, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 14, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 15, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 16, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 17, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 18, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 19, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 20, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 21, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 22, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 23, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 24, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 25, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 26, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 27, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 28, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 29, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 30, function 0: id=3Dffffffff: Vendor=3Dffff, Produc=
t=3Dffff
PCI: bus 0, device 31, function 0: id=3D0: Vendor=3D0, Product=3D0
PCI: bus 0, device 31, function 0: Found dev 0x0000 0x0000 -- really pr=
obing.
PCI: bus 0, device 31, function 0: MEM32 BAR 0x10 is void
PCI: bus 0, device 31, function 0: MEM32 BAR 0x14 is void
PCI: bus 0, device 31, function 0: MEM32 BAR 0x18 is void
PCI: bus 0, device 31, function 0: MEM32 BAR 0x1c is void
PCI: bus 0, device 31, function 0: MEM32 BAR 0x20 is void
PCI: bus 0, device 31, function 0: MEM32 BAR 0x24 is void
PCI: bus 0, device 7, function 0: Putting 128 I/O bytes @ 0x10000000 (r=
eg 10)
PCI: bus 0, device 10, function 3: Putting 128 I/O bytes @ 0x10000080 (=
reg 14)
PCI: bus 0, device 12, function 0: Putting 128 I/O bytes @ 0x10000100 (=
reg 10)
PCI: bus 0, device 10, function 0: Putting 32 I/O bytes @ 0x10000180 (r=
eg 20)
PCI: bus 0, device 10, function 1: Putting 32 I/O bytes @ 0x100001a0 (r=
eg 20)
PCI: bus 0, device 9, function 1: Putting 16 I/O bytes @ 0x100001c0 (re=
g 20)
PCI: bus 0, device 10, function 3: Putting 2048 MEM bytes @ 0x12000000 =
(reg 10)
PCI: bus 0, device 7, function 0: Putting 1024 MEM bytes @ 0x12000800 (=
reg 14)
PCI: bus 0, device 12, function 0: Putting 1024 MEM bytes @ 0x12000c00 =
(reg 14)
PCI: bus 0, device 10, function 2: Putting 256 MEM bytes @ 0x12001000 (=
reg 10)
PCI: bus 0, device 6, function 0: Configuring device.
PCI: bus 0, device 7, function 0: Configuring device.
PCI: bus 0, device 9, function 0: Configuring device.
PCI: bus 0, device 9, function 1: Configuring device.
PCI: bus 0, device 10, function 0: Configuring device.
PCI: bus 0, device 10, function 1: Configuring device.
PCI: bus 0, device 10, function 2: Configuring device.
PCI: bus 0, device 10, function 3: Configuring device.
PCI: bus 0, device 12, function 0: Configuring device.
PCI: bus 0, device 31, function 0: Configuring device.
PCI bus 0 configured
pci0 at gt0
pci0: i/o space, memory space enabled, rd/line, wr/inv ok
pchb0 at pci0 dev 0 function 0: Galileo GT-64111 System Controller, rev=
 1
tlp0 at pci0 dev 7 function 0: DECchip 21143 Ethernet, pass 4.1
tlp0: interrupting at level 1
tlp0: Ethernet address 00:10:e0:00:5b:b3
lxtphy0 at tlp0 phy 1: LXT970 10/100 media interface, rev. 3
lxtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pcib0 at pci0 dev 9 function 0
pcib0: VIA Technologies VT82C586 (Apollo VP) PCI-ISA Bridge, rev 39
viaide0 at pci0 dev 9 function 1
viaide0: VIA Technologies VT82C586 (Apollo VP) ATA33 controller
viaide0: bus-master DMA support present
viaide0: primary channel configured to compatibility mode
viaide0: primary channel interrupting at irq 14
atabus0 at viaide0 channel 0
viaide0: secondary channel configured to compatibility mode
viaide0: secondary channel interrupting at irq 15
atabus1 at viaide0 channel 1
uhci0 at pci0 dev 9 function 2: VIA Technologies VT83C572 USB Controlle=
r (rev. 0x02)
uhci0: can't map i/o space
uhci1 at pci0 dev 10 function 0: VIA Technologies VT83C572 USB Controll=
er (rev. 0x61)
uhci1: interrupting at irq 9
usb0 at uhci1: USB revision 1.0
uhub0 at usb0
uhub0: VIA Technologies UHCI root hub, class 9/0, rev 1.00/1.00, addr 1=

uhub0: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 10 function 1: VIA Technologies VT83C572 USB Controll=
er (rev. 0x61)
uhci2: interrupting at irq 0
usb1 at uhci2: USB revision 1.0
uhub1 at usb1
uhub1: VIA Technologies UHCI root hub, class 9/0, rev 1.00/1.00, addr 1=

uhub1: 2 ports with 2 removable, self powered
ehci0 at pci0 dev 10 function 2: VIA Technologies VT8237 EHCI USB Contr=
oller (rev. 0x62)
ehci0: interrupting at irq 0
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci1 uhci2
usb2 at ehci0: USB revision 2.0
uhub2 at usb2
uhub2: VIA Technologie EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub2: 4 ports with 4 removable, self powered
fwohci0 at pci0 dev 10 function 3: VIA Technologies VT3606 OHCI IEEE 13=
94 Controller (rev. 0x46)
fwohci0: interrupting at irq 0
fwohci0: OHCI 1.0, 00:40:26:01:08:08:19:30, 400Mb/s, 2048 max_rec, 8 ir=
_ctx, 8 it_ctx
tlp1 at pci0 dev 12 function 0: DECchip 21143 Ethernet, pass 4.1
tlp1: interrupting at level 2
tlp1: Ethernet address 00:10:e0:00:55:b6
lxtphy1 at tlp1 phy 1: LXT970 10/100 media interface, rev. 3
lxtphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fw0 at fwohci0: 00:40:26:01:08:08:19:30:0a:02:ff:ff:f0:01:00:00
uhub0: port error, restarting port 1
uhub0: port error, restarting port 2
uhub0: port error, giving up port 2
uhub1: port error, restarting port 2
uhub1: port error, giving up port 2
ehci0: handing over full speed device on port 3 to uhci2
uhub2: port 3, device disappeared after reset
uplcom0 at uhub1 port 1
uplcom0: vendor 0x0557 product 0x2008, rev 1.10/0.01, addr 2
ucom0 at uplcom0
wd0 at atabus0 drive 0: <QUANTUM FIREBALL CR4.3A>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 4110 MB, 14848 cyl, 9 head, 63 sec, 512 bytes/sect x 8418816 secto=
rs
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)=

wd0(viaide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using =
DMA data transfers)
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
Fri Dec 31 00:00:02 GMT 1999
swapctl: adding /dev/wd0b as swap device at priority 0
Starting file system checks:
/dev/rwd0a: file system is clean; not checking
/dev/rwd0f: file system is clean; not checking
/dev/rwd0h: file system is clean; not checking
/dev/rwd0g: file system is clean; not checking
Setting tty flags.
Setting sysctl variables:
Starting network.
Hostname: cobalt.fool
IPv6 mode: host
Configuring network interfaces: tlp0.
add net default: gateway 192.168.1.21
Adding interface aliases:
Building databases...
kvm_mkdb: machdep.booted_kernel: sysctl() failed with No such file or d=
irectory: No such file or directory
Starting syslogd.
Checking for core dump...
savecore: no core dump
Setting date via ntp.
Mounting all filesystems...
Clearing /tmp.
Checking quotas: done.
Setting securelevel: kern.securelevel: 0 -> 1
Starting virecover.
starting local daemons:.
Updating motd.
Starting ntpd.
Starting sshd.
Starting sendmail.
Starting inetd.
Starting cron.
Sat Jan 10 00:34:00 JST 2004

----Next_Part(Sat_Jan_10_17:07:38_2004_708)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="cobalt_multifuncpci.diff"

Index: dev/gt.c
===================================================================
RCS file: /cvsroot/src/sys/arch/cobalt/dev/gt.c,v
retrieving revision 1.9
diff -c -r1.9 gt.c
*** dev/gt.c	2003/07/15 01:29:23	1.9
--- dev/gt.c	2004/01/09 16:49:58
***************
*** 42,53 ****
--- 42,57 ----
  #include <sys/syslog.h>
  #include <sys/types.h>
  #include <sys/device.h>
+ #include <sys/extent.h>
+ #include <sys/malloc.h>
  
  #include <machine/intr.h>
  #include <machine/bus.h>
  
  #include <dev/pci/pcivar.h>
+ #include <dev/pci/pciconf.h>
  #include "pci.h"
+ #include "opt_pci.h"
  
  struct gt_softc {
  	struct device	sc_dev;
***************
*** 76,81 ****
--- 80,88 ----
  	void *aux;
  {
  	struct pcibus_attach_args pba;
+ #ifdef PCI_NETBSD_CONFIGURE
+ 	struct extent *ioext, *memext;
+ #endif
  
  	printf("\n");
  
***************
*** 84,89 ****
--- 91,107 ----
  		(*((volatile u_int32_t *)0xb4000c00) & ~0x6) | 0x2;
  
  #if NPCI > 0
+ #ifdef PCI_NETBSD_CONFIGURE
+ 	ioext = extent_create(
+ 	    "pciio", 0x10000000, 0x11ffffff, M_DEVBUF, NULL, 0, EX_NOWAIT);
+ 	memext = extent_create(
+ 	    "pcimem", 0x12000000, 0x13ffffff, M_DEVBUF, NULL, 0, EX_NOWAIT);
+ 	pci_configure_bus(0, ioext, memext, NULL, 0, 32);
+ /*
+ 	pc->memext = memext;
+ 	pc->ioext = ioext;
+ */
+ #endif
  	pba.pba_busname = "pci";
  	pba.pba_dmat = &pci_bus_dma_tag;
  	pba.pba_dmat64 = NULL;
Index: include/pci_machdep.h
===================================================================
RCS file: /cvsroot/src/sys/arch/cobalt/include/pci_machdep.h,v
retrieving revision 1.5
diff -c -r1.5 pci_machdep.h
*** include/pci_machdep.h	2002/05/15 19:23:53	1.5
--- include/pci_machdep.h	2004/01/09 16:49:58
***************
*** 34,39 ****
--- 34,40 ----
   * Machine-specific definitions for PCI autoconfiguration.
   */
  #define	__HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH
+ #define __HAVE_PCI_CONF_HOOK
  
  /*
   * Forward declarations.
***************
*** 72,77 ****
--- 73,80 ----
  void		*pci_intr_establish(pci_chipset_tag_t, pci_intr_handle_t,
  			int, int (*)(void *), void *);
  void		pci_intr_disestablish(pci_chipset_tag_t, void *);
+ void		pci_conf_interrupt(void *, int, int, int, int, int *); 
+ int		pci_conf_hook(pci_chipset_tag_t, int, int, int, pcireg_t);
  
  #define	pci_enumerate_bus(sc, m, p)					\
  	pci_enumerate_bus_generic((sc), (m), (p))
Index: pci/pci_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/cobalt/pci/pci_machdep.c,v
retrieving revision 1.15
diff -c -r1.15 pci_machdep.c
*** pci/pci_machdep.c	2003/09/12 17:55:52	1.15
--- pci/pci_machdep.c	2004/01/09 16:49:58
***************
*** 34,39 ****
--- 34,40 ----
  #include <sys/systm.h>
  #include <sys/errno.h>
  #include <sys/device.h>
+ #include <sys/extent.h>
  
  #define _COBALT_BUS_DMA_PRIVATE
  #include <machine/bus.h>
***************
*** 42,47 ****
--- 43,49 ----
  #include <dev/pci/pcivar.h>
  #include <dev/pci/pcireg.h>
  #include <dev/pci/pcidevs.h>
+ #include <dev/pci/pciconf.h>
  
  /*
   * PCI doesn't have any special needs; just use
***************
*** 223,226 ****
--- 225,250 ----
  	/* Try both, only the valid one will disestablish. */
  	cpu_intr_disestablish(cookie);
  	icu_intr_disestablish(cookie);
+ }
+ 
+ void
+ pci_conf_interrupt(pc, bus, dev, pin, swiz, iline)
+ 	pci_chipset_tag_t pc;
+ 	int bus, dev, pin, swiz, *iline;
+ {
+ 	/* not yet... */
+ }
+ 
+ int
+ pci_conf_hook(pci_chipset_tag_t pc, int bus, int dev, int func, pcireg_t id)
+ {
+ 	if ((PCI_VENDOR(id) == PCI_VENDOR_GALILEO &&
+ 	    PCI_PRODUCT(id) == PCI_PRODUCT_GALILEO_GT64011)) {
+ 		/* Don't configure the bridge and PCI probe. */ 
+ 		return 0;
+ 	}
+ 	/* Don't configure internal USB Controller */
+ 	if (dev == 9 && func == 2) return 0;
+ 
+ 	return PCI_CONF_ALL & ~PCI_CONF_MAP_ROM;
  }

----Next_Part(Sat_Jan_10_17:07:38_2004_708)----