From: Bryan Wu <cooloney@kernel.org>
To: alan@redhat.com
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
Sonic Zhang <sonic.zhang@analog.com>,
Bryan Wu <cooloney@kernel.org>
Subject: [PATCH 4/6] Blackfin Serial Driver: Clean serial console and early prink code`
Date: Mon, 13 Oct 2008 17:46:23 +0800 [thread overview]
Message-ID: <1223891185-13924-5-git-send-email-cooloney@kernel.org> (raw)
In-Reply-To: <1223891185-13924-1-git-send-email-cooloney@kernel.org>
From: Sonic Zhang <sonic.zhang@analog.com>
Singed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
drivers/serial/bfin_5xx.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 3cc7b98..44a0855 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -987,7 +987,7 @@ static void __init bfin_serial_init_ports(void)
}
-#ifdef CONFIG_SERIAL_BFIN_CONSOLE
+#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
/*
* If the port was already initialised (eg, by a boot loader),
* try to determine the current setup.
@@ -1031,24 +1031,20 @@ bfin_serial_console_get_options(struct bfin_serial_port *uart, int *baud,
}
pr_debug("%s:baud = %d, parity = %c, bits= %d\n", __func__, *baud, *parity, *bits);
}
-#endif
-#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
static struct uart_driver bfin_serial_reg;
static int __init
bfin_serial_console_setup(struct console *co, char *options)
{
struct bfin_serial_port *uart;
-# ifdef CONFIG_SERIAL_BFIN_CONSOLE
int baud = 57600;
int bits = 8;
int parity = 'n';
-# ifdef CONFIG_SERIAL_BFIN_CTSRTS
+# ifdef CONFIG_SERIAL_BFIN_CTSRTS
int flow = 'r';
-# else
+# else
int flow = 'n';
-# endif
# endif
/*
@@ -1060,16 +1056,12 @@ bfin_serial_console_setup(struct console *co, char *options)
co->index = 0;
uart = &bfin_serial_ports[co->index];
-# ifdef CONFIG_SERIAL_BFIN_CONSOLE
if (options)
uart_parse_options(options, &baud, &parity, &bits, &flow);
else
bfin_serial_console_get_options(uart, &baud, &parity, &bits);
return uart_set_options(&uart->port, co, baud, parity, bits, flow);
-# else
- return 0;
-# endif
}
#endif /* defined (CONFIG_SERIAL_BFIN_CONSOLE) ||
defined (CONFIG_EARLY_PRINTK) */
@@ -1179,7 +1171,7 @@ struct console __init *bfin_earlyserial_init(unsigned int port,
return &bfin_early_serial_console;
}
-#endif /* CONFIG_SERIAL_BFIN_CONSOLE */
+#endif /* CONFIG_EARLY_PRINTK */
#ifdef CONFIG_DEBUG_KERNEL
void bfin_serial_debug(const char *fmt, ...)
--
1.5.6
next prev parent reply other threads:[~2008-10-13 9:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-13 9:46 [PATCH 0/6] Blackfin Serial Driver updates for 2.6.28 Bryan Wu
2008-10-13 9:46 ` [PATCH 1/6] Blackfin Serial Driver: updates kgdb over Blackfin serial driver with kgdb framework Bryan Wu
2008-10-13 9:46 ` [PATCH 2/6] Blackfin Serial Driver: Add a debug function to serial driver Bryan Wu
2008-10-14 13:27 ` Alan Cox
2008-10-14 13:27 ` Alan Cox
2008-10-15 2:23 ` gyang
2008-10-15 2:23 ` gyang
2008-10-15 8:38 ` Alan Cox
2008-10-16 13:58 ` Bryan Wu
2008-10-13 9:46 ` [PATCH 3/6] Blackfin Serial Driver: fix bug - SIR driver stop receiving randomly Bryan Wu
2008-10-13 9:46 ` Bryan Wu [this message]
2008-10-13 9:46 ` [PATCH 5/6] Blackfin Serial Driver: Fix bug - BF527-EZKIT unable to receive large files over UART in DMA mode Bryan Wu
2008-10-13 9:46 ` [PATCH 6/6] Blackfin Serial Driver: Remove BI status for known_good_char Bryan Wu
2008-10-13 10:16 ` [PATCH 0/6] Blackfin Serial Driver updates for 2.6.28 Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1223891185-13924-5-git-send-email-cooloney@kernel.org \
--to=cooloney@kernel.org \
--cc=alan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=sonic.zhang@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.