All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] tty: serial: Add earlycon support to MT8173 SoC
@ 2015-01-12 13:08 ` Eddie Huang
  0 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-01-12 13:08 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Greg Kroah-Hartman, Matthias Brugger
  Cc: devicetree, Vladimir Murzin, srv_heupstream, Pawel Moll,
	Ian Campbell, Catalin Marinas, Jonathan Corbet, Will Deacon,
	linux-kernel, linux-doc, yh.chen, Howard Chen, Ashwin Chaugule,
	linux-serial, Kumar Gala, Joe.C, Eddie Huang, Jiri Slaby,
	linux-arm-kernel, Alan Cox

8250 earlycon will always init serial hardware. The hardware setting is
from kernel earlycon parameters or by probe current baudrate. I add noinit
options in 8250 earlycon to bypass init, such that earlycon can use the
same hardware setting as loader.

This series also add MT8173 earlycon support, and stdout in device
tree.

Change v2:
1. Add noinit options.
2. Remove duplicate code in 8250_mtk.c, reuse the 8250_early.c existed function.

This patchset is based on 3.19-rc1, and my basic support for Mediatek
MT8173 SoC [1].

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/315165.html

Eddie Huang (4):
  tty: serial: Add 8250 earlycon to support noinit option
  tty: serial: 8250_mtk: Add earlycon
  arm64: dts: Add mediatek MT8173 earlycon support
  Document: Modify 8250 earlycon kernel parameters

 Documentation/kernel-parameters.txt         |  5 ++++-
 arch/arm64/boot/dts/mediatek/mt8173-evb.dts |  4 +++-
 drivers/tty/serial/8250/8250_early.c        |  7 ++++---
 drivers/tty/serial/8250/8250_mtk.c          | 15 +++++++++++++++
 drivers/tty/serial/earlycon.c               | 17 ++++++++++++-----
 include/linux/serial_8250.h                 |  2 ++
 include/linux/serial_core.h                 |  1 +
 7 files changed, 41 insertions(+), 10 deletions(-)

--
1.8.1.1.dirty

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 0/4] tty: serial: Add earlycon support to MT8173 SoC
@ 2015-01-12 13:08 ` Eddie Huang
  0 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-01-12 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

8250 earlycon will always init serial hardware. The hardware setting is
from kernel earlycon parameters or by probe current baudrate. I add noinit
options in 8250 earlycon to bypass init, such that earlycon can use the
same hardware setting as loader.

This series also add MT8173 earlycon support, and stdout in device
tree.

Change v2:
1. Add noinit options.
2. Remove duplicate code in 8250_mtk.c, reuse the 8250_early.c existed function.

This patchset is based on 3.19-rc1, and my basic support for Mediatek
MT8173 SoC [1].

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/315165.html

Eddie Huang (4):
  tty: serial: Add 8250 earlycon to support noinit option
  tty: serial: 8250_mtk: Add earlycon
  arm64: dts: Add mediatek MT8173 earlycon support
  Document: Modify 8250 earlycon kernel parameters

 Documentation/kernel-parameters.txt         |  5 ++++-
 arch/arm64/boot/dts/mediatek/mt8173-evb.dts |  4 +++-
 drivers/tty/serial/8250/8250_early.c        |  7 ++++---
 drivers/tty/serial/8250/8250_mtk.c          | 15 +++++++++++++++
 drivers/tty/serial/earlycon.c               | 17 ++++++++++++-----
 include/linux/serial_8250.h                 |  2 ++
 include/linux/serial_core.h                 |  1 +
 7 files changed, 41 insertions(+), 10 deletions(-)

--
1.8.1.1.dirty

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
  2015-01-12 13:08 ` Eddie Huang
@ 2015-01-12 13:08   ` Eddie Huang
  -1 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-01-12 13:08 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Greg Kroah-Hartman, Matthias Brugger
  Cc: devicetree, Vladimir Murzin, srv_heupstream, Pawel Moll,
	Ian Campbell, Catalin Marinas, Jonathan Corbet, Will Deacon,
	linux-kernel, linux-doc, yh.chen, Howard Chen, Ashwin Chaugule,
	linux-serial, Kumar Gala, Joe.C, Eddie Huang, Jiri Slaby,
	linux-arm-kernel, Alan Cox

Add earlycon support not only baudrate option, but also add noinit option.
If use noinit option, 8250 earlycon will not init serial hardware and use
loader setting.

Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
---
 drivers/tty/serial/8250/8250_early.c |  7 ++++---
 drivers/tty/serial/earlycon.c        | 17 ++++++++++++-----
 include/linux/serial_8250.h          |  2 ++
 include/linux/serial_core.h          |  1 +
 4 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index 4858b8a..a13d757 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -138,19 +138,20 @@ static void __init init_port(struct earlycon_device *device)
 	serial8250_early_out(port, UART_LCR, c & ~UART_LCR_DLAB);
 }
 
-static int __init early_serial8250_setup(struct earlycon_device *device,
+int __init early_serial8250_setup(struct earlycon_device *device,
 					 const char *options)
 {
 	if (!(device->port.membase || device->port.iobase))
 		return 0;
 
-	if (!device->baud) {
+	if (!device->baud && !device->noinit) {
 		device->baud = probe_baud(&device->port);
 		snprintf(device->options, sizeof(device->options), "%u",
 			 device->baud);
 	}
 
-	init_port(device);
+	if (!device->noinit)
+		init_port(device);
 
 	early_device = device;
 	device->con->write = early_serial8250_write;
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index 64fe25a..4891251 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -58,7 +58,7 @@ static int __init parse_options(struct earlycon_device *device,
 				char *options)
 {
 	struct uart_port *port = &device->port;
-	int mmio, mmio32, length;
+	int noinit, mmio, mmio32, length;
 	unsigned long addr;
 
 	if (!options)
@@ -92,10 +92,17 @@ static int __init parse_options(struct earlycon_device *device,
 	options = strchr(options, ',');
 	if (options) {
 		options++;
-		device->baud = simple_strtoul(options, NULL, 0);
-		length = min(strcspn(options, " ") + 1,
-			     (size_t)(sizeof(device->options)));
-		strlcpy(device->options, options, length);
+		noinit = !strncmp(options, "noinit", 6);
+		if (noinit) {
+			device->noinit = noinit;
+			strlcpy(device->options, options, 6);
+			device->options[6] = '\0';
+		} else {
+			device->baud = simple_strtoul(options, NULL, 0);
+			length = min(strcspn(options, " ") + 1,
+					(size_t)(sizeof(device->options)));
+			strlcpy(device->options, options, length);
+		}
 	}
 
 	if (port->iotype == UPIO_MEM || port->iotype == UPIO_MEM32)
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index e02acf0..0e26eec 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -119,6 +119,8 @@ extern int serial8250_find_port(struct uart_port *p);
 extern int serial8250_find_port_for_earlycon(void);
 extern unsigned int serial8250_early_in(struct uart_port *port, int offset);
 extern void serial8250_early_out(struct uart_port *port, int offset, int value);
+extern int early_serial8250_setup(struct earlycon_device *device,
+					 const char *options);
 extern int setup_early_serial8250_console(char *cmdline);
 extern void serial8250_do_set_termios(struct uart_port *port,
 		struct ktermios *termios, struct ktermios *old);
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 057038c..72c6698 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -326,6 +326,7 @@ struct earlycon_device {
 	struct uart_port port;
 	char options[16];		/* e.g., 115200n8 */
 	unsigned int baud;
+	int noinit;
 };
 int setup_earlycon(char *buf, const char *match,
 		   int (*setup)(struct earlycon_device *, const char *));
-- 
1.8.1.1.dirty

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-01-12 13:08   ` Eddie Huang
  0 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-01-12 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

Add earlycon support not only baudrate option, but also add noinit option.
If use noinit option, 8250 earlycon will not init serial hardware and use
loader setting.

Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
---
 drivers/tty/serial/8250/8250_early.c |  7 ++++---
 drivers/tty/serial/earlycon.c        | 17 ++++++++++++-----
 include/linux/serial_8250.h          |  2 ++
 include/linux/serial_core.h          |  1 +
 4 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index 4858b8a..a13d757 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -138,19 +138,20 @@ static void __init init_port(struct earlycon_device *device)
 	serial8250_early_out(port, UART_LCR, c & ~UART_LCR_DLAB);
 }
 
-static int __init early_serial8250_setup(struct earlycon_device *device,
+int __init early_serial8250_setup(struct earlycon_device *device,
 					 const char *options)
 {
 	if (!(device->port.membase || device->port.iobase))
 		return 0;
 
-	if (!device->baud) {
+	if (!device->baud && !device->noinit) {
 		device->baud = probe_baud(&device->port);
 		snprintf(device->options, sizeof(device->options), "%u",
 			 device->baud);
 	}
 
-	init_port(device);
+	if (!device->noinit)
+		init_port(device);
 
 	early_device = device;
 	device->con->write = early_serial8250_write;
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index 64fe25a..4891251 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -58,7 +58,7 @@ static int __init parse_options(struct earlycon_device *device,
 				char *options)
 {
 	struct uart_port *port = &device->port;
-	int mmio, mmio32, length;
+	int noinit, mmio, mmio32, length;
 	unsigned long addr;
 
 	if (!options)
@@ -92,10 +92,17 @@ static int __init parse_options(struct earlycon_device *device,
 	options = strchr(options, ',');
 	if (options) {
 		options++;
-		device->baud = simple_strtoul(options, NULL, 0);
-		length = min(strcspn(options, " ") + 1,
-			     (size_t)(sizeof(device->options)));
-		strlcpy(device->options, options, length);
+		noinit = !strncmp(options, "noinit", 6);
+		if (noinit) {
+			device->noinit = noinit;
+			strlcpy(device->options, options, 6);
+			device->options[6] = '\0';
+		} else {
+			device->baud = simple_strtoul(options, NULL, 0);
+			length = min(strcspn(options, " ") + 1,
+					(size_t)(sizeof(device->options)));
+			strlcpy(device->options, options, length);
+		}
 	}
 
 	if (port->iotype == UPIO_MEM || port->iotype == UPIO_MEM32)
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index e02acf0..0e26eec 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -119,6 +119,8 @@ extern int serial8250_find_port(struct uart_port *p);
 extern int serial8250_find_port_for_earlycon(void);
 extern unsigned int serial8250_early_in(struct uart_port *port, int offset);
 extern void serial8250_early_out(struct uart_port *port, int offset, int value);
+extern int early_serial8250_setup(struct earlycon_device *device,
+					 const char *options);
 extern int setup_early_serial8250_console(char *cmdline);
 extern void serial8250_do_set_termios(struct uart_port *port,
 		struct ktermios *termios, struct ktermios *old);
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 057038c..72c6698 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -326,6 +326,7 @@ struct earlycon_device {
 	struct uart_port port;
 	char options[16];		/* e.g., 115200n8 */
 	unsigned int baud;
+	int noinit;
 };
 int setup_earlycon(char *buf, const char *match,
 		   int (*setup)(struct earlycon_device *, const char *));
-- 
1.8.1.1.dirty

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH v2 2/4] tty: serial: 8250_mtk: Add earlycon
  2015-01-12 13:08 ` Eddie Huang
@ 2015-01-12 13:08   ` Eddie Huang
  -1 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-01-12 13:08 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Greg Kroah-Hartman, Matthias Brugger
  Cc: devicetree, Vladimir Murzin, srv_heupstream, Pawel Moll,
	Ian Campbell, Catalin Marinas, Jonathan Corbet, Will Deacon,
	linux-kernel, linux-doc, yh.chen, Howard Chen, Ashwin Chaugule,
	linux-serial, Kumar Gala, Joe.C, Eddie Huang, Jiri Slaby,
	linux-arm-kernel, Alan Cox

Add 8250 MTK UART driver to support earlycon device tree.

Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
---
 drivers/tty/serial/8250/8250_mtk.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c
index 7a11fac..86964df 100644
--- a/drivers/tty/serial/8250/8250_mtk.c
+++ b/drivers/tty/serial/8250/8250_mtk.c
@@ -23,6 +23,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/serial_8250.h>
 #include <linux/serial_reg.h>
+#include <linux/console.h>
 
 #include "8250.h"
 
@@ -289,6 +290,20 @@ static struct platform_driver mtk8250_platform_driver = {
 };
 module_platform_driver(mtk8250_platform_driver);
 
+static int __init early_mtk8250_setup(struct earlycon_device *device,
+					const char *options)
+{
+	if (!device->port.membase)
+		return -ENODEV;
+
+	device->port.iotype = UPIO_MEM32;
+	device->noinit = 1;
+
+	return early_serial8250_setup(device, NULL);
+}
+
+OF_EARLYCON_DECLARE(mtk8250, "mediatek,mt6577-uart", early_mtk8250_setup);
+
 MODULE_AUTHOR("Matthias Brugger");
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Mediatek 8250 serial port driver");
-- 
1.8.1.1.dirty

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH v2 2/4] tty: serial: 8250_mtk: Add earlycon
@ 2015-01-12 13:08   ` Eddie Huang
  0 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-01-12 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

Add 8250 MTK UART driver to support earlycon device tree.

Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
---
 drivers/tty/serial/8250/8250_mtk.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c
index 7a11fac..86964df 100644
--- a/drivers/tty/serial/8250/8250_mtk.c
+++ b/drivers/tty/serial/8250/8250_mtk.c
@@ -23,6 +23,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/serial_8250.h>
 #include <linux/serial_reg.h>
+#include <linux/console.h>
 
 #include "8250.h"
 
@@ -289,6 +290,20 @@ static struct platform_driver mtk8250_platform_driver = {
 };
 module_platform_driver(mtk8250_platform_driver);
 
+static int __init early_mtk8250_setup(struct earlycon_device *device,
+					const char *options)
+{
+	if (!device->port.membase)
+		return -ENODEV;
+
+	device->port.iotype = UPIO_MEM32;
+	device->noinit = 1;
+
+	return early_serial8250_setup(device, NULL);
+}
+
+OF_EARLYCON_DECLARE(mtk8250, "mediatek,mt6577-uart", early_mtk8250_setup);
+
 MODULE_AUTHOR("Matthias Brugger");
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Mediatek 8250 serial port driver");
-- 
1.8.1.1.dirty

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH v2 3/4] arm64: dts: Add mediatek MT8173 earlycon support
  2015-01-12 13:08 ` Eddie Huang
@ 2015-01-12 13:08   ` Eddie Huang
  -1 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-01-12 13:08 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Greg Kroah-Hartman, Matthias Brugger
  Cc: devicetree, Vladimir Murzin, srv_heupstream, Pawel Moll,
	Ian Campbell, Catalin Marinas, Jonathan Corbet, Will Deacon,
	linux-kernel, linux-doc, yh.chen, Howard Chen, Ashwin Chaugule,
	linux-serial, Kumar Gala, Joe.C, Eddie Huang, Jiri Slaby,
	linux-arm-kernel, Alan Cox

Add earlycon support to mediatek MT8173 evaluation board dts.

Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
index 43d5401..d4cf751 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
@@ -30,7 +30,9 @@
 		reg = <0 0x40000000 0 0x80000000>;
 	};
 
-	chosen { };
+	chosen {
+		linux,stdout-path = &uart0;
+	};
 };
 
 &uart0 {
-- 
1.8.1.1.dirty

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH v2 3/4] arm64: dts: Add mediatek MT8173 earlycon support
@ 2015-01-12 13:08   ` Eddie Huang
  0 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-01-12 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

Add earlycon support to mediatek MT8173 evaluation board dts.

Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
index 43d5401..d4cf751 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
@@ -30,7 +30,9 @@
 		reg = <0 0x40000000 0 0x80000000>;
 	};
 
-	chosen { };
+	chosen {
+		linux,stdout-path = &uart0;
+	};
 };
 
 &uart0 {
-- 
1.8.1.1.dirty

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH v2 4/4] Document: Modify 8250 earlycon kernel parameters
  2015-01-12 13:08 ` Eddie Huang
@ 2015-01-12 13:08   ` Eddie Huang
  -1 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-01-12 13:08 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Greg Kroah-Hartman, Matthias Brugger
  Cc: devicetree, Vladimir Murzin, srv_heupstream, Pawel Moll,
	Ian Campbell, Catalin Marinas, Jonathan Corbet, Will Deacon,
	linux-kernel, linux-doc, yh.chen, Howard Chen, Ashwin Chaugule,
	linux-serial, Kumar Gala, Joe.C, Eddie Huang, Jiri Slaby,
	linux-arm-kernel, Alan Cox

Add options "noinit" to avoid init serial hardware in 8250_early.c

Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
---
 Documentation/kernel-parameters.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 4df73da..03a4e9b 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -948,7 +948,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			UART at the specified I/O port or MMIO address.
 			MMIO inter-register address stride is either 8-bit
 			(mmio) or 32-bit (mmio32).
-			The options are the same as for ttyS, above.
+			The options have two choices: one is the same as for
+			ttyS, above. The other is noinit, which means don't
+			initialize serial hardware, use the same setting as
+			loader.
 
 		pl011,<addr>
 			Start an early, polled-mode console on a pl011 serial
-- 
1.8.1.1.dirty

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH v2 4/4] Document: Modify 8250 earlycon kernel parameters
@ 2015-01-12 13:08   ` Eddie Huang
  0 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-01-12 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

Add options "noinit" to avoid init serial hardware in 8250_early.c

Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
---
 Documentation/kernel-parameters.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 4df73da..03a4e9b 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -948,7 +948,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			UART at the specified I/O port or MMIO address.
 			MMIO inter-register address stride is either 8-bit
 			(mmio) or 32-bit (mmio32).
-			The options are the same as for ttyS, above.
+			The options have two choices: one is the same as for
+			ttyS, above. The other is noinit, which means don't
+			initialize serial hardware, use the same setting as
+			loader.
 
 		pl011,<addr>
 			Start an early, polled-mode console on a pl011 serial
-- 
1.8.1.1.dirty

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
  2015-01-12 13:08   ` Eddie Huang
@ 2015-01-12 15:35     ` Arnd Bergmann
  -1 siblings, 0 replies; 43+ messages in thread
From: Arnd Bergmann @ 2015-01-12 15:35 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Eddie Huang, Rob Herring, Mark Rutland, Greg Kroah-Hartman,
	Matthias Brugger, devicetree, Vladimir Murzin, srv_heupstream,
	Pawel Moll, Ian Campbell, Catalin Marinas, Jonathan Corbet,
	Will Deacon, linux-kernel, linux-doc, yh.chen, Howard Chen,
	Ashwin Chaugule, linux-serial, Kumar Gala, Joe.C, Jiri Slaby,
	Alan Cox

On Monday 12 January 2015 21:08:21 Eddie Huang wrote:
> Add earlycon support not only baudrate option, but also add noinit option.
> If use noinit option, 8250 earlycon will not init serial hardware and use
> loader setting.
> 
> Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>

I probably missed something in the previous discussion, but why is
"noinit" not just the default? I believe that is how we handle early
serial ports on PowerPC, and I see no downsides to it.

	Arnd

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-01-12 15:35     ` Arnd Bergmann
  0 siblings, 0 replies; 43+ messages in thread
From: Arnd Bergmann @ 2015-01-12 15:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 12 January 2015 21:08:21 Eddie Huang wrote:
> Add earlycon support not only baudrate option, but also add noinit option.
> If use noinit option, 8250 earlycon will not init serial hardware and use
> loader setting.
> 
> Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>

I probably missed something in the previous discussion, but why is
"noinit" not just the default? I believe that is how we handle early
serial ports on PowerPC, and I see no downsides to it.

	Arnd

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
  2015-01-12 15:35     ` Arnd Bergmann
@ 2015-01-12 16:08       ` Alan Cox
  -1 siblings, 0 replies; 43+ messages in thread
From: Alan Cox @ 2015-01-12 16:08 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, Eddie Huang, Rob Herring, Mark Rutland,
	Greg Kroah-Hartman, Matthias Brugger, devicetree,
	Vladimir Murzin, srv_heupstream, Pawel Moll, Ian Campbell,
	Catalin Marinas, Jonathan Corbet, Will Deacon, linux-kernel,
	linux-doc, yh.chen, Howard Chen, Ashwin Chaugule, linux-serial,
	Kumar Gala, Joe.C, Jiri Slaby

On Mon, 2015-01-12 at 16:35 +0100, Arnd Bergmann wrote:
> On Monday 12 January 2015 21:08:21 Eddie Huang wrote:
> > Add earlycon support not only baudrate option, but also add noinit option.
> > If use noinit option, 8250 earlycon will not init serial hardware and use
> > loader setting.
> > 
> > Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
> 
> I probably missed something in the previous discussion, but why is
> "noinit" not just the default? I believe that is how we handle early
> serial ports on PowerPC, and I see no downsides to it.

Most PC hardware at least needs the port initialised to use it. It won't
have been configured by the firmware in many cases.

Alan



^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-01-12 16:08       ` Alan Cox
  0 siblings, 0 replies; 43+ messages in thread
From: Alan Cox @ 2015-01-12 16:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 2015-01-12 at 16:35 +0100, Arnd Bergmann wrote:
> On Monday 12 January 2015 21:08:21 Eddie Huang wrote:
> > Add earlycon support not only baudrate option, but also add noinit option.
> > If use noinit option, 8250 earlycon will not init serial hardware and use
> > loader setting.
> > 
> > Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
> 
> I probably missed something in the previous discussion, but why is
> "noinit" not just the default? I believe that is how we handle early
> serial ports on PowerPC, and I see no downsides to it.

Most PC hardware at least needs the port initialised to use it. It won't
have been configured by the firmware in many cases.

Alan

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
  2015-01-12 16:08       ` Alan Cox
@ 2015-01-13  1:05         ` Eddie Huang
  -1 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-01-13  1:05 UTC (permalink / raw)
  To: Arnd Bergmann, Alan Cox
  Cc: Mark Rutland, linux-doc, Catalin Marinas, Will Deacon,
	Jiri Slaby, Jonathan Corbet, yh.chen, Howard Chen, linux-serial,
	Joe.C, devicetree, Vladimir Murzin, Pawel Moll, Ian Campbell,
	Rob Herring, Matthias Brugger, linux-arm-kernel, srv_heupstream,
	Greg Kroah-Hartman, linux-kernel, Ashwin Chaugule, Kumar Gala

Hi Arnd,

On Mon, 2015-01-12 at 16:08 +0000, Alan Cox wrote:
> On Mon, 2015-01-12 at 16:35 +0100, Arnd Bergmann wrote:
> > On Monday 12 January 2015 21:08:21 Eddie Huang wrote:
> > > Add earlycon support not only baudrate option, but also add noinit option.
> > > If use noinit option, 8250 earlycon will not init serial hardware and use
> > > loader setting.
> > > 
> > > Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
> > 
> > I probably missed something in the previous discussion, but why is
> > "noinit" not just the default? I believe that is how we handle early
> > serial ports on PowerPC, and I see no downsides to it.
> 
> Most PC hardware at least needs the port initialised to use it. It won't
> have been configured by the firmware in many cases.
> 

Sorry no continue discuss in previous series. Since other 8250 user may
already depend on current init behavior, I think it's better to keep it
and add noinit by extra setting.

Eddie 

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-01-13  1:05         ` Eddie Huang
  0 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-01-13  1:05 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd,

On Mon, 2015-01-12 at 16:08 +0000, Alan Cox wrote:
> On Mon, 2015-01-12 at 16:35 +0100, Arnd Bergmann wrote:
> > On Monday 12 January 2015 21:08:21 Eddie Huang wrote:
> > > Add earlycon support not only baudrate option, but also add noinit option.
> > > If use noinit option, 8250 earlycon will not init serial hardware and use
> > > loader setting.
> > > 
> > > Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
> > 
> > I probably missed something in the previous discussion, but why is
> > "noinit" not just the default? I believe that is how we handle early
> > serial ports on PowerPC, and I see no downsides to it.
> 
> Most PC hardware at least needs the port initialised to use it. It won't
> have been configured by the firmware in many cases.
> 

Sorry no continue discuss in previous series. Since other 8250 user may
already depend on current init behavior, I think it's better to keep it
and add noinit by extra setting.

Eddie 

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-01 16:27     ` Peter Hurley
  0 siblings, 0 replies; 43+ messages in thread
From: Peter Hurley @ 2015-02-01 16:27 UTC (permalink / raw)
  To: Eddie Huang, Rob Herring, Mark Rutland, Greg Kroah-Hartman,
	Matthias Brugger
  Cc: devicetree, Vladimir Murzin, srv_heupstream, Pawel Moll,
	Ian Campbell, Catalin Marinas, Jonathan Corbet, Will Deacon,
	linux-kernel, linux-doc, yh.chen, Howard Chen, Ashwin Chaugule,
	linux-serial, Kumar Gala, Joe.C, Jiri Slaby, linux-arm-kernel,
	Alan Cox

Hi Eddie,

On 01/12/2015 08:08 AM, Eddie Huang wrote:
> Add earlycon support not only baudrate option, but also add noinit option.
> If use noinit option, 8250 earlycon will not init serial hardware and use
> loader setting.

I see this went into Greg's tty-testing branch.

The only point of this is to not program the divisor, right?

I ask because early_serial8250_setup() could already handle this without
extra options by simply not doing divisor programming if no baud option is
present.

And this blows up if the optional console= form is used:
    console=uart,mmio32,<addr>,noinit
because the ttyS console will expect line settings for console match.

Regards,
Peter Hurley

> Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
> ---
>  drivers/tty/serial/8250/8250_early.c |  7 ++++---
>  drivers/tty/serial/earlycon.c        | 17 ++++++++++++-----
>  include/linux/serial_8250.h          |  2 ++
>  include/linux/serial_core.h          |  1 +
>  4 files changed, 19 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
> index 4858b8a..a13d757 100644
> --- a/drivers/tty/serial/8250/8250_early.c
> +++ b/drivers/tty/serial/8250/8250_early.c
> @@ -138,19 +138,20 @@ static void __init init_port(struct earlycon_device *device)
>  	serial8250_early_out(port, UART_LCR, c & ~UART_LCR_DLAB);
>  }
>  
> -static int __init early_serial8250_setup(struct earlycon_device *device,
> +int __init early_serial8250_setup(struct earlycon_device *device,
>  					 const char *options)
>  {
>  	if (!(device->port.membase || device->port.iobase))
>  		return 0;
>  
> -	if (!device->baud) {
> +	if (!device->baud && !device->noinit) {
>  		device->baud = probe_baud(&device->port);
>  		snprintf(device->options, sizeof(device->options), "%u",
>  			 device->baud);
>  	}
>  
> -	init_port(device);
> +	if (!device->noinit)
> +		init_port(device);
>  
>  	early_device = device;
>  	device->con->write = early_serial8250_write;
> diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
> index 64fe25a..4891251 100644
> --- a/drivers/tty/serial/earlycon.c
> +++ b/drivers/tty/serial/earlycon.c
> @@ -58,7 +58,7 @@ static int __init parse_options(struct earlycon_device *device,
>  				char *options)
>  {
>  	struct uart_port *port = &device->port;
> -	int mmio, mmio32, length;
> +	int noinit, mmio, mmio32, length;
>  	unsigned long addr;
>  
>  	if (!options)
> @@ -92,10 +92,17 @@ static int __init parse_options(struct earlycon_device *device,
>  	options = strchr(options, ',');
>  	if (options) {
>  		options++;
> -		device->baud = simple_strtoul(options, NULL, 0);
> -		length = min(strcspn(options, " ") + 1,
> -			     (size_t)(sizeof(device->options)));
> -		strlcpy(device->options, options, length);
> +		noinit = !strncmp(options, "noinit", 6);
> +		if (noinit) {
> +			device->noinit = noinit;
> +			strlcpy(device->options, options, 6);
> +			device->options[6] = '\0';
> +		} else {
> +			device->baud = simple_strtoul(options, NULL, 0);
> +			length = min(strcspn(options, " ") + 1,
> +					(size_t)(sizeof(device->options)));
> +			strlcpy(device->options, options, length);
> +		}
>  	}
>  
>  	if (port->iotype == UPIO_MEM || port->iotype == UPIO_MEM32)
> diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
> index e02acf0..0e26eec 100644
> --- a/include/linux/serial_8250.h
> +++ b/include/linux/serial_8250.h
> @@ -119,6 +119,8 @@ extern int serial8250_find_port(struct uart_port *p);
>  extern int serial8250_find_port_for_earlycon(void);
>  extern unsigned int serial8250_early_in(struct uart_port *port, int offset);
>  extern void serial8250_early_out(struct uart_port *port, int offset, int value);
> +extern int early_serial8250_setup(struct earlycon_device *device,
> +					 const char *options);
>  extern int setup_early_serial8250_console(char *cmdline);
>  extern void serial8250_do_set_termios(struct uart_port *port,
>  		struct ktermios *termios, struct ktermios *old);
> diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
> index 057038c..72c6698 100644
> --- a/include/linux/serial_core.h
> +++ b/include/linux/serial_core.h
> @@ -326,6 +326,7 @@ struct earlycon_device {
>  	struct uart_port port;
>  	char options[16];		/* e.g., 115200n8 */
>  	unsigned int baud;
> +	int noinit;
>  };
>  int setup_earlycon(char *buf, const char *match,
>  		   int (*setup)(struct earlycon_device *, const char *));
> 


^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-01 16:27     ` Peter Hurley
  0 siblings, 0 replies; 43+ messages in thread
From: Peter Hurley @ 2015-02-01 16:27 UTC (permalink / raw)
  To: Eddie Huang, Rob Herring, Mark Rutland, Greg Kroah-Hartman,
	Matthias Brugger
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Vladimir Murzin,
	srv_heupstream-NuS5LvNUpcJWk0Htik3J/w, Pawel Moll, Ian Campbell,
	Catalin Marinas, Jonathan Corbet, Will Deacon,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-doc-u79uwXL29TY76Z2rM5mHXA, yh.chen-NuS5LvNUpcJWk0Htik3J/w,
	Howard Chen, Ashwin Chaugule,
	linux-serial-u79uwXL29TY76Z2rM5mHXA, Kumar Gala, Joe.C,
	Jiri Slaby, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Alan Cox

Hi Eddie,

On 01/12/2015 08:08 AM, Eddie Huang wrote:
> Add earlycon support not only baudrate option, but also add noinit option.
> If use noinit option, 8250 earlycon will not init serial hardware and use
> loader setting.

I see this went into Greg's tty-testing branch.

The only point of this is to not program the divisor, right?

I ask because early_serial8250_setup() could already handle this without
extra options by simply not doing divisor programming if no baud option is
present.

And this blows up if the optional console= form is used:
    console=uart,mmio32,<addr>,noinit
because the ttyS console will expect line settings for console match.

Regards,
Peter Hurley

> Signed-off-by: Eddie Huang <eddie.huang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> ---
>  drivers/tty/serial/8250/8250_early.c |  7 ++++---
>  drivers/tty/serial/earlycon.c        | 17 ++++++++++++-----
>  include/linux/serial_8250.h          |  2 ++
>  include/linux/serial_core.h          |  1 +
>  4 files changed, 19 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
> index 4858b8a..a13d757 100644
> --- a/drivers/tty/serial/8250/8250_early.c
> +++ b/drivers/tty/serial/8250/8250_early.c
> @@ -138,19 +138,20 @@ static void __init init_port(struct earlycon_device *device)
>  	serial8250_early_out(port, UART_LCR, c & ~UART_LCR_DLAB);
>  }
>  
> -static int __init early_serial8250_setup(struct earlycon_device *device,
> +int __init early_serial8250_setup(struct earlycon_device *device,
>  					 const char *options)
>  {
>  	if (!(device->port.membase || device->port.iobase))
>  		return 0;
>  
> -	if (!device->baud) {
> +	if (!device->baud && !device->noinit) {
>  		device->baud = probe_baud(&device->port);
>  		snprintf(device->options, sizeof(device->options), "%u",
>  			 device->baud);
>  	}
>  
> -	init_port(device);
> +	if (!device->noinit)
> +		init_port(device);
>  
>  	early_device = device;
>  	device->con->write = early_serial8250_write;
> diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
> index 64fe25a..4891251 100644
> --- a/drivers/tty/serial/earlycon.c
> +++ b/drivers/tty/serial/earlycon.c
> @@ -58,7 +58,7 @@ static int __init parse_options(struct earlycon_device *device,
>  				char *options)
>  {
>  	struct uart_port *port = &device->port;
> -	int mmio, mmio32, length;
> +	int noinit, mmio, mmio32, length;
>  	unsigned long addr;
>  
>  	if (!options)
> @@ -92,10 +92,17 @@ static int __init parse_options(struct earlycon_device *device,
>  	options = strchr(options, ',');
>  	if (options) {
>  		options++;
> -		device->baud = simple_strtoul(options, NULL, 0);
> -		length = min(strcspn(options, " ") + 1,
> -			     (size_t)(sizeof(device->options)));
> -		strlcpy(device->options, options, length);
> +		noinit = !strncmp(options, "noinit", 6);
> +		if (noinit) {
> +			device->noinit = noinit;
> +			strlcpy(device->options, options, 6);
> +			device->options[6] = '\0';
> +		} else {
> +			device->baud = simple_strtoul(options, NULL, 0);
> +			length = min(strcspn(options, " ") + 1,
> +					(size_t)(sizeof(device->options)));
> +			strlcpy(device->options, options, length);
> +		}
>  	}
>  
>  	if (port->iotype == UPIO_MEM || port->iotype == UPIO_MEM32)
> diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
> index e02acf0..0e26eec 100644
> --- a/include/linux/serial_8250.h
> +++ b/include/linux/serial_8250.h
> @@ -119,6 +119,8 @@ extern int serial8250_find_port(struct uart_port *p);
>  extern int serial8250_find_port_for_earlycon(void);
>  extern unsigned int serial8250_early_in(struct uart_port *port, int offset);
>  extern void serial8250_early_out(struct uart_port *port, int offset, int value);
> +extern int early_serial8250_setup(struct earlycon_device *device,
> +					 const char *options);
>  extern int setup_early_serial8250_console(char *cmdline);
>  extern void serial8250_do_set_termios(struct uart_port *port,
>  		struct ktermios *termios, struct ktermios *old);
> diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
> index 057038c..72c6698 100644
> --- a/include/linux/serial_core.h
> +++ b/include/linux/serial_core.h
> @@ -326,6 +326,7 @@ struct earlycon_device {
>  	struct uart_port port;
>  	char options[16];		/* e.g., 115200n8 */
>  	unsigned int baud;
> +	int noinit;
>  };
>  int setup_earlycon(char *buf, const char *match,
>  		   int (*setup)(struct earlycon_device *, const char *));
> 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-01 16:27     ` Peter Hurley
  0 siblings, 0 replies; 43+ messages in thread
From: Peter Hurley @ 2015-02-01 16:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Eddie,

On 01/12/2015 08:08 AM, Eddie Huang wrote:
> Add earlycon support not only baudrate option, but also add noinit option.
> If use noinit option, 8250 earlycon will not init serial hardware and use
> loader setting.

I see this went into Greg's tty-testing branch.

The only point of this is to not program the divisor, right?

I ask because early_serial8250_setup() could already handle this without
extra options by simply not doing divisor programming if no baud option is
present.

And this blows up if the optional console= form is used:
    console=uart,mmio32,<addr>,noinit
because the ttyS console will expect line settings for console match.

Regards,
Peter Hurley

> Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
> ---
>  drivers/tty/serial/8250/8250_early.c |  7 ++++---
>  drivers/tty/serial/earlycon.c        | 17 ++++++++++++-----
>  include/linux/serial_8250.h          |  2 ++
>  include/linux/serial_core.h          |  1 +
>  4 files changed, 19 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
> index 4858b8a..a13d757 100644
> --- a/drivers/tty/serial/8250/8250_early.c
> +++ b/drivers/tty/serial/8250/8250_early.c
> @@ -138,19 +138,20 @@ static void __init init_port(struct earlycon_device *device)
>  	serial8250_early_out(port, UART_LCR, c & ~UART_LCR_DLAB);
>  }
>  
> -static int __init early_serial8250_setup(struct earlycon_device *device,
> +int __init early_serial8250_setup(struct earlycon_device *device,
>  					 const char *options)
>  {
>  	if (!(device->port.membase || device->port.iobase))
>  		return 0;
>  
> -	if (!device->baud) {
> +	if (!device->baud && !device->noinit) {
>  		device->baud = probe_baud(&device->port);
>  		snprintf(device->options, sizeof(device->options), "%u",
>  			 device->baud);
>  	}
>  
> -	init_port(device);
> +	if (!device->noinit)
> +		init_port(device);
>  
>  	early_device = device;
>  	device->con->write = early_serial8250_write;
> diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
> index 64fe25a..4891251 100644
> --- a/drivers/tty/serial/earlycon.c
> +++ b/drivers/tty/serial/earlycon.c
> @@ -58,7 +58,7 @@ static int __init parse_options(struct earlycon_device *device,
>  				char *options)
>  {
>  	struct uart_port *port = &device->port;
> -	int mmio, mmio32, length;
> +	int noinit, mmio, mmio32, length;
>  	unsigned long addr;
>  
>  	if (!options)
> @@ -92,10 +92,17 @@ static int __init parse_options(struct earlycon_device *device,
>  	options = strchr(options, ',');
>  	if (options) {
>  		options++;
> -		device->baud = simple_strtoul(options, NULL, 0);
> -		length = min(strcspn(options, " ") + 1,
> -			     (size_t)(sizeof(device->options)));
> -		strlcpy(device->options, options, length);
> +		noinit = !strncmp(options, "noinit", 6);
> +		if (noinit) {
> +			device->noinit = noinit;
> +			strlcpy(device->options, options, 6);
> +			device->options[6] = '\0';
> +		} else {
> +			device->baud = simple_strtoul(options, NULL, 0);
> +			length = min(strcspn(options, " ") + 1,
> +					(size_t)(sizeof(device->options)));
> +			strlcpy(device->options, options, length);
> +		}
>  	}
>  
>  	if (port->iotype == UPIO_MEM || port->iotype == UPIO_MEM32)
> diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
> index e02acf0..0e26eec 100644
> --- a/include/linux/serial_8250.h
> +++ b/include/linux/serial_8250.h
> @@ -119,6 +119,8 @@ extern int serial8250_find_port(struct uart_port *p);
>  extern int serial8250_find_port_for_earlycon(void);
>  extern unsigned int serial8250_early_in(struct uart_port *port, int offset);
>  extern void serial8250_early_out(struct uart_port *port, int offset, int value);
> +extern int early_serial8250_setup(struct earlycon_device *device,
> +					 const char *options);
>  extern int setup_early_serial8250_console(char *cmdline);
>  extern void serial8250_do_set_termios(struct uart_port *port,
>  		struct ktermios *termios, struct ktermios *old);
> diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
> index 057038c..72c6698 100644
> --- a/include/linux/serial_core.h
> +++ b/include/linux/serial_core.h
> @@ -326,6 +326,7 @@ struct earlycon_device {
>  	struct uart_port port;
>  	char options[16];		/* e.g., 115200n8 */
>  	unsigned int baud;
> +	int noinit;
>  };
>  int setup_earlycon(char *buf, const char *match,
>  		   int (*setup)(struct earlycon_device *, const char *));
> 

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-01 18:26       ` Peter Hurley
  0 siblings, 0 replies; 43+ messages in thread
From: Peter Hurley @ 2015-02-01 18:26 UTC (permalink / raw)
  To: Eddie Huang
  Cc: Rob Herring, Mark Rutland, Greg Kroah-Hartman, Matthias Brugger,
	devicetree, Vladimir Murzin, srv_heupstream, Pawel Moll,
	Ian Campbell, Catalin Marinas, Jonathan Corbet, Will Deacon,
	linux-kernel, linux-doc, yh.chen, Howard Chen, Ashwin Chaugule,
	linux-serial, Kumar Gala, Joe.C, Jiri Slaby, linux-arm-kernel,
	Alan Cox

On 02/01/2015 11:27 AM, Peter Hurley wrote:
> Hi Eddie,
> 
> On 01/12/2015 08:08 AM, Eddie Huang wrote:
>> Add earlycon support not only baudrate option, but also add noinit option.
>> If use noinit option, 8250 earlycon will not init serial hardware and use
>> loader setting.
> 
> I see this went into Greg's tty-testing branch.
> 
> The only point of this is to not program the divisor, right?
> 
> I ask because early_serial8250_setup() could already handle this without
> extra options by simply not doing divisor programming if no baud option is
> present.

Does the patch below work for your use-case?

[ Note: the patch applies to 3.19-rcX. To test, your noinit patches need to be
  reverted first.
]

--- >% ---
From: Peter Hurley <peter@hurleysoftware.com>
Subject: [PATCH] serial: 8250_early: Assume uart already initialized if no
 baud option

The <baud><parity><bit> option string is not supplied if the earlycon
is started via devicetree and OF_EARLYCON_DECLARE(). The option string
is also not required if started via kernel command line parameters of
the form:
  earlycon=uart,mmio,<addr>
  console=uart,mmio,<addr>

If earlycon_device->baud is 0, then an option string was not supplied.
In this case, assume the uart has already been initialized by the
bootloader or firmware.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
 drivers/tty/serial/8250/8250_early.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index d7b831b..1701d00 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -149,12 +149,18 @@ static int __init early_serial8250_setup(struct earlycon_device *device,
 		return 0;
 
 	if (!device->baud) {
+		struct uart_port *port = &device->port;
+		unsigned int ier;
+
 		device->baud = probe_baud(&device->port);
 		snprintf(device->options, sizeof(device->options), "%u",
 			 device->baud);
-	}
 
-	init_port(device);
+		/* assume the device was initialized, only mask interrupts */
+		ier = serial8250_early_in(port, UART_IER);
+		serial8250_early_out(port, UART_IER, ier & UART_IER_UUE);
+	} else
+		init_port(device);
 
 	device->con->write = early_serial8250_write;
 	return 0;
-- 
2.2.2


^ permalink raw reply related	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-01 18:26       ` Peter Hurley
  0 siblings, 0 replies; 43+ messages in thread
From: Peter Hurley @ 2015-02-01 18:26 UTC (permalink / raw)
  To: Eddie Huang
  Cc: Rob Herring, Mark Rutland, Greg Kroah-Hartman, Matthias Brugger,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Vladimir Murzin,
	srv_heupstream-NuS5LvNUpcJWk0Htik3J/w, Pawel Moll, Ian Campbell,
	Catalin Marinas, Jonathan Corbet, Will Deacon,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-doc-u79uwXL29TY76Z2rM5mHXA, yh.chen-NuS5LvNUpcJWk0Htik3J/w,
	Howard Chen, Ashwin Chaugule,
	linux-serial-u79uwXL29TY76Z2rM5mHXA, Kumar Gala, Joe.C,
	Jiri Slaby, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Alan Cox

On 02/01/2015 11:27 AM, Peter Hurley wrote:
> Hi Eddie,
> 
> On 01/12/2015 08:08 AM, Eddie Huang wrote:
>> Add earlycon support not only baudrate option, but also add noinit option.
>> If use noinit option, 8250 earlycon will not init serial hardware and use
>> loader setting.
> 
> I see this went into Greg's tty-testing branch.
> 
> The only point of this is to not program the divisor, right?
> 
> I ask because early_serial8250_setup() could already handle this without
> extra options by simply not doing divisor programming if no baud option is
> present.

Does the patch below work for your use-case?

[ Note: the patch applies to 3.19-rcX. To test, your noinit patches need to be
  reverted first.
]

--- >% ---
From: Peter Hurley <peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
Subject: [PATCH] serial: 8250_early: Assume uart already initialized if no
 baud option

The <baud><parity><bit> option string is not supplied if the earlycon
is started via devicetree and OF_EARLYCON_DECLARE(). The option string
is also not required if started via kernel command line parameters of
the form:
  earlycon=uart,mmio,<addr>
  console=uart,mmio,<addr>

If earlycon_device->baud is 0, then an option string was not supplied.
In this case, assume the uart has already been initialized by the
bootloader or firmware.

Signed-off-by: Peter Hurley <peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
---
 drivers/tty/serial/8250/8250_early.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index d7b831b..1701d00 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -149,12 +149,18 @@ static int __init early_serial8250_setup(struct earlycon_device *device,
 		return 0;
 
 	if (!device->baud) {
+		struct uart_port *port = &device->port;
+		unsigned int ier;
+
 		device->baud = probe_baud(&device->port);
 		snprintf(device->options, sizeof(device->options), "%u",
 			 device->baud);
-	}
 
-	init_port(device);
+		/* assume the device was initialized, only mask interrupts */
+		ier = serial8250_early_in(port, UART_IER);
+		serial8250_early_out(port, UART_IER, ier & UART_IER_UUE);
+	} else
+		init_port(device);
 
 	device->con->write = early_serial8250_write;
 	return 0;
-- 
2.2.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-01 18:26       ` Peter Hurley
  0 siblings, 0 replies; 43+ messages in thread
From: Peter Hurley @ 2015-02-01 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/01/2015 11:27 AM, Peter Hurley wrote:
> Hi Eddie,
> 
> On 01/12/2015 08:08 AM, Eddie Huang wrote:
>> Add earlycon support not only baudrate option, but also add noinit option.
>> If use noinit option, 8250 earlycon will not init serial hardware and use
>> loader setting.
> 
> I see this went into Greg's tty-testing branch.
> 
> The only point of this is to not program the divisor, right?
> 
> I ask because early_serial8250_setup() could already handle this without
> extra options by simply not doing divisor programming if no baud option is
> present.

Does the patch below work for your use-case?

[ Note: the patch applies to 3.19-rcX. To test, your noinit patches need to be
  reverted first.
]

--- >% ---
From: Peter Hurley <peter@hurleysoftware.com>
Subject: [PATCH] serial: 8250_early: Assume uart already initialized if no
 baud option

The <baud><parity><bit> option string is not supplied if the earlycon
is started via devicetree and OF_EARLYCON_DECLARE(). The option string
is also not required if started via kernel command line parameters of
the form:
  earlycon=uart,mmio,<addr>
  console=uart,mmio,<addr>

If earlycon_device->baud is 0, then an option string was not supplied.
In this case, assume the uart has already been initialized by the
bootloader or firmware.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
 drivers/tty/serial/8250/8250_early.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index d7b831b..1701d00 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -149,12 +149,18 @@ static int __init early_serial8250_setup(struct earlycon_device *device,
 		return 0;
 
 	if (!device->baud) {
+		struct uart_port *port = &device->port;
+		unsigned int ier;
+
 		device->baud = probe_baud(&device->port);
 		snprintf(device->options, sizeof(device->options), "%u",
 			 device->baud);
-	}
 
-	init_port(device);
+		/* assume the device was initialized, only mask interrupts */
+		ier = serial8250_early_in(port, UART_IER);
+		serial8250_early_out(port, UART_IER, ier & UART_IER_UUE);
+	} else
+		init_port(device);
 
 	device->con->write = early_serial8250_write;
 	return 0;
-- 
2.2.2

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
  2015-02-01 16:27     ` Peter Hurley
@ 2015-02-02  2:45       ` Eddie Huang
  -1 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-02-02  2:45 UTC (permalink / raw)
  To: Peter Hurley
  Cc: Mark Rutland, linux-doc, Catalin Marinas, Will Deacon,
	Jiri Slaby, Jonathan Corbet, yh.chen, Howard Chen, linux-serial,
	Joe.C, devicetree, Vladimir Murzin, Pawel Moll, Ian Campbell,
	Rob Herring, Matthias Brugger, linux-arm-kernel, Alan Cox,
	srv_heupstream, Greg Kroah-Hartman, linux-kernel,
	Ashwin Chaugule, Kumar Gala

Hi Peter,

On Sun, 2015-02-01 at 11:27 -0500, Peter Hurley wrote:
> Hi Eddie,
> 
> On 01/12/2015 08:08 AM, Eddie Huang wrote:
> > Add earlycon support not only baudrate option, but also add noinit option.
> > If use noinit option, 8250 earlycon will not init serial hardware and use
> > loader setting.
> 
> I see this went into Greg's tty-testing branch.
> 
> The only point of this is to not program the divisor, right?
In this case, yes.

> I ask because early_serial8250_setup() could already handle this without
> extra options by simply not doing divisor programming if no baud option is
> present.
MTK support high speed UART, which means baudrate can be more than
115200. You can reference mtk8250_set_termios() function in 8250_mtk.c.
Unfortunately, the early_serial8250_setup() can not handle high speed
case. This is why I add noinit parameter.

Besides, I think "no baud option" is a little tricky, and maybe someday
someone not only care about divisor, but also flow. Legacy earlyprintk
and other uart drivers like msm_serial.c also don't init uart hardware.

> 
> And this blows up if the optional console= form is used:
>     console=uart,mmio32,<addr>,noinit
> because the ttyS console will expect line settings for console match.
> 
Yes, you are right. console parameter case will fail, I only consider
earlycon parameter case.

> 
> > Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
> > ---
> >  drivers/tty/serial/8250/8250_early.c |  7 ++++---
> >  drivers/tty/serial/earlycon.c        | 17 ++++++++++++-----
> >  include/linux/serial_8250.h          |  2 ++
> >  include/linux/serial_core.h          |  1 +
> >  4 files changed, 19 insertions(+), 8 deletions(-)
> > 

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-02  2:45       ` Eddie Huang
  0 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-02-02  2:45 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,

On Sun, 2015-02-01 at 11:27 -0500, Peter Hurley wrote:
> Hi Eddie,
> 
> On 01/12/2015 08:08 AM, Eddie Huang wrote:
> > Add earlycon support not only baudrate option, but also add noinit option.
> > If use noinit option, 8250 earlycon will not init serial hardware and use
> > loader setting.
> 
> I see this went into Greg's tty-testing branch.
> 
> The only point of this is to not program the divisor, right?
In this case, yes.

> I ask because early_serial8250_setup() could already handle this without
> extra options by simply not doing divisor programming if no baud option is
> present.
MTK support high speed UART, which means baudrate can be more than
115200. You can reference mtk8250_set_termios() function in 8250_mtk.c.
Unfortunately, the early_serial8250_setup() can not handle high speed
case. This is why I add noinit parameter.

Besides, I think "no baud option" is a little tricky, and maybe someday
someone not only care about divisor, but also flow. Legacy earlyprintk
and other uart drivers like msm_serial.c also don't init uart hardware.

> 
> And this blows up if the optional console= form is used:
>     console=uart,mmio32,<addr>,noinit
> because the ttyS console will expect line settings for console match.
> 
Yes, you are right. console parameter case will fail, I only consider
earlycon parameter case.

> 
> > Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
> > ---
> >  drivers/tty/serial/8250/8250_early.c |  7 ++++---
> >  drivers/tty/serial/earlycon.c        | 17 ++++++++++++-----
> >  include/linux/serial_8250.h          |  2 ++
> >  include/linux/serial_core.h          |  1 +
> >  4 files changed, 19 insertions(+), 8 deletions(-)
> > 

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
  2015-02-01 18:26       ` Peter Hurley
@ 2015-02-02  3:16         ` Eddie Huang
  -1 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-02-02  3:16 UTC (permalink / raw)
  To: Peter Hurley
  Cc: Mark Rutland, linux-doc, Catalin Marinas, Will Deacon,
	Jiri Slaby, Jonathan Corbet, yh.chen, Howard Chen, linux-serial,
	Joe.C, devicetree, Vladimir Murzin, Pawel Moll, Ian Campbell,
	Rob Herring, Matthias Brugger, linux-arm-kernel, Alan Cox,
	srv_heupstream, Greg Kroah-Hartman, linux-kernel,
	Ashwin Chaugule, Kumar Gala

Hi Peter,

On Sun, 2015-02-01 at 13:26 -0500, Peter Hurley wrote:
> On 02/01/2015 11:27 AM, Peter Hurley wrote:
> > Hi Eddie,
> > 
> > On 01/12/2015 08:08 AM, Eddie Huang wrote:
> >> Add earlycon support not only baudrate option, but also add noinit option.
> >> If use noinit option, 8250 earlycon will not init serial hardware and use
> >> loader setting.
> > 
> > I see this went into Greg's tty-testing branch.
> > 
> > The only point of this is to not program the divisor, right?
> > 
> > I ask because early_serial8250_setup() could already handle this without
> > extra options by simply not doing divisor programming if no baud option is
> > present.
> 
> Does the patch below work for your use-case?
> 
> [ Note: the patch applies to 3.19-rcX. To test, your noinit patches need to be
>   reverted first.
> ]
> 
> --- >% ---
> From: Peter Hurley <peter@hurleysoftware.com>
> Subject: [PATCH] serial: 8250_early: Assume uart already initialized if no
>  baud option
> 
> The <baud><parity><bit> option string is not supplied if the earlycon
> is started via devicetree and OF_EARLYCON_DECLARE(). The option string
> is also not required if started via kernel command line parameters of
> the form:
>   earlycon=uart,mmio,<addr>
>   console=uart,mmio,<addr>
> 
> If earlycon_device->baud is 0, then an option string was not supplied.
> In this case, assume the uart has already been initialized by the
> bootloader or firmware.
> 
> Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
> ---
>  drivers/tty/serial/8250/8250_early.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
> index d7b831b..1701d00 100644
> --- a/drivers/tty/serial/8250/8250_early.c
> +++ b/drivers/tty/serial/8250/8250_early.c
> @@ -149,12 +149,18 @@ static int __init early_serial8250_setup(struct earlycon_device *device,
>  		return 0;
>  
>  	if (!device->baud) {
> +		struct uart_port *port = &device->port;
> +		unsigned int ier;
> +
>  		device->baud = probe_baud(&device->port);
>  		snprintf(device->options, sizeof(device->options), "%u",
>  			 device->baud);
> -	}
>  
> -	init_port(device);
> +		/* assume the device was initialized, only mask interrupts */
> +		ier = serial8250_early_in(port, UART_IER);
> +		serial8250_early_out(port, UART_IER, ier & UART_IER_UUE);
> +	} else
> +		init_port(device);
Should add brace in else.

Where is original line here.
          early_device = device;
>  	device->con->write = early_serial8250_write;
>  	return 0;

With above comment, I test ok on my platform.

Eddie
Best Regards.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-02  3:16         ` Eddie Huang
  0 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-02-02  3:16 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,

On Sun, 2015-02-01 at 13:26 -0500, Peter Hurley wrote:
> On 02/01/2015 11:27 AM, Peter Hurley wrote:
> > Hi Eddie,
> > 
> > On 01/12/2015 08:08 AM, Eddie Huang wrote:
> >> Add earlycon support not only baudrate option, but also add noinit option.
> >> If use noinit option, 8250 earlycon will not init serial hardware and use
> >> loader setting.
> > 
> > I see this went into Greg's tty-testing branch.
> > 
> > The only point of this is to not program the divisor, right?
> > 
> > I ask because early_serial8250_setup() could already handle this without
> > extra options by simply not doing divisor programming if no baud option is
> > present.
> 
> Does the patch below work for your use-case?
> 
> [ Note: the patch applies to 3.19-rcX. To test, your noinit patches need to be
>   reverted first.
> ]
> 
> --- >% ---
> From: Peter Hurley <peter@hurleysoftware.com>
> Subject: [PATCH] serial: 8250_early: Assume uart already initialized if no
>  baud option
> 
> The <baud><parity><bit> option string is not supplied if the earlycon
> is started via devicetree and OF_EARLYCON_DECLARE(). The option string
> is also not required if started via kernel command line parameters of
> the form:
>   earlycon=uart,mmio,<addr>
>   console=uart,mmio,<addr>
> 
> If earlycon_device->baud is 0, then an option string was not supplied.
> In this case, assume the uart has already been initialized by the
> bootloader or firmware.
> 
> Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
> ---
>  drivers/tty/serial/8250/8250_early.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
> index d7b831b..1701d00 100644
> --- a/drivers/tty/serial/8250/8250_early.c
> +++ b/drivers/tty/serial/8250/8250_early.c
> @@ -149,12 +149,18 @@ static int __init early_serial8250_setup(struct earlycon_device *device,
>  		return 0;
>  
>  	if (!device->baud) {
> +		struct uart_port *port = &device->port;
> +		unsigned int ier;
> +
>  		device->baud = probe_baud(&device->port);
>  		snprintf(device->options, sizeof(device->options), "%u",
>  			 device->baud);
> -	}
>  
> -	init_port(device);
> +		/* assume the device was initialized, only mask interrupts */
> +		ier = serial8250_early_in(port, UART_IER);
> +		serial8250_early_out(port, UART_IER, ier & UART_IER_UUE);
> +	} else
> +		init_port(device);
Should add brace in else.

Where is original line here.
          early_device = device;
>  	device->con->write = early_serial8250_write;
>  	return 0;

With above comment, I test ok on my platform.

Eddie
Best Regards.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
  2015-02-02  2:45       ` Eddie Huang
@ 2015-02-02  3:27         ` Peter Hurley
  -1 siblings, 0 replies; 43+ messages in thread
From: Peter Hurley @ 2015-02-02  3:27 UTC (permalink / raw)
  To: Eddie Huang
  Cc: Rob Herring, Mark Rutland, Greg Kroah-Hartman, Matthias Brugger,
	devicetree, Vladimir Murzin, srv_heupstream, Pawel Moll,
	Ian Campbell, Catalin Marinas, Jonathan Corbet, Will Deacon,
	linux-kernel, linux-doc, yh.chen, Howard Chen, Ashwin Chaugule,
	linux-serial, Kumar Gala, Joe.C, Jiri Slaby, linux-arm-kernel,
	Alan Cox

On 02/01/2015 09:45 PM, Eddie Huang wrote:
> Hi Peter,
> 
> On Sun, 2015-02-01 at 11:27 -0500, Peter Hurley wrote:
>> Hi Eddie,
>>
>> On 01/12/2015 08:08 AM, Eddie Huang wrote:
>>> Add earlycon support not only baudrate option, but also add noinit option.
>>> If use noinit option, 8250 earlycon will not init serial hardware and use
>>> loader setting.
>>
>> I see this went into Greg's tty-testing branch.
>>
>> The only point of this is to not program the divisor, right?
> In this case, yes.
> 
>> I ask because early_serial8250_setup() could already handle this without
>> extra options by simply not doing divisor programming if no baud option is
>> present.
> MTK support high speed UART, which means baudrate can be more than
> 115200. You can reference mtk8250_set_termios() function in 8250_mtk.c.
> Unfortunately, the early_serial8250_setup() can not handle high speed
> case. This is why I add noinit parameter.

Thanks, that's what I thought; I just wanted to verify.

> Besides, I think "no baud option" is a little tricky, and maybe someday
> someone not only care about divisor, but also flow. Legacy earlyprintk
> and other uart drivers like msm_serial.c also don't init uart hardware.

My point is the 8250 earlycon should only be doing hardware initialization
if there is an option string (of the form <baud><parity><bits>), because
if there's no baud option, programming the divisor is pointless.

And to specify any other line control option the baud must be specified.
So to program any other setting would require the proper option string.

Regards,
Peter Hurley




^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-02  3:27         ` Peter Hurley
  0 siblings, 0 replies; 43+ messages in thread
From: Peter Hurley @ 2015-02-02  3:27 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/01/2015 09:45 PM, Eddie Huang wrote:
> Hi Peter,
> 
> On Sun, 2015-02-01 at 11:27 -0500, Peter Hurley wrote:
>> Hi Eddie,
>>
>> On 01/12/2015 08:08 AM, Eddie Huang wrote:
>>> Add earlycon support not only baudrate option, but also add noinit option.
>>> If use noinit option, 8250 earlycon will not init serial hardware and use
>>> loader setting.
>>
>> I see this went into Greg's tty-testing branch.
>>
>> The only point of this is to not program the divisor, right?
> In this case, yes.
> 
>> I ask because early_serial8250_setup() could already handle this without
>> extra options by simply not doing divisor programming if no baud option is
>> present.
> MTK support high speed UART, which means baudrate can be more than
> 115200. You can reference mtk8250_set_termios() function in 8250_mtk.c.
> Unfortunately, the early_serial8250_setup() can not handle high speed
> case. This is why I add noinit parameter.

Thanks, that's what I thought; I just wanted to verify.

> Besides, I think "no baud option" is a little tricky, and maybe someday
> someone not only care about divisor, but also flow. Legacy earlyprintk
> and other uart drivers like msm_serial.c also don't init uart hardware.

My point is the 8250 earlycon should only be doing hardware initialization
if there is an option string (of the form <baud><parity><bits>), because
if there's no baud option, programming the divisor is pointless.

And to specify any other line control option the baud must be specified.
So to program any other setting would require the proper option string.

Regards,
Peter Hurley

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
  2015-02-02  3:16         ` Eddie Huang
@ 2015-02-02  3:45           ` Peter Hurley
  -1 siblings, 0 replies; 43+ messages in thread
From: Peter Hurley @ 2015-02-02  3:45 UTC (permalink / raw)
  To: Eddie Huang
  Cc: Rob Herring, Mark Rutland, Greg Kroah-Hartman, Matthias Brugger,
	devicetree, Vladimir Murzin, srv_heupstream, Pawel Moll,
	Ian Campbell, Catalin Marinas, Jonathan Corbet, Will Deacon,
	linux-kernel, linux-doc, yh.chen, Howard Chen, Ashwin Chaugule,
	linux-serial, Kumar Gala, Joe.C, Jiri Slaby, linux-arm-kernel,
	Alan Cox

On 02/01/2015 10:16 PM, Eddie Huang wrote:
> Hi Peter,
> 
> On Sun, 2015-02-01 at 13:26 -0500, Peter Hurley wrote:
>> On 02/01/2015 11:27 AM, Peter Hurley wrote:
>>> Hi Eddie,
>>>
>>> On 01/12/2015 08:08 AM, Eddie Huang wrote:
>>>> Add earlycon support not only baudrate option, but also add noinit option.
>>>> If use noinit option, 8250 earlycon will not init serial hardware and use
>>>> loader setting.
>>>
>>> I see this went into Greg's tty-testing branch.
>>>
>>> The only point of this is to not program the divisor, right?
>>>
>>> I ask because early_serial8250_setup() could already handle this without
>>> extra options by simply not doing divisor programming if no baud option is
>>> present.
>>
>> Does the patch below work for your use-case?
>>
>> [ Note: the patch applies to 3.19-rcX. To test, your noinit patches need to be
>>   reverted first.
>> ]
>>
>> --- >% ---
>> From: Peter Hurley <peter@hurleysoftware.com>
>> Subject: [PATCH] serial: 8250_early: Assume uart already initialized if no
>>  baud option
>>
>> The <baud><parity><bit> option string is not supplied if the earlycon
>> is started via devicetree and OF_EARLYCON_DECLARE(). The option string
>> is also not required if started via kernel command line parameters of
>> the form:
>>   earlycon=uart,mmio,<addr>
>>   console=uart,mmio,<addr>
>>
>> If earlycon_device->baud is 0, then an option string was not supplied.
>> In this case, assume the uart has already been initialized by the
>> bootloader or firmware.
>>
>> Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
>> ---
>>  drivers/tty/serial/8250/8250_early.c | 10 ++++++++--
>>  1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
>> index d7b831b..1701d00 100644
>> --- a/drivers/tty/serial/8250/8250_early.c
>> +++ b/drivers/tty/serial/8250/8250_early.c
>> @@ -149,12 +149,18 @@ static int __init early_serial8250_setup(struct earlycon_device *device,
>>  		return 0;
>>  
>>  	if (!device->baud) {
>> +		struct uart_port *port = &device->port;
>> +		unsigned int ier;
>> +
>>  		device->baud = probe_baud(&device->port);
>>  		snprintf(device->options, sizeof(device->options), "%u",
>>  			 device->baud);
>> -	}
>>  
>> -	init_port(device);
>> +		/* assume the device was initialized, only mask interrupts */
>> +		ier = serial8250_early_in(port, UART_IER);
>> +		serial8250_early_out(port, UART_IER, ier & UART_IER_UUE);
>> +	} else
>> +		init_port(device);
> Should add brace in else.

I don't do that unless I have to.

> Where is original line here.
>           early_device = device;

Whoops :)

I wrote the patch from a private branch which implements extensible console
matching (so a console can define its own match function) and a bunch of
other console cleanup and code removal. In that series, early_device becomes
unnecessary and is removed.

I'll respin proper patches on top of Greg's tty-testing branch with reverts
for the noinit options. I noticed that one of the noinit patches actually
has the linkage for the mtk earlycon, so I'll be sure to preserve that.

Regards,
Peter Hurley


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-02  3:45           ` Peter Hurley
  0 siblings, 0 replies; 43+ messages in thread
From: Peter Hurley @ 2015-02-02  3:45 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/01/2015 10:16 PM, Eddie Huang wrote:
> Hi Peter,
> 
> On Sun, 2015-02-01 at 13:26 -0500, Peter Hurley wrote:
>> On 02/01/2015 11:27 AM, Peter Hurley wrote:
>>> Hi Eddie,
>>>
>>> On 01/12/2015 08:08 AM, Eddie Huang wrote:
>>>> Add earlycon support not only baudrate option, but also add noinit option.
>>>> If use noinit option, 8250 earlycon will not init serial hardware and use
>>>> loader setting.
>>>
>>> I see this went into Greg's tty-testing branch.
>>>
>>> The only point of this is to not program the divisor, right?
>>>
>>> I ask because early_serial8250_setup() could already handle this without
>>> extra options by simply not doing divisor programming if no baud option is
>>> present.
>>
>> Does the patch below work for your use-case?
>>
>> [ Note: the patch applies to 3.19-rcX. To test, your noinit patches need to be
>>   reverted first.
>> ]
>>
>> --- >% ---
>> From: Peter Hurley <peter@hurleysoftware.com>
>> Subject: [PATCH] serial: 8250_early: Assume uart already initialized if no
>>  baud option
>>
>> The <baud><parity><bit> option string is not supplied if the earlycon
>> is started via devicetree and OF_EARLYCON_DECLARE(). The option string
>> is also not required if started via kernel command line parameters of
>> the form:
>>   earlycon=uart,mmio,<addr>
>>   console=uart,mmio,<addr>
>>
>> If earlycon_device->baud is 0, then an option string was not supplied.
>> In this case, assume the uart has already been initialized by the
>> bootloader or firmware.
>>
>> Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
>> ---
>>  drivers/tty/serial/8250/8250_early.c | 10 ++++++++--
>>  1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
>> index d7b831b..1701d00 100644
>> --- a/drivers/tty/serial/8250/8250_early.c
>> +++ b/drivers/tty/serial/8250/8250_early.c
>> @@ -149,12 +149,18 @@ static int __init early_serial8250_setup(struct earlycon_device *device,
>>  		return 0;
>>  
>>  	if (!device->baud) {
>> +		struct uart_port *port = &device->port;
>> +		unsigned int ier;
>> +
>>  		device->baud = probe_baud(&device->port);
>>  		snprintf(device->options, sizeof(device->options), "%u",
>>  			 device->baud);
>> -	}
>>  
>> -	init_port(device);
>> +		/* assume the device was initialized, only mask interrupts */
>> +		ier = serial8250_early_in(port, UART_IER);
>> +		serial8250_early_out(port, UART_IER, ier & UART_IER_UUE);
>> +	} else
>> +		init_port(device);
> Should add brace in else.

I don't do that unless I have to.

> Where is original line here.
>           early_device = device;

Whoops :)

I wrote the patch from a private branch which implements extensible console
matching (so a console can define its own match function) and a bunch of
other console cleanup and code removal. In that series, early_device becomes
unnecessary and is removed.

I'll respin proper patches on top of Greg's tty-testing branch with reverts
for the noinit options. I noticed that one of the noinit patches actually
has the linkage for the mtk earlycon, so I'll be sure to preserve that.

Regards,
Peter Hurley

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
  2015-02-02  3:45           ` Peter Hurley
@ 2015-02-02  4:28             ` Greg Kroah-Hartman
  -1 siblings, 0 replies; 43+ messages in thread
From: Greg Kroah-Hartman @ 2015-02-02  4:28 UTC (permalink / raw)
  To: Peter Hurley
  Cc: Eddie Huang, Rob Herring, Mark Rutland, Matthias Brugger,
	devicetree, Vladimir Murzin, srv_heupstream, Pawel Moll,
	Ian Campbell, Catalin Marinas, Jonathan Corbet, Will Deacon,
	linux-kernel, linux-doc, yh.chen, Howard Chen, Ashwin Chaugule,
	linux-serial, Kumar Gala, Joe.C, Jiri Slaby, linux-arm-kernel,
	Alan Cox

On Sun, Feb 01, 2015 at 10:45:12PM -0500, Peter Hurley wrote:
> On 02/01/2015 10:16 PM, Eddie Huang wrote:
> > Hi Peter,
> > 
> > On Sun, 2015-02-01 at 13:26 -0500, Peter Hurley wrote:
> >> On 02/01/2015 11:27 AM, Peter Hurley wrote:
> >>> Hi Eddie,
> >>>
> >>> On 01/12/2015 08:08 AM, Eddie Huang wrote:
> >>>> Add earlycon support not only baudrate option, but also add noinit option.
> >>>> If use noinit option, 8250 earlycon will not init serial hardware and use
> >>>> loader setting.
> >>>
> >>> I see this went into Greg's tty-testing branch.
> >>>
> >>> The only point of this is to not program the divisor, right?
> >>>
> >>> I ask because early_serial8250_setup() could already handle this without
> >>> extra options by simply not doing divisor programming if no baud option is
> >>> present.
> >>
> >> Does the patch below work for your use-case?
> >>
> >> [ Note: the patch applies to 3.19-rcX. To test, your noinit patches need to be
> >>   reverted first.
> >> ]
> >>
> >> --- >% ---
> >> From: Peter Hurley <peter@hurleysoftware.com>
> >> Subject: [PATCH] serial: 8250_early: Assume uart already initialized if no
> >>  baud option
> >>
> >> The <baud><parity><bit> option string is not supplied if the earlycon
> >> is started via devicetree and OF_EARLYCON_DECLARE(). The option string
> >> is also not required if started via kernel command line parameters of
> >> the form:
> >>   earlycon=uart,mmio,<addr>
> >>   console=uart,mmio,<addr>
> >>
> >> If earlycon_device->baud is 0, then an option string was not supplied.
> >> In this case, assume the uart has already been initialized by the
> >> bootloader or firmware.
> >>
> >> Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
> >> ---
> >>  drivers/tty/serial/8250/8250_early.c | 10 ++++++++--
> >>  1 file changed, 8 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
> >> index d7b831b..1701d00 100644
> >> --- a/drivers/tty/serial/8250/8250_early.c
> >> +++ b/drivers/tty/serial/8250/8250_early.c
> >> @@ -149,12 +149,18 @@ static int __init early_serial8250_setup(struct earlycon_device *device,
> >>  		return 0;
> >>  
> >>  	if (!device->baud) {
> >> +		struct uart_port *port = &device->port;
> >> +		unsigned int ier;
> >> +
> >>  		device->baud = probe_baud(&device->port);
> >>  		snprintf(device->options, sizeof(device->options), "%u",
> >>  			 device->baud);
> >> -	}
> >>  
> >> -	init_port(device);
> >> +		/* assume the device was initialized, only mask interrupts */
> >> +		ier = serial8250_early_in(port, UART_IER);
> >> +		serial8250_early_out(port, UART_IER, ier & UART_IER_UUE);
> >> +	} else
> >> +		init_port(device);
> > Should add brace in else.
> 
> I don't do that unless I have to.
> 
> > Where is original line here.
> >           early_device = device;
> 
> Whoops :)
> 
> I wrote the patch from a private branch which implements extensible console
> matching (so a console can define its own match function) and a bunch of
> other console cleanup and code removal. In that series, early_device becomes
> unnecessary and is removed.
> 
> I'll respin proper patches on top of Greg's tty-testing branch with reverts
> for the noinit options. I noticed that one of the noinit patches actually
> has the linkage for the mtk earlycon, so I'll be sure to preserve that.

I can just drop the patches in the tty-testing branch, that's what it is
there for :)

Just let me know the specific patches and I will do so, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-02  4:28             ` Greg Kroah-Hartman
  0 siblings, 0 replies; 43+ messages in thread
From: Greg Kroah-Hartman @ 2015-02-02  4:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Feb 01, 2015 at 10:45:12PM -0500, Peter Hurley wrote:
> On 02/01/2015 10:16 PM, Eddie Huang wrote:
> > Hi Peter,
> > 
> > On Sun, 2015-02-01 at 13:26 -0500, Peter Hurley wrote:
> >> On 02/01/2015 11:27 AM, Peter Hurley wrote:
> >>> Hi Eddie,
> >>>
> >>> On 01/12/2015 08:08 AM, Eddie Huang wrote:
> >>>> Add earlycon support not only baudrate option, but also add noinit option.
> >>>> If use noinit option, 8250 earlycon will not init serial hardware and use
> >>>> loader setting.
> >>>
> >>> I see this went into Greg's tty-testing branch.
> >>>
> >>> The only point of this is to not program the divisor, right?
> >>>
> >>> I ask because early_serial8250_setup() could already handle this without
> >>> extra options by simply not doing divisor programming if no baud option is
> >>> present.
> >>
> >> Does the patch below work for your use-case?
> >>
> >> [ Note: the patch applies to 3.19-rcX. To test, your noinit patches need to be
> >>   reverted first.
> >> ]
> >>
> >> --- >% ---
> >> From: Peter Hurley <peter@hurleysoftware.com>
> >> Subject: [PATCH] serial: 8250_early: Assume uart already initialized if no
> >>  baud option
> >>
> >> The <baud><parity><bit> option string is not supplied if the earlycon
> >> is started via devicetree and OF_EARLYCON_DECLARE(). The option string
> >> is also not required if started via kernel command line parameters of
> >> the form:
> >>   earlycon=uart,mmio,<addr>
> >>   console=uart,mmio,<addr>
> >>
> >> If earlycon_device->baud is 0, then an option string was not supplied.
> >> In this case, assume the uart has already been initialized by the
> >> bootloader or firmware.
> >>
> >> Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
> >> ---
> >>  drivers/tty/serial/8250/8250_early.c | 10 ++++++++--
> >>  1 file changed, 8 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
> >> index d7b831b..1701d00 100644
> >> --- a/drivers/tty/serial/8250/8250_early.c
> >> +++ b/drivers/tty/serial/8250/8250_early.c
> >> @@ -149,12 +149,18 @@ static int __init early_serial8250_setup(struct earlycon_device *device,
> >>  		return 0;
> >>  
> >>  	if (!device->baud) {
> >> +		struct uart_port *port = &device->port;
> >> +		unsigned int ier;
> >> +
> >>  		device->baud = probe_baud(&device->port);
> >>  		snprintf(device->options, sizeof(device->options), "%u",
> >>  			 device->baud);
> >> -	}
> >>  
> >> -	init_port(device);
> >> +		/* assume the device was initialized, only mask interrupts */
> >> +		ier = serial8250_early_in(port, UART_IER);
> >> +		serial8250_early_out(port, UART_IER, ier & UART_IER_UUE);
> >> +	} else
> >> +		init_port(device);
> > Should add brace in else.
> 
> I don't do that unless I have to.
> 
> > Where is original line here.
> >           early_device = device;
> 
> Whoops :)
> 
> I wrote the patch from a private branch which implements extensible console
> matching (so a console can define its own match function) and a bunch of
> other console cleanup and code removal. In that series, early_device becomes
> unnecessary and is removed.
> 
> I'll respin proper patches on top of Greg's tty-testing branch with reverts
> for the noinit options. I noticed that one of the noinit patches actually
> has the linkage for the mtk earlycon, so I'll be sure to preserve that.

I can just drop the patches in the tty-testing branch, that's what it is
there for :)

Just let me know the specific patches and I will do so, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
  2015-02-02  4:28             ` Greg Kroah-Hartman
@ 2015-02-02  5:15               ` Peter Hurley
  -1 siblings, 0 replies; 43+ messages in thread
From: Peter Hurley @ 2015-02-02  5:15 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Eddie Huang, Rob Herring, Mark Rutland, Matthias Brugger,
	devicetree, Vladimir Murzin, srv_heupstream, Pawel Moll,
	Ian Campbell, Catalin Marinas, Jonathan Corbet, Will Deacon,
	linux-kernel, linux-doc, yh.chen, Howard Chen, Ashwin Chaugule,
	linux-serial, Kumar Gala, Joe.C, Jiri Slaby, linux-arm-kernel,
	Alan Cox

On 02/01/2015 11:28 PM, Greg Kroah-Hartman wrote:
> On Sun, Feb 01, 2015 at 10:45:12PM -0500, Peter Hurley wrote:
>> On 02/01/2015 10:16 PM, Eddie Huang wrote:

>> I'll respin proper patches on top of Greg's tty-testing branch with reverts
>> for the noinit options. I noticed that one of the noinit patches actually
>> has the linkage for the mtk earlycon, so I'll be sure to preserve that.
> 
> I can just drop the patches in the tty-testing branch, that's what it is
> there for :)
> 
> Just let me know the specific patches and I will do so, thanks.

Well that pretty much means dropping the 3 patches that add earlycon to
8250_mtk and then applying my patch (needs fixed to apply cleanly, which
I can do) and then applying a fixed-up replacement patch to add earlycon
to 8250_mtk (which I can also supply).

Is that the way you want to go?


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-02  5:15               ` Peter Hurley
  0 siblings, 0 replies; 43+ messages in thread
From: Peter Hurley @ 2015-02-02  5:15 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/01/2015 11:28 PM, Greg Kroah-Hartman wrote:
> On Sun, Feb 01, 2015 at 10:45:12PM -0500, Peter Hurley wrote:
>> On 02/01/2015 10:16 PM, Eddie Huang wrote:

>> I'll respin proper patches on top of Greg's tty-testing branch with reverts
>> for the noinit options. I noticed that one of the noinit patches actually
>> has the linkage for the mtk earlycon, so I'll be sure to preserve that.
> 
> I can just drop the patches in the tty-testing branch, that's what it is
> there for :)
> 
> Just let me know the specific patches and I will do so, thanks.

Well that pretty much means dropping the 3 patches that add earlycon to
8250_mtk and then applying my patch (needs fixed to apply cleanly, which
I can do) and then applying a fixed-up replacement patch to add earlycon
to 8250_mtk (which I can also supply).

Is that the way you want to go?

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
  2015-02-02  5:15               ` Peter Hurley
@ 2015-02-02  5:24                 ` Greg Kroah-Hartman
  -1 siblings, 0 replies; 43+ messages in thread
From: Greg Kroah-Hartman @ 2015-02-02  5:24 UTC (permalink / raw)
  To: Peter Hurley
  Cc: Eddie Huang, Rob Herring, Mark Rutland, Matthias Brugger,
	devicetree, Vladimir Murzin, srv_heupstream, Pawel Moll,
	Ian Campbell, Catalin Marinas, Jonathan Corbet, Will Deacon,
	linux-kernel, linux-doc, yh.chen, Howard Chen, Ashwin Chaugule,
	linux-serial, Kumar Gala, Joe.C, Jiri Slaby, linux-arm-kernel,
	Alan Cox

On Mon, Feb 02, 2015 at 12:15:31AM -0500, Peter Hurley wrote:
> On 02/01/2015 11:28 PM, Greg Kroah-Hartman wrote:
> > On Sun, Feb 01, 2015 at 10:45:12PM -0500, Peter Hurley wrote:
> >> On 02/01/2015 10:16 PM, Eddie Huang wrote:
> 
> >> I'll respin proper patches on top of Greg's tty-testing branch with reverts
> >> for the noinit options. I noticed that one of the noinit patches actually
> >> has the linkage for the mtk earlycon, so I'll be sure to preserve that.
> > 
> > I can just drop the patches in the tty-testing branch, that's what it is
> > there for :)
> > 
> > Just let me know the specific patches and I will do so, thanks.
> 
> Well that pretty much means dropping the 3 patches that add earlycon to
> 8250_mtk and then applying my patch (needs fixed to apply cleanly, which
> I can do) and then applying a fixed-up replacement patch to add earlycon
> to 8250_mtk (which I can also supply).
> 
> Is that the way you want to go?

Sounds good to me, send your patch, and I'll fix it all up tomorrow.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-02  5:24                 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 43+ messages in thread
From: Greg Kroah-Hartman @ 2015-02-02  5:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 02, 2015 at 12:15:31AM -0500, Peter Hurley wrote:
> On 02/01/2015 11:28 PM, Greg Kroah-Hartman wrote:
> > On Sun, Feb 01, 2015 at 10:45:12PM -0500, Peter Hurley wrote:
> >> On 02/01/2015 10:16 PM, Eddie Huang wrote:
> 
> >> I'll respin proper patches on top of Greg's tty-testing branch with reverts
> >> for the noinit options. I noticed that one of the noinit patches actually
> >> has the linkage for the mtk earlycon, so I'll be sure to preserve that.
> > 
> > I can just drop the patches in the tty-testing branch, that's what it is
> > there for :)
> > 
> > Just let me know the specific patches and I will do so, thanks.
> 
> Well that pretty much means dropping the 3 patches that add earlycon to
> 8250_mtk and then applying my patch (needs fixed to apply cleanly, which
> I can do) and then applying a fixed-up replacement patch to add earlycon
> to 8250_mtk (which I can also supply).
> 
> Is that the way you want to go?

Sounds good to me, send your patch, and I'll fix it all up tomorrow.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
  2015-02-02  5:24                 ` Greg Kroah-Hartman
@ 2015-02-02  5:33                   ` Eddie Huang
  -1 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-02-02  5:33 UTC (permalink / raw)
  To: Peter Hurley, Greg Kroah-Hartman
  Cc: Mark Rutland, linux-doc, Catalin Marinas, Will Deacon,
	Jiri Slaby, Jonathan Corbet, yh.chen, Howard Chen, linux-serial,
	Joe.C, devicetree, Vladimir Murzin, Pawel Moll, Ian Campbell,
	Rob Herring, Matthias Brugger, linux-arm-kernel, Alan Cox,
	srv_heupstream, linux-kernel, Ashwin Chaugule, Kumar Gala

Hi Peter,

On Sun, 2015-02-01 at 21:24 -0800, Greg Kroah-Hartman wrote:
> On Mon, Feb 02, 2015 at 12:15:31AM -0500, Peter Hurley wrote:
> > On 02/01/2015 11:28 PM, Greg Kroah-Hartman wrote:
> > > On Sun, Feb 01, 2015 at 10:45:12PM -0500, Peter Hurley wrote:
> > >> On 02/01/2015 10:16 PM, Eddie Huang wrote:
> > 
> > >> I'll respin proper patches on top of Greg's tty-testing branch with reverts
> > >> for the noinit options. I noticed that one of the noinit patches actually
> > >> has the linkage for the mtk earlycon, so I'll be sure to preserve that.
> > > 
> > > I can just drop the patches in the tty-testing branch, that's what it is
> > > there for :)
> > > 
> > > Just let me know the specific patches and I will do so, thanks.
> > 
> > Well that pretty much means dropping the 3 patches that add earlycon to
> > 8250_mtk and then applying my patch (needs fixed to apply cleanly, which
> > I can do) and then applying a fixed-up replacement patch to add earlycon
> > to 8250_mtk (which I can also supply).
> > 
> > Is that the way you want to go?
> 
> Sounds good to me, send your patch, and I'll fix it all up tomorrow.
> 
> thanks,
> 
> greg k-h

Actually, your patch is a little different from my original idea.
Although my use case only care about divisor now, but other hardware
setting is still hard-code, not from parameter. In init_port()
function:   
	serial8250_early_out(port, UART_LCR, 0x3); /* 8n1 */
	serial8250_early_out(port, UART_IER, 0);/* no interrupt */
	serial8250_early_out(port, UART_FCR, 0); /* no fifo */
	serial8250_early_out(port, UART_MCR, 0x3); /* DTR + RTS */

This is why I propose a new option "noinit".

After checking further, in my case, I found that your patch should be
unnecessary because if skip baudrate, probe_baud() read DLL/DLM register
and init_port() write the same DLL/DLM value back, no touch any high
speed register, which means keep uart divisor setting as loader

Since I don't take "console=uart,mmio32,<addr>,noinit" into
consideration, it is good to drop my patches in the tty-testing branch.
For my case, I can send another series without noinit, just 8250_mtk.c
and its linkage modification in 8250_early.c

Eddie

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-02  5:33                   ` Eddie Huang
  0 siblings, 0 replies; 43+ messages in thread
From: Eddie Huang @ 2015-02-02  5:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,

On Sun, 2015-02-01 at 21:24 -0800, Greg Kroah-Hartman wrote:
> On Mon, Feb 02, 2015 at 12:15:31AM -0500, Peter Hurley wrote:
> > On 02/01/2015 11:28 PM, Greg Kroah-Hartman wrote:
> > > On Sun, Feb 01, 2015 at 10:45:12PM -0500, Peter Hurley wrote:
> > >> On 02/01/2015 10:16 PM, Eddie Huang wrote:
> > 
> > >> I'll respin proper patches on top of Greg's tty-testing branch with reverts
> > >> for the noinit options. I noticed that one of the noinit patches actually
> > >> has the linkage for the mtk earlycon, so I'll be sure to preserve that.
> > > 
> > > I can just drop the patches in the tty-testing branch, that's what it is
> > > there for :)
> > > 
> > > Just let me know the specific patches and I will do so, thanks.
> > 
> > Well that pretty much means dropping the 3 patches that add earlycon to
> > 8250_mtk and then applying my patch (needs fixed to apply cleanly, which
> > I can do) and then applying a fixed-up replacement patch to add earlycon
> > to 8250_mtk (which I can also supply).
> > 
> > Is that the way you want to go?
> 
> Sounds good to me, send your patch, and I'll fix it all up tomorrow.
> 
> thanks,
> 
> greg k-h

Actually, your patch is a little different from my original idea.
Although my use case only care about divisor now, but other hardware
setting is still hard-code, not from parameter. In init_port()
function:   
	serial8250_early_out(port, UART_LCR, 0x3); /* 8n1 */
	serial8250_early_out(port, UART_IER, 0);/* no interrupt */
	serial8250_early_out(port, UART_FCR, 0); /* no fifo */
	serial8250_early_out(port, UART_MCR, 0x3); /* DTR + RTS */

This is why I propose a new option "noinit".

After checking further, in my case, I found that your patch should be
unnecessary because if skip baudrate, probe_baud() read DLL/DLM register
and init_port() write the same DLL/DLM value back, no touch any high
speed register, which means keep uart divisor setting as loader

Since I don't take "console=uart,mmio32,<addr>,noinit" into
consideration, it is good to drop my patches in the tty-testing branch.
For my case, I can send another series without noinit, just 8250_mtk.c
and its linkage modification in 8250_early.c

Eddie

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
  2015-02-02  5:33                   ` Eddie Huang
  (?)
@ 2015-02-02  5:43                     ` Peter Hurley
  -1 siblings, 0 replies; 43+ messages in thread
From: Peter Hurley @ 2015-02-02  5:43 UTC (permalink / raw)
  To: Eddie Huang, Greg Kroah-Hartman
  Cc: Rob Herring, Mark Rutland, Matthias Brugger, devicetree,
	Vladimir Murzin, srv_heupstream, Pawel Moll, Ian Campbell,
	Catalin Marinas, Jonathan Corbet, Will Deacon, linux-kernel,
	linux-doc, yh.chen, Howard Chen, Ashwin Chaugule, linux-serial,
	Kumar Gala, Joe.C, Jiri Slaby, linux-arm-kernel, Alan Cox

On 02/02/2015 12:33 AM, Eddie Huang wrote:
> Hi Peter,
> 
> On Sun, 2015-02-01 at 21:24 -0800, Greg Kroah-Hartman wrote:
>> On Mon, Feb 02, 2015 at 12:15:31AM -0500, Peter Hurley wrote:
>>> On 02/01/2015 11:28 PM, Greg Kroah-Hartman wrote:
>>>> On Sun, Feb 01, 2015 at 10:45:12PM -0500, Peter Hurley wrote:
>>>>> On 02/01/2015 10:16 PM, Eddie Huang wrote:
>>>
>>>>> I'll respin proper patches on top of Greg's tty-testing branch with reverts
>>>>> for the noinit options. I noticed that one of the noinit patches actually
>>>>> has the linkage for the mtk earlycon, so I'll be sure to preserve that.
>>>>
>>>> I can just drop the patches in the tty-testing branch, that's what it is
>>>> there for :)
>>>>
>>>> Just let me know the specific patches and I will do so, thanks.
>>>
>>> Well that pretty much means dropping the 3 patches that add earlycon to
>>> 8250_mtk and then applying my patch (needs fixed to apply cleanly, which
>>> I can do) and then applying a fixed-up replacement patch to add earlycon
>>> to 8250_mtk (which I can also supply).
>>>
>>> Is that the way you want to go?
>>
>> Sounds good to me, send your patch, and I'll fix it all up tomorrow.
>>
>> thanks,
>>
>> greg k-h
> 
> Actually, your patch is a little different from my original idea.
> Although my use case only care about divisor now, but other hardware
> setting is still hard-code, not from parameter. In init_port()
> function:   
> 	serial8250_early_out(port, UART_LCR, 0x3); /* 8n1 */
> 	serial8250_early_out(port, UART_IER, 0);/* no interrupt */
> 	serial8250_early_out(port, UART_FCR, 0); /* no fifo */
> 	serial8250_early_out(port, UART_MCR, 0x3); /* DTR + RTS */
> 
> This is why I propose a new option "noinit".
> 
> After checking further, in my case, I found that your patch should be
> unnecessary because if skip baudrate, probe_baud() read DLL/DLM register
> and init_port() write the same DLL/DLM value back, no touch any high
> speed register, which means keep uart divisor setting as loader
> 
> Since I don't take "console=uart,mmio32,<addr>,noinit" into
> consideration, it is good to drop my patches in the tty-testing branch.
> For my case, I can send another series without noinit, just 8250_mtk.c
> and its linkage modification in 8250_early.c

Ok.

Greg,

The patches to drop from tty-testing are:
* 405017d Document: Modify 8250 earlycon kernel parameters
* 0dff3a4 tty: serial: 8250_mtk: Add earlycon
* b829735 tty: serial: Add 8250 earlycon to support noinit option

Regards,
Peter Hurley

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-02  5:43                     ` Peter Hurley
  0 siblings, 0 replies; 43+ messages in thread
From: Peter Hurley @ 2015-02-02  5:43 UTC (permalink / raw)
  To: Eddie Huang, Greg Kroah-Hartman
  Cc: Rob Herring, Mark Rutland, Matthias Brugger,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Vladimir Murzin,
	srv_heupstream-NuS5LvNUpcJWk0Htik3J/w, Pawel Moll, Ian Campbell,
	Catalin Marinas, Jonathan Corbet, Will Deacon,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-doc-u79uwXL29TY76Z2rM5mHXA, yh.chen-NuS5LvNUpcJWk0Htik3J/w,
	Howard Chen, Ashwin Chaugule,
	linux-serial-u79uwXL29TY76Z2rM5mHXA, Kumar Gala, Joe.C,
	Jiri Slaby, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Alan Cox

On 02/02/2015 12:33 AM, Eddie Huang wrote:
> Hi Peter,
> 
> On Sun, 2015-02-01 at 21:24 -0800, Greg Kroah-Hartman wrote:
>> On Mon, Feb 02, 2015 at 12:15:31AM -0500, Peter Hurley wrote:
>>> On 02/01/2015 11:28 PM, Greg Kroah-Hartman wrote:
>>>> On Sun, Feb 01, 2015 at 10:45:12PM -0500, Peter Hurley wrote:
>>>>> On 02/01/2015 10:16 PM, Eddie Huang wrote:
>>>
>>>>> I'll respin proper patches on top of Greg's tty-testing branch with reverts
>>>>> for the noinit options. I noticed that one of the noinit patches actually
>>>>> has the linkage for the mtk earlycon, so I'll be sure to preserve that.
>>>>
>>>> I can just drop the patches in the tty-testing branch, that's what it is
>>>> there for :)
>>>>
>>>> Just let me know the specific patches and I will do so, thanks.
>>>
>>> Well that pretty much means dropping the 3 patches that add earlycon to
>>> 8250_mtk and then applying my patch (needs fixed to apply cleanly, which
>>> I can do) and then applying a fixed-up replacement patch to add earlycon
>>> to 8250_mtk (which I can also supply).
>>>
>>> Is that the way you want to go?
>>
>> Sounds good to me, send your patch, and I'll fix it all up tomorrow.
>>
>> thanks,
>>
>> greg k-h
> 
> Actually, your patch is a little different from my original idea.
> Although my use case only care about divisor now, but other hardware
> setting is still hard-code, not from parameter. In init_port()
> function:   
> 	serial8250_early_out(port, UART_LCR, 0x3); /* 8n1 */
> 	serial8250_early_out(port, UART_IER, 0);/* no interrupt */
> 	serial8250_early_out(port, UART_FCR, 0); /* no fifo */
> 	serial8250_early_out(port, UART_MCR, 0x3); /* DTR + RTS */
> 
> This is why I propose a new option "noinit".
> 
> After checking further, in my case, I found that your patch should be
> unnecessary because if skip baudrate, probe_baud() read DLL/DLM register
> and init_port() write the same DLL/DLM value back, no touch any high
> speed register, which means keep uart divisor setting as loader
> 
> Since I don't take "console=uart,mmio32,<addr>,noinit" into
> consideration, it is good to drop my patches in the tty-testing branch.
> For my case, I can send another series without noinit, just 8250_mtk.c
> and its linkage modification in 8250_early.c

Ok.

Greg,

The patches to drop from tty-testing are:
* 405017d Document: Modify 8250 earlycon kernel parameters
* 0dff3a4 tty: serial: 8250_mtk: Add earlycon
* b829735 tty: serial: Add 8250 earlycon to support noinit option

Regards,
Peter Hurley
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-02  5:43                     ` Peter Hurley
  0 siblings, 0 replies; 43+ messages in thread
From: Peter Hurley @ 2015-02-02  5:43 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/02/2015 12:33 AM, Eddie Huang wrote:
> Hi Peter,
> 
> On Sun, 2015-02-01 at 21:24 -0800, Greg Kroah-Hartman wrote:
>> On Mon, Feb 02, 2015 at 12:15:31AM -0500, Peter Hurley wrote:
>>> On 02/01/2015 11:28 PM, Greg Kroah-Hartman wrote:
>>>> On Sun, Feb 01, 2015 at 10:45:12PM -0500, Peter Hurley wrote:
>>>>> On 02/01/2015 10:16 PM, Eddie Huang wrote:
>>>
>>>>> I'll respin proper patches on top of Greg's tty-testing branch with reverts
>>>>> for the noinit options. I noticed that one of the noinit patches actually
>>>>> has the linkage for the mtk earlycon, so I'll be sure to preserve that.
>>>>
>>>> I can just drop the patches in the tty-testing branch, that's what it is
>>>> there for :)
>>>>
>>>> Just let me know the specific patches and I will do so, thanks.
>>>
>>> Well that pretty much means dropping the 3 patches that add earlycon to
>>> 8250_mtk and then applying my patch (needs fixed to apply cleanly, which
>>> I can do) and then applying a fixed-up replacement patch to add earlycon
>>> to 8250_mtk (which I can also supply).
>>>
>>> Is that the way you want to go?
>>
>> Sounds good to me, send your patch, and I'll fix it all up tomorrow.
>>
>> thanks,
>>
>> greg k-h
> 
> Actually, your patch is a little different from my original idea.
> Although my use case only care about divisor now, but other hardware
> setting is still hard-code, not from parameter. In init_port()
> function:   
> 	serial8250_early_out(port, UART_LCR, 0x3); /* 8n1 */
> 	serial8250_early_out(port, UART_IER, 0);/* no interrupt */
> 	serial8250_early_out(port, UART_FCR, 0); /* no fifo */
> 	serial8250_early_out(port, UART_MCR, 0x3); /* DTR + RTS */
> 
> This is why I propose a new option "noinit".
> 
> After checking further, in my case, I found that your patch should be
> unnecessary because if skip baudrate, probe_baud() read DLL/DLM register
> and init_port() write the same DLL/DLM value back, no touch any high
> speed register, which means keep uart divisor setting as loader
> 
> Since I don't take "console=uart,mmio32,<addr>,noinit" into
> consideration, it is good to drop my patches in the tty-testing branch.
> For my case, I can send another series without noinit, just 8250_mtk.c
> and its linkage modification in 8250_early.c

Ok.

Greg,

The patches to drop from tty-testing are:
* 405017d Document: Modify 8250 earlycon kernel parameters
* 0dff3a4 tty: serial: 8250_mtk: Add earlycon
* b829735 tty: serial: Add 8250 earlycon to support noinit option

Regards,
Peter Hurley

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
  2015-02-02  5:43                     ` Peter Hurley
@ 2015-02-02 18:46                       ` Greg Kroah-Hartman
  -1 siblings, 0 replies; 43+ messages in thread
From: Greg Kroah-Hartman @ 2015-02-02 18:46 UTC (permalink / raw)
  To: Peter Hurley
  Cc: Eddie Huang, Rob Herring, Mark Rutland, Matthias Brugger,
	devicetree, Vladimir Murzin, srv_heupstream, Pawel Moll,
	Ian Campbell, Catalin Marinas, Jonathan Corbet, Will Deacon,
	linux-kernel, linux-doc, yh.chen, Howard Chen, Ashwin Chaugule,
	linux-serial, Kumar Gala, Joe.C, Jiri Slaby, linux-arm-kernel,
	Alan Cox

On Mon, Feb 02, 2015 at 12:43:50AM -0500, Peter Hurley wrote:
> On 02/02/2015 12:33 AM, Eddie Huang wrote:
> > Hi Peter,
> > 
> > On Sun, 2015-02-01 at 21:24 -0800, Greg Kroah-Hartman wrote:
> >> On Mon, Feb 02, 2015 at 12:15:31AM -0500, Peter Hurley wrote:
> >>> On 02/01/2015 11:28 PM, Greg Kroah-Hartman wrote:
> >>>> On Sun, Feb 01, 2015 at 10:45:12PM -0500, Peter Hurley wrote:
> >>>>> On 02/01/2015 10:16 PM, Eddie Huang wrote:
> >>>
> >>>>> I'll respin proper patches on top of Greg's tty-testing branch with reverts
> >>>>> for the noinit options. I noticed that one of the noinit patches actually
> >>>>> has the linkage for the mtk earlycon, so I'll be sure to preserve that.
> >>>>
> >>>> I can just drop the patches in the tty-testing branch, that's what it is
> >>>> there for :)
> >>>>
> >>>> Just let me know the specific patches and I will do so, thanks.
> >>>
> >>> Well that pretty much means dropping the 3 patches that add earlycon to
> >>> 8250_mtk and then applying my patch (needs fixed to apply cleanly, which
> >>> I can do) and then applying a fixed-up replacement patch to add earlycon
> >>> to 8250_mtk (which I can also supply).
> >>>
> >>> Is that the way you want to go?
> >>
> >> Sounds good to me, send your patch, and I'll fix it all up tomorrow.
> >>
> >> thanks,
> >>
> >> greg k-h
> > 
> > Actually, your patch is a little different from my original idea.
> > Although my use case only care about divisor now, but other hardware
> > setting is still hard-code, not from parameter. In init_port()
> > function:   
> > 	serial8250_early_out(port, UART_LCR, 0x3); /* 8n1 */
> > 	serial8250_early_out(port, UART_IER, 0);/* no interrupt */
> > 	serial8250_early_out(port, UART_FCR, 0); /* no fifo */
> > 	serial8250_early_out(port, UART_MCR, 0x3); /* DTR + RTS */
> > 
> > This is why I propose a new option "noinit".
> > 
> > After checking further, in my case, I found that your patch should be
> > unnecessary because if skip baudrate, probe_baud() read DLL/DLM register
> > and init_port() write the same DLL/DLM value back, no touch any high
> > speed register, which means keep uart divisor setting as loader
> > 
> > Since I don't take "console=uart,mmio32,<addr>,noinit" into
> > consideration, it is good to drop my patches in the tty-testing branch.
> > For my case, I can send another series without noinit, just 8250_mtk.c
> > and its linkage modification in 8250_early.c
> 
> Ok.
> 
> Greg,
> 
> The patches to drop from tty-testing are:
> * 405017d Document: Modify 8250 earlycon kernel parameters
> * 0dff3a4 tty: serial: 8250_mtk: Add earlycon
> * b829735 tty: serial: Add 8250 earlycon to support noinit option

Ok, now dropped, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option
@ 2015-02-02 18:46                       ` Greg Kroah-Hartman
  0 siblings, 0 replies; 43+ messages in thread
From: Greg Kroah-Hartman @ 2015-02-02 18:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 02, 2015 at 12:43:50AM -0500, Peter Hurley wrote:
> On 02/02/2015 12:33 AM, Eddie Huang wrote:
> > Hi Peter,
> > 
> > On Sun, 2015-02-01 at 21:24 -0800, Greg Kroah-Hartman wrote:
> >> On Mon, Feb 02, 2015 at 12:15:31AM -0500, Peter Hurley wrote:
> >>> On 02/01/2015 11:28 PM, Greg Kroah-Hartman wrote:
> >>>> On Sun, Feb 01, 2015 at 10:45:12PM -0500, Peter Hurley wrote:
> >>>>> On 02/01/2015 10:16 PM, Eddie Huang wrote:
> >>>
> >>>>> I'll respin proper patches on top of Greg's tty-testing branch with reverts
> >>>>> for the noinit options. I noticed that one of the noinit patches actually
> >>>>> has the linkage for the mtk earlycon, so I'll be sure to preserve that.
> >>>>
> >>>> I can just drop the patches in the tty-testing branch, that's what it is
> >>>> there for :)
> >>>>
> >>>> Just let me know the specific patches and I will do so, thanks.
> >>>
> >>> Well that pretty much means dropping the 3 patches that add earlycon to
> >>> 8250_mtk and then applying my patch (needs fixed to apply cleanly, which
> >>> I can do) and then applying a fixed-up replacement patch to add earlycon
> >>> to 8250_mtk (which I can also supply).
> >>>
> >>> Is that the way you want to go?
> >>
> >> Sounds good to me, send your patch, and I'll fix it all up tomorrow.
> >>
> >> thanks,
> >>
> >> greg k-h
> > 
> > Actually, your patch is a little different from my original idea.
> > Although my use case only care about divisor now, but other hardware
> > setting is still hard-code, not from parameter. In init_port()
> > function:   
> > 	serial8250_early_out(port, UART_LCR, 0x3); /* 8n1 */
> > 	serial8250_early_out(port, UART_IER, 0);/* no interrupt */
> > 	serial8250_early_out(port, UART_FCR, 0); /* no fifo */
> > 	serial8250_early_out(port, UART_MCR, 0x3); /* DTR + RTS */
> > 
> > This is why I propose a new option "noinit".
> > 
> > After checking further, in my case, I found that your patch should be
> > unnecessary because if skip baudrate, probe_baud() read DLL/DLM register
> > and init_port() write the same DLL/DLM value back, no touch any high
> > speed register, which means keep uart divisor setting as loader
> > 
> > Since I don't take "console=uart,mmio32,<addr>,noinit" into
> > consideration, it is good to drop my patches in the tty-testing branch.
> > For my case, I can send another series without noinit, just 8250_mtk.c
> > and its linkage modification in 8250_early.c
> 
> Ok.
> 
> Greg,
> 
> The patches to drop from tty-testing are:
> * 405017d Document: Modify 8250 earlycon kernel parameters
> * 0dff3a4 tty: serial: 8250_mtk: Add earlycon
> * b829735 tty: serial: Add 8250 earlycon to support noinit option

Ok, now dropped, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2015-02-02 18:46 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-12 13:08 [PATCH v2 0/4] tty: serial: Add earlycon support to MT8173 SoC Eddie Huang
2015-01-12 13:08 ` Eddie Huang
2015-01-12 13:08 ` [PATCH v2 1/4] tty: serial: Add 8250 earlycon to support noinit option Eddie Huang
2015-01-12 13:08   ` Eddie Huang
2015-01-12 15:35   ` Arnd Bergmann
2015-01-12 15:35     ` Arnd Bergmann
2015-01-12 16:08     ` Alan Cox
2015-01-12 16:08       ` Alan Cox
2015-01-13  1:05       ` Eddie Huang
2015-01-13  1:05         ` Eddie Huang
2015-02-01 16:27   ` Peter Hurley
2015-02-01 16:27     ` Peter Hurley
2015-02-01 16:27     ` Peter Hurley
2015-02-01 18:26     ` Peter Hurley
2015-02-01 18:26       ` Peter Hurley
2015-02-01 18:26       ` Peter Hurley
2015-02-02  3:16       ` Eddie Huang
2015-02-02  3:16         ` Eddie Huang
2015-02-02  3:45         ` Peter Hurley
2015-02-02  3:45           ` Peter Hurley
2015-02-02  4:28           ` Greg Kroah-Hartman
2015-02-02  4:28             ` Greg Kroah-Hartman
2015-02-02  5:15             ` Peter Hurley
2015-02-02  5:15               ` Peter Hurley
2015-02-02  5:24               ` Greg Kroah-Hartman
2015-02-02  5:24                 ` Greg Kroah-Hartman
2015-02-02  5:33                 ` Eddie Huang
2015-02-02  5:33                   ` Eddie Huang
2015-02-02  5:43                   ` Peter Hurley
2015-02-02  5:43                     ` Peter Hurley
2015-02-02  5:43                     ` Peter Hurley
2015-02-02 18:46                     ` Greg Kroah-Hartman
2015-02-02 18:46                       ` Greg Kroah-Hartman
2015-02-02  2:45     ` Eddie Huang
2015-02-02  2:45       ` Eddie Huang
2015-02-02  3:27       ` Peter Hurley
2015-02-02  3:27         ` Peter Hurley
2015-01-12 13:08 ` [PATCH v2 2/4] tty: serial: 8250_mtk: Add earlycon Eddie Huang
2015-01-12 13:08   ` Eddie Huang
2015-01-12 13:08 ` [PATCH v2 3/4] arm64: dts: Add mediatek MT8173 earlycon support Eddie Huang
2015-01-12 13:08   ` Eddie Huang
2015-01-12 13:08 ` [PATCH v2 4/4] Document: Modify 8250 earlycon kernel parameters Eddie Huang
2015-01-12 13:08   ` Eddie Huang

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.