From patchwork Wed Sep 17 15:02:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 390433 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 C13AC1400DD for ; Thu, 18 Sep 2014 01:05:09 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9C415A751A; Wed, 17 Sep 2014 17:04:24 +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 jCKbntlljzHG; Wed, 17 Sep 2014 17:04:24 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B47E3AB573; Wed, 17 Sep 2014 17:03:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EDBE7A74FC for ; Wed, 17 Sep 2014 17:03:12 +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 q4wB7M7Zj4i0 for ; Wed, 17 Sep 2014 17:03:08 +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-pd0-f202.google.com (mail-pd0-f202.google.com [209.85.192.202]) by theia.denx.de (Postfix) with ESMTPS id 98C5DA73F1 for ; Wed, 17 Sep 2014 17:02:56 +0200 (CEST) Received: by mail-pd0-f202.google.com with SMTP id ft15so476049pdb.3 for ; Wed, 17 Sep 2014 08:02:54 -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=dtXpkAFLpO6gQlnI2KK6gqbopDdmZeUqH5PlK9OEU4A=; b=F/qlKWSpSc09B3HYGJMWhtG3r7BJlz+7+nfA3DBPCe7FZ++aukHkxfmYM4isbpG4R4 2Z/fEXAwcppC+OPgeUxeGSObL2mEvHuMHxaL/GY+MbOV1AJ0xHSdEhRGN3MbT/OumVtb VGuGqgDcGbm5ILfb0HwjzL4lg7OZj89jJER6hIvWF8K+yv9BhalPoebWUTppMrDLw8bY TcbXvh11wqW4NBHel0+w6Tk5n6xD50bB+CYFgo14DbA0aRTaTbC/xWHwO92ktcWkb3U/ LCXGcSshc+6Hgs6Qc04ulc1VlyvUU82DDpDnUe0GN38xHOZ1xFMrdd5a5jMSvtix+sXy aMxQ== X-Gm-Message-State: ALoCoQliWE2Sq15pq0y9yyYHJ3eST7cE/ND6661RFESRBUmnvWeHjtcLsldRyc2yiSmx2c6GrrW4 X-Received: by 10.70.140.36 with SMTP id rd4mr24357390pdb.1.1410966174852; Wed, 17 Sep 2014 08:02:54 -0700 (PDT) Received: from corpmail-nozzle1-2.hot.corp.google.com ([100.108.1.103]) by gmr-mx.google.com with ESMTPS id l45si838281yha.2.2014.09.17.08.02.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Sep 2014 08:02:54 -0700 (PDT) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by corpmail-nozzle1-2.hot.corp.google.com with ESMTP id 2cqC8Dq3.1; Wed, 17 Sep 2014 08:02:54 -0700 Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id E6937221C15; Wed, 17 Sep 2014 09:02:53 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Wed, 17 Sep 2014 09:02:40 -0600 Message-Id: <1410966166-20767-6-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 In-Reply-To: <1410966166-20767-1-git-send-email-sjg@chromium.org> References: <1410966166-20767-1-git-send-email-sjg@chromium.org> Subject: [U-Boot] [PATCH v3 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 v3: None 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