Messages in this thread |  | | | Date | Thu, 04 Jan 2001 23:20:51 +0100 | | From | (Gunther Mayer) | | Subject | Re: PCI serial card (VScom): BARs+Offset mix |
| |
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/
|  |