* Re: PCI serial card (VScom): BARs+Offset mix
2001-01-04 22:20 PCI serial card (VScom): BARs+Offset mix Gunther Mayer
@ 2001-01-04 21:40 ` Tim Waugh
0 siblings, 0 replies; 2+ messages in thread
From: Tim Waugh @ 2001-01-04 21:40 UTC (permalink / raw)
To: Gunther Mayer; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 320 bytes --]
On Thu, Jan 04, 2001 at 11:20:51PM +0100, Gunther Mayer wrote:
> this mapping must be hardcoded like I did for Timedia serial:
I was thinking about using another flag, like SPCI_FL_SEE_BELOW_TOO,
to mean 'look at the next entry too'. Then I could just have both
entries there one after the other.
Thoughts?
Tim.
*/
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PCI serial card (VScom): BARs+Offset mix
@ 2001-01-04 22:20 Gunther Mayer
2001-01-04 21:40 ` Tim Waugh
0 siblings, 1 reply; 2+ messages in thread
From: Gunther Mayer @ 2001-01-04 22:20 UTC (permalink / raw)
To: twaugh, linux-kernel
Hi Tim,
this mapping must be hardcoded like I did for Timedia serial:
serial.c: get_pci_port
e.g.
/* Timedia/SUNIX uses a mixture of BARs and offsets */
if(dev->vendor == PCI_VENDOR_ID_TIMEDIA ) /* 0x1409 */
switch(idx) {
case 0: base_idx=0;
break;
case 1: base_idx=0; offset=8;
break;
case 2: base_idx=1;
break;
case 3: base_idx=1; offset=8;
break;
case 4: /* BAR 2*/
case 5: /* BAR 3 */
case 6: /* BAR 4*/
case 7: base_idx=idx-2; /* BAR 5*/
}
---> /* VScom uses another mixture */
if(VScom)
YOUR CODE HERE PLEASE
...
This maps: idx -> (base_idx, offset),
where idx: goes from 0 to number_of_serial_ports,
base_idx: BAR,
offset: added to the BAR IO-address to find actual port.
BAR mapping is set by a flag, here you need "SPCI_FL_BASE_TABLE":
e.g. { PCI_VENDOR_ID_TIMEDIA, PCI_DEVICE_ID_TIMEDIA_1889,
PCI_VENDOR_ID_TIMEDIA, PCI_ANY_ID,
SPCI_FL_BASE_TABLE, 1, 921600,
0, 0, pci_timedia_fn },
Footnote: This entry is fixed up at detect time and num_ports set by pci_timedia_fn,
Ted fixed my table to a nice collapsed data structure for subids.
Hope this helps,
Gunther
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-01-04 21:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-04 22:20 PCI serial card (VScom): BARs+Offset mix Gunther Mayer
2001-01-04 21:40 ` Tim Waugh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox