Dave Airlie wrote:
> Should I be enabling interrupts during the boot-up stage for the serial
> port keyboard? or should I be doing this later on ?
To save interrupt overhead, serial drivers enable interrupts during the
open call, i.e. at the moment the interrupts are really needed. The
console driver opens a low-level serial driver anyway. So, you don't
need to enable interrupts at the boot stage even for console.
The zs driver is reliable enough (if Harald applied all patches) to be a
source for references. Or just look at standard serial.c. Note, the zs
driver allocates irq (in request_irq) in zs_init, but _enables_
interrupts in startup() (called from zs_open, in particular). The
standard serial driver allocates and enables irq in one place, during
Also, what might puzzles you is the fact the zs driver has additional
code for the debugger/keyboard support. The code programs interrupts for
lines that are used for debuuging/keyboard IO. But in this case, those
lines are excluded from the open procedure, so high-level drivers can't
use them and it's very special case.
Hope this helps,