aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/omap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/omap.c')
-rw-r--r--drivers/mmc/host/omap.c37
1 files changed, 17 insertions, 20 deletions
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index c6259a829544..48ad361613ef 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -27,16 +27,10 @@
27#include <linux/mmc/card.h> 27#include <linux/mmc/card.h>
28#include <linux/clk.h> 28#include <linux/clk.h>
29#include <linux/scatterlist.h> 29#include <linux/scatterlist.h>
30#include <linux/i2c/tps65010.h>
31#include <linux/slab.h> 30#include <linux/slab.h>
32 31
33#include <asm/io.h>
34#include <asm/irq.h>
35
36#include <plat/mmc.h> 32#include <plat/mmc.h>
37#include <asm/gpio.h>
38#include <plat/dma.h> 33#include <plat/dma.h>
39#include <plat/fpga.h>
40 34
41#define OMAP_MMC_REG_CMD 0x00 35#define OMAP_MMC_REG_CMD 0x00
42#define OMAP_MMC_REG_ARGL 0x01 36#define OMAP_MMC_REG_ARGL 0x01
@@ -105,7 +99,6 @@ struct mmc_omap_slot {
105 u16 saved_con; 99 u16 saved_con;
106 u16 bus_mode; 100 u16 bus_mode;
107 unsigned int fclk_freq; 101 unsigned int fclk_freq;
108 unsigned powered:1;
109 102
110 struct tasklet_struct cover_tasklet; 103 struct tasklet_struct cover_tasklet;
111 struct timer_list cover_timer; 104 struct timer_list cover_timer;
@@ -137,7 +130,6 @@ struct mmc_omap_host {
137 unsigned int phys_base; 130 unsigned int phys_base;
138 int irq; 131 int irq;
139 unsigned char bus_mode; 132 unsigned char bus_mode;
140 unsigned char hw_bus_mode;
141 unsigned int reg_shift; 133 unsigned int reg_shift;
142 134
143 struct work_struct cmd_abort_work; 135 struct work_struct cmd_abort_work;
@@ -695,22 +687,29 @@ mmc_omap_xfer_data(struct mmc_omap_host *host, int write)
695 host->buffer += nwords; 687 host->buffer += nwords;
696} 688}
697 689
698static inline void mmc_omap_report_irq(u16 status) 690#ifdef CONFIG_MMC_DEBUG
691static void mmc_omap_report_irq(struct mmc_omap_host *host, u16 status)
699{ 692{
700 static const char *mmc_omap_status_bits[] = { 693 static const char *mmc_omap_status_bits[] = {
701 "EOC", "CD", "CB", "BRS", "EOFB", "DTO", "DCRC", "CTO", 694 "EOC", "CD", "CB", "BRS", "EOFB", "DTO", "DCRC", "CTO",
702 "CCRC", "CRW", "AF", "AE", "OCRB", "CIRQ", "CERR" 695 "CCRC", "CRW", "AF", "AE", "OCRB", "CIRQ", "CERR"
703 }; 696 };
704 int i, c = 0; 697 int i;
698 char res[64], *buf = res;
699
700 buf += sprintf(buf, "MMC IRQ 0x%x:", status);
705 701
706 for (i = 0; i < ARRAY_SIZE(mmc_omap_status_bits); i++) 702 for (i = 0; i < ARRAY_SIZE(mmc_omap_status_bits); i++)
707 if (status & (1 << i)) { 703 if (status & (1 << i))
708 if (c) 704 buf += sprintf(buf, " %s", mmc_omap_status_bits[i]);
709 printk(" "); 705 dev_vdbg(mmc_dev(host->mmc), "%s\n", res);
710 printk("%s", mmc_omap_status_bits[i]);
711 c++;
712 }
713} 706}
707#else
708static void mmc_omap_report_irq(struct mmc_omap_host *host, u16 status)
709{
710}
711#endif
712
714 713
715static irqreturn_t mmc_omap_irq(int irq, void *dev_id) 714static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
716{ 715{
@@ -744,12 +743,10 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
744 cmd = host->cmd->opcode; 743 cmd = host->cmd->opcode;
745 else 744 else
746 cmd = -1; 745 cmd = -1;
747#ifdef CONFIG_MMC_DEBUG
748 dev_dbg(mmc_dev(host->mmc), "MMC IRQ %04x (CMD %d): ", 746 dev_dbg(mmc_dev(host->mmc), "MMC IRQ %04x (CMD %d): ",
749 status, cmd); 747 status, cmd);
750 mmc_omap_report_irq(status); 748 mmc_omap_report_irq(host, status);
751 printk("\n"); 749
752#endif
753 if (host->total_bytes_left) { 750 if (host->total_bytes_left) {
754 if ((status & OMAP_MMC_STAT_A_FULL) || 751 if ((status & OMAP_MMC_STAT_A_FULL) ||
755 (status & OMAP_MMC_STAT_END_OF_DATA)) 752 (status & OMAP_MMC_STAT_END_OF_DATA))