aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenkatraman S <svenkatr@ti.com>2012-08-07 09:33:01 -0400
committerChris Ball <cjb@laptop.org>2012-09-04 13:58:22 -0400
commit75d569d343bdb759105477ea9876cbd62e43d103 (patch)
tree338bac4ce6771b7ed5654e009744cac7ff14a87c
parent2976837c6ea8c852389b99e6e1a6f91ccd21fba1 (diff)
mmc: omap: fix mmc_omap_report_irq to use dev_dbg macros
The function mmc_omap_report_irq uses raw printks and the actual output was disabled by a static variable. Make the function use dev_vdbg macro and use it under the standard CONFIG_MMC_DEBUG flag. Signed-off-by: Venkatraman S <svenkatr@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r--drivers/mmc/host/omap.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 921cf3af8efe..48ad361613ef 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -687,22 +687,29 @@ mmc_omap_xfer_data(struct mmc_omap_host *host, int write)
687 host->buffer += nwords; 687 host->buffer += nwords;
688} 688}
689 689
690static 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)
691{ 692{
692 static const char *mmc_omap_status_bits[] = { 693 static const char *mmc_omap_status_bits[] = {
693 "EOC", "CD", "CB", "BRS", "EOFB", "DTO", "DCRC", "CTO", 694 "EOC", "CD", "CB", "BRS", "EOFB", "DTO", "DCRC", "CTO",
694 "CCRC", "CRW", "AF", "AE", "OCRB", "CIRQ", "CERR" 695 "CCRC", "CRW", "AF", "AE", "OCRB", "CIRQ", "CERR"
695 }; 696 };
696 int i, c = 0; 697 int i;
698 char res[64], *buf = res;
699
700 buf += sprintf(buf, "MMC IRQ 0x%x:", status);
697 701
698 for (i = 0; i < ARRAY_SIZE(mmc_omap_status_bits); i++) 702 for (i = 0; i < ARRAY_SIZE(mmc_omap_status_bits); i++)
699 if (status & (1 << i)) { 703 if (status & (1 << i))
700 if (c) 704 buf += sprintf(buf, " %s", mmc_omap_status_bits[i]);
701 printk(" "); 705 dev_vdbg(mmc_dev(host->mmc), "%s\n", res);
702 printk("%s", mmc_omap_status_bits[i]); 706}
703 c++; 707#else
704 } 708static void mmc_omap_report_irq(struct mmc_omap_host *host, u16 status)
709{
705} 710}
711#endif
712
706 713
707static irqreturn_t mmc_omap_irq(int irq, void *dev_id) 714static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
708{ 715{
@@ -736,12 +743,10 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
736 cmd = host->cmd->opcode; 743 cmd = host->cmd->opcode;
737 else 744 else
738 cmd = -1; 745 cmd = -1;
739#ifdef CONFIG_MMC_DEBUG
740 dev_dbg(mmc_dev(host->mmc), "MMC IRQ %04x (CMD %d): ", 746 dev_dbg(mmc_dev(host->mmc), "MMC IRQ %04x (CMD %d): ",
741 status, cmd); 747 status, cmd);
742 mmc_omap_report_irq(status); 748 mmc_omap_report_irq(host, status);
743 printk("\n"); 749
744#endif
745 if (host->total_bytes_left) { 750 if (host->total_bytes_left) {
746 if ((status & OMAP_MMC_STAT_A_FULL) || 751 if ((status & OMAP_MMC_STAT_A_FULL) ||
747 (status & OMAP_MMC_STAT_END_OF_DATA)) 752 (status & OMAP_MMC_STAT_END_OF_DATA))