Commit e8164f64 authored by Felipe Balbi's avatar Felipe Balbi Committed by Greg Kroah-Hartman

usb: musb: get rid of MUSB_LOGLEVEL and use parameter

We can change debugging level on the fly via
/sys/module/musb_hdrc/parameters/debug.

We can also get rid of the LOGLEVEL facility in Kconfig
and rely only in module parameter.

Cc: Anand Gadiyar <gadiyar@ti.com>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 746cdd0b
...@@ -165,12 +165,11 @@ config USB_TUSB_OMAP_DMA ...@@ -165,12 +165,11 @@ config USB_TUSB_OMAP_DMA
help help
Enable DMA transfers on TUSB 6010 when OMAP DMA is available. Enable DMA transfers on TUSB 6010 when OMAP DMA is available.
config USB_MUSB_LOGLEVEL config USB_MUSB_DEBUG
depends on USB_MUSB_HDRC depends on USB_MUSB_HDRC
int 'Logging Level (0 - none / 3 - annoying / ... )' bool "Enable debugging messages"
default 0 default n
help help
Set the logging level. 0 disables the debugging altogether, This enables musb debugging. To set the logging level use the debug
although when USB_DEBUG is set the value is at least 1. module parameter. Starting at level 3, per-transfer (urb, usb_request,
Starting at level 3, per-transfer (urb, usb_request, packet, packet, or dma transfer) tracing may kick in.
or dma transfer) tracing may kick in.
...@@ -64,18 +64,6 @@ endif ...@@ -64,18 +64,6 @@ endif
# Debugging # Debugging
MUSB_DEBUG:=$(CONFIG_USB_MUSB_LOGLEVEL) ifeq ($(CONFIG_USB_MUSB_DEBUG),y)
EXTRA_CFLAGS += -DDEBUG
ifeq ("$(strip $(MUSB_DEBUG))","")
ifdef CONFIG_USB_DEBUG
MUSB_DEBUG:=1
else
MUSB_DEBUG:=0
endif
endif endif
ifneq ($(MUSB_DEBUG),0)
EXTRA_CFLAGS += -DDEBUG
endif
EXTRA_CFLAGS += -DMUSB_DEBUG=$(MUSB_DEBUG)
...@@ -114,23 +114,14 @@ ...@@ -114,23 +114,14 @@
#if MUSB_DEBUG > 0 unsigned debug;
unsigned debug = MUSB_DEBUG; module_param(debug, uint, S_IRUGO | S_IWUSR);
module_param(debug, uint, 0); MODULE_PARM_DESC(debug, "Debug message level. Default = 0");
MODULE_PARM_DESC(debug, "initial debug message level");
#define MUSB_VERSION_SUFFIX "/dbg"
#endif
#define DRIVER_AUTHOR "Mentor Graphics, Texas Instruments, Nokia" #define DRIVER_AUTHOR "Mentor Graphics, Texas Instruments, Nokia"
#define DRIVER_DESC "Inventra Dual-Role USB Controller Driver" #define DRIVER_DESC "Inventra Dual-Role USB Controller Driver"
#define MUSB_VERSION_BASE "6.0" #define MUSB_VERSION "6.0"
#ifndef MUSB_VERSION_SUFFIX
#define MUSB_VERSION_SUFFIX ""
#endif
#define MUSB_VERSION MUSB_VERSION_BASE MUSB_VERSION_SUFFIX
#define DRIVER_INFO DRIVER_DESC ", v" MUSB_VERSION #define DRIVER_INFO DRIVER_DESC ", v" MUSB_VERSION
......
...@@ -48,11 +48,7 @@ ...@@ -48,11 +48,7 @@
__func__, __LINE__ , ## args); \ __func__, __LINE__ , ## args); \
} } while (0) } } while (0)
#if MUSB_DEBUG > 0
extern unsigned debug; extern unsigned debug;
#else
#define debug 0
#endif
static inline int _dbg_level(unsigned l) static inline int _dbg_level(unsigned l)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment