From: Paul M. <le...@li...> - 2007-08-16 15:32:04
|
On Tue, Aug 14, 2007 at 07:45:34PM +0900, Magnus Damm wrote: > On 8/14/07, Paul Mundt <le...@li...> wrote: > > On Mon, Aug 13, 2007 at 11:49:21AM +0900, Magnus Damm wrote: > > The current API works fine for this. the trigger flag is going to be > > board-specific in the terms of most drivers, and conventional wisdom > > dictates that the pin said peripheral's interrupt line is connected to is > > able to do sense selection based on what the peripheral mandates. > > How do we handle the case when say an ethernet controller can be > configured as either edge or level, but the stupid FPGA interrupt > controller only does only support one of them? > > The driver for the ethernet controller is of course totally > disconnected from the interrupt controller code. But the ethernet > controller hardware does support both edge and level triggered > interrupts - just configure a certain register to switch mode. Can we > handle that today? > We handle this today based on the board configuration. Regardless of what the controller supports, there is always going to be board-specific glue for this. This is true for things like buswidth, IRQ sense, and so on. This is not something that can be implemented transparently, it's ultimately up to the system integrator to know how this is wired up on their particular platform and clue the driver in accordingly. The board folks do have to know what they are doing at least some of the time. |