From patchwork Wed Sep 2 06:09:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 513354 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 0C901140129 for ; Wed, 2 Sep 2015 18:06:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2FF184B7CD; Wed, 2 Sep 2015 10:05:37 +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 CTX95UpqeteD; Wed, 2 Sep 2015 10:05:37 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 81A664B832; Wed, 2 Sep 2015 10:04:55 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 706594B768 for ; Wed, 2 Sep 2015 08:11:13 +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 B4F-sleI2rQz for ; Wed, 2 Sep 2015 08:11:13 +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-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by theia.denx.de (Postfix) with ESMTPS id 04A8B4B73C for ; Wed, 2 Sep 2015 08:11:09 +0200 (CEST) Received: by paap5 with SMTP id p5so190756paa.0 for ; Tue, 01 Sep 2015 23:11:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JnDhs+W+X558k+ad+AuQuneZKQBUN7mZZWskAxzbIBM=; b=C5CjLevKka4p9Ljm8sp0BeHsQM4spteduPHqzNLpnDmCobnMmTjP/yW6IEgRHEYogu KMkx6sI35d1u1vZwUb8nTW4ekYbUZMqG6NozplUe/ZzYykCz8ZmQ9Kbk0viTMQDutges UuBSuvd2c27FSju1sCdd0PXGmxoXLLpLhjaag96znZQTpUIUp0w+R1XpLcT6sykEtKOm W1eav0xITEnJriog7oO0i5cGOW09SVnU5fchV/2tSZ4cjc05ldXN0YCIyHQGeLncKLwY C2eEfBk7wbwyVjXW0HEchtWgGy1cJyu1cxB78jyUi97jgzmkA0QSYdBkpckch1C1mcGg OBbg== X-Received: by 10.67.5.228 with SMTP id cp4mr41627469pad.120.1441174268597; Tue, 01 Sep 2015 23:11:08 -0700 (PDT) Received: from Jubuntu.amcc.com ([182.73.239.130]) by smtp.gmail.com with ESMTPSA id pi9sm20195859pbb.96.2015.09.01.23.11.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Sep 2015 23:11:07 -0700 (PDT) From: Jagan Teki To: u-boot@lists.denx.de Date: Wed, 2 Sep 2015 11:39:57 +0530 Message-Id: <1441174197-5096-14-git-send-email-jteki@openedev.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1441174197-5096-1-git-send-email-jteki@openedev.com> References: <1441174197-5096-1-git-send-email-jteki@openedev.com> X-Mailman-Approved-At: Wed, 02 Sep 2015 10:04:23 +0200 Cc: Jagan Teki Subject: [U-Boot] [PATCH v3 13/13] sf: Rename read register functions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" spi_flash_cmd_read_status -> read_sr spi_flash_cmd_read_config -> read_cr Signed-off-by: Jagan Teki --- Changes for v3: - none Changes for v2: - none drivers/mtd/spi/sf_internal.h | 5 +---- drivers/mtd/spi/sf_ops.c | 8 ++++---- drivers/mtd/spi/sf_probe.c | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h index e4cb198..e618306 100644 --- a/drivers/mtd/spi/sf_internal.h +++ b/drivers/mtd/spi/sf_internal.h @@ -180,14 +180,11 @@ int spi_flash_cmd_write(struct spi_slave *spi, const u8 *cmd, size_t cmd_len, /* Flash erase(sectors) operation, support all possible erase commands */ int spi_flash_cmd_erase_ops(struct spi_flash *flash, u32 offset, size_t len); -/* Read the status register */ -int spi_flash_cmd_read_status(struct spi_flash *flash); - /* Program the status register */ 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); +int read_cr(struct spi_flash *flash); /* Program the config register */ int spi_flash_cmd_write_config(struct spi_flash *flash, u8 wc); diff --git a/drivers/mtd/spi/sf_ops.c b/drivers/mtd/spi/sf_ops.c index 77b053a..a27beb5 100644 --- a/drivers/mtd/spi/sf_ops.c +++ b/drivers/mtd/spi/sf_ops.c @@ -26,7 +26,7 @@ static void spi_flash_addr(u32 addr, u8 *cmd) cmd[3] = addr >> 0; } -int spi_flash_cmd_read_status(struct spi_flash *flash) +int read_sr(struct spi_flash *flash) { int ret; u8 rs; @@ -70,7 +70,7 @@ int spi_flash_cmd_write_status(struct spi_flash *flash, u8 ws) } #if defined(CONFIG_SPI_FLASH_SPANSION) || defined(CONFIG_SPI_FLASH_WINBOND) -int spi_flash_cmd_read_config(struct spi_flash *flash) +int read_cr(struct spi_flash *flash) { int ret; u8 rc; @@ -90,7 +90,7 @@ int spi_flash_cmd_write_config(struct spi_flash *flash, u8 wc) u8 cmd; int ret, val; - val = spi_flash_cmd_read_status(flash); + val = read_sr(flash); if (val < 0) return val; @@ -160,7 +160,7 @@ static inline int write_cfsr(struct spi_flash *flash) static inline int spi_flash_sr_ready(struct spi_flash *flash) { - int sr = spi_flash_cmd_read_status(flash); + int sr = read_sr(flash); if (sr < 0) return sr; else diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c index 262849e..bf84f06 100644 --- a/drivers/mtd/spi/sf_probe.c +++ b/drivers/mtd/spi/sf_probe.c @@ -37,7 +37,7 @@ static int spi_flash_set_qeb_mxic(struct spi_flash *flash) { int qeb_status, ret; - qeb_status = spi_flash_cmd_read_config(flash); + qeb_status = read_cr(flash); if (qeb_status < 0) return qeb_status; @@ -58,7 +58,7 @@ static int spi_flash_set_qeb_winspan(struct spi_flash *flash) { int qeb_status, ret; - qeb_status = spi_flash_cmd_read_config(flash); + qeb_status = read_cr(flash); if (qeb_status < 0) return qeb_status;