Using the FIQ and Bell IRQ for the USB driver
Stephen Warren
swarren at wwwdotorg.org
Mon May 13 12:12:25 EDT 2013
On 05/12/2013 12:21 PM, Simon Arlott wrote:
> As the USB driver needs to handle 8000+ interrupts/s without wasting
> CPU, one option is to use the FIQ handler to filter out and handle most
> of the interrupts. This is complicated by the need to be able to write
> a readable driver that interacts with the rest of the USB subsystem,
> which will require proper use of locking.
>
> Locking that depends on being able to disable interrupts won't easily
> work because the FIQ is enabled independently of the normal interrupts.
> The USB host only generates one interrupt, so the FIQ can only handle
> all or none of these. Some process is required to convert the FIQ to a
> normal IRQ (that can be disabled for locking to work correctly).
Perhaps the locking can be simplified a bit by using FIQ just to make
the HW look more like regular EHCI (so just queue management I guess)
and then passing /all/ "normal" USB interrupts back to the regular USB
driver. That should isolate all the locking entirely within the
HW-specific driver, right?
Rather than re-purposing a bell interrupt, aren't there SW-generated
interrupts that can be allocated/implemented for this purpose?
More information about the linux-rpi-kernel
mailing list