Skip to content

Commit

Permalink
ARM: PL011: include revision number in boot-time port printk
Browse files Browse the repository at this point in the history
Include the revision number of the PL011 primecell in the boot-time
port printk to allow proper identification of the peripheral.

Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Jan 5, 2011
1 parent f6614b7 commit e8a7ba8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/serial/amba-pl011.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ struct uart_amba_port {
unsigned int lcrh_rx; /* vendor-specific */
bool oversampling; /* vendor-specific */
bool autorts;
char type[12];
};

/* There is by now at least one vendor with differing details, so handle it */
Expand Down Expand Up @@ -622,7 +623,8 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios,

static const char *pl011_type(struct uart_port *port)
{
return port->type == PORT_AMBA ? "AMBA/PL011" : NULL;
struct uart_amba_port *uap = (struct uart_amba_port *)port;
return uap->port.type == PORT_AMBA ? uap->type : NULL;
}

/*
Expand Down Expand Up @@ -872,6 +874,8 @@ static int pl011_probe(struct amba_device *dev, struct amba_id *id)
uap->port.flags = UPF_BOOT_AUTOCONF;
uap->port.line = i;

snprintf(uap->type, sizeof(uap->type), "PL011 rev%u", amba_rev(dev));

amba_ports[i] = uap;

amba_set_drvdata(dev, uap);
Expand Down

0 comments on commit e8a7ba8

Please sign in to comment.