3/7 AU1100 MMC support
Subsystems (2)
PATCH 1/1 3/7 AU1100 MMC support
Kernel messages fixup.
Signature · 4 lines
GNU/Linux Solutions e-mail: [email protected] Linux Device Driver [email protected] Embedded Systems [email protected] UNIX programming phone: +39 349 2432127
drivers/mmc/au1xmmc.c +17 -16
@@ -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 abreak ;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 @@ #endifau1xmmc_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(unsignedmmc_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(strucstruct 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(strucadd_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" ); }
Hello.
Quoted 1 line · Rodolfo Giometti
Kernel messages fixup.
I guess the MMC patches should go to the appropriate maintainer, Russel
King <[email protected]>.
Quoted 9 lines
Signed-off-by Rodolfo Giometti <[email protected]>------------------------------------------------------------------------
drivers/mmc/au1xmmc.c +0
-0
drivers/mmc/au1xmmc.c #include "au1xmmc.h" · line 59
Quoted 10 lines
drivers/mmc/au1xmmc.c +3
-4@@ -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.
drivers/mmc/au1xmmc.c #include "au1xmmc.h" · line 64
Quoted 6 lines
drivers/mmc/au1xmmc.c +3
-1#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?
drivers/mmc/au1xmmc.c #include "au1xmmc.h" · line 66
Quoted 2 lines
drivers/mmc/au1xmmc.c +2
-0+#define info(fmt, idx, args...) printk(KERN_INFO "%s(%d): " \ + fmt, DRIVER_NAME, idx, ##args)
Could use pr_info() there...
WBR, Sergei
Quoted 3 lines · Sergei Shtylyov
I guess the MMC patches should go to the appropriate maintainer, Russel
King <[email protected]>.
Ok, I'll send them to him too.
Quoted 2 lines
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...
Quoted 1 line
Are you sure
KERN_DEBUGfits best for error messages, notKERN_ERR?
Yes. You are right. Fixed. :)
Ciao,
Rodolfo
Signature · 4 lines
GNU/Linux Solutions e-mail: [email protected] Linux Device Driver [email protected] Embedded Systems [email protected] UNIX programming phone: +39 349 2432127