public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gunther.Mayer@t-online.de (Gunther Mayer)
To: twaugh@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: PCI serial card (VScom): BARs+Offset mix
Date: Thu, 04 Jan 2001 23:20:51 +0100	[thread overview]
Message-ID: <3A54F743.E04052A4@t-online.de> (raw)

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/

             reply	other threads:[~2001-01-04 21:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-04 22:20 Gunther Mayer [this message]
2001-01-04 21:40 ` PCI serial card (VScom): BARs+Offset mix Tim Waugh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A54F743.E04052A4@t-online.de \
    --to=gunther.mayer@t-online.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=twaugh@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox