From patchwork Mon May 16 11:35:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 67886 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1486325qge; Mon, 16 May 2016 04:36:48 -0700 (PDT) X-Received: by 10.98.66.80 with SMTP id p77mr44529615pfa.75.1463398608168; Mon, 16 May 2016 04:36:48 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fd2si45540153pac.68.2016.05.16.04.36.47; Mon, 16 May 2016 04:36:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752046AbcEPLgq (ORCPT + 2 others); Mon, 16 May 2016 07:36:46 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:40624 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751571AbcEPLgq (ORCPT ); Mon, 16 May 2016 07:36:46 -0400 Received: from 172.24.1.137 (EHLO szxeml425-hub.china.huawei.com) ([172.24.1.137]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id CBT40485; Mon, 16 May 2016 19:36:39 +0800 (CST) Received: from localhost (10.177.23.164) by szxeml425-hub.china.huawei.com (10.82.67.180) with Microsoft SMTP Server id 14.3.235.1; Mon, 16 May 2016 19:36:29 +0800 From: Zhen Lei To: Greg Kroah-Hartman , Jiri Slaby , linux-serial , linux-kernel CC: Zefan Li , Xinwei Hu , "Tianhong Ding" , Hanjun Guo , "Kefeng Wang" , Zhen Lei Subject: [PATCH 1/1] tty/serial: to support 8250 earlycon can be enabled independently Date: Mon, 16 May 2016 19:35:58 +0800 Message-ID: <1463398558-6636-1-git-send-email-thunder.leizhen@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 MIME-Version: 1.0 X-Originating-IP: [10.177.23.164] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090202.5739B0C8.000F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 9cb8262ed3ba78daaf67a22514a5dc76 Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Sometimes, we may only use SSH to login, and build 8250 uart driver as a ko(insmod if needed). But the earlycon may still be necessary, because the kernel boot process may take a long time. It's not good to display nothing but ask people to wait patiently. In addition, the 8250.ko can not be worked if we have not opened any other serial drivers, because SERIAL_CORE would not be selected. Signed-off-by: Zhen Lei --- drivers/tty/serial/8250/Kconfig | 9 +++++++-- drivers/tty/serial/8250/Makefile | 1 - drivers/tty/serial/Makefile | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig index 4d7cb9c..2992f0a 100644 --- a/drivers/tty/serial/8250/Kconfig +++ b/drivers/tty/serial/8250/Kconfig @@ -3,6 +3,12 @@ # you somehow have an implicit or explicit dependency on SERIAL_8250. # +config SERIAL_8250_EARLYCON + bool "Early console using 8250" + select SERIAL_CORE + select SERIAL_CORE_CONSOLE + select SERIAL_EARLYCON + config SERIAL_8250 tristate "8250/16550 and compatible serial support" select SERIAL_CORE @@ -60,8 +66,7 @@ config SERIAL_8250_PNP config SERIAL_8250_CONSOLE bool "Console on 8250/16550 and compatible serial port" depends on SERIAL_8250=y - select SERIAL_CORE_CONSOLE - select SERIAL_EARLYCON + select SERIAL_8250_EARLYCON ---help--- If you say Y here, it will be possible to use a serial port as the system console (the system console is the device which receives all diff --git a/drivers/tty/serial/8250/Makefile b/drivers/tty/serial/8250/Makefile index c9a2d6e..1f24c74 100644 --- a/drivers/tty/serial/8250/Makefile +++ b/drivers/tty/serial/8250/Makefile @@ -13,7 +13,6 @@ obj-$(CONFIG_SERIAL_8250_HP300) += 8250_hp300.o obj-$(CONFIG_SERIAL_8250_CS) += serial_cs.o obj-$(CONFIG_SERIAL_8250_ACORN) += 8250_acorn.o obj-$(CONFIG_SERIAL_8250_BCM2835AUX) += 8250_bcm2835aux.o -obj-$(CONFIG_SERIAL_8250_CONSOLE) += 8250_early.o obj-$(CONFIG_SERIAL_8250_FOURPORT) += 8250_fourport.o obj-$(CONFIG_SERIAL_8250_ACCENT) += 8250_accent.o obj-$(CONFIG_SERIAL_8250_BOCA) += 8250_boca.o diff --git a/drivers/tty/serial/Makefile b/drivers/tty/serial/Makefile index 8c261ad..cd84181 100644 --- a/drivers/tty/serial/Makefile +++ b/drivers/tty/serial/Makefile @@ -19,6 +19,7 @@ obj-$(CONFIG_SERIAL_SUNSAB) += sunsab.o # Now bring in any enabled 8250/16450/16550 type drivers. obj-$(CONFIG_SERIAL_8250) += 8250/ +obj-$(CONFIG_SERIAL_8250_EARLYCON) += 8250/8250_early.o obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o