From patchwork Wed Dec 22 14:41:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 76412 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 01FE8B7093 for ; Thu, 23 Dec 2010 01:41:20 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3506A28148; Wed, 22 Dec 2010 15:41:18 +0100 (CET) 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 wao63dzGuwuy; Wed, 22 Dec 2010 15:41:18 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 552442812E; Wed, 22 Dec 2010 15:41:15 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C5D632812E for ; Wed, 22 Dec 2010 15:41:13 +0100 (CET) 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 YfI5KcA37pKQ for ; Wed, 22 Dec 2010 15:41:13 +0100 (CET) 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 smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by theia.denx.de (Postfix) with ESMTPS id 428562812C for ; Wed, 22 Dec 2010 15:41:13 +0100 (CET) Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 331441B41F4; Wed, 22 Dec 2010 14:41:11 +0000 (UTC) From: Mike Frysinger To: u-boot@lists.denx.de, Stefan Roese Date: Wed, 22 Dec 2010 09:41:13 -0500 Message-Id: <1293028873-16231-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.3.4 Subject: [U-Boot] [PATCH] cfi_flash: avoid flash_verbose when possible 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The flash_verbose logic is only used by the CFI MTD layer, so if we aren't using that, disable the logic completely. Signed-off-by: Mike Frysinger --- drivers/mtd/cfi_flash.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 39c235e..b05264b 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -63,7 +63,11 @@ */ static uint flash_offset_cfi[2] = { FLASH_OFFSET_CFI, FLASH_OFFSET_CFI_ALT }; +#ifdef CONFIG_FLASH_CFI_MTD static uint flash_verbose = 1; +#else +#define flash_verbose 1 +#endif flash_info_t flash_info[CFI_MAX_FLASH_BANKS]; /* FLASH chips info */ @@ -2016,10 +2020,12 @@ ulong flash_get_size (phys_addr_t base, int banknum) return (info->size); } +#ifdef CONFIG_FLASH_CFI_MTD void flash_set_verbose(uint v) { flash_verbose = v; } +#endif /*----------------------------------------------------------------------- */