Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340367
b: refs/heads/master
c: 8d16002
h: refs/heads/master
i:
  340365: eec846e
  340363: 2e40533
  340359: a6a6de6
  340351: 775b1e1
v: v3
  • Loading branch information
Mark Salter authored and David Howells committed Dec 12, 2012
1 parent 6f634ad commit 446ce47
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d361cb754720d69695a3efc973e9a1a51e46b21
refs/heads/master: 8d160027ff234bddea627ba54c2b85efa1884867
34 changes: 30 additions & 4 deletions trunk/arch/mn10300/kernel/mn10300-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,34 @@ static struct irq_chip mn10300_serial_pic = {
.irq_unmask = mn10300_serial_nop,
};

static void mn10300_serial_low_mask(struct irq_data *d)
{
unsigned long flags;
u16 tmp;

flags = arch_local_cli_save();
GxICR(d->irq) = NUM2GxICR_LEVEL(CONFIG_MN10300_SERIAL_IRQ_LEVEL);
tmp = GxICR(d->irq); /* flush write buffer */
arch_local_irq_restore(flags);
}

static void mn10300_serial_low_unmask(struct irq_data *d)
{
unsigned long flags;
u16 tmp;

flags = arch_local_cli_save();
GxICR(d->irq) =
NUM2GxICR_LEVEL(CONFIG_MN10300_SERIAL_IRQ_LEVEL) | GxICR_ENABLE;
tmp = GxICR(d->irq); /* flush write buffer */
arch_local_irq_restore(flags);
}

static struct irq_chip mn10300_serial_low_pic = {
.name = "mnserial-low",
.irq_mask = mn10300_serial_low_mask,
.irq_unmask = mn10300_serial_low_unmask,
};

/*
* serial virtual DMA interrupt jump table
Expand Down Expand Up @@ -929,10 +957,8 @@ static int mn10300_serial_startup(struct uart_port *_port)
pint->port = port;
pint->vdma = mn10300_serial_vdma_tx_handler;

set_intr_level(port->rx_irq,
NUM2GxICR_LEVEL(CONFIG_MN10300_SERIAL_IRQ_LEVEL));
set_intr_level(port->tx_irq,
NUM2GxICR_LEVEL(CONFIG_MN10300_SERIAL_IRQ_LEVEL));
irq_set_chip(port->rx_irq, &mn10300_serial_low_pic);
irq_set_chip(port->tx_irq, &mn10300_serial_low_pic);
irq_set_chip(port->tm_irq, &mn10300_serial_pic);

if (request_irq(port->rx_irq, mn10300_serial_interrupt,
Expand Down

0 comments on commit 446ce47

Please sign in to comment.