Re: PCI interrupt question

2009-12-04 Thread Benjamin Herrenschmidt
On Thu, 2009-12-03 at 11:52 -0800, David Hawkins wrote: > > Really? I thought the pci_dev structures represent the > devices found on the PCI bus, and the IRQ line in > that structure was merely copied from the configuration > space registers. No, it's not. In fact it's mostly irrelevant. It has

Re: PCI interrupt question

2009-12-04 Thread Benjamin Herrenschmidt
> So are you saying linux should be writing the irq number to the > INTERRUPT_LINE config reg? This is what I expected but I do not see > it. No it won't necessarily touch it, this is not terribly useful anyways. Linux will assign an interrupt based on the informations from the device-tree an

Re: PCI interrupt question

2009-12-03 Thread Stefan Roese
On Thursday 03 December 2009 20:39:00 Jeff Hane wrote: > > Can you clarify: > > > > 1. 460EX is your PCI host CPU? > > yes. We are using a canyonlands board with 460ex. PCI works on Canyonlands without any problems. I just tested latest Linux release (2.6.32) with an PCI USB card: -bash-3.2# u

Re: PCI interrupt question

2009-12-03 Thread David Hawkins
Hi Wolfgang, In message <4b1816f9.1020...@ovro.caltech.edu> you wrote: Yep. It might require enabling a PCI subsystem in U-Boot. I recall playing with a Yosemite board and a PCI card, but I forget whether I had to do anything to enable PCI configuration space setup. Post a question to the U-Boo

Re: PCI interrupt question

2009-12-03 Thread Wolfgang Denk
Dear David Hawkins, In message <4b1816f9.1020...@ovro.caltech.edu> you wrote: > > Yep. It might require enabling a PCI subsystem in U-Boot. > I recall playing with a Yosemite board and a PCI card, > but I forget whether I had to do anything to enable > PCI configuration space setup. Post a questi

Re: PCI interrupt question

2009-12-03 Thread Ira W. Snyder
On Thu, Dec 03, 2009 at 11:39:00AM -0800, Jeff Hane wrote: > On Thu, 2009-12-03 at 09:11 -0800, David Hawkins wrote: > > Hi Jeff, > > > > > I'm trying to get interrupts working for my PCI device on a 460ex and > > > am having problem. My ISR never triggers. > > > > > > I'm new to PCI(and ppc) a

Re: PCI interrupt question

2009-12-03 Thread David Hawkins
Hi Ira, When Linux is assigning BARs and IRQs, it writes the BAR addresses to the PCI cards, but does not write the IRQ. This was my experience with PCI hotplug. Ooh, subtle. Bottom line is; if the IRQ field of lspci is 0, then you need to figure out that problem first :) In the PCI hotpl

Re: PCI interrupt question

2009-12-03 Thread Ira W. Snyder
On Thu, Dec 03, 2009 at 11:52:25AM -0800, David Hawkins wrote: > Hi Jeff, > > > yes. We are using a canyonlands board with 460ex. > > Ok. > > >> 2. You have some PCI device - what? Have you tested it works in a > >> standard PCI bus? Eg. ran lspci from an x86 host. > > > > It is a FPGA boa

Re: PCI interrupt question

2009-12-03 Thread David Hawkins
Hi Jeff, yes. We are using a canyonlands board with 460ex. Ok. 2. You have some PCI device - what? Have you tested it works in a standard PCI bus? Eg. ran lspci from an x86 host. It is a FPGA board that we are using to develop a video codec/SOC. We have not connected it an x86; howev

Re: PCI interrupt question

2009-12-03 Thread Jeff Hane
On Thu, 2009-12-03 at 09:11 -0800, David Hawkins wrote: > Hi Jeff, > > > I'm trying to get interrupts working for my PCI device on a 460ex and > > am having problem. My ISR never triggers. > > > > I'm new to PCI(and ppc) and LDD said that I could read the config reg > > INTURRUPT_LINE to get th

Re: PCI interrupt question

2009-12-03 Thread David Hawkins
Hi Jeff, I'm trying to get interrupts working for my PCI device on a 460ex and am having problem. My ISR never triggers. I'm new to PCI(and ppc) and LDD said that I could read the config reg INTURRUPT_LINE to get the interrupt assigned to my PCI device. Well, this always reads zero. After

Re: PCI interrupt question

2009-12-02 Thread Stefan Roese
Hi Jeff, On Thursday 03 December 2009 07:21:56 Jeff Hane wrote: > I'm trying to get interrupts working for my PCI device on a 460ex and > am having problem. My ISR never triggers. Which 460EX board is this? Canyonlands or some custom board? > I'm new to PCI(and ppc) and LDD said that I could

PCI interrupt question

2009-12-02 Thread Jeff Hane
Hello, I'm trying to get interrupts working for my PCI device on a 460ex and am having problem. My ISR never triggers. I'm new to PCI(and ppc) and LDD said that I could read the config reg INTURRUPT_LINE to get the interrupt assigned to my PCI device. Well, this always reads zero. After rea