public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
To: LKML <linux-kernel@vger.kernel.org>
Subject: [Fwd: help with PCI hotplug and a PCI device enabled after boot]
Date: Wed, 17 Aug 2005 06:02:22 -0300	[thread overview]
Message-ID: <1124269343.4423.35.camel@localhost> (raw)

    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.


             reply	other threads:[~2005-08-17  9:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-17  9:02 Mauro Carvalho Chehab [this message]
2005-08-17  9:47 ` [Fwd: help with PCI hotplug and a PCI device enabled after boot] 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1124269343.4423.35.camel@localhost \
    --to=mchehab@brturbo.com.br \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox