lkml.org 
[lkml]   [2000]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: New topic (PowerPC Linux PCI HELL)
On Mon, 18 Sep 2000, Jeff Garzik wrote:

> Benjamin Herrenschmidt wrote:
> > Andre Hedrick wrote:
> > >All I wanted was a function that allows the driver to decide that which
> > >needs to be enabled.
> > >
> > >pci_enable_device(struct pci_dev *dev, byte enable_mask)
>
> > This is indeed interesting.
> >
> > Some devices, for example, will provide several apertures (can eat much
> > bus space) while only one of them is actually needed by the driver.
> > Having the driver be able to only enable (and possibly claim) one of them
> > would free up some bus space for other devices (I'm thinking here about
> > hot swap devices that will dynamically claim bus space, like cardbus).
>
> Perhaps I was mistaken, but I was thinking about enable_mask only
> applied to PCI_COMMAND_{IO,MEM}. If that is the case, it sounds like
> your needs would only be met if one set of apertures was driven via
> ISA-style port I/O, and the other set of apertures via PCI shared mem
> (MMIO).

Then change it to :

pci_enable_device(struct pci_dev *dev, struct pci_enable *enable_set)

typedef union {
unsigned all : 8;
struct {
unsigned bar0 : 1;
unsigned bar1 : 1;
unsigned bar2 : 1;
unsigned bar3 : 1;
unsigned bar4 : 1;
unsigned bar5 : 1;
unsigned reserved : 2;
} bar;
} pci_t;

struct pci_enable {
pci_t io_bars;
pci_t mem_bars;
...
pci_t wtf_bars;
...
unsigned long reg[6];
...
(pick and add whatever gets the job done)
};

I am not picky, just want it simple so that It can be tabled out by device
classes.

Cheers,

Andre Hedrick
The Linux ATA/IDE guy

-
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/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.021 / U:8.192 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site