From patchwork Wed Sep 17 03:51:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 390275 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id CE88214012C for ; Wed, 17 Sep 2014 13:53:40 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D8BC9A7450; Wed, 17 Sep 2014 05:53:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id srVBTSGkSuUg; Wed, 17 Sep 2014 05:53:22 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 47CEBA74C8; Wed, 17 Sep 2014 05:52:23 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3DB40A7494 for ; Wed, 17 Sep 2014 05:52:15 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r7KUuRyR+JHO for ; Wed, 17 Sep 2014 05:52:12 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ig0-f202.google.com (mail-ig0-f202.google.com [209.85.213.202]) by theia.denx.de (Postfix) with ESMTPS id 06BFFA7450 for ; Wed, 17 Sep 2014 05:51:59 +0200 (CEST) Received: by mail-ig0-f202.google.com with SMTP id h18so110927igc.3 for ; Tue, 16 Sep 2014 20:51:58 -0700 (PDT) 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=vE+nAhPqhP809fOFcZt3yfhk6JlZAWnqChc8Gz80bzE=; b=LGge0QMzCrSeJESsat+ZUDVcSfiCbKKvi8IY7Vks6TPwaMc8tBxR9eAkZa3TohmZNN pcKwJ+GMEN0I9Isy3xMjL/l5ob7isY6Ym3c+nQoIqKZIkYxl9YGViqx6Bgn4vwRNvfBY spQVkazPY5HKCyMEmC8fcUrcb5acC8X0WC+/jNZZDrOatUaOgFMP0x3pDkypUKSfCciC dd3zWvvxDkABgDnPphNMZ+vrkRCHW+rp1dyirmp14dHsfuXoOjTNzvUDSmYEl9StogLV PrlDBZK9Ams0gSzI3H0WIdoQzJjCzv1zNo0/ISxwHAAAXw26kIWGW8dsnI9RdBQcJ/DY rw3Q== X-Gm-Message-State: ALoCoQkRfLOadXPjWJP62KnARqgdHJRAwCTwCyO/tpA7Pcztf/DG5P4Zuv1UwaBEXax1tCo6kGAG X-Received: by 10.182.91.69 with SMTP id cc5mr23879339obb.33.1410925917937; Tue, 16 Sep 2014 20:51:57 -0700 (PDT) Received: from corpmail-nozzle1-1.hot.corp.google.com ([100.108.1.104]) by gmr-mx.google.com with ESMTPS id m14si790612yhm.7.2014.09.16.20.51.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Sep 2014 20:51:57 -0700 (PDT) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by corpmail-nozzle1-1.hot.corp.google.com with ESMTP id vEa8mPcZ.1; Tue, 16 Sep 2014 20:51:57 -0700 Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 8944022014C; Tue, 16 Sep 2014 21:51:56 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Tue, 16 Sep 2014 21:51:18 -0600 Message-Id: <1410925884-8767-6-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 In-Reply-To: <1410925884-8767-1-git-send-email-sjg@chromium.org> References: <1410925884-8767-1-git-send-email-sjg@chromium.org> Subject: [U-Boot] [PATCH v2 05/11] dm: serial: Don't require device tree to configure a console X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Allow serial_find_console_or_panic() to work without a device tree. Signed-off-by: Simon Glass --- Changes in v2: None drivers/serial/serial-uclass.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c index d04104e..1ac943f 100644 --- a/drivers/serial/serial-uclass.c +++ b/drivers/serial/serial-uclass.c @@ -25,6 +25,7 @@ struct udevice *cur_dev __attribute__ ((section(".data"))); static void serial_find_console_or_panic(void) { +#ifdef CONFIG_OF_CONTROL int node; /* Check for a chosen console */ @@ -44,7 +45,7 @@ static void serial_find_console_or_panic(void) return; cur_dev = NULL; } - +#endif /* * Failing that, get the device with sequence number 0, or in extremis * just the first serial device we can find. But we insist on having