Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235535
b: refs/heads/master
c: 2780ad4
h: refs/heads/master
i:
  235533: 9f168ad
  235531: 79ed82f
  235527: b1eca24
  235519: eacc397
v: v3
  • Loading branch information
Tobias Klauser authored and Greg Kroah-Hartman committed Feb 17, 2011
1 parent e225437 commit 5348a26
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: e96fabd8791aad30a3c8a03919893ae3e2e3df25
refs/heads/master: 2780ad42f5fe6739882603c61c8decba6e50eaa2
14 changes: 7 additions & 7 deletions trunk/drivers/tty/serial/altera_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,12 @@ struct altera_uart {

static u32 altera_uart_readl(struct uart_port *port, int reg)
{
struct altera_uart_platform_uart *platp = port->private_data;

return readl(port->membase + (reg << platp->bus_shift));
return readl(port->membase + (reg << port->regshift));
}

static void altera_uart_writel(struct uart_port *port, u32 dat, int reg)
{
struct altera_uart_platform_uart *platp = port->private_data;

writel(dat, port->membase + (reg << platp->bus_shift));
writel(dat, port->membase + (reg << port->regshift));
}

static unsigned int altera_uart_tx_empty(struct uart_port *port)
Expand Down Expand Up @@ -546,13 +542,17 @@ static int __devinit altera_uart_probe(struct platform_device *pdev)
if (!port->membase)
return -ENOMEM;

if (platp)
port->regshift = platp->bus_shift;
else
port->regshift = 0;

port->line = i;
port->type = PORT_ALTERA_UART;
port->iotype = SERIAL_IO_MEM;
port->uartclk = platp->uartclk;
port->ops = &altera_uart_ops;
port->flags = UPF_BOOT_AUTOCONF;
port->private_data = platp;

uart_add_one_port(&altera_uart_driver, port);

Expand Down

0 comments on commit 5348a26

Please sign in to comment.