Module: xenomai-2.5
Branch: master
Commit: 56d9f7a94808d89cc4617b519974580cfcaf6e71
URL:    
http://git.xenomai.org/?p=xenomai-2.5.git;a=commit;h=56d9f7a94808d89cc4617b519974580cfcaf6e71

Author: Stefan Kisdaroczi <ki...@hispeed.ch>
Date:   Fri Jan  7 20:21:16 2011 +0100

16550A: customizable irqtype

---

 ksrc/drivers/serial/16550A.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ksrc/drivers/serial/16550A.c b/ksrc/drivers/serial/16550A.c
index 4c46d86..f290e43 100644
--- a/ksrc/drivers/serial/16550A.c
+++ b/ksrc/drivers/serial/16550A.c
@@ -119,6 +119,9 @@ static const struct rtser_config default_config = {
 static struct rtdm_device *device[MAX_DEVICES];
 
 static unsigned int irq[MAX_DEVICES];
+static unsigned long irqtype[MAX_DEVICES] = {
+       [0 ... MAX_DEVICES-1] = RTDM_IRQTYPE_SHARED | RTDM_IRQTYPE_EDGE
+};
 static unsigned int baud_base[MAX_DEVICES];
 static int tx_fifo[MAX_DEVICES];
 static unsigned int start_index;
@@ -478,8 +481,7 @@ int rt_16550_open(struct rtdm_dev_context *context,
        rt_16550_set_config(ctx, &default_config, &dummy);
 
        err = rtdm_irq_request(&ctx->irq_handle, irq[dev_id],
-                              rt_16550_interrupt,
-                              RTDM_IRQTYPE_SHARED | RTDM_IRQTYPE_EDGE,
+                              rt_16550_interrupt, irqtype[dev_id],
                               context->device->proc_name, ctx);
        if (err) {
                /* reset DTR and RTS */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to