From patchwork Thu Sep 2 15:33:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 71838 Return-Path: X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id D7D7A153781 for ; Thu, 2 Sep 2010 17:34:16 +0200 (CEST) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id ADA6D30E5B70 for ; Thu, 2 Sep 2010 17:34:16 +0200 (MEST) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.17) for (single-drop); Thu, 02 Sep 2010 17:34:16 +0200 (MEST) Received: from murder ([192.168.8.180]) by backend2 (Cyrus v2.2.12) with LMTPA; Thu, 02 Sep 2010 17:34:05 +0200 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend1.mail.m-online.net (Cyrus v2.2.12) with LMTPA; Thu, 02 Sep 2010 17:34:04 +0200 Received: from scanner-3.m-online.net (unknown [192.168.6.168]) by mail.m-online.net (Postfix) with ESMTP id 757111C001CB; Thu, 2 Sep 2010 17:34:04 +0200 (CEST) Received: from mxin-3.m-online.net ([192.168.6.165]) by scanner-3.m-online.net (scanner-3.m-online.net [192.168.6.168]) (amavisd-new, port 10026) with ESMTP id 15208-02; Thu, 2 Sep 2010 17:34:03 +0200 (CEST) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-3.m-online.net (Postfix) with ESMTP id 9197F46AF23; Thu, 2 Sep 2010 17:34:02 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9AE0628098; Thu, 2 Sep 2010 17:33:58 +0200 (CEST) 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 EaYMQaCPzmXA; Thu, 2 Sep 2010 17:33:58 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9E4D02808F; Thu, 2 Sep 2010 17:33:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0CE6B28088 for ; Thu, 2 Sep 2010 17:33:48 +0200 (CEST) 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 y+JvysQdghWj for ; Thu, 2 Sep 2010 17:33:46 +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-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by theia.denx.de (Postfix) with ESMTP id 066862807E for ; Thu, 2 Sep 2010 17:33:44 +0200 (CEST) Received: by fxm18 with SMTP id 18so305176fxm.3 for ; Thu, 02 Sep 2010 08:33:44 -0700 (PDT) Received: by 10.223.126.19 with SMTP id a19mr8634101fas.88.1283441624077; Thu, 02 Sep 2010 08:33:44 -0700 (PDT) Received: from [192.168.0.210] (static-74-41-60-154.dsl1.pco.ca.frontiernet.net [74.41.60.154]) by mx.google.com with ESMTPS id b36sm256562faq.35.2010.09.02.08.33.40 (version=SSLv3 cipher=RC4-MD5); Thu, 02 Sep 2010 08:33:42 -0700 (PDT) From: Steve Sakoman To: "u-boot@lists.denx.de" In-Reply-To: <20100901125550.4bea5be9@schlenkerla.am.freescale.net> References: <1283296887-8631-1-git-send-email-steve@sakoman.com> <1283296887-8631-9-git-send-email-steve@sakoman.com> <0554BEF07D437848AF01B9C9B5F0BC5DA8709970@dlee01.ent.ti.com> <20100901112618.069e4da2@schlenkerla.am.freescale.net> <1283359397.2011.104.camel@quadra> <20100901125550.4bea5be9@schlenkerla.am.freescale.net> Date: Thu, 02 Sep 2010 08:33:31 -0700 Message-ID: <1283441611.2011.113.camel@quadra> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Cc: Scott Wood Subject: Re: [U-Boot] [PATCH V2 08/11] mtd: nand: supress 'unknown NAND' warning if no nand is found X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Virus-Scanned: by amavisd-new at m-online.net This printk was added recently and results in ugly output on systems with no NAND: NAND: nand_get_flash_type: unknown NAND device: Manufacturer ID: 0x00, Chip ID: 0x00 0 MiB instead of: NAND: 0 MiB Signed-off-by: Steve Sakoman --- drivers/mtd/nand/nand_base.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index ed1c9c9..b2400dd 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2653,8 +2653,11 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, } if (!type) { - printk(KERN_INFO "%s: unknown NAND device: Manufacturer ID:" - " 0x%02x, Chip ID: 0x%02x\n", __func__, + /* supress warning if there is no nand */ + if ((*maf_id != 0x00) && (*maf_id != 0xff) && + (dev_id != 0x00) && (dev_id != 0xff)) + printk(KERN_INFO "%s: unknown NAND device: " + "Manufacturer ID: 0x%02x, Chip ID: 0x%02x\n", __func__, *maf_id, dev_id); return ERR_PTR(-ENODEV); }