From patchwork Sat Jan 4 15:04:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagannadha Sutradharudu Teki X-Patchwork-Id: 306853 X-Patchwork-Delegate: jagannadh.teki@gmail.com 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 B7F272C0085 for ; Sun, 5 Jan 2014 02:06:10 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 244234ACBE; Sat, 4 Jan 2014 16:06:07 +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 2XoHZQYQOEA0; Sat, 4 Jan 2014 16:06:06 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D63684ACC8; Sat, 4 Jan 2014 16:05:30 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AC3BE4ACB7 for ; Sat, 4 Jan 2014 16:05:20 +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 Kakh7ZYUXRTK for ; Sat, 4 Jan 2014 16:05:15 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=ERR(-1.5) (only DNSBL check requested) Received: from db9outboundpool.messaging.microsoft.com (mail-db9lp0249.outbound.messaging.microsoft.com [213.199.154.249]) by theia.denx.de (Postfix) with ESMTPS id 94D234AC9C for ; Sat, 4 Jan 2014 16:05:03 +0100 (CET) Received: from mail11-db9-R.bigfish.com (10.174.16.232) by DB9EHSOBE034.bigfish.com (10.174.14.97) with Microsoft SMTP Server id 14.1.225.22; Sat, 4 Jan 2014 15:05:02 +0000 Received: from mail11-db9 (localhost [127.0.0.1]) by mail11-db9-R.bigfish.com (Postfix) with ESMTP id 7AEBB1C007A; Sat, 4 Jan 2014 15:05:02 +0000 (UTC) X-Forefront-Antispam-Report: CIP:149.199.60.83; KIP:(null); UIP:(null); IPV:NLI; H:xsj-gw1; RD:unknown-60-83.xilinx.com; EFVD:NLI X-SpamScore: 1 X-BigFish: VPS1(zzzz1f42h2148h208ch1ee6h1de0h1fdah2073h2146h1202h1e76h2189h1d1ah1d2ah1fc6hzz1de098h8275bh1de097hz2fh95h839hd24hf0ah119dh1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14ddh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1b0ah224fh1d0ch1d2eh1d3fh1dfeh1dffh1e1dh1e23h1fe8h1ff5h2218h2216h226dh2327h2336h906i1155h) Received-SPF: pass (mail11-db9: domain of xilinx.com designates 149.199.60.83 as permitted sender) client-ip=149.199.60.83; envelope-from=jagannadha.sutradharudu-teki@xilinx.com; helo=xsj-gw1 ; helo=xsj-gw1 ; Received: from mail11-db9 (localhost.localdomain [127.0.0.1]) by mail11-db9 (MessageSwitch) id 1388847900578755_30308; Sat, 4 Jan 2014 15:05:00 +0000 (UTC) Received: from DB9EHSMHS011.bigfish.com (unknown [10.174.16.253]) by mail11-db9.bigfish.com (Postfix) with ESMTP id 7D977400047; Sat, 4 Jan 2014 15:05:00 +0000 (UTC) Received: from xsj-gw1 (149.199.60.83) by DB9EHSMHS011.bigfish.com (10.174.14.21) with Microsoft SMTP Server id 14.16.227.3; Sat, 4 Jan 2014 15:04:59 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-smtp1) by xsj-gw1 with esmtp (Exim 4.63) (envelope-from ) id 1VzSmZ-0007F8-BO; Sat, 04 Jan 2014 07:04:59 -0800 From: Jagannadha Sutradharudu Teki To: Date: Sat, 4 Jan 2014 20:34:48 +0530 X-Mailer: git-send-email 1.8.3 In-Reply-To: <1388847888-19474-1-git-send-email-jaganna@xilinx.com> References: <1388847888-19474-1-git-send-email-jaganna@xilinx.com> X-RCIS-Action: ALLOW MIME-Version: 1.0 Message-ID: <2df7bd23-56ec-4f98-98a7-12580263d30e@DB9EHSMHS011.ehs.local> X-OriginatorOrg: xilinx.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Cc: trini@ti.com, sourav.poddar@ti.com, Jagannadha Sutradharudu Teki Subject: [U-Boot] [PATCH v6 12/12] sf: Code cleanups 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de - comment typo's - func args have a proper names Signed-off-by: Jagannadha Sutradharudu Teki --- drivers/mtd/spi/sf_internal.h | 6 +++--- drivers/mtd/spi/sf_ops.c | 4 ++-- drivers/mtd/spi/sf_probe.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h index c77961f..da69549 100644 --- a/drivers/mtd/spi/sf_internal.h +++ b/drivers/mtd/spi/sf_internal.h @@ -60,10 +60,10 @@ #endif /* Common status */ -#define STATUS_WIP 0x01 +#define STATUS_WIP (1 << 0) #define STATUS_QEB_WINSPAN (1 << 1) #define STATUS_QEB_MXIC (1 << 6) -#define STATUS_PEC 0x80 +#define STATUS_PEC (1 << 7) /* Flash timeout values */ #define SPI_FLASH_PROG_TIMEOUT (2 * CONFIG_SYS_HZ) @@ -105,7 +105,7 @@ int spi_flash_cmd_erase_ops(struct spi_flash *flash, u32 offset, size_t len); int spi_flash_cmd_read_status(struct spi_flash *flash, u8 *rs); /* Program the status register */ -int spi_flash_cmd_write_status(struct spi_flash *flash, u8 sr); +int spi_flash_cmd_write_status(struct spi_flash *flash, u8 ws); /* Read the config register */ int spi_flash_cmd_read_config(struct spi_flash *flash, u8 *rc); diff --git a/drivers/mtd/spi/sf_ops.c b/drivers/mtd/spi/sf_ops.c index 658294c..7a499d5 100644 --- a/drivers/mtd/spi/sf_ops.c +++ b/drivers/mtd/spi/sf_ops.c @@ -39,13 +39,13 @@ int spi_flash_cmd_read_status(struct spi_flash *flash, u8 *rs) return 0; } -int spi_flash_cmd_write_status(struct spi_flash *flash, u8 sr) +int spi_flash_cmd_write_status(struct spi_flash *flash, u8 ws) { u8 cmd; int ret; cmd = CMD_WRITE_STATUS; - ret = spi_flash_write_common(flash, &cmd, 1, &sr, 1); + ret = spi_flash_write_common(flash, &cmd, 1, &ws, 1); if (ret < 0) { debug("SF: fail to write status register\n"); return ret; diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c index 8715b7c..98fc271 100644 --- a/drivers/mtd/spi/sf_probe.c +++ b/drivers/mtd/spi/sf_probe.c @@ -167,7 +167,7 @@ static struct spi_flash *spi_flash_validate_params(struct spi_slave *spi, cmd = spi_read_cmds_array[cmd - 1]; flash->read_cmd = cmd; } else { - /* Go for for default supported read cmd */ + /* Go for default supported read cmd */ flash->read_cmd = CMD_READ_ARRAY_FAST; } @@ -200,7 +200,7 @@ static struct spi_flash *spi_flash_validate_params(struct spi_slave *spi, flash->dummy_cycles = 1; } - /* Poll cmd seclection */ + /* Poll cmd selection */ flash->poll_cmd = CMD_READ_STATUS; #ifdef CONFIG_SPI_FLASH_STMICRO if (params->flags & E_FSR)