* PCIe: Xilinx: sdhci-pci: probe() issue
@ 2015-07-20 10:55 Naveen Kumar Parna
2015-07-20 13:33 ` Bjorn Helgaas
0 siblings, 1 reply; 3+ messages in thread
From: Naveen Kumar Parna @ 2015-07-20 10:55 UTC (permalink / raw)
To: linux-pci
Hi ,
I have a Verilog image & hardware which provides a PCIe interface with
two BAR’s(BAR0 & BAR1) to host.
BAR0 is having customized UART, GPIO and 1-wire prom modules. These
modules are accessed via customized PCIe interface driver.
BAR1 is having SD Host controller as per SD Specifications. Here
requirement is such that we should use Linux kernel stack drivers
(sdhci.ko & sdhci-pci.ko).
Here the issue is only one driver’s probe() function gets executed
i.e. either customized PCIe driver or sdhci-pci.ko.
Output of lspci:
02:00.0 SD Host controller: PLDA Device 5555
Customized PCIe driver's struct pci_device_id:
static struct pci_device_id pci_id_table[] = {
{ PCI_DEVICE( 0x1556, 0x5555)},
{ 0 },
};
For example: If I load the customized PCIe driver first and then
sdhci-pci, then only customized PCIe driver’s probe() function gets
called.
If I change the order of loading the module i.e. sdhci-pci first then
only sdhci-pci’s probe gets called.
Is there any better solution to use customized PCIe driver for BAR0
and sdhci for BAR1?
I will be happy to provide additional debugging info, just let me know.
Thanks,
Naveen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PCIe: Xilinx: sdhci-pci: probe() issue
2015-07-20 10:55 PCIe: Xilinx: sdhci-pci: probe() issue Naveen Kumar Parna
@ 2015-07-20 13:33 ` Bjorn Helgaas
2015-07-20 14:16 ` Naveen Kumar Parna
0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2015-07-20 13:33 UTC (permalink / raw)
To: Naveen Kumar Parna; +Cc: linux-pci@vger.kernel.org
Hi Naveen,
On Mon, Jul 20, 2015 at 5:55 AM, Naveen Kumar Parna
<pnaveenkos@gmail.com> wrote:
> Hi ,
>
> I have a Verilog image & hardware which provides a PCIe interface with
> two BAR’s(BAR0 & BAR1) to host.
>
> BAR0 is having customized UART, GPIO and 1-wire prom modules. These
> modules are accessed via customized PCIe interface driver.
>
> BAR1 is having SD Host controller as per SD Specifications. Here
> requirement is such that we should use Linux kernel stack drivers
> (sdhci.ko & sdhci-pci.ko).
>
>
> Here the issue is only one driver’s probe() function gets executed
> i.e. either customized PCIe driver or sdhci-pci.ko.
The PCI infrastructure is designed such that a bus/device/function
address identifies a single device. To that device, we can attach a
single driver, which manages all BARs on that device. There is no
provision for attaching one driver to BAR0 and a different driver to
BAR1.
To manage the device you describe, you'd have to have a driver that
claims the entire PCI device, including both BARs. That driver would
internally deal with the UART, GPIO, 1-wire prom, and SD host
controller modules.
Bjorn
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PCIe: Xilinx: sdhci-pci: probe() issue
2015-07-20 13:33 ` Bjorn Helgaas
@ 2015-07-20 14:16 ` Naveen Kumar Parna
0 siblings, 0 replies; 3+ messages in thread
From: Naveen Kumar Parna @ 2015-07-20 14:16 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci@vger.kernel.org
Hi Bjorn,
Thanks for clarification.
Thanks,
Naveen.
On Mon, Jul 20, 2015 at 7:03 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> Hi Naveen,
>
> On Mon, Jul 20, 2015 at 5:55 AM, Naveen Kumar Parna
> <pnaveenkos@gmail.com> wrote:
>> Hi ,
>>
>> I have a Verilog image & hardware which provides a PCIe interface with
>> two BAR’s(BAR0 & BAR1) to host.
>>
>> BAR0 is having customized UART, GPIO and 1-wire prom modules. These
>> modules are accessed via customized PCIe interface driver.
>>
>> BAR1 is having SD Host controller as per SD Specifications. Here
>> requirement is such that we should use Linux kernel stack drivers
>> (sdhci.ko & sdhci-pci.ko).
>>
>>
>> Here the issue is only one driver’s probe() function gets executed
>> i.e. either customized PCIe driver or sdhci-pci.ko.
>
> The PCI infrastructure is designed such that a bus/device/function
> address identifies a single device. To that device, we can attach a
> single driver, which manages all BARs on that device. There is no
> provision for attaching one driver to BAR0 and a different driver to
> BAR1.
>
> To manage the device you describe, you'd have to have a driver that
> claims the entire PCI device, including both BARs. That driver would
> internally deal with the UART, GPIO, 1-wire prom, and SD host
> controller modules.
>
> Bjorn
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-20 14:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-20 10:55 PCIe: Xilinx: sdhci-pci: probe() issue Naveen Kumar Parna
2015-07-20 13:33 ` Bjorn Helgaas
2015-07-20 14:16 ` Naveen Kumar Parna
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).