diff options
author | Julien Grall <julien.grall@linaro.org> | 2013-04-26 20:36:35 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-05-13 11:59:59 +0100 |
commit | 2be37b2cda31fc1b5f11deb912249bc54803f055 (patch) | |
tree | 267c28970649cc3d0bbeee4de78c18b4015edac0 /xen/drivers | |
parent | 23045cfe5099a0ff211b31b69073d907f2f221fd (diff) | |
download | xen-2be37b2cda31fc1b5f11deb912249bc54803f055.tar.gz xen-2be37b2cda31fc1b5f11deb912249bc54803f055.tar.bz2 xen-2be37b2cda31fc1b5f11deb912249bc54803f055.zip |
xen/arm: New callback in uart_driver to get device tree interrupt structure
The existing function serial_irq doesn't allow to retrieve if the interrupt
is edge or level trigger.
Use this function to routes IRQs for all serial ports which Xen is using
to Xen.
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/drivers')
-rw-r--r-- | xen/drivers/char/serial.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xen/drivers/char/serial.c b/xen/drivers/char/serial.c index a3d2b26cd9..0ae7e4daeb 100644 --- a/xen/drivers/char/serial.c +++ b/xen/drivers/char/serial.c @@ -482,6 +482,16 @@ int __init serial_irq(int idx) return -1; } +const struct dt_irq __init *serial_dt_irq(int idx) +{ + if ( (idx >= 0) && (idx < ARRAY_SIZE(com)) && + com[idx].driver && com[idx].driver->dt_irq_get ) + return com[idx].driver->dt_irq_get(&com[idx]); + + return NULL; +} + + void serial_suspend(void) { int i; |