public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Fwd: help with PCI hotplug and a PCI device enabled after boot]
@ 2005-08-17  9:02 Mauro Carvalho Chehab
  2005-08-17  9:47 ` Rolf Eike Beer
  0 siblings, 1 reply; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2005-08-17  9:02 UTC (permalink / raw)
  To: LKML

    I need some help with PCI hotplug for allowing a new driver at
Video4Linux.

    I'm trying to develop a kernel module to handle audio support for a
video chipset (cx2388x from conexant). This chipset does provide several
PCI ID according with its function:

14f1:8800 function 0: for video stuff
14f1:8801 or 14f1:8811 - function 1: for audio stuff
14f1:8802 - function 2: mpeg
14f1:8803 - function 3: VESA VIP
14f1:8804 - function 4: Host

    8800 is enabled in all cards, but the other PCI IDs only if the
board has an eeprom inside, and, at the first byte, bits 0 to 4 enables
each function. Functions 2 to 4 does require additional hardware, but
function 1 doesn't seem to require, since it will only enable DMA audio
transfers from board to memory the same way as function 0 does for
video. The board I have to test it doesn't have an eeprom, so, only
function 0 is enabled at boot. There's a way to enable other modes via
changing an internal register at cx88.
    At current kernel, module cx8800 does implement function 0; module
cx8801 is intended to implement function 1, but it is only a skeleton. I
have a modified version of cx8800 that enables function 1. After
enabling it, and with the help of fakephp, i got it recognized, but
without memory resources.

    I need memory to set its internal registers. Is there a way to make
PCI drivers to allocate a memory region for the board?

Thanks in advance,
Mauro

--------------------
Hotplug enabled by using:

modprobe cx8800
modprobe fakephp
echo 1 >/sys/bus/pci/slots/0000\\:01\\:07.0/power

lspci after fake hotplug:

01:07.0 Multimedia video controller: Conexant CX23880/1/2/3 PCI Video
and Audio Decoder (rev 05)
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 32 (5000ns min, 13750ns max), cache line size 08
        Interrupt: pin A routed to IRQ 19
        Region 0: Memory at e2000000 (32-bit, non-prefetchable)
[size=16M]
        Capabilities: [44] Vital Product Data
        Capabilities: [4c] Power Management version 2
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

01:07.1 Multimedia controller: Conexant CX23880/1/2/3 PCI Video and
Audio Decoder [Audio Port] (rev 05)
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
        Interrupt: pin A routed to IRQ 0
        Region 0: Memory at <unassigned> (32-bit, non-prefetchable)
[disabled] [size=16M]
        Capabilities: [4c] Power Management version 2
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

errors when loading cx8801:

cx88/1: Trying to enable PCI device
PCI: Device 0000:01:07.1 not available because of resource collisions
cx88_audio: probe of 0000:01:07.1 failed with error -22



Cheers, 
Mauro.
Cheers, 
Mauro.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-08-17 12:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-17  9:02 [Fwd: help with PCI hotplug and a PCI device enabled after boot] Mauro Carvalho Chehab
2005-08-17  9:47 ` Rolf Eike Beer
2005-08-17 10:54   ` Mauro Carvalho Chehab
2005-08-17 11:15     ` Rolf Eike Beer
2005-08-17 11:53       ` Mauro Carvalho Chehab
2005-08-17 12:11         ` Rolf Eike Beer
2005-08-17 12:15           ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox