summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2016-01-16 15:23:42 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-06 22:07:37 -0800
commit4d118c9a866590850dad8689262a95345d2c6e09 (patch)
treea5667d9441ff995380c4fc1bbda65e1d7bf5f1e7 /drivers/of
parent05d961320ba624c98b16d72b32f947307674b341 (diff)
downloadop-kernel-dev-4d118c9a866590850dad8689262a95345d2c6e09.zip
op-kernel-dev-4d118c9a866590850dad8689262a95345d2c6e09.tar.gz
of: earlycon: Add options string handling
Pass-through any options string in the 'stdout-path' property to the earlycon "driver" setup. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/fdt.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index ec14595..cfd3b35 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -800,7 +800,7 @@ static inline void early_init_dt_check_for_initrd(unsigned long node)
static int __init early_init_dt_scan_chosen_serial(void)
{
int offset;
- const char *p;
+ const char *p, *q, *options = NULL;
int l;
const struct earlycon_id *match;
const void *fdt = initial_boot_params;
@@ -817,11 +817,12 @@ static int __init early_init_dt_scan_chosen_serial(void)
if (!p || !l)
return -ENOENT;
- /* Remove console options if present */
- l = strchrnul(p, ':') - p;
+ q = strchrnul(p, ':');
+ if (*q != '\0')
+ options = q + 1;
/* Get the node specified by stdout-path */
- offset = fdt_path_offset_namelen(fdt, p, l);
+ offset = fdt_path_offset_namelen(fdt, p, q - p);
if (offset < 0)
return -ENODEV;
@@ -838,7 +839,7 @@ static int __init early_init_dt_scan_chosen_serial(void)
if (addr == OF_BAD_ADDR)
return -ENXIO;
- of_setup_earlycon(addr, match);
+ of_setup_earlycon(addr, match, options);
return 0;
}
return -ENODEV;
OpenPOWER on IntegriCloud