aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/at91_mci.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
index 5b00c194b628..647f29473cf9 100644
--- a/drivers/mmc/host/at91_mci.c
+++ b/drivers/mmc/host/at91_mci.c
@@ -131,7 +131,7 @@ struct at91mci_host
131/* 131/*
132 * Copy from sg to a dma block - used for transfers 132 * Copy from sg to a dma block - used for transfers
133 */ 133 */
134static inline void at91mci_sg_to_dma(struct at91mci_host *host, struct mmc_data *data) 134static inline void at91_mci_sg_to_dma(struct at91mci_host *host, struct mmc_data *data)
135{ 135{
136 unsigned int len, i, size; 136 unsigned int len, i, size;
137 unsigned *dmabuf = host->buffer; 137 unsigned *dmabuf = host->buffer;
@@ -180,7 +180,7 @@ static inline void at91mci_sg_to_dma(struct at91mci_host *host, struct mmc_data
180/* 180/*
181 * Prepare a dma read 181 * Prepare a dma read
182 */ 182 */
183static void at91mci_pre_dma_read(struct at91mci_host *host) 183static void at91_mci_pre_dma_read(struct at91mci_host *host)
184{ 184{
185 int i; 185 int i;
186 struct scatterlist *sg; 186 struct scatterlist *sg;
@@ -248,7 +248,7 @@ static void at91mci_pre_dma_read(struct at91mci_host *host)
248/* 248/*
249 * Handle after a dma read 249 * Handle after a dma read
250 */ 250 */
251static void at91mci_post_dma_read(struct at91mci_host *host) 251static void at91_mci_post_dma_read(struct at91mci_host *host)
252{ 252{
253 struct mmc_command *cmd; 253 struct mmc_command *cmd;
254 struct mmc_data *data; 254 struct mmc_data *data;
@@ -299,7 +299,7 @@ static void at91mci_post_dma_read(struct at91mci_host *host)
299 299
300 /* Is there another transfer to trigger? */ 300 /* Is there another transfer to trigger? */
301 if (host->transfer_index < data->sg_len) 301 if (host->transfer_index < data->sg_len)
302 at91mci_pre_dma_read(host); 302 at91_mci_pre_dma_read(host);
303 else { 303 else {
304 at91_mci_write(host, AT91_MCI_IER, AT91_MCI_RXBUFF); 304 at91_mci_write(host, AT91_MCI_IER, AT91_MCI_RXBUFF);
305 at91_mci_write(host, ATMEL_PDC_PTCR, ATMEL_PDC_RXTDIS | ATMEL_PDC_TXTDIS); 305 at91_mci_write(host, ATMEL_PDC_PTCR, ATMEL_PDC_RXTDIS | ATMEL_PDC_TXTDIS);
@@ -464,7 +464,7 @@ static unsigned int at91_mci_send_command(struct at91mci_host *host, struct mmc_
464 host->buffer = NULL; 464 host->buffer = NULL;
465 host->total_length = 0; 465 host->total_length = 0;
466 466
467 at91mci_pre_dma_read(host); 467 at91_mci_pre_dma_read(host);
468 ier = AT91_MCI_ENDRX /* | AT91_MCI_RXBUFF */; 468 ier = AT91_MCI_ENDRX /* | AT91_MCI_RXBUFF */;
469 } 469 }
470 else { 470 else {
@@ -476,7 +476,7 @@ static unsigned int at91_mci_send_command(struct at91mci_host *host, struct mmc_
476 host->total_length, 476 host->total_length,
477 &host->physical_address, GFP_KERNEL); 477 &host->physical_address, GFP_KERNEL);
478 478
479 at91mci_sg_to_dma(host, data); 479 at91_mci_sg_to_dma(host, data);
480 480
481 pr_debug("Transmitting %d bytes\n", host->total_length); 481 pr_debug("Transmitting %d bytes\n", host->total_length);
482 482
@@ -506,7 +506,7 @@ static unsigned int at91_mci_send_command(struct at91mci_host *host, struct mmc_
506/* 506/*
507 * Wait for a command to complete 507 * Wait for a command to complete
508 */ 508 */
509static void at91mci_process_command(struct at91mci_host *host, struct mmc_command *cmd) 509static void at91_mci_process_command(struct at91mci_host *host, struct mmc_command *cmd)
510{ 510{
511 unsigned int ier; 511 unsigned int ier;
512 512
@@ -521,15 +521,15 @@ static void at91mci_process_command(struct at91mci_host *host, struct mmc_comman
521/* 521/*
522 * Process the next step in the request 522 * Process the next step in the request
523 */ 523 */
524static void at91mci_process_next(struct at91mci_host *host) 524static void at91_mci_process_next(struct at91mci_host *host)
525{ 525{
526 if (!(host->flags & FL_SENT_COMMAND)) { 526 if (!(host->flags & FL_SENT_COMMAND)) {
527 host->flags |= FL_SENT_COMMAND; 527 host->flags |= FL_SENT_COMMAND;
528 at91mci_process_command(host, host->request->cmd); 528 at91_mci_process_command(host, host->request->cmd);
529 } 529 }
530 else if ((!(host->flags & FL_SENT_STOP)) && host->request->stop) { 530 else if ((!(host->flags & FL_SENT_STOP)) && host->request->stop) {
531 host->flags |= FL_SENT_STOP; 531 host->flags |= FL_SENT_STOP;
532 at91mci_process_command(host, host->request->stop); 532 at91_mci_process_command(host, host->request->stop);
533 } 533 }
534 else 534 else
535 mmc_request_done(host->mmc, host->request); 535 mmc_request_done(host->mmc, host->request);
@@ -538,7 +538,7 @@ static void at91mci_process_next(struct at91mci_host *host)
538/* 538/*
539 * Handle a command that has been completed 539 * Handle a command that has been completed
540 */ 540 */
541static void at91mci_completed_command(struct at91mci_host *host) 541static void at91_mci_completed_command(struct at91mci_host *host)
542{ 542{
543 struct mmc_command *cmd = host->cmd; 543 struct mmc_command *cmd = host->cmd;
544 unsigned int status; 544 unsigned int status;
@@ -583,7 +583,7 @@ static void at91mci_completed_command(struct at91mci_host *host)
583 else 583 else
584 cmd->error = MMC_ERR_NONE; 584 cmd->error = MMC_ERR_NONE;
585 585
586 at91mci_process_next(host); 586 at91_mci_process_next(host);
587} 587}
588 588
589/* 589/*
@@ -595,7 +595,7 @@ static void at91_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
595 host->request = mrq; 595 host->request = mrq;
596 host->flags = 0; 596 host->flags = 0;
597 597
598 at91mci_process_next(host); 598 at91_mci_process_next(host);
599} 599}
600 600
601/* 601/*
@@ -708,7 +708,7 @@ static irqreturn_t at91_mci_irq(int irq, void *devid)
708 708
709 if (int_status & AT91_MCI_ENDRX) { 709 if (int_status & AT91_MCI_ENDRX) {
710 pr_debug("Receive has ended\n"); 710 pr_debug("Receive has ended\n");
711 at91mci_post_dma_read(host); 711 at91_mci_post_dma_read(host);
712 } 712 }
713 713
714 if (int_status & AT91_MCI_NOTBUSY) { 714 if (int_status & AT91_MCI_NOTBUSY) {
@@ -737,7 +737,7 @@ static irqreturn_t at91_mci_irq(int irq, void *devid)
737 if (completed) { 737 if (completed) {
738 pr_debug("Completed command\n"); 738 pr_debug("Completed command\n");
739 at91_mci_write(host, AT91_MCI_IDR, 0xffffffff); 739 at91_mci_write(host, AT91_MCI_IDR, 0xffffffff);
740 at91mci_completed_command(host); 740 at91_mci_completed_command(host);
741 } else 741 } else
742 at91_mci_write(host, AT91_MCI_IDR, int_status); 742 at91_mci_write(host, AT91_MCI_IDR, int_status);
743 743