Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338376
b: refs/heads/master
c: f52ede2
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Shiyan authored and Greg Kroah-Hartman committed Oct 24, 2012
1 parent b39da69 commit 212b287
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 23 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: 135cc7903593af78c45dc3f8e6a1f528f083e002
refs/heads/master: f52ede2ac1159f844994519ae0386def308a296b
29 changes: 7 additions & 22 deletions trunk/drivers/tty/serial/clps711x.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ static void clps711xuart_break_ctl(struct uart_port *port, int break_state)
static int clps711xuart_startup(struct uart_port *port)
{
struct clps711x_port *s = dev_get_drvdata(port->dev);
unsigned int syscon;
int ret;

s->tx_enabled[port->line] = 1;
Expand All @@ -248,37 +247,23 @@ static int clps711xuart_startup(struct uart_port *port)
return ret;
}

/*
* enable the port
*/
syscon = clps_readl(SYSCON(port));
syscon |= SYSCON_UARTEN;
clps_writel(syscon, SYSCON(port));
/* Disable break */
clps_writel(clps_readl(UBRLCR(port)) & ~UBRLCR_BREAK, UBRLCR(port));

/* Enable the port */
clps_writel(clps_readl(SYSCON(port)) | SYSCON_UARTEN, SYSCON(port));

return 0;
}

static void clps711xuart_shutdown(struct uart_port *port)
{
unsigned int ubrlcr, syscon;

/* Free the interrupts */
devm_free_irq(port->dev, TX_IRQ(port), port);
devm_free_irq(port->dev, RX_IRQ(port), port);

/*
* disable the port
*/
syscon = clps_readl(SYSCON(port));
syscon &= ~SYSCON_UARTEN;
clps_writel(syscon, SYSCON(port));

/*
* disable break condition and fifos
*/
ubrlcr = clps_readl(UBRLCR(port));
ubrlcr &= ~(UBRLCR_FIFOEN | UBRLCR_BREAK);
clps_writel(ubrlcr, UBRLCR(port));
/* Disable the port */
clps_writel(clps_readl(SYSCON(port)) & ~SYSCON_UARTEN, SYSCON(port));
}

static void
Expand Down

0 comments on commit 212b287

Please sign in to comment.