* PCI driver on EB8347
@ 2006-08-11 0:49 rajan rai
2006-08-11 3:40 ` Liu Dave-r63238
0 siblings, 1 reply; 8+ messages in thread
From: rajan rai @ 2006-08-11 0:49 UTC (permalink / raw)
To: kumar.gala; +Cc: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 2322 bytes --]
I have written PCI driver which works fine along with MPC8347 and two PCI card connected in a single PCI bus. When I try to communicate same PCI card using PCI bridge ( PCI2050B ), Linux does detect PCI card on Secondary bus but same driver doesn't work !!!!
Do I need to enable support for second PCI host controller at kernel level to make it work? Or I need to do something else ? I tried compiling PPC-linux kernel after enabling CONFIG_85xx_PCI2 kernel doesn't compile it gives me error while compiling "arch/ppc/syslib/ppc83xx_setup.c" Kernel version I'm using is 2.6.13.
****** Board along with which PCI card works ************
lspci -v
/demo # lspci -v
00:1b.0 Non-VGA unclassified device: Texas Instruments: Unknown device 9065 (rev 01)
Flags: bus master, medium devsel, latency 128, IRQ 21
Memory at 9fc00000 (32-bit, prefetchable) [size=4M]
Memory at 9f000000 (32-bit, non-prefetchable) [size=8M]
I/O ports at 3ffffff0 [size=16]
Capabilities: [40] Power Management version 2
00:1c.0 Non-VGA unclassified device: Texas Instruments: Unknown device 9065 (rev 01)
Flags: bus master, medium devsel, latency 128, IRQ 18
Memory at 9ec00000 (32-bit, prefetchable) [size=4M]
Memory at 9e000000 (32-bit, non-prefetchable) [size=8M]
I/O ports at 3fffffe0 [size=16]
Capabilities: [40] Power Management version 2
****** Board along with which PCI card doesn't work ************
lspci -v
PCI devices found:
Bus 0, device 17, function 0:
Class 0604: PCI device 104c:ac28 (rev 2).
Bus 1, device 1, function 0:
Class 0000: PCI device 104c:9065 (rev 1).
Master Capable. Latency=128.
Prefetchable 32 bit memory at 0x9fc00000 [0x9fffffff].
Non-prefetchable 32 bit memory at 0x9f000000 [0x9f7fffff].
I/O at 0xfff0 [0xffff].
Bus 1, device 2, function 0:
Class 0000: PCI device 104c:9065 (rev 1).
Master Capable. Latency=128.
Prefetchable 32 bit memory at 0x9ec00000 [0x9effffff].
Non-prefetchable 32 bit memory at 0x9e000000 [0x9e7fffff].
I/O at 0xffe0 [0xffef].
Any help would be appreciated I'm running out of ideas what to do next !!!!!!!!
Regards,
-Rajan Rai
[-- Attachment #2: Type: text/html, Size: 3795 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: PCI driver on EB8347
2006-08-11 0:49 PCI driver on EB8347 rajan rai
@ 2006-08-11 3:40 ` Liu Dave-r63238
2006-08-11 9:15 ` rajan rai
0 siblings, 1 reply; 8+ messages in thread
From: Liu Dave-r63238 @ 2006-08-11 3:40 UTC (permalink / raw)
To: rajan rai, Gala Kumar K.-galak; +Cc: linuxppc-embedded
Rajan> I have written PCI driver which works fine along with
MPC8347 and two PCI
Rajan> card connected in a single PCI bus. When I try to communicate
same PCI card
Rajan> using PCI bridge ( PCI2050B ), Linux does detect PCI card on
Secondary bus=20
Rajan> but same driver doesn't work !!!!
PCI interrupt for secondary bus set up properly?
=20
Rajan> Do I need to enable support for second PCI host controller
at kernel level to=20
Rajan>make it work? Or I need to do something else ? I tried compiling
PPC-linux kernel
Rajan> after enabling CONFIG_85xx_PCI2 kernel doesn't compile it gives
me error while=20
Rajan>compiling "arch/ppc/syslib/ppc83xx_setup.c" Kernel version I'm
using is 2.6.13.
Why you enable CONFIG_85xx_PCI2 in kernel? It is for 85xx, but you are
using 8347 processor.
<snip>
Dave
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: PCI driver on EB8347
2006-08-11 3:40 ` Liu Dave-r63238
@ 2006-08-11 9:15 ` rajan rai
2006-08-11 12:42 ` Kumar Gala
0 siblings, 1 reply; 8+ messages in thread
From: rajan rai @ 2006-08-11 9:15 UTC (permalink / raw)
To: Liu Dave-r63238, Gala Kumar K.-galak; +Cc: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1702 bytes --]
I'm using polling mechanism and not interrupts in my driver. Although I'm not using polling I see strange behavior When I do lspci -v I don't see any interrupts being allocated to PCI device behind PCI bridge !!!! But when I use same card directly on primary bus I do see interrupt being allocated to PCI device. Any advise why IRQ's being not allocated in case its attached to PCI bridge ?
Do I need to take care of any extra configuration in case of PCI card is attached to PCI bridge ?
Yaa you are correct I shouldn't use CONFIG_85xx_PCI2
Thanks,
-Rajan
________________________________
From: Liu Dave-r63238 [mailto:DaveLiu@freescale.com]
Sent: Thu 8/10/2006 10:40 PM
To: rajan rai; Gala Kumar K.-galak
Cc: linuxppc-embedded@ozlabs.org
Subject: RE: PCI driver on EB8347
Rajan> I have written PCI driver which works fine along with
MPC8347 and two PCI
Rajan> card connected in a single PCI bus. When I try to communicate
same PCI card
Rajan> using PCI bridge ( PCI2050B ), Linux does detect PCI card on
Secondary bus
Rajan> but same driver doesn't work !!!!
PCI interrupt for secondary bus set up properly?
Rajan> Do I need to enable support for second PCI host controller
at kernel level to
Rajan>make it work? Or I need to do something else ? I tried compiling
PPC-linux kernel
Rajan> after enabling CONFIG_85xx_PCI2 kernel doesn't compile it gives
me error while
Rajan>compiling "arch/ppc/syslib/ppc83xx_setup.c" Kernel version I'm
using is 2.6.13.
Why you enable CONFIG_85xx_PCI2 in kernel? It is for 85xx, but you are
using 8347 processor.
<snip>
Dave
[-- Attachment #2: Type: text/html, Size: 3177 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: PCI driver on EB8347
2006-08-11 9:15 ` rajan rai
@ 2006-08-11 12:42 ` Kumar Gala
2006-08-12 12:34 ` Rajan Rai
0 siblings, 1 reply; 8+ messages in thread
From: Kumar Gala @ 2006-08-11 12:42 UTC (permalink / raw)
To: rajan rai; +Cc: Gala Kumar K.-galak, Liu Dave-r63238, linuxppc-embedded
On Aug 11, 2006, at 4:15 AM, rajan rai wrote:
>
> I'm using polling mechanism and not
> interrupts in my driver. Although I'm not using polling I see
> strange behavior When I do lspci -v I don't see any interrupts
> being allocated to PCI device behind PCI bridge !!!! But when I use
> same card directly on primary bus I do see interrupt being
> allocated to PCI device. Any advise why IRQ's being not allocated
> in case its attached to PCI bridge ?
>
> Do I need to take care of any extra
> configuration in case of PCI card is attached to PCI bridge ?
You need to make sure that the pci_map_irq/mpc83xx_map_irq function
handles the right swizziling for the P2P bridge for your setup. If
you are just connected directly its pretty straight forward. However
IRQ assignment behind the bridge can be very board specific and so
you need to make sure that the code is doing the right think for you.
What ever strangeness do you see from lspci?
- k
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: PCI driver on EB8347
2006-08-11 12:42 ` Kumar Gala
@ 2006-08-12 12:34 ` Rajan Rai
2006-08-12 13:54 ` Kumar Gala
0 siblings, 1 reply; 8+ messages in thread
From: Rajan Rai @ 2006-08-12 12:34 UTC (permalink / raw)
To: Kumar Gala; +Cc: Gala Kumar K.-galak, Liu Dave-r63238, linuxppc-embedded
Thanks IRQ problem is resolved. As pointed out it was problem
with IRQ IDSEL mapping. Mapping needs to be different on Eval board I'm
using and our custom design. But my driver is still not working on our
custom design. PCI device doesn't receive any messages from MPC8347 on
our custom design mother board which uses pci-bridge where as it works
fine on Eval board which doesn't use PCI bridge.
I guess problem lies at the kernel level and
not the driver. Any tips apart from IDSEL IRQ settings at kernel level
what else I need to change when I move from 1 mother board to another.
My PCI devices do get base address 0 and 1 allocated properly by the
OS. But when I try to write any messages on those addresses PCI device
doesn't see them
Regards,
-Rajan
Kumar Gala wrote:
>
> On Aug 11, 2006, at 4:15 AM, rajan rai wrote:
>
>>
>> I'm using polling mechanism and not interrupts
>> in my driver. Although I'm not using polling I see strange behavior
>> When I do lspci -v I don't see any interrupts being allocated to PCI
>> device behind PCI bridge !!!! But when I use same card directly on
>> primary bus I do see interrupt being allocated to PCI device. Any
>> advise why IRQ's being not allocated in case its attached to PCI
>> bridge ?
>>
>> Do I need to take care of any extra
>> configuration in case of PCI card is attached to PCI bridge ?
>
> You need to make sure that the pci_map_irq/mpc83xx_map_irq function
> handles the right swizziling for the P2P bridge for your setup. If
> you are just connected directly its pretty straight forward. However
> IRQ assignment behind the bridge can be very board specific and so you
> need to make sure that the code is doing the right think for you.
>
> What ever strangeness do you see from lspci?
>
> - k
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: PCI driver on EB8347
2006-08-12 12:34 ` Rajan Rai
@ 2006-08-12 13:54 ` Kumar Gala
2006-08-12 16:07 ` rajan rai
2006-08-13 4:31 ` Rajan Rai
0 siblings, 2 replies; 8+ messages in thread
From: Kumar Gala @ 2006-08-12 13:54 UTC (permalink / raw)
To: Rajan Rai; +Cc: Gala Kumar K.-galak, Liu Dave-r63238, linuxppc-embedded
On Aug 12, 2006, at 7:34 AM, Rajan Rai wrote:
>
>
> Thanks IRQ problem is resolved. As pointed out it was
> problem with IRQ IDSEL mapping. Mapping needs to be different on
> Eval board I'm using and our custom design. But my driver is still
> not working on our custom design. PCI device doesn't receive any
> messages from MPC8347 on our custom design mother board which uses
> pci-bridge where as it works fine on Eval board which doesn't use
> PCI bridge.
>
> I guess problem lies at the kernel level
> and not the driver. Any tips apart from IDSEL IRQ settings at
> kernel level what else I need to change when I move from 1 mother
> board to another. My PCI devices do get base address 0 and 1
> allocated properly by the OS. But when I try to write any messages
> on those addresses PCI device doesn't see them
Is the bridge getting configured correctly? An lspci output would be
helpful from your system with the P2P bridge.
- kumar
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: PCI driver on EB8347
2006-08-12 13:54 ` Kumar Gala
@ 2006-08-12 16:07 ` rajan rai
2006-08-13 4:31 ` Rajan Rai
1 sibling, 0 replies; 8+ messages in thread
From: rajan rai @ 2006-08-12 16:07 UTC (permalink / raw)
To: Kumar Gala; +Cc: Gala Kumar K.-galak, Liu Dave-r63238, linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 2649 bytes --]
Kumar,
Here is lspci -v from my P2P system. In case you have any suggestion do let me know. I appreciate your help
00:11.0 PCI bridge: Texas Instruments PCI2050 PCI-to-PCI Bridge (rev 02) (prog-if 00 [Normal decode])
Flags: bus master, 66Mhz, medium devsel, latency 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 0000f000-0000ffff
Memory behind bridge: 9e000000-9fffffff
Prefetchable memory behind bridge: 000000009df00000-000000009df00000
Capabilities: [dc] Power Management version 2
01:01.0 Non-VGA unclassified device: Texas Instruments: Unknown device 9065 (rev 01)
Flags: bus master, 66Mhz, medium devsel, latency 128, IRQ 18
Memory at 9fc00000 (32-bit, prefetchable) [size=4M]
Memory at 9f000000 (32-bit, non-prefetchable) [size=8M]
I/O ports at 3ffffff0 [size=16]
Capabilities: [40] Power Management version 2
01:02.0 Non-VGA unclassified device: Texas Instruments: Unknown device 9065 (rev 01)
Flags: bus master, 66Mhz, medium devsel, latency 128, IRQ 19
Memory at 9ec00000 (32-bit, prefetchable) [size=4M]
Memory at 9e000000 (32-bit, non-prefetchable) [size=8M]
I/O ports at 3fffffe0 [size=16]
Capabilities: [40] Power Management version 2
Regards
-Rajan Rai
-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Sat 8/12/2006 8:54 AM
To: rajan rai
Cc: Liu Dave-r63238; Gala Kumar K.-galak; linuxppc-embedded@ozlabs.org
Subject: Re: PCI driver on EB8347
On Aug 12, 2006, at 7:34 AM, Rajan Rai wrote:
>
>
> Thanks IRQ problem is resolved. As pointed out it was
> problem with IRQ IDSEL mapping. Mapping needs to be different on
> Eval board I'm using and our custom design. But my driver is still
> not working on our custom design. PCI device doesn't receive any
> messages from MPC8347 on our custom design mother board which uses
> pci-bridge where as it works fine on Eval board which doesn't use
> PCI bridge.
>
> I guess problem lies at the kernel level
> and not the driver. Any tips apart from IDSEL IRQ settings at
> kernel level what else I need to change when I move from 1 mother
> board to another. My PCI devices do get base address 0 and 1
> allocated properly by the OS. But when I try to write any messages
> on those addresses PCI device doesn't see them
Is the bridge getting configured correctly? An lspci output would be
helpful from your system with the P2P bridge.
- kumar
[-- Attachment #2: Type: text/html, Size: 4198 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: PCI driver on EB8347
2006-08-12 13:54 ` Kumar Gala
2006-08-12 16:07 ` rajan rai
@ 2006-08-13 4:31 ` Rajan Rai
1 sibling, 0 replies; 8+ messages in thread
From: Rajan Rai @ 2006-08-13 4:31 UTC (permalink / raw)
To: Kumar Gala; +Cc: Gala Kumar K.-galak, Liu Dave-r63238, linuxppc-embedded
Kumar, Liu
I was able to resolve problem. Problem was in PCI card
firmware and not in Linux Kernel or driver.
Thanks for your help.
Regards,
-Rajan
Kumar Gala wrote:
>
> On Aug 12, 2006, at 7:34 AM, Rajan Rai wrote:
>
>>
>>
>> Thanks IRQ problem is resolved. As pointed out it was
>> problem with IRQ IDSEL mapping. Mapping needs to be different on Eval
>> board I'm using and our custom design. But my driver is still not
>> working on our custom design. PCI device doesn't receive any messages
>> from MPC8347 on our custom design mother board which uses pci-bridge
>> where as it works fine on Eval board which doesn't use PCI bridge.
>>
>> I guess problem lies at the kernel level and
>> not the driver. Any tips apart from IDSEL IRQ settings at kernel
>> level what else I need to change when I move from 1 mother board to
>> another. My PCI devices do get base address 0 and 1 allocated
>> properly by the OS. But when I try to write any messages on those
>> addresses PCI device doesn't see them
>
> Is the bridge getting configured correctly? An lspci output would be
> helpful from your system with the P2P bridge.
>
> - kumar
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-08-13 4:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-11 0:49 PCI driver on EB8347 rajan rai
2006-08-11 3:40 ` Liu Dave-r63238
2006-08-11 9:15 ` rajan rai
2006-08-11 12:42 ` Kumar Gala
2006-08-12 12:34 ` Rajan Rai
2006-08-12 13:54 ` Kumar Gala
2006-08-12 16:07 ` rajan rai
2006-08-13 4:31 ` Rajan Rai
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).