Browse Source

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>
Ludovic Desroches 14 years ago
parent
commit
1ebbe3d31f
2 changed files with 4 additions and 2 deletions
  1. 2 2
      drivers/mmc/host/atmel-mci.c
  2. 2 0
      include/linux/atmel_pdc.h

+ 2 - 2
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));

+ 2 - 0
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