All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aleksey Makarov <aleksey.makarov@linaro.org>
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>,
	Yury Norov <ynorov@caviumnetworks.com>,
	"Zheng, Lv" <lv.zheng@intel.com>,
	Frank Rowand <frowand.list@gmail.com>,
	Russell King <linux@arm.linux.org.uk>,
	linux-acpi@vger.kernel.org,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	linux-serial@vger.kernel.org, Mark Salter <msalter@redhat.com>,
	Len Brown <lenb@kernel.org>,
	devicetree@vger.kernel.org, Jiri Slaby <jslaby@suse.com>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	Aleksey Makarov <aleksey.makarov@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Christopher Covington <cov@codeaurora.org>,
	Al Stone <ahs3@redhat.com>,
	linux-arm-kernel@lists.infradead.org,
	Peter Hurley <peter@hurleysoftware.com>,
	Graeme Gregory <graeme.gregory@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v10 1/4] of/serial: move earlycon early_param handling to serial
Date: Mon,  5 Sep 2016 15:36:12 +0300	[thread overview]
Message-ID: <20160905123617.18775-2-aleksey.makarov@linaro.org> (raw)
In-Reply-To: <20160905123617.18775-1-aleksey.makarov@linaro.org>

From: Leif Lindholm <leif.lindholm@linaro.org>

We have multiple "earlycon" early_param handlers - merge the DT one into
the main earlycon one.  It's a cleanup that also will be useful
to defer setting up DT console until ACPI/DT decision is made.

Rename the exported function to avoid clashing with the function from
arch/microblaze/kernel/prom.c

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Tested-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Tested-by: Christopher Covington <cov@codeaurora.org>
---
 drivers/of/fdt.c              | 11 +----------
 drivers/tty/serial/earlycon.c |  2 +-
 include/linux/of_fdt.h        |  3 +++
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 085c638..c89d5d2 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -924,7 +924,7 @@ static inline void early_init_dt_check_for_initrd(unsigned long node)
 
 #ifdef CONFIG_SERIAL_EARLYCON
 
-static int __init early_init_dt_scan_chosen_serial(void)
+int __init early_init_dt_scan_chosen_stdout(void)
 {
 	int offset;
 	const char *p, *q, *options = NULL;
@@ -968,15 +968,6 @@ static int __init early_init_dt_scan_chosen_serial(void)
 	}
 	return -ENODEV;
 }
-
-static int __init setup_of_earlycon(char *buf)
-{
-	if (buf)
-		return 0;
-
-	return early_init_dt_scan_chosen_serial();
-}
-early_param("earlycon", setup_of_earlycon);
 #endif
 
 /**
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index 067783f..7aae655 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -209,7 +209,7 @@ static int __init param_setup_earlycon(char *buf)
 	 * don't generate a warning from parse_early_params() in that case
 	 */
 	if (!buf || !buf[0])
-		return 0;
+		return early_init_dt_scan_chosen_stdout();
 
 	err = setup_earlycon(buf);
 	if (err == -ENOENT || err == -EALREADY)
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index 26c3302..4341f32 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -14,6 +14,7 @@
 
 #include <linux/types.h>
 #include <linux/init.h>
+#include <linux/errno.h>
 
 /* Definitions used by the flattened device tree */
 #define OF_DT_HEADER		0xd00dfeed	/* marker */
@@ -66,6 +67,7 @@ extern int early_init_dt_scan_chosen(unsigned long node, const char *uname,
 				     int depth, void *data);
 extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
 				     int depth, void *data);
+extern int early_init_dt_scan_chosen_stdout(void);
 extern void early_init_fdt_scan_reserved_mem(void);
 extern void early_init_fdt_reserve_self(void);
 extern void early_init_dt_add_memory_arch(u64 base, u64 size);
@@ -94,6 +96,7 @@ extern void early_get_first_memblock_info(void *, phys_addr_t *);
 extern u64 of_flat_dt_translate_address(unsigned long node);
 extern void of_fdt_limit_memory(int limit);
 #else /* CONFIG_OF_FLATTREE */
+static inline int early_init_dt_scan_chosen_stdout(void) { return -ENODEV; }
 static inline void early_init_fdt_scan_reserved_mem(void) {}
 static inline void early_init_fdt_reserve_self(void) {}
 static inline const char *of_flat_dt_get_machine_name(void) { return NULL; }
-- 
2.9.3

WARNING: multiple messages have this Message-ID (diff)
From: Aleksey Makarov <aleksey.makarov@linaro.org>
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>
Cc: linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Aleksey Makarov <aleksey.makarov@linaro.org>,
	Russell King <linux@arm.linux.org.uk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Len Brown <lenb@kernel.org>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	Graeme Gregory <graeme.gregory@linaro.org>,
	Al Stone <ahs3@redhat.com>,
	Christopher Covington <cov@codeaurora.org>,
	Yury Norov <ynorov@caviumnetworks.com>,
	Peter Hurley <peter@hurleysoftware.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	"Zheng, Lv" <lv.zheng@intel.com>,
	Mark Salter <msalter@redhat.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	Jiri Slaby <jslaby@suse.com>,
	devicetree@vger.kernel.org
Subject: [PATCH v10 1/4] of/serial: move earlycon early_param handling to serial
Date: Mon,  5 Sep 2016 15:36:12 +0300	[thread overview]
Message-ID: <20160905123617.18775-2-aleksey.makarov@linaro.org> (raw)
In-Reply-To: <20160905123617.18775-1-aleksey.makarov@linaro.org>

From: Leif Lindholm <leif.lindholm@linaro.org>

We have multiple "earlycon" early_param handlers - merge the DT one into
the main earlycon one.  It's a cleanup that also will be useful
to defer setting up DT console until ACPI/DT decision is made.

Rename the exported function to avoid clashing with the function from
arch/microblaze/kernel/prom.c

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Tested-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Tested-by: Christopher Covington <cov@codeaurora.org>
---
 drivers/of/fdt.c              | 11 +----------
 drivers/tty/serial/earlycon.c |  2 +-
 include/linux/of_fdt.h        |  3 +++
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 085c638..c89d5d2 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -924,7 +924,7 @@ static inline void early_init_dt_check_for_initrd(unsigned long node)
 
 #ifdef CONFIG_SERIAL_EARLYCON
 
-static int __init early_init_dt_scan_chosen_serial(void)
+int __init early_init_dt_scan_chosen_stdout(void)
 {
 	int offset;
 	const char *p, *q, *options = NULL;
@@ -968,15 +968,6 @@ static int __init early_init_dt_scan_chosen_serial(void)
 	}
 	return -ENODEV;
 }
-
-static int __init setup_of_earlycon(char *buf)
-{
-	if (buf)
-		return 0;
-
-	return early_init_dt_scan_chosen_serial();
-}
-early_param("earlycon", setup_of_earlycon);
 #endif
 
 /**
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index 067783f..7aae655 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -209,7 +209,7 @@ static int __init param_setup_earlycon(char *buf)
 	 * don't generate a warning from parse_early_params() in that case
 	 */
 	if (!buf || !buf[0])
-		return 0;
+		return early_init_dt_scan_chosen_stdout();
 
 	err = setup_earlycon(buf);
 	if (err == -ENOENT || err == -EALREADY)
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index 26c3302..4341f32 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -14,6 +14,7 @@
 
 #include <linux/types.h>
 #include <linux/init.h>
+#include <linux/errno.h>
 
 /* Definitions used by the flattened device tree */
 #define OF_DT_HEADER		0xd00dfeed	/* marker */
@@ -66,6 +67,7 @@ extern int early_init_dt_scan_chosen(unsigned long node, const char *uname,
 				     int depth, void *data);
 extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
 				     int depth, void *data);
+extern int early_init_dt_scan_chosen_stdout(void);
 extern void early_init_fdt_scan_reserved_mem(void);
 extern void early_init_fdt_reserve_self(void);
 extern void early_init_dt_add_memory_arch(u64 base, u64 size);
@@ -94,6 +96,7 @@ extern void early_get_first_memblock_info(void *, phys_addr_t *);
 extern u64 of_flat_dt_translate_address(unsigned long node);
 extern void of_fdt_limit_memory(int limit);
 #else /* CONFIG_OF_FLATTREE */
+static inline int early_init_dt_scan_chosen_stdout(void) { return -ENODEV; }
 static inline void early_init_fdt_scan_reserved_mem(void) {}
 static inline void early_init_fdt_reserve_self(void) {}
 static inline const char *of_flat_dt_get_machine_name(void) { return NULL; }
-- 
2.9.3

WARNING: multiple messages have this Message-ID (diff)
From: aleksey.makarov@linaro.org (Aleksey Makarov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v10 1/4] of/serial: move earlycon early_param handling to serial
Date: Mon,  5 Sep 2016 15:36:12 +0300	[thread overview]
Message-ID: <20160905123617.18775-2-aleksey.makarov@linaro.org> (raw)
In-Reply-To: <20160905123617.18775-1-aleksey.makarov@linaro.org>

From: Leif Lindholm <leif.lindholm@linaro.org>

We have multiple "earlycon" early_param handlers - merge the DT one into
the main earlycon one.  It's a cleanup that also will be useful
to defer setting up DT console until ACPI/DT decision is made.

Rename the exported function to avoid clashing with the function from
arch/microblaze/kernel/prom.c

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Tested-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Tested-by: Christopher Covington <cov@codeaurora.org>
---
 drivers/of/fdt.c              | 11 +----------
 drivers/tty/serial/earlycon.c |  2 +-
 include/linux/of_fdt.h        |  3 +++
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 085c638..c89d5d2 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -924,7 +924,7 @@ static inline void early_init_dt_check_for_initrd(unsigned long node)
 
 #ifdef CONFIG_SERIAL_EARLYCON
 
-static int __init early_init_dt_scan_chosen_serial(void)
+int __init early_init_dt_scan_chosen_stdout(void)
 {
 	int offset;
 	const char *p, *q, *options = NULL;
@@ -968,15 +968,6 @@ static int __init early_init_dt_scan_chosen_serial(void)
 	}
 	return -ENODEV;
 }
-
-static int __init setup_of_earlycon(char *buf)
-{
-	if (buf)
-		return 0;
-
-	return early_init_dt_scan_chosen_serial();
-}
-early_param("earlycon", setup_of_earlycon);
 #endif
 
 /**
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index 067783f..7aae655 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -209,7 +209,7 @@ static int __init param_setup_earlycon(char *buf)
 	 * don't generate a warning from parse_early_params() in that case
 	 */
 	if (!buf || !buf[0])
-		return 0;
+		return early_init_dt_scan_chosen_stdout();
 
 	err = setup_earlycon(buf);
 	if (err == -ENOENT || err == -EALREADY)
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index 26c3302..4341f32 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -14,6 +14,7 @@
 
 #include <linux/types.h>
 #include <linux/init.h>
+#include <linux/errno.h>
 
 /* Definitions used by the flattened device tree */
 #define OF_DT_HEADER		0xd00dfeed	/* marker */
@@ -66,6 +67,7 @@ extern int early_init_dt_scan_chosen(unsigned long node, const char *uname,
 				     int depth, void *data);
 extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
 				     int depth, void *data);
+extern int early_init_dt_scan_chosen_stdout(void);
 extern void early_init_fdt_scan_reserved_mem(void);
 extern void early_init_fdt_reserve_self(void);
 extern void early_init_dt_add_memory_arch(u64 base, u64 size);
@@ -94,6 +96,7 @@ extern void early_get_first_memblock_info(void *, phys_addr_t *);
 extern u64 of_flat_dt_translate_address(unsigned long node);
 extern void of_fdt_limit_memory(int limit);
 #else /* CONFIG_OF_FLATTREE */
+static inline int early_init_dt_scan_chosen_stdout(void) { return -ENODEV; }
 static inline void early_init_fdt_scan_reserved_mem(void) {}
 static inline void early_init_fdt_reserve_self(void) {}
 static inline const char *of_flat_dt_get_machine_name(void) { return NULL; }
-- 
2.9.3

  reply	other threads:[~2016-09-05 12:36 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-05 12:36 [PATCH v10 0/4] ACPI: parse the SPCR table Aleksey Makarov
2016-09-05 12:36 ` Aleksey Makarov
2016-09-05 12:36 ` Aleksey Makarov [this message]
2016-09-05 12:36   ` [PATCH v10 1/4] of/serial: move earlycon early_param handling to serial Aleksey Makarov
2016-09-05 12:36   ` Aleksey Makarov
2016-09-05 12:36 ` [PATCH v10 2/4] ACPI: parse SPCR and enable matching console Aleksey Makarov
2016-09-05 12:36   ` Aleksey Makarov
2016-09-05 12:36 ` [PATCH v10 3/4] ARM64: ACPI: enable ACPI_SPCR_TABLE Aleksey Makarov
2016-09-05 12:36   ` Aleksey Makarov
2016-09-07  9:30   ` Aleksey Makarov
2016-09-07  9:30     ` Aleksey Makarov
2016-09-08 11:16     ` Will Deacon
2016-09-08 11:16       ` Will Deacon
2016-09-08 13:25       ` Graeme Gregory
2016-09-08 13:25         ` Graeme Gregory
2016-09-08 13:25         ` Graeme Gregory
2016-09-08 13:35       ` Hanjun Guo
2016-09-08 13:35         ` Hanjun Guo
2016-09-08 16:34       ` Mark Salter
2016-09-08 16:34         ` Mark Salter
2016-09-09  8:36         ` Graeme Gregory
2016-09-09  8:36           ` Graeme Gregory
2016-09-09  8:36           ` Graeme Gregory
2016-09-09  9:28         ` Hanjun Guo
2016-09-09  9:28           ` Hanjun Guo
2016-09-13 18:45           ` Mark Salter
2016-09-13 18:45             ` Mark Salter
2016-09-09  9:29     ` Will Deacon
2016-09-09  9:29       ` Will Deacon
2016-09-09 15:07       ` Aleksey Makarov
2016-09-09 15:07         ` Aleksey Makarov
2016-09-09 15:17         ` Will Deacon
2016-09-09 15:17           ` Will Deacon
2016-09-05 12:36 ` [PATCH v10 4/4] serial: pl011: add console matching function Aleksey Makarov
2016-09-05 12:36   ` Aleksey Makarov
2016-09-12 15:55 ` [PATCH v10 0/4] ACPI: parse the SPCR table Aleksey Makarov
2016-09-12 15:55   ` Aleksey Makarov
2016-09-16 13:40 ` Aleksey Makarov
2016-09-16 13:40   ` Aleksey Makarov
2016-09-21 10:27 ` Aleksey Makarov
2016-09-21 10:27   ` Aleksey Makarov
2016-09-21 10:37   ` Greg Kroah-Hartman
2016-09-21 10:37     ` Greg Kroah-Hartman
2016-09-21 16:19     ` Timur Tabi
2016-09-21 16:19       ` Timur Tabi
2016-09-21 16:19       ` Timur Tabi
2016-09-21 16:38       ` Greg Kroah-Hartman
2016-09-21 16:38         ` Greg Kroah-Hartman
2016-09-21 16:38         ` Greg Kroah-Hartman
2016-09-21 17:22         ` Aleksey Makarov
2016-09-21 17:22           ` Aleksey Makarov
2016-09-21 17:22           ` Aleksey Makarov
2016-09-26 19:48           ` Aleksey Makarov
2016-09-26 19:48             ` Aleksey Makarov
2016-09-26 19:48             ` Aleksey Makarov
2016-09-27 15:19             ` Greg Kroah-Hartman
2016-09-27 15:19               ` Greg Kroah-Hartman
2016-09-27 15:19               ` Greg Kroah-Hartman
     [not found]               ` <20160927151953.GB4371-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2016-09-27 20:54                 ` [PATCH v11 1/4] of/serial: move earlycon early_param handling to serial Aleksey Makarov
2016-09-27 20:54                   ` Aleksey Makarov
2016-09-27 20:54                   ` Aleksey Makarov
2016-09-27 20:54                   ` [PATCH v11 2/4] ACPI: parse SPCR and enable matching console Aleksey Makarov
2016-09-27 20:54                     ` Aleksey Makarov
2017-09-11  9:11                     ` Andreas Schwab
2017-09-11  9:11                       ` Andreas Schwab
2017-09-11 11:05                       ` Leif Lindholm
2017-09-11 11:05                         ` Leif Lindholm
2017-09-11 11:39                         ` Andreas Schwab
2017-09-11 11:39                           ` Andreas Schwab
2017-09-11 11:39                           ` Andreas Schwab
2017-09-11 12:24                           ` Graeme Gregory
2017-09-11 12:24                             ` Graeme Gregory
2017-09-11 12:24                             ` Graeme Gregory
2017-09-11 12:28                             ` Andreas Schwab
2017-09-11 12:28                               ` Andreas Schwab
2017-09-11 12:28                               ` Andreas Schwab
2017-09-11 13:03                               ` Graeme Gregory
2017-09-11 13:03                                 ` Graeme Gregory
2017-09-11 13:03                                 ` Graeme Gregory
2017-09-11 13:23                               ` Leif Lindholm
2017-09-11 13:23                                 ` Leif Lindholm
2017-09-11 13:23                                 ` Leif Lindholm
2016-09-27 20:54                   ` [PATCH v11 3/4] ARM64: ACPI: enable ACPI_SPCR_TABLE Aleksey Makarov
2016-09-27 20:54                     ` Aleksey Makarov
2016-09-27 20:54                   ` [PATCH v11 4/4] serial: pl011: add console matching function Aleksey Makarov
2016-09-27 20:54                     ` Aleksey Makarov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160905123617.18775-2-aleksey.makarov@linaro.org \
    --to=aleksey.makarov@linaro.org \
    --cc=ahs3@redhat.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=cov@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=graeme.gregory@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=leif.lindholm@linaro.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=lv.zheng@intel.com \
    --cc=msalter@redhat.com \
    --cc=peter@hurleysoftware.com \
    --cc=rjw@rjwysocki.net \
    --cc=robh+dt@kernel.org \
    --cc=wangkefeng.wang@huawei.com \
    --cc=ynorov@caviumnetworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.