linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: benh@kernel.crashing.org, paulus@samba.org
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: [PATCH] powerpc: dont include 8250 pre-setup if 8250 driver isn't enabled.
Date: Fri, 20 Jan 2012 22:50:28 -0500	[thread overview]
Message-ID: <1327117828-27085-1-git-send-email-paul.gortmaker@windriver.com> (raw)

The legacy_serial code was setting things up based on the assumption
that the main 8250 driver would be loaded shortly after.  But some
randconfigs exposed an issue where early debug (UDB) UART support was
enabled, yet the core UART 8250 support was disabled.

In theory a person could care about _really_ early UART output for
early debug, but not care about generic console output via UART on
embedded devices, so fix things so it is a valid combination.

While this might seem like a pointless randconfig change, there are
some existing default configs that actually reflect the above setup.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 3fea368..9a82a49 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -413,6 +413,14 @@ void __init find_legacy_serial_ports(void)
 	DBG(" <- find_legacy_serial_port()\n");
 }
 
+/*
+ * In theory, one could have the early debugging enabled, but yet not care
+ * about 8250 after that, i.e. PPC_UDBG_16550=y but "SERIAL_8250 is not set".
+ * Mostly appears in randconfig builds, but some defconfigs have this.
+ */
+
+#ifdef CONFIG_SERIAL_8250
+
 static struct platform_device serial_device = {
 	.name	= "serial8250",
 	.id	= PLAT8250_DEV_PLATFORM,
@@ -523,6 +531,7 @@ static int __init serial_dev_init(void)
 }
 device_initcall(serial_dev_init);
 
+#endif	/* CONFIG_SERIAL_8250 */
 
 #ifdef CONFIG_SERIAL_8250_CONSOLE
 /*
-- 
1.7.7.2

             reply	other threads:[~2012-01-21  3:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-21  3:50 Paul Gortmaker [this message]
2012-02-02 17:56 ` [PATCH] powerpc: dont include 8250 pre-setup if 8250 driver isn't enabled Paul Gortmaker
2012-02-02 21:26   ` Benjamin Herrenschmidt

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=1327117828-27085-1-git-send-email-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).