Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235505
b: refs/heads/master
c: a5f4dbf
h: refs/heads/master
i:
  235503: eed7400
v: v3
  • Loading branch information
Feng Tang authored and Greg Kroah-Hartman committed Feb 3, 2011
1 parent 3758a38 commit f7b4cc0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 39 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: 940f3be4058e0aff0505fd6f68e29e547e10e552
refs/heads/master: a5f4dbf0ae972510faca799a809d3771fab323b7
38 changes: 0 additions & 38 deletions trunk/drivers/tty/serial/mfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
#define mfd_readl(obj, offset) readl(obj->reg + offset)
#define mfd_writel(obj, offset, val) writel(val, obj->reg + offset)

#define HSU_DMA_TIMEOUT_CHECK_FREQ (HZ/10)

struct hsu_dma_buffer {
u8 *buf;
dma_addr_t dma_addr;
Expand All @@ -65,7 +63,6 @@ struct hsu_dma_chan {
enum dma_data_direction dirt;
struct uart_hsu_port *uport;
void __iomem *reg;
struct timer_list rx_timer; /* only needed by RX channel */
};

struct uart_hsu_port {
Expand Down Expand Up @@ -355,8 +352,6 @@ void hsu_dma_start_rx_chan(struct hsu_dma_chan *rxc, struct hsu_dma_buffer *dbuf
| (0x1 << 24) /* timeout bit, see HSU Errata 1 */
);
chan_writel(rxc, HSU_CH_CR, 0x3);

mod_timer(&rxc->rx_timer, jiffies + HSU_DMA_TIMEOUT_CHECK_FREQ);
}

/* Protected by spin_lock_irqsave(port->lock) */
Expand Down Expand Up @@ -420,7 +415,6 @@ void hsu_dma_rx(struct uart_hsu_port *up, u32 int_sts)
chan_writel(chan, HSU_CH_CR, 0x3);
return;
}
del_timer(&chan->rx_timer);

dma_sync_single_for_cpu(port->dev, dbuf->dma_addr,
dbuf->dma_size, DMA_FROM_DEVICE);
Expand Down Expand Up @@ -448,8 +442,6 @@ void hsu_dma_rx(struct uart_hsu_port *up, u32 int_sts)
tty_flip_buffer_push(tty);

chan_writel(chan, HSU_CH_CR, 0x3);
chan->rx_timer.expires = jiffies + HSU_DMA_TIMEOUT_CHECK_FREQ;
add_timer(&chan->rx_timer);

}

Expand Down Expand Up @@ -870,8 +862,6 @@ static void serial_hsu_shutdown(struct uart_port *port)
container_of(port, struct uart_hsu_port, port);
unsigned long flags;

del_timer_sync(&up->rxc->rx_timer);

/* Disable interrupts from this port */
up->ier = 0;
serial_out(up, UART_IER, 0);
Expand Down Expand Up @@ -1343,28 +1333,6 @@ static int serial_hsu_probe(struct pci_dev *pdev,
return ret;
}

static void hsu_dma_rx_timeout(unsigned long data)
{
struct hsu_dma_chan *chan = (void *)data;
struct uart_hsu_port *up = chan->uport;
struct hsu_dma_buffer *dbuf = &up->rxbuf;
int count = 0;
unsigned long flags;

spin_lock_irqsave(&up->port.lock, flags);

count = chan_readl(chan, HSU_CH_D0SAR) - dbuf->dma_addr;

if (!count) {
mod_timer(&chan->rx_timer, jiffies + HSU_DMA_TIMEOUT_CHECK_FREQ);
goto exit;
}

hsu_dma_rx(up, 0);
exit:
spin_unlock_irqrestore(&up->port.lock, flags);
}

static void hsu_global_init(void)
{
struct hsu_port *hsu;
Expand Down Expand Up @@ -1427,12 +1395,6 @@ static void hsu_global_init(void)
dchan->reg = hsu->reg + HSU_DMA_CHANS_REG_OFFSET +
i * HSU_DMA_CHANS_REG_LENGTH;

/* Work around for RX */
if (dchan->dirt == DMA_FROM_DEVICE) {
init_timer(&dchan->rx_timer);
dchan->rx_timer.function = hsu_dma_rx_timeout;
dchan->rx_timer.data = (unsigned long)dchan;
}
dchan++;
}

Expand Down

0 comments on commit f7b4cc0

Please sign in to comment.