Skip to content

Commit 1ebbe3d

Browse files
ldesrochescjb
authored andcommitted
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>
1 parent 11d1488 commit 1ebbe3d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎drivers/mmc/host/atmel-mci.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,8 +603,8 @@ static void atmci_pdc_set_single_buf(struct atmel_mci *host,
603603
}
604604

605605
if (buf_nb == PDC_SECOND_BUF) {
606-
pointer_reg += 0x10;
607-
counter_reg += 0x10;
606+
pointer_reg += ATMEL_PDC_SCND_BUF_OFF;
607+
counter_reg += ATMEL_PDC_SCND_BUF_OFF;
608608
}
609609

610610
atmci_writel(host, pointer_reg, sg_dma_address(host->sg));

‎include/linux/atmel_pdc.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@
3333

3434
#define ATMEL_PDC_PTSR 0x124 /* Transfer Status Register */
3535

36+
#define ATMEL_PDC_SCND_BUF_OFF 0x10 /* Offset between first and second buffer registers */
37+
3638
#endif

0 commit comments

Comments
 (0)