From owner-freebsd-hackers Wed Mar 20 22:47:25 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from cain.gsoft.com.au (genesi.lnk.telstra.net [139.130.136.161]) by hub.freebsd.org (Postfix) with ESMTP id 984FC37B41A for ; Wed, 20 Mar 2002 22:47:17 -0800 (PST) Received: from localhost (root@localhost [127.0.0.1]) by cain.gsoft.com.au (8.12.2/8.12.2) with ESMTP id g2L6lEru093582; Thu, 21 Mar 2002 17:17:14 +1030 (CST) (envelope-from doconnor@gsoft.com.au) Subject: Re: Decision PCCOM Serial Card From: "Daniel O'Connor" To: John Hay Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: <200203210639.g2L6dSv79049@zibbi.icomtek.csir.co.za> References: <200203210639.g2L6dSv79049@zibbi.icomtek.csir.co.za> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 21 Mar 2002 18:17:14 +1130 Message-Id: <1016693235.383.74.camel@chowder.gsoft.com.au> Mime-Version: 1.0 X-Spam-Status: No, hits=-5 required=5 X-Spam-Level: (-5) X-Scanned-By: MIMEDefang 2.6 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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: 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