mmc: atmel-mci: use ATMEL_PDC_SCND_BUF_OFF instead of a literal value
authorLudovic Desroches <ludovic.desroches@atmel.com>
Thu, 11 Aug 2011 15:25:46 +0000 (15:25 +0000)
committerChris Ball <cjb@laptop.org>
Wed, 26 Oct 2011 19:43:26 +0000 (15:43 -0400)
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>
drivers/mmc/host/atmel-mci.c
include/linux/atmel_pdc.h

index caae967..c0a0659 100644 (file)
@@ -603,8 +603,8 @@ static void atmci_pdc_set_single_buf(struct atmel_mci *host,
        }
 
        if (buf_nb == PDC_SECOND_BUF) {
        }
 
        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));
        }
 
        atmci_writel(host, pointer_reg, sg_dma_address(host->sg));
index 5058a31..63499ce 100644 (file)
@@ -33,4 +33,6 @@
 
 #define ATMEL_PDC_PTSR         0x124   /* Transfer Status Register */
 
 
 #define ATMEL_PDC_PTSR         0x124   /* Transfer Status Register */
 
+#define ATMEL_PDC_SCND_BUF_OFF 0x10    /* Offset between first and second buffer registers */
+
 #endif
 #endif