Don't think these lists are the best place for this question but alas...

On Mon, Jan 06, 2003 at 06:25:13AM +0000, shubha mr wrote:
> If I have to  write to a register at offset say x,in
> the pci configuration space,how do I do it? If it is
> using pci_read_config and pci_write_config,how does
> the system know where the pci reg base address of my
> device is?

val = pci_read_config(dev, OFFSET, len);

dev: the PCI device your driver is working on
OFFSET: the position you want to read from
len: the number of bytes you want to read

Because you specify the pci dev the system knows where to read from.

Look at any random pci driver in sys/ and it will all become clear.

Mark

-- 
Mark Santcroos                    RIPE Network Coordination Centre
http://www.ripe.net/home/mark/    New Projects Group/TTM

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to