From patchwork Mon Dec 10 14:41:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 204931 X-Patchwork-Delegate: vapier@gentoo.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 768022C023D for ; Tue, 11 Dec 2012 01:54:43 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6E2D64A053; Mon, 10 Dec 2012 15:54:33 +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 nSutGrQp0vFD; Mon, 10 Dec 2012 15:54:33 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 22DF64A054; Mon, 10 Dec 2012 15:54:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DB3324A03C for ; Mon, 10 Dec 2012 15:44:54 +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 iBMijMXTeH2e for ; Mon, 10 Dec 2012 15:44:54 +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 mail-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) by theia.denx.de (Postfix) with ESMTPS id 18EF64A047 for ; Mon, 10 Dec 2012 15:44:52 +0100 (CET) Received: by mail-pb0-f44.google.com with SMTP id uo1so1906061pbc.3 for ; Mon, 10 Dec 2012 06:44:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=WsSBVWcVcMo4LbdZp/aVQfucNr7x4Nw4235Wz/VTgRU=; b=S01UhEMYhbwZRUx7FK4YSmJiGe3cdTka4g8OzIKHBRSKUF/Tm+1/KDw1Ap2hIF7L62 mCzt+Z+nMmwH1qHOI8bvewoMRtE1qebOcdlZHcWJbvriRca6g3qjKNg/bW1F+EY8VuhW vDke7KV70PgkvAfELGqlgOJKDnFww03G6dlUoaxwy8NWTjr1l9bi/g8cO0SQqUCvg4Qj Si0EHR6cUozFQJJtxTkNJIIy9j4Fi4e0ndQDq9ZLA3d8HMb/f9SCARFixQDdyT4nT3zE Jgv47+1ApsdjBC8NjXFqO3bsc7V0auD2qyOZp5u14VY0QzEit7oj7+aZnFbXvw4X16TE UgeQ== Received: by 10.68.134.130 with SMTP id pk2mr39740172pbb.31.1355150690893; Mon, 10 Dec 2012 06:44:50 -0800 (PST) Received: from localhost.localdomain ([49.204.14.3]) by mx.google.com with ESMTPS id ty4sm11952285pbc.57.2012.12.10.06.44.48 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 10 Dec 2012 06:44:50 -0800 (PST) From: Jagannadha Sutradharudu Teki To: u-boot@lists.denx.de Date: Mon, 10 Dec 2012 20:11:59 +0530 Message-Id: <1355150521-3339-3-git-send-email-jagannadh.teki@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1355150521-3339-1-git-send-email-jagannadh.teki@gmail.com> References: <1355150521-3339-1-git-send-email-jagannadh.teki@gmail.com> X-Mailman-Approved-At: Mon, 10 Dec 2012 15:54:16 +0100 Subject: [U-Boot] [PATCH 2/4] sf: Add print message on flash read function 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 This patch adds a print message on spi_flash_cmd_read_fast() to make sure that how many bytes read from flash device. Signed-off-by: Jagannadha Sutradharudu Teki --- drivers/mtd/spi/spi_flash.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index 464c2ab..800ed8b 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -139,12 +139,17 @@ int spi_flash_cmd_read_fast(struct spi_flash *flash, u32 offset, size_t len, void *data) { u8 cmd[5]; + int ret; cmd[0] = CMD_READ_ARRAY_FAST; spi_flash_addr(offset, cmd); cmd[4] = 0x00; - return spi_flash_read_common(flash, cmd, sizeof(cmd), data, len); + ret = spi_flash_read_common(flash, cmd, sizeof(cmd), data, len); + printf("SF: re-program %s %zu bytes @ %#x\n", + ret ? "failure" : "success", len, offset); + + return ret; } int spi_flash_cmd_poll_bit(struct spi_flash *flash, unsigned long timeout,