public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Ulf Hansson <ulf.hansson@linaro.org>, Chris Ball <chris@printf.net>
Cc: linux-mmc <linux-mmc@vger.kernel.org>
Subject: [PATCH 05/15] mmc: sdhci: Rename adma_desc to adma_table
Date: Tue, 21 Oct 2014 12:26:15 +0300	[thread overview]
Message-ID: <1413883585-16299-6-git-send-email-adrian.hunter@intel.com> (raw)
In-Reply-To: <1413883585-16299-1-git-send-email-adrian.hunter@intel.com>

In preparation for 64-bit ADMA, rename adma_desc to
adma_table.  That is because members will be added
for descriptor size and table size, so using adma_desc
(which is the table) is confusing.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 drivers/mmc/host/sdhci.c  | 31 ++++++++++++++++---------------
 include/linux/mmc/sdhci.h |  2 +-
 2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index b61e84b..b45814e 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -505,7 +505,7 @@ static int sdhci_adma_table_pre(struct sdhci_host *host,
 	if (host->sg_count == 0)
 		goto unmap_align;
 
-	desc = host->adma_desc;
+	desc = host->adma_table;
 	align = host->align_buffer;
 
 	align_addr = host->align_addr;
@@ -555,14 +555,14 @@ static int sdhci_adma_table_pre(struct sdhci_host *host,
 		 * If this triggers then we have a calculation bug
 		 * somewhere. :/
 		 */
-		WARN_ON((desc - host->adma_desc) >= ADMA_SIZE);
+		WARN_ON((desc - host->adma_table) >= ADMA_SIZE);
 	}
 
 	if (host->quirks & SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC) {
 		/*
 		* Mark the last descriptor as the terminating descriptor
 		*/
-		if (desc != host->adma_desc) {
+		if (desc != host->adma_table) {
 			desc -= 8;
 			desc[0] |= 0x2; /* end */
 		}
@@ -2293,7 +2293,7 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask, u32 *mask)
 static void sdhci_adma_show_error(struct sdhci_host *host)
 {
 	const char *name = mmc_hostname(host->mmc);
-	u8 *desc = host->adma_desc;
+	u8 *desc = host->adma_table;
 	__le32 *dma;
 	__le16 *len;
 	u8 attr;
@@ -2874,27 +2874,28 @@ int sdhci_add_host(struct sdhci_host *host)
 		 * (128) and potentially one alignment transfer for
 		 * each of those entries.
 		 */
-		host->adma_desc = dma_alloc_coherent(mmc_dev(mmc),
-						     ADMA_SIZE, &host->adma_addr,
-						     GFP_KERNEL);
+		host->adma_table = dma_alloc_coherent(mmc_dev(mmc),
+						      ADMA_SIZE,
+						      &host->adma_addr,
+						      GFP_KERNEL);
 		host->align_buffer = kmalloc(128 * 4, GFP_KERNEL);
-		if (!host->adma_desc || !host->align_buffer) {
+		if (!host->adma_table || !host->align_buffer) {
 			dma_free_coherent(mmc_dev(mmc), ADMA_SIZE,
-					  host->adma_desc, host->adma_addr);
+					  host->adma_table, host->adma_addr);
 			kfree(host->align_buffer);
 			pr_warn("%s: Unable to allocate ADMA buffers - falling back to standard DMA\n",
 				mmc_hostname(mmc));
 			host->flags &= ~SDHCI_USE_ADMA;
-			host->adma_desc = NULL;
+			host->adma_table = NULL;
 			host->align_buffer = NULL;
 		} else if (host->adma_addr & 3) {
 			pr_warn("%s: unable to allocate aligned ADMA descriptor\n",
 				mmc_hostname(mmc));
 			host->flags &= ~SDHCI_USE_ADMA;
 			dma_free_coherent(mmc_dev(mmc), ADMA_SIZE,
-					  host->adma_desc, host->adma_addr);
+					  host->adma_table, host->adma_addr);
 			kfree(host->align_buffer);
-			host->adma_desc = NULL;
+			host->adma_table = NULL;
 			host->align_buffer = NULL;
 		}
 	}
@@ -3353,12 +3354,12 @@ void sdhci_remove_host(struct sdhci_host *host, int dead)
 	if (!IS_ERR(mmc->supply.vqmmc))
 		regulator_disable(mmc->supply.vqmmc);
 
-	if (host->adma_desc)
+	if (host->adma_table)
 		dma_free_coherent(mmc_dev(mmc), ADMA_SIZE,
-				  host->adma_desc, host->adma_addr);
+				  host->adma_table, host->adma_addr);
 	kfree(host->align_buffer);
 
-	host->adma_desc = NULL;
+	host->adma_table = NULL;
 	host->align_buffer = NULL;
 }
 
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h
index dba793e..76e0432 100644
--- a/include/linux/mmc/sdhci.h
+++ b/include/linux/mmc/sdhci.h
@@ -155,7 +155,7 @@ struct sdhci_host {
 
 	int sg_count;		/* Mapped sg entries */
 
-	u8 *adma_desc;		/* ADMA descriptor table */
+	u8 *adma_table;		/* ADMA descriptor table */
 	u8 *align_buffer;	/* Bounce buffer */
 
 	dma_addr_t adma_addr;	/* Mapped ADMA descr. table */
-- 
1.9.1


  parent reply	other threads:[~2014-10-21  9:28 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-21  9:26 [PATCH 00/15] mmc: sdhci: Add 64-bit ADMA support Adrian Hunter
2014-10-21  9:26 ` [PATCH 01/15] mmc: sdhci: Fix incorrect ADMA2 descriptor table size Adrian Hunter
2014-10-21  9:26 ` [PATCH 02/15] mmc: sdhci: Fix ADMA page boundary warnings Adrian Hunter
2014-10-21  9:26 ` [PATCH 03/15] mmc: sdhci: Fix ADMA table size warning Adrian Hunter
2014-10-21  9:26 ` [PATCH 04/15] mmc: sdhci: Rename two ADMA-related functions for consistency Adrian Hunter
2014-10-21  9:26 ` Adrian Hunter [this message]
2014-10-21  9:26 ` [PATCH 06/15] mmc: sdhci: Add sdhci_adma_mark_end() Adrian Hunter
2014-10-21  9:26 ` [PATCH 07/15] mmc: sdhci: Use 'void *' for not 'u8 *' for ADMA data Adrian Hunter
2014-10-21  9:26 ` [PATCH 08/15] mmc: sdhci: Parameterize ADMA sizes and alignment Adrian Hunter
2014-10-21  9:26 ` [PATCH 09/15] mmc: sdhci: Define maximum segments Adrian Hunter
2014-10-21  9:26 ` [PATCH 10/15] mmc: sdhci: Define ADMA constants Adrian Hunter
2014-10-21  9:26 ` [PATCH 11/15] mmc: sdhci: Define ADMA descriptor structure Adrian Hunter
2014-10-21  9:26 ` [PATCH 12/15] mmc: sdhci: Add 64-bit ADMA support Adrian Hunter
2014-10-21  9:26 ` [PATCH 13/15] mmc: sdhci-acpi: Add 64-bit DMA support Adrian Hunter
2014-10-21  9:33   ` Arnd Bergmann
2014-10-21 10:45     ` Adrian Hunter
2014-10-21 11:05       ` Arnd Bergmann
2014-10-28  8:37         ` [PATCH V2] " Adrian Hunter
2014-10-28  9:43           ` Arnd Bergmann
2014-10-28 10:05             ` Adrian Hunter
2014-10-28 10:18               ` Arnd Bergmann
2014-10-28 11:41                 ` Adrian Hunter
2014-10-28 13:54                   ` Arnd Bergmann
2014-10-28 14:14                     ` Adrian Hunter
2014-10-28 15:08                       ` Arnd Bergmann
2014-10-28 15:14                         ` Adrian Hunter
2014-10-28 15:38                           ` Arnd Bergmann
2014-10-29  8:53                             ` Adrian Hunter
2014-10-21  9:26 ` [PATCH 14/15] mmc: sdhci-pci: " Adrian Hunter
2014-10-21  9:26 ` [PATCH 15/15] mmc: mmc_test: Extend "Badly aligned" tests for 8-byte alignment Adrian Hunter
2014-10-30  7:25 ` [PATCH 00/15] mmc: sdhci: Add 64-bit ADMA support Adrian Hunter
2014-10-30  8:05   ` Arnd Bergmann
2014-10-30  8:40     ` Adrian Hunter
2014-10-30 10:00       ` Arnd Bergmann
2014-10-30 10:50         ` Adrian Hunter
2014-10-30 12:15           ` Arnd Bergmann
2014-10-30 12:55             ` Adrian Hunter
2014-11-03  8:28   ` Adrian Hunter
2014-11-03 14:40     ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1413883585-16299-6-git-send-email-adrian.hunter@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=chris@printf.net \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox