From patchwork Wed Nov 26 17:40:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 41559 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A702D203C2 for ; Wed, 26 Nov 2014 17:40:49 +0000 (UTC) Received: by mail-la0-f70.google.com with SMTP id q1sf2097463lam.9 for ; Wed, 26 Nov 2014 09:40:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=R9r9jugXK10kbzE/4xTuQbgMqNjrBmaBPIHzP89iy8A=; b=Gsi52piavkyZMObHlobuZ/w5vPzhcMGmGG6FcjbRB22bVa5xpxP/wwvqUVTcziehZ2 8PM2m8cHxNAiUjIYfbLfJpjWrXhJHwxPAFjEzN0ztQhm9lsD6OkTUJOY+Sz5cxoSZfNV 8K0f1AQMS9gr6HFsZEyV9BizzGwur+GaGOD0JxkxnvtAJuQnSGkuS4W71olJPbxLbDQR PLBXHdEwFbiIO2IWHFQnbLyBDNcNqePzRKJg+uMAAR1UCvJhNbKsYS6uJrGQ0OC4Kcep wdCGt9am8NddBlUqIncOk52jcI4YoWQBiGnjq2YtVAreyktecoRrikbNF181Rsvfm5uB K55w== X-Gm-Message-State: ALoCoQmpjbwPI7rIZoi4jozJLyEZaE0M9/ccerOArLUo+CDaKO+QYNsjmSQcpkCcZ0utDxn4Ag4Q X-Received: by 10.112.48.6 with SMTP id h6mr314569lbn.19.1417023648603; Wed, 26 Nov 2014 09:40:48 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.38 with SMTP id ld6ls749573lac.50.gmail; Wed, 26 Nov 2014 09:40:48 -0800 (PST) X-Received: by 10.152.43.13 with SMTP id s13mr991582lal.69.1417023648369; Wed, 26 Nov 2014 09:40:48 -0800 (PST) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id qb8si5002384lbb.127.2014.11.26.09.40.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Nov 2014 09:40:48 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by mail-la0-f54.google.com with SMTP id gf13so2922622lab.13 for ; Wed, 26 Nov 2014 09:40:48 -0800 (PST) X-Received: by 10.112.14.69 with SMTP id n5mr35081706lbc.34.1417023648284; Wed, 26 Nov 2014 09:40:48 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp665617lbc; Wed, 26 Nov 2014 09:40:47 -0800 (PST) X-Received: by 10.67.24.99 with SMTP id ih3mr55375066pad.101.1417023646495; Wed, 26 Nov 2014 09:40:46 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ag1si3489698pbd.164.2014.11.26.09.40.45 for ; Wed, 26 Nov 2014 09:40:46 -0800 (PST) Received-SPF: none (google.com: devicetree-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752858AbaKZRko (ORCPT + 4 others); Wed, 26 Nov 2014 12:40:44 -0500 Received: from mail-wi0-f182.google.com ([209.85.212.182]:52558 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753192AbaKZRkZ (ORCPT ); Wed, 26 Nov 2014 12:40:25 -0500 Received: by mail-wi0-f182.google.com with SMTP id h11so5812751wiw.3 for ; Wed, 26 Nov 2014 09:40:23 -0800 (PST) X-Received: by 10.180.103.38 with SMTP id ft6mr4539511wib.19.1417023623828; Wed, 26 Nov 2014 09:40:23 -0800 (PST) Received: from mohikan.mushroom.smurfnet.nu (cpc4-cmbg17-2-0-cust71.5-4.cable.virginm.net. [86.14.224.72]) by mx.google.com with ESMTPSA id wr9sm7211904wjb.42.2014.11.26.09.40.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Nov 2014 09:40:23 -0800 (PST) From: Leif Lindholm To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: mark.rutland@arm.com, grant.likely@linaro.org, robh+dt@kernel.org, plagnioj@jcrosoft.com, ijc@debian.org, andrew@lunn.ch, s.hauer@pengutronix.de Subject: [PATCH v2 2/2] of: support passing console options with stdout-path Date: Wed, 26 Nov 2014 17:40:40 +0000 Message-Id: <1417023640-23464-3-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1417023640-23464-1-git-send-email-leif.lindholm@linaro.org> References: <1417023640-23464-1-git-send-email-leif.lindholm@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Support specifying console options (like with console=ttyXN,) by appending them to the stdout-path property after a separating ':'. Example: stdout-path = "uart0:115200"; Signed-off-by: Leif Lindholm --- drivers/of/base.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 3e764bd..d265514 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -37,6 +37,7 @@ EXPORT_SYMBOL(of_allnodes); struct device_node *of_chosen; struct device_node *of_aliases; struct device_node *of_stdout; +static char *of_stdout_options; struct kset *of_kset; @@ -1844,7 +1845,7 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align)) if (IS_ENABLED(CONFIG_PPC) && !name) name = of_get_property(of_aliases, "stdout", NULL); if (name) - of_stdout = of_find_node_by_path(name, NULL); + of_stdout = of_find_node_by_path(name, &of_stdout_options); } if (!of_aliases) @@ -1970,7 +1971,7 @@ bool of_console_check(struct device_node *dn, char *name, int index) { if (!dn || dn != of_stdout || console_set_on_cmdline) return false; - return !add_preferred_console(name, index, NULL); + return !add_preferred_console(name, index, of_stdout_options); } EXPORT_SYMBOL_GPL(of_console_check);