diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/at91_mci.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/mmc/at91_mci.c b/drivers/mmc/at91_mci.c index 2ce50f38e3c7..459f4b4feded 100644 --- a/drivers/mmc/at91_mci.c +++ b/drivers/mmc/at91_mci.c | |||
@@ -64,6 +64,7 @@ | |||
64 | #include <linux/err.h> | 64 | #include <linux/err.h> |
65 | #include <linux/dma-mapping.h> | 65 | #include <linux/dma-mapping.h> |
66 | #include <linux/clk.h> | 66 | #include <linux/clk.h> |
67 | #include <linux/atmel_pdc.h> | ||
67 | 68 | ||
68 | #include <linux/mmc/host.h> | 69 | #include <linux/mmc/host.h> |
69 | #include <linux/mmc/protocol.h> | 70 | #include <linux/mmc/protocol.h> |
@@ -75,7 +76,6 @@ | |||
75 | #include <asm/arch/cpu.h> | 76 | #include <asm/arch/cpu.h> |
76 | #include <asm/arch/gpio.h> | 77 | #include <asm/arch/gpio.h> |
77 | #include <asm/arch/at91_mci.h> | 78 | #include <asm/arch/at91_mci.h> |
78 | #include <asm/arch/at91_pdc.h> | ||
79 | 79 | ||
80 | #define DRIVER_NAME "at91_mci" | 80 | #define DRIVER_NAME "at91_mci" |
81 | 81 | ||
@@ -211,13 +211,13 @@ static void at91mci_pre_dma_read(struct at91mci_host *host) | |||
211 | 211 | ||
212 | /* Check to see if this needs filling */ | 212 | /* Check to see if this needs filling */ |
213 | if (i == 0) { | 213 | if (i == 0) { |
214 | if (at91_mci_read(host, AT91_PDC_RCR) != 0) { | 214 | if (at91_mci_read(host, ATMEL_PDC_RCR) != 0) { |
215 | pr_debug("Transfer active in current\n"); | 215 | pr_debug("Transfer active in current\n"); |
216 | continue; | 216 | continue; |
217 | } | 217 | } |
218 | } | 218 | } |
219 | else { | 219 | else { |
220 | if (at91_mci_read(host, AT91_PDC_RNCR) != 0) { | 220 | if (at91_mci_read(host, ATMEL_PDC_RNCR) != 0) { |
221 | pr_debug("Transfer active in next\n"); | 221 | pr_debug("Transfer active in next\n"); |
222 | continue; | 222 | continue; |
223 | } | 223 | } |
@@ -234,12 +234,12 @@ static void at91mci_pre_dma_read(struct at91mci_host *host) | |||
234 | pr_debug("dma address = %08X, length = %d\n", sg->dma_address, sg->length); | 234 | pr_debug("dma address = %08X, length = %d\n", sg->dma_address, sg->length); |
235 | 235 | ||
236 | if (i == 0) { | 236 | if (i == 0) { |
237 | at91_mci_write(host, AT91_PDC_RPR, sg->dma_address); | 237 | at91_mci_write(host, ATMEL_PDC_RPR, sg->dma_address); |
238 | at91_mci_write(host, AT91_PDC_RCR, sg->length / 4); | 238 | at91_mci_write(host, ATMEL_PDC_RCR, sg->length / 4); |
239 | } | 239 | } |
240 | else { | 240 | else { |
241 | at91_mci_write(host, AT91_PDC_RNPR, sg->dma_address); | 241 | at91_mci_write(host, ATMEL_PDC_RNPR, sg->dma_address); |
242 | at91_mci_write(host, AT91_PDC_RNCR, sg->length / 4); | 242 | at91_mci_write(host, ATMEL_PDC_RNCR, sg->length / 4); |
243 | } | 243 | } |
244 | } | 244 | } |
245 | 245 | ||
@@ -303,7 +303,7 @@ static void at91mci_post_dma_read(struct at91mci_host *host) | |||
303 | at91mci_pre_dma_read(host); | 303 | at91mci_pre_dma_read(host); |
304 | else { | 304 | else { |
305 | at91_mci_write(host, AT91_MCI_IER, AT91_MCI_RXBUFF); | 305 | at91_mci_write(host, AT91_MCI_IER, AT91_MCI_RXBUFF); |
306 | at91_mci_write(host, AT91_PDC_PTCR, AT91_PDC_RXTDIS | AT91_PDC_TXTDIS); | 306 | at91_mci_write(host, ATMEL_PDC_PTCR, ATMEL_PDC_RXTDIS | ATMEL_PDC_TXTDIS); |
307 | } | 307 | } |
308 | 308 | ||
309 | pr_debug("post dma read done\n"); | 309 | pr_debug("post dma read done\n"); |
@@ -320,7 +320,7 @@ static void at91_mci_handle_transmitted(struct at91mci_host *host) | |||
320 | pr_debug("Handling the transmit\n"); | 320 | pr_debug("Handling the transmit\n"); |
321 | 321 | ||
322 | /* Disable the transfer */ | 322 | /* Disable the transfer */ |
323 | at91_mci_write(host, AT91_PDC_PTCR, AT91_PDC_RXTDIS | AT91_PDC_TXTDIS); | 323 | at91_mci_write(host, ATMEL_PDC_PTCR, ATMEL_PDC_RXTDIS | ATMEL_PDC_TXTDIS); |
324 | 324 | ||
325 | /* Now wait for cmd ready */ | 325 | /* Now wait for cmd ready */ |
326 | at91_mci_write(host, AT91_MCI_IDR, AT91_MCI_TXBUFE); | 326 | at91_mci_write(host, AT91_MCI_IDR, AT91_MCI_TXBUFE); |
@@ -431,15 +431,15 @@ static unsigned int at91_mci_send_command(struct at91mci_host *host, struct mmc_ | |||
431 | cmd->opcode, cmdr, cmd->arg, blocks, block_length, at91_mci_read(host, AT91_MCI_MR)); | 431 | cmd->opcode, cmdr, cmd->arg, blocks, block_length, at91_mci_read(host, AT91_MCI_MR)); |
432 | 432 | ||
433 | if (!data) { | 433 | if (!data) { |
434 | at91_mci_write(host, AT91_PDC_PTCR, AT91_PDC_TXTDIS | AT91_PDC_RXTDIS); | 434 | at91_mci_write(host, ATMEL_PDC_PTCR, ATMEL_PDC_TXTDIS | ATMEL_PDC_RXTDIS); |
435 | at91_mci_write(host, AT91_PDC_RPR, 0); | 435 | at91_mci_write(host, ATMEL_PDC_RPR, 0); |
436 | at91_mci_write(host, AT91_PDC_RCR, 0); | 436 | at91_mci_write(host, ATMEL_PDC_RCR, 0); |
437 | at91_mci_write(host, AT91_PDC_RNPR, 0); | 437 | at91_mci_write(host, ATMEL_PDC_RNPR, 0); |
438 | at91_mci_write(host, AT91_PDC_RNCR, 0); | 438 | at91_mci_write(host, ATMEL_PDC_RNCR, 0); |
439 | at91_mci_write(host, AT91_PDC_TPR, 0); | 439 | at91_mci_write(host, ATMEL_PDC_TPR, 0); |
440 | at91_mci_write(host, AT91_PDC_TCR, 0); | 440 | at91_mci_write(host, ATMEL_PDC_TCR, 0); |
441 | at91_mci_write(host, AT91_PDC_TNPR, 0); | 441 | at91_mci_write(host, ATMEL_PDC_TNPR, 0); |
442 | at91_mci_write(host, AT91_PDC_TNCR, 0); | 442 | at91_mci_write(host, ATMEL_PDC_TNCR, 0); |
443 | 443 | ||
444 | at91_mci_write(host, AT91_MCI_ARGR, cmd->arg); | 444 | at91_mci_write(host, AT91_MCI_ARGR, cmd->arg); |
445 | at91_mci_write(host, AT91_MCI_CMDR, cmdr); | 445 | at91_mci_write(host, AT91_MCI_CMDR, cmdr); |
@@ -452,7 +452,7 @@ static unsigned int at91_mci_send_command(struct at91mci_host *host, struct mmc_ | |||
452 | /* | 452 | /* |
453 | * Disable the PDC controller | 453 | * Disable the PDC controller |
454 | */ | 454 | */ |
455 | at91_mci_write(host, AT91_PDC_PTCR, AT91_PDC_RXTDIS | AT91_PDC_TXTDIS); | 455 | at91_mci_write(host, ATMEL_PDC_PTCR, ATMEL_PDC_RXTDIS | ATMEL_PDC_TXTDIS); |
456 | 456 | ||
457 | if (cmdr & AT91_MCI_TRCMD_START) { | 457 | if (cmdr & AT91_MCI_TRCMD_START) { |
458 | data->bytes_xfered = 0; | 458 | data->bytes_xfered = 0; |
@@ -481,8 +481,8 @@ static unsigned int at91_mci_send_command(struct at91mci_host *host, struct mmc_ | |||
481 | 481 | ||
482 | pr_debug("Transmitting %d bytes\n", host->total_length); | 482 | pr_debug("Transmitting %d bytes\n", host->total_length); |
483 | 483 | ||
484 | at91_mci_write(host, AT91_PDC_TPR, host->physical_address); | 484 | at91_mci_write(host, ATMEL_PDC_TPR, host->physical_address); |
485 | at91_mci_write(host, AT91_PDC_TCR, host->total_length / 4); | 485 | at91_mci_write(host, ATMEL_PDC_TCR, host->total_length / 4); |
486 | ier = AT91_MCI_TXBUFE; | 486 | ier = AT91_MCI_TXBUFE; |
487 | } | 487 | } |
488 | } | 488 | } |
@@ -497,9 +497,9 @@ static unsigned int at91_mci_send_command(struct at91mci_host *host, struct mmc_ | |||
497 | 497 | ||
498 | if (cmdr & AT91_MCI_TRCMD_START) { | 498 | if (cmdr & AT91_MCI_TRCMD_START) { |
499 | if (cmdr & AT91_MCI_TRDIR) | 499 | if (cmdr & AT91_MCI_TRDIR) |
500 | at91_mci_write(host, AT91_PDC_PTCR, AT91_PDC_RXTEN); | 500 | at91_mci_write(host, ATMEL_PDC_PTCR, ATMEL_PDC_RXTEN); |
501 | else | 501 | else |
502 | at91_mci_write(host, AT91_PDC_PTCR, AT91_PDC_TXTEN); | 502 | at91_mci_write(host, ATMEL_PDC_PTCR, ATMEL_PDC_TXTEN); |
503 | } | 503 | } |
504 | return ier; | 504 | return ier; |
505 | } | 505 | } |