Re: PCI register questions..

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

 



Aha!

So my "device" is the bridge - not the cr16. 

I guess that I must use the pci_resource_*() functions to access the IO
ports of the cr16 then. I know from the data sheet for the cpu (an STPC
Atlas) that I can access the IO ports (there are two) on the cr16 at
specific addresses (0x328 and 0x32e). But it seems that the bridge are
wrong about these adresses. Using the pcidump sample module from "Linux
Device Drivers, 2. edition" I get this output (irrelevant information
removed):

 	Compulsory registers:
Vendor id: 104a
Device id: 0210
I/O space enabled: y
Memory enabled: y
Master enabled: y
Special command enabled: y
Write-invalidate enabled: n
Palette-snoop enabled: n
Parity enabled: n
Wait-cycle enabled: n
System-error enabled: n
Fast-back-to-back enabled: n
Can do 66MHz: n
Supports User Defined Features: n
Fast-back-to-back capable: y
Data Parity Reported: n
Device Select Timing bits are 200
Signalled abort as target: n
Received abort from target: n
Aborted transaction as master: n
Did send a system error: n
Detected a parity error: n
Revision id (decimal): 0
Programmer Interface: 00
Class of device: 0601
Header type: 00
Multi function device: n
	Optional registers:
Cache line size (decimal): 0
Latency timer (decimal): 64
Is Built-In-Self-Test available: n
Did Built-In-Self-Test fail: n
Base Address 0: 00000000
Base Address 0 Is I/O: n
Base Address 0 is 64-bits: n
Base Address 0 is below-1M: n
Base Address 0 is prefetchable: n
Base Address 1: 00000000
Base Address 1 Is I/O: n
Base Address 1 is 64-bits: n
Base Address 1 is below-1M: n
Base Address 1 is prefetchable: n
Subsystem id: 0000
Subsystem vendor: 0000
Rom address: 00000000
Rom is enabled: n
Does generate interrupts: y
Interrupt line (decimal): 11
Interrupt pin (decimal): 1
Min bus grant time (decimal): 0
Max bus latency acceptable (decimal): 0

This output put the both ports at 0x0. So it seems that I should use the
port IO function (inb(), outb() and friends) to access the cr16 at its
known IO addresses after having completed pci_register_driver() for the
bridge.

> Yes. The CR16MCS9 is bolted to the PCI/ISA bridge. In order to fiddle
> with it, you need to talk to the bridge. The bridge has a PCI ID, so
> you can get the a struct pci_dev. (I suppose your PCI/ISA bridge is
> something like the PLX 9080).

My vendor/device id combo says 104a/0210 which seems to imply that it
comes from SGS Thompson and that the device itself is so rare that it
hasn't been included in pci_ids.h.

Thanks a lot! 
jules

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



[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