* [PATCH] 3/7 AU1100 MMC support
@ 2006-08-09 21:09 Rodolfo Giometti
2006-08-10 13:17 ` Sergei Shtylyov
0 siblings, 1 reply; 3+ messages in thread
From: Rodolfo Giometti @ 2006-08-09 21:09 UTC (permalink / raw)
To: linux-mips
[-- Attachment #1: Type: text/plain, Size: 340 bytes --]
Kernel messages fixup.
Signed-off-by: Rodolfo Giometti <giometti@linux.it>
--
GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@gnudd.com
Embedded Systems giometti@linux.it
UNIX programming phone: +39 349 2432127
[-- Attachment #2: patch-mmc-kmsg-fix --]
[-- Type: text/plain, Size: 2873 bytes --]
diff --git a/drivers/mmc/au1xmmc.c b/drivers/mmc/au1xmmc.c
index 6084bb8..560d6e3 100644
--- a/drivers/mmc/au1xmmc.c
+++ b/drivers/mmc/au1xmmc.c
@@ -54,13 +54,16 @@ #include "au1xmmc.h"
#define DRIVER_NAME "au1xxx-mmc"
-/* Set this to enable special debugging macros */
-
-#ifdef DEBUG
-#define DBG(fmt, idx, args...) printk("au1xx(%d): DEBUG: " fmt, idx, ##args)
+#ifdef CONFIG_MMC_DEBUG
+#define dbg(fmt, idx, args...) printk(KERN_DEBUG "%s(%d): DEBUG: " \
+ fmt, DRIVER_NAME, idx, ##args)
#else
-#define DBG(fmt, idx, args...)
+#define dbg(fmt, idx, args...)
#endif
+#define err(fmt, idx, args...) printk(KERN_DEBUG "%s(%d): ERROR: " \
+ fmt, DRIVER_NAME, idx, ##args)
+#define info(fmt, idx, args...) printk(KERN_INFO "%s(%d): " \
+ fmt, DRIVER_NAME, idx, ##args)
const struct {
u32 iobase;
@@ -445,18 +448,18 @@ static void au1xmmc_receive_pio(struct a
break;
if (status & SD_STATUS_RC) {
- DBG("RX CRC Error [%d + %d].\n", host->id,
+ dbg("RX CRC Error [%d + %d].\n", host->id,
host->pio.len, count);
break;
}
if (status & SD_STATUS_RO) {
- DBG("RX Overrun [%d + %d]\n", host->id,
+ dbg("RX Overrun [%d + %d]\n", host->id,
host->pio.len, count);
break;
}
else if (status & SD_STATUS_RU) {
- DBG("RX Underrun [%d + %d]\n", host->id,
+ dbg("RX Underrun [%d + %d]\n", host->id,
host->pio.len, count);
break;
}
@@ -829,7 +832,7 @@ #endif
au1xmmc_receive_pio(host);
}
else if (status & 0x203FBC70) {
- DBG("Unhandled status %8.8x\n", host->id, status);
+ dbg("Unhandled status %8.8x\n", host->id, status);
handled = 0;
}
@@ -856,10 +859,8 @@ static void au1xmmc_poll_event(unsigned
mmc_detect_change(host->mmc, 0);
}
- if (host->mrq != NULL) {
- u32 status = au_readl(HOST_STATUS(host));
- DBG("PENDING - %8.8x\n", host->id, status);
- }
+ if (host->mrq != NULL)
+ dbg("PENDING - %8.8x\n", host->id, au_readl(HOST_STATUS(host)));
mod_timer(&host->timer, jiffies + AU1XMMC_DETECT_TIMEOUT);
}
@@ -914,7 +915,7 @@ static int __devinit au1xmmc_probe(struc
ret = request_irq(AU1100_SD_IRQ, au1xmmc_irq, IRQF_DISABLED, "MMC", 0);
if (ret) {
- printk(DRIVER_NAME "ERROR: Couldn't get int %d: %d\n",
+ err("ERROR: Couldn't get int %d: %d\n",
AU1100_SD_IRQ, ret);
return -ENXIO;
}
@@ -926,7 +927,7 @@ static int __devinit au1xmmc_probe(struc
struct au1xmmc_host *host = 0;
if (!mmc) {
- printk(DRIVER_NAME "ERROR: no mem for host %d\n", i);
+ err("ERROR: no mem for host %d\n", i);
au1xmmc_hosts[i] = 0;
continue;
}
@@ -976,7 +977,7 @@ static int __devinit au1xmmc_probe(struc
add_timer(&host->timer);
- printk(KERN_INFO DRIVER_NAME ": MMC Controller %d set up at %8.8X (mode=%s)\n",
+ info("MMC Controller %d set up at %x (mode=%s)\n",
host->id, host->iobase, dma ? "dma" : "pio");
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] 3/7 AU1100 MMC support
2006-08-09 21:09 [PATCH] 3/7 AU1100 MMC support Rodolfo Giometti
@ 2006-08-10 13:17 ` Sergei Shtylyov
2006-08-10 13:31 ` Rodolfo Giometti
0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2006-08-10 13:17 UTC (permalink / raw)
To: Rodolfo Giometti; +Cc: linux-mips
Hello.
Rodolfo Giometti wrote:
> Kernel messages fixup.
I guess the MMC patches should go to the appropriate maintainer, Russel
King <rmk+mmc@arm.linux.org.uk>.
> Signed-off-by: Rodolfo Giometti <giometti@linux.it>
> ------------------------------------------------------------------------
>
> diff --git a/drivers/mmc/au1xmmc.c b/drivers/mmc/au1xmmc.c
> index 6084bb8..560d6e3 100644
> --- a/drivers/mmc/au1xmmc.c
> +++ b/drivers/mmc/au1xmmc.c
> @@ -54,13 +54,16 @@ #include "au1xmmc.h"
>
> #define DRIVER_NAME "au1xxx-mmc"
>
> -/* Set this to enable special debugging macros */
> -
> -#ifdef DEBUG
> -#define DBG(fmt, idx, args...) printk("au1xx(%d): DEBUG: " fmt, idx, ##args)
> +#ifdef CONFIG_MMC_DEBUG
> +#define dbg(fmt, idx, args...) printk(KERN_DEBUG "%s(%d): DEBUG: " \
> + fmt, DRIVER_NAME, idx, ##args)
Could also use pr_debug() here. If DEBUG is #defined, it'll print what you
need, if not then no.
> #else
> -#define DBG(fmt, idx, args...)
> +#define dbg(fmt, idx, args...)
> #endif
> +#define err(fmt, idx, args...) printk(KERN_DEBUG "%s(%d): ERROR: " \
> + fmt, DRIVER_NAME, idx, ##args)
Are you sure KERN_DEBUG fits best for error messages, not KERN_ERR?
> +#define info(fmt, idx, args...) printk(KERN_INFO "%s(%d): " \
> + fmt, DRIVER_NAME, idx, ##args)
Could use pr_info() there...
WBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] 3/7 AU1100 MMC support
2006-08-10 13:17 ` Sergei Shtylyov
@ 2006-08-10 13:31 ` Rodolfo Giometti
0 siblings, 0 replies; 3+ messages in thread
From: Rodolfo Giometti @ 2006-08-10 13:31 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linux-mips
[-- Attachment #1: Type: text/plain, Size: 805 bytes --]
On Thu, Aug 10, 2006 at 05:17:47PM +0400, Sergei Shtylyov wrote:
>
> I guess the MMC patches should go to the appropriate maintainer, Russel
> King <rmk+mmc@arm.linux.org.uk>.
Ok, I'll send them to him too.
> Could also use pr_debug() here. If DEBUG is #defined, it'll print what
> you need, if not then no.
I see, but I'd prefere connect these messages with CONFIG_MMC_DEBUG...
> Are you sure KERN_DEBUG fits best for error messages, not KERN_ERR?
Yes. You are right. Fixed. :)
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@gnudd.com
Embedded Systems giometti@linux.it
UNIX programming phone: +39 349 2432127
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-08-10 13:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-09 21:09 [PATCH] 3/7 AU1100 MMC support Rodolfo Giometti
2006-08-10 13:17 ` Sergei Shtylyov
2006-08-10 13:31 ` Rodolfo Giometti
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.