summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Desroches <ludovic.desroches@atmel.com>2011-08-11 19:25:46 +0400
committerChris Ball <cjb@laptop.org>2011-10-26 23:43:26 +0400
commit1ebbe3d31fd96865b4d4874f3c74fef0e386fb79 (patch)
tree78759bbced46adc4dc5bc3302b8a2be6aa2dcd2a
parent11d1488b01b803254842b756ff7662085b37970e (diff)
downloadlinux-1ebbe3d31fd96865b4d4874f3c74fef0e386fb79.tar.xz
mmc: atmel-mci: use ATMEL_PDC_SCND_BUF_OFF instead of a literal value
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r--drivers/mmc/host/atmel-mci.c4
-rw-r--r--include/linux/atmel_pdc.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index caae967dcafe..c0a0659261aa 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -603,8 +603,8 @@ static void atmci_pdc_set_single_buf(struct atmel_mci *host,
}
if (buf_nb == PDC_SECOND_BUF) {
- pointer_reg += 0x10;
- counter_reg += 0x10;
+ pointer_reg += ATMEL_PDC_SCND_BUF_OFF;
+ counter_reg += ATMEL_PDC_SCND_BUF_OFF;
}
atmci_writel(host, pointer_reg, sg_dma_address(host->sg));
diff --git a/include/linux/atmel_pdc.h b/include/linux/atmel_pdc.h
index 5058a31d2ce8..63499ce806ea 100644
--- a/include/linux/atmel_pdc.h
+++ b/include/linux/atmel_pdc.h
@@ -33,4 +33,6 @@
#define ATMEL_PDC_PTSR 0x124 /* Transfer Status Register */
+#define ATMEL_PDC_SCND_BUF_OFF 0x10 /* Offset between first and second buffer registers */
+
#endif