From patchwork Sun Jul 15 02:44:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Domenico Andreoli X-Patchwork-Id: 1198311 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 6E0D1DF28C for ; Sun, 15 Jul 2012 02:53:35 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SqEqz-00005n-MV; Sun, 15 Jul 2012 02:46:40 +0000 Received: from mail-wg0-f49.google.com ([74.125.82.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SqEqd-0008VR-03 for linux-arm-kernel@lists.infradead.org; Sun, 15 Jul 2012 02:46:18 +0000 Received: by wgbez12 with SMTP id ez12so2630988wgb.18 for ; Sat, 14 Jul 2012 19:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:user-agent:date:from:to:cc:subject:references :content-disposition; bh=uwl7uG/jF2GbAEaxPfp5Q6/jAs8+6uXaLo0hBM/foco=; b=fHNNxkL57KH7MkJHZbctPsajlNs5ARQTMD4UmfAxRdQjFJjIaTeau2rHLEEXCnZoye 6AX8xNUccdilc11OqcnKZCIj/cYFUTFY+3/Dz77MPWmFn1FAVUy+5rxDSAqLLbAH3q6Y NoX7q95u+D4vHn9DrLiDa82jvpqM7Mflo/uZjHQFZKtwMxCYwyWTFcpeZVL16thYkAVu 1/px8THYEp8yvZwk79gnWd49Uct6E7NNRWwUDyckL5CL50unOIn0fjlgk+rNMcWv2xrE 9+kuLDQpOvJkAU0Wm/YflCDFEtoM5uewntX/OZw5iKSao3d9oZsZlIfBxyTydVjv7ZNt /noQ== Received: by 10.180.83.66 with SMTP id o2mr8265759wiy.14.1342320371782; Sat, 14 Jul 2012 19:46:11 -0700 (PDT) Received: from raptus.dandreoli.com (178-85-163-250.dynamic.upc.nl. [178.85.163.250]) by mx.google.com with ESMTPS id el6sm13058499wib.8.2012.07.14.19.46.10 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 14 Jul 2012 19:46:11 -0700 (PDT) Received: by raptus.dandreoli.com (Postfix, from userid 1000) id C091237BA05; Sun, 15 Jul 2012 04:46:10 +0200 (CEST) Message-Id: <20120715024610.498135890@gmail.com> User-Agent: quilt/0.60-1 Date: Sun, 15 Jul 2012 04:44:16 +0200 From: Domenico Andreoli To: linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 08/12] ARM: Add DT support to the decompressor console References: <20120715024408.747946928@gmail.com> Content-Disposition: inline; filename=decomp-console-dt.patch X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (cavokz[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.49 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Domenico Andreoli , Russell King - ARM Linux , Arnd Bergmann X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Domenico Andreoli This is the very minimal support of DT that currently the decompressor console provides. That is reading the command line from the DT. This means that pure DT machines currently need some console data to be shipped to the decompressor (tags have their DT table) although they already provide all the required info in the DT, where the decompressor should ideally take them. So the current blocker here is what to extract from DT. Or, what to _put_ into the DT for the decompressor. Signed-off-by: Domenico Andreoli --- arch/arm/boot/compressed/console.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) Index: b/arch/arm/boot/compressed/console.c =================================================================== --- a/arch/arm/boot/compressed/console.c +++ b/arch/arm/boot/compressed/console.c @@ -24,11 +24,19 @@ #include "arch.h" +const char *get_fdt_prop(void *fdt, const char *path, const char *prop); + static const char *get_cmdline(void *atag_fdt) { struct tag *atag = atag_fdt; + const char *cmdline; + + /* let's try with DT */ + cmdline = get_fdt_prop(atag_fdt, "/chosen", "bootargs"); + if (cmdline) + return cmdline; - /* validate the ATAG */ + /* no DT, validate the ATAG */ if (atag->hdr.tag != ATAG_CORE || (atag->hdr.size != tag_size(tag_core) && atag->hdr.size != 2)) return NULL;