RE: PCI register questions..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Title: PCI register questions..
Hi,
 

>a) Do I need to do a request_region()/release_region() for both
>addresses around these lines of code ?

Yes u have to. U can find out the range of address(s) that u need to map and then request it.
 
>/* Write to the pci configuration address register */
> outl(0x80000000 | (0xc << 11) | (0x40 << 2), 0xcf8)

U shouldnt do it like this.
U hv to use pci_read/write_config_byte/word  to read/write the config data.
 
 
>b) Do I need to disable interrupts while writing to these registers ?
Depends on the scenario...usually  NO.

>c) Do I need to reset 0xcf8 after having written to 0xcfc ?

Can't think of any reason.

 

Geeks, correct me if im wrong anywhere.

Regds.

-nagaraj

\(*_*)/

 




 
-----Original Message-----
From: Jules Bjørn Colding [mailto:JuBColding@yorkref.com]
Sent: Tue 2/4/2003 5:04 PM
To: Kernel Newbies
Cc:
Subject: PCI register questions..

Hi all,

My problem is that I have to write a driver for a co-processor on a
board which we will use, at my work, as an embedded controller. The
board itself is based upon a 486. The co-processor has been bolted onto
the PCI/ISA bridge with nine of its pins.

I am almost where I can start to access it but I have a few remaining
questions.

This is what I know:

1) I have to enable all GPIOs on the board before I can access the
co-processor. This is done by writing 0x2 to register offset 0x40 at the
PCI data configuration register. Before doing so I have to enable reads
and writes to this register. These two lines does that:

/* Write to the pci configuration address register */
outl(0x80000000 | (0xc << 11) | (0x40 << 2), 0xcf8)

/* Write to the pci configuration data register */
outb(0x02, 0xcfc)


But..

a) Do I need to do a request_region()/release_region() for both
addresses around these lines of code ?

b) Do I need to disable interrupts while writing to these registers ?

c) Do I need to reset 0xcf8 after having written to 0xcfc ?


Thanks a lot in advance!
  jules

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/

)zYw朆az^jn{zP+rzmj)gX+w?!Gg{z+ګ

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux