Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1461084
| Path | csiph.com!news.mixmin.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Aleksey Makarov <aleksey.makarov@linaro.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH v9 1/4] of/serial: move earlycon early_param handling to serial |
| Date | Fri, 12 Aug 2016 13:10:01 +0200 |
| Message-ID | <s5ivD-R3-3@gated-at.bofh.it> (permalink) |
| References | <s51Et-6Jw-1@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UQGF8qjorFMp/5UgP5Dr+QVWGvZMPipOKmt+D9MCEEs=; b=C3pneg9JP6ZlDzVf67zSh5BgyfVfxm3T5ZAOEkZjvFGBz299oo6Bo0aJt8wZKHZs4S UTqUpwAbfBQHaVobPcor6SQs8j1XMqJzthSyty8GljQLxF5xn1glU++ACS9NoVoxccnI ZbfCoeFWRzf4Xn4wVuFNYDJ/9yT4N24qRtu7A= |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UQGF8qjorFMp/5UgP5Dr+QVWGvZMPipOKmt+D9MCEEs=; b=geLK26pStsqtJn4LyF831hKBHuXdKlUotdO/0fE8MUjrot5z1Vx0uswRiIIlfua+z3 iiJoZA9TW5ZH/cDJ0hmT6PkXiG3Bvy1Vn5fXa7ktMrQAJ8JygRqO0PVTe0rHN5lawIFs 9ikBYqfdGK613yT71wsWFUddctYVgA/5zj5JCs4BmtpTKjZVPxtUOvct2+3j+3X7h+Kc f2a7cd8w8eUo7O0TzMPtVoDMrxdgGu+xHFsxg10MDC+gPO8Z4WQqrevY+cx0jikJ1wJB wm2pcA9m9qlkx8ndvwQQuxwblGfy1I54nN90SNvp225cScXFAoLVo+q8vm5LYu2Hr2AE Q2hw== |
| X-Gm-Message-State | AEkoouuED+WcXJ/tgvjXGpViEU34NrSIFD9XJsfaFuRxNMtt82fQ1IJS2HV/iyEhANh/11lm |
| X-Received | by 10.25.22.152 with SMTP id 24mr2411296lfw.180.1471000137234; Fri, 12 Aug 2016 04:08:57 -0700 (PDT) |
| X-Mailer | git-send-email 2.9.2 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 93 |
| Organization | linux.* mail to news gateway |
| X-Original-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>, 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 |
| X-Original-Date | Fri, 12 Aug 2016 14:07:14 +0300 |
| X-Original-Message-ID | <20160812110717.12351-1-aleksey.makarov@linaro.org> |
| X-Original-References | <201608120110.sf8xniKf%fengguang.wu@intel.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1461084 |
Show key headers only | View raw
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>
---
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 55f1b83..741cac53 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.2
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v9 1/4] of/serial: move earlycon early_param handling to serial Aleksey Makarov <aleksey.makarov@linaro.org> - 2016-08-11 17:40 +0200
Re: [PATCH v9 1/4] of/serial: move earlycon early_param handling to serial kbuild test robot <lkp@intel.com> - 2016-08-11 19:10 +0200
[PATCH v9 1/4] of/serial: move earlycon early_param handling to serial Aleksey Makarov <aleksey.makarov@linaro.org> - 2016-08-12 13:10 +0200
csiph-web