Date: 21 Mar 2002 18:17:14 +1130 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: John Hay <jhay@icomtek.csir.co.za> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Decision PCCOM Serial Card Message-ID: <1016693235.383.74.camel@chowder.gsoft.com.au> In-Reply-To: <200203210639.g2L6dSv79049@zibbi.icomtek.csir.co.za> References: <200203210639.g2L6dSv79049@zibbi.icomtek.csir.co.za>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2002-03-21 at 18:09, John Hay wrote:
> Hmmm. The puc driver won't work with a mem mapped BAR. The sio driver won't
> like it, so I never tried to make the puc driver able to do mem mapped
> devices. Hopefully, one of the other BARs (the IO ones) will contain the
> serial ports.
Hmm.. Why does it make a difference? I would have thought the sio driver
would just use newbus handles..
> > Probably just guessed the BAR address wrong I suppose.
>
> Can't you get the BAR info from the linux driver?
It doesn't seem terribly obvious :(
...
for (index = card = 0; card < serial_dcpci_nr_cards; index++) {
/*
* find sio communication class
*/
for (i = 0; i < DCIPCCOM_PCI_PI_MAX; i++) {
pi = dcipccom_pci_pi[i];
if ((pdev = pci_find_class((class << 8) | pi, pdev))
!= NULL)
break;
}
if (i == DCIPCCOM_PCI_PI_MAX) break;
/*
* find decision card
*/
if ((rc = pci_read_config_word(pdev, PCI_VENDOR_ID,
&vendor)) != PCIBIOS_SUCCESSFUL)
break;
if (vendor != PCI_DECISION) continue;
...
/*
* I/O Base addr
*/
i = 0;
for (reg = PCI_BASE_ADDRESS_2; reg <= PCI_BASE_ADDRESS_5;
i++, reg += 4) {
if ((rc = pci_read_config_dword(pdev, reg,
&base)) != PCIBIOS_SUCCESSFUL) return;
if (!base) continue;
...
Sigh.. Newbus is so much cleaner :(
> I never tried to make it into a module because I weren't sure what the
> interaction with the sio driver would be.
Hmm.. sio handles pccard stuff OK. As long as you release the resources
and stuff it should be OK (famous last words :)
Now I'm getting ->
puc0: <PCCOM Serial port> port 0xc400-0xc4ff,0xc000-0xc07f mem 0xd8002000-0xd800207f irq 9 at device 11.0 on pci0
sio2: configured irq 9 not in bitmap of probed irqs 0
I might try reading the contents of the EEPROM on the board as I have
the routine to do that (we've used the PLX9050 before and I wrote some
routines to read/write the EEPROM connected to it.
---
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1016693235.383.74.camel>
