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: 5387131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8C01B9F2F5 for ; Wed, 26 Nov 2014 17:43:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B876A201EF for ; Wed, 26 Nov 2014 17:43:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DD06E201F5 for ; Wed, 26 Nov 2014 17:43:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XtgaZ-0007V6-E7; Wed, 26 Nov 2014 17:41:15 +0000 Received: from mail-wi0-f171.google.com ([209.85.212.171]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xtga9-00073w-9D for linux-arm-kernel@lists.infradead.org; Wed, 26 Nov 2014 17:40:53 +0000 Received: by mail-wi0-f171.google.com with SMTP id bs8so13267607wib.16 for ; Wed, 26 Nov 2014 09:40:23 -0800 (PST) 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=TwKNYNRtIoGPBbnc9VKnLsy2mhWh6VFQ3u6vKiA3VIg=; b=h/G07HmdN6vX3Fa2HkUvm5d4YKe+ucBGS9ehYfYmgbD0wA+HGGmkDYzQNx2/DpdFr4 Va3t/XV4oTvSRzorvaCbOnxWT6xcMRAeY7seQQLBo31YxdC+ek+akexaPZIrByEsY0YX pPe6COVmP/5G6h6+VZS8N18lv2kPHNKcRLT+hnCBVE6HVWSXoYsITBiM+Ow/5ftgsKU/ 8NsWzdtW3o6vM2m5heG81xK9yafgqFuREUuElJVpSTHMN0KpFtKYN1f+esh7KB99bTpJ u/aOj8/F4NBrq4970kdclxSb2zuNjF6xJikWI0WT7nlf2jehPML2oTwwUxdlrEWdtqlU 8iHA== X-Gm-Message-State: ALoCoQn3AD/B+wYvpaVDikOcguajUXMgrzYh3ZtmRIH+BwbS8gqkFwNaGJbCWcv8PCVrXKRtryp7 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141126_094049_556266_0FFADB41 X-CRM114-Status: UNSURE ( 9.80 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: mark.rutland@arm.com, andrew@lunn.ch, s.hauer@pengutronix.de, robh+dt@kernel.org, ijc@debian.org, grant.likely@linaro.org, plagnioj@jcrosoft.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);