aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-09-03 10:30:21 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-09-03 10:30:21 -0400
commit30b7a3bc133c5b4a723163be35157ed709fca91c (patch)
treefbd56e4acffb5d4ec271b9b4fc6506e6098bca44 /drivers
parentd27400746189f3b5194b49575833ea660c430118 (diff)
[SERIAL] Prefix serial printks with KERN_INFO and pre-format
Pre-format the IO part of the ttyS printks, and prefix them with KERN_INFO to avoid bootsplash corruption. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/serial/serial_core.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index dea156a62d0a..2d8622eef701 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1947,21 +1947,29 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
1947static inline void 1947static inline void
1948uart_report_port(struct uart_driver *drv, struct uart_port *port) 1948uart_report_port(struct uart_driver *drv, struct uart_port *port)
1949{ 1949{
1950 printk("%s%d", drv->dev_name, port->line); 1950 char address[64];
1951 printk(" at "); 1951
1952 switch (port->iotype) { 1952 switch (port->iotype) {
1953 case UPIO_PORT: 1953 case UPIO_PORT:
1954 printk("I/O 0x%x", port->iobase); 1954 snprintf(address, sizeof(address),
1955 "I/O 0x%x", port->iobase);
1955 break; 1956 break;
1956 case UPIO_HUB6: 1957 case UPIO_HUB6:
1957 printk("I/O 0x%x offset 0x%x", port->iobase, port->hub6); 1958 snprintf(address, sizeof(address),
1959 "I/O 0x%x offset 0x%x", port->iobase, port->hub6);
1958 break; 1960 break;
1959 case UPIO_MEM: 1961 case UPIO_MEM:
1960 case UPIO_MEM32: 1962 case UPIO_MEM32:
1961 printk("MMIO 0x%lx", port->mapbase); 1963 snprintf(address, sizeof(address),
1964 "MMIO 0x%lx", port->mapbase);
1965 break;
1966 default:
1967 strlcpy(address, "*unknown*", sizeof(address));
1962 break; 1968 break;
1963 } 1969 }
1964 printk(" (irq = %d) is a %s\n", port->irq, uart_type(port)); 1970
1971 printk(KERN_INFO "%s%d at %s (irq = %d) is a %s\n",
1972 drv->dev_name, port->line, address, port->irq, uart_type(port));
1965} 1973}
1966 1974
1967static void 1975static void