diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/musb/Kconfig | 13 | ||||
-rw-r--r-- | drivers/usb/musb/Makefile | 16 | ||||
-rw-r--r-- | drivers/usb/musb/musb_core.c | 17 | ||||
-rw-r--r-- | drivers/usb/musb/musb_debug.h | 4 |
4 files changed, 12 insertions, 38 deletions
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig index faca4333f27a..a0017486ad4e 100644 --- a/drivers/usb/musb/Kconfig +++ b/drivers/usb/musb/Kconfig | |||
@@ -165,12 +165,11 @@ config USB_TUSB_OMAP_DMA | |||
165 | help | 165 | help |
166 | Enable DMA transfers on TUSB 6010 when OMAP DMA is available. | 166 | Enable DMA transfers on TUSB 6010 when OMAP DMA is available. |
167 | 167 | ||
168 | config USB_MUSB_LOGLEVEL | 168 | config USB_MUSB_DEBUG |
169 | depends on USB_MUSB_HDRC | 169 | depends on USB_MUSB_HDRC |
170 | int 'Logging Level (0 - none / 3 - annoying / ... )' | 170 | bool "Enable debugging messages" |
171 | default 0 | 171 | default n |
172 | help | 172 | help |
173 | Set the logging level. 0 disables the debugging altogether, | 173 | This enables musb debugging. To set the logging level use the debug |
174 | although when USB_DEBUG is set the value is at least 1. | 174 | module parameter. Starting at level 3, per-transfer (urb, usb_request, |
175 | Starting at level 3, per-transfer (urb, usb_request, packet, | 175 | packet, or dma transfer) tracing may kick in. |
176 | or dma transfer) tracing may kick in. | ||
diff --git a/drivers/usb/musb/Makefile b/drivers/usb/musb/Makefile index 860369c7cbe1..b6af0d687a73 100644 --- a/drivers/usb/musb/Makefile +++ b/drivers/usb/musb/Makefile | |||
@@ -64,18 +64,6 @@ endif | |||
64 | 64 | ||
65 | # Debugging | 65 | # Debugging |
66 | 66 | ||
67 | MUSB_DEBUG:=$(CONFIG_USB_MUSB_LOGLEVEL) | 67 | ifeq ($(CONFIG_USB_MUSB_DEBUG),y) |
68 | 68 | EXTRA_CFLAGS += -DDEBUG | |
69 | ifeq ("$(strip $(MUSB_DEBUG))","") | ||
70 | ifdef CONFIG_USB_DEBUG | ||
71 | MUSB_DEBUG:=1 | ||
72 | else | ||
73 | MUSB_DEBUG:=0 | ||
74 | endif | ||
75 | endif | 69 | endif |
76 | |||
77 | ifneq ($(MUSB_DEBUG),0) | ||
78 | EXTRA_CFLAGS += -DDEBUG | ||
79 | endif | ||
80 | |||
81 | EXTRA_CFLAGS += -DMUSB_DEBUG=$(MUSB_DEBUG) | ||
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 99690ba436dc..c5b8f0296fcf 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -114,23 +114,14 @@ | |||
114 | 114 | ||
115 | 115 | ||
116 | 116 | ||
117 | #if MUSB_DEBUG > 0 | 117 | unsigned debug; |
118 | unsigned debug = MUSB_DEBUG; | 118 | module_param(debug, uint, S_IRUGO | S_IWUSR); |
119 | module_param(debug, uint, 0); | 119 | MODULE_PARM_DESC(debug, "Debug message level. Default = 0"); |
120 | MODULE_PARM_DESC(debug, "initial debug message level"); | ||
121 | |||
122 | #define MUSB_VERSION_SUFFIX "/dbg" | ||
123 | #endif | ||
124 | 120 | ||
125 | #define DRIVER_AUTHOR "Mentor Graphics, Texas Instruments, Nokia" | 121 | #define DRIVER_AUTHOR "Mentor Graphics, Texas Instruments, Nokia" |
126 | #define DRIVER_DESC "Inventra Dual-Role USB Controller Driver" | 122 | #define DRIVER_DESC "Inventra Dual-Role USB Controller Driver" |
127 | 123 | ||
128 | #define MUSB_VERSION_BASE "6.0" | 124 | #define MUSB_VERSION "6.0" |
129 | |||
130 | #ifndef MUSB_VERSION_SUFFIX | ||
131 | #define MUSB_VERSION_SUFFIX "" | ||
132 | #endif | ||
133 | #define MUSB_VERSION MUSB_VERSION_BASE MUSB_VERSION_SUFFIX | ||
134 | 125 | ||
135 | #define DRIVER_INFO DRIVER_DESC ", v" MUSB_VERSION | 126 | #define DRIVER_INFO DRIVER_DESC ", v" MUSB_VERSION |
136 | 127 | ||
diff --git a/drivers/usb/musb/musb_debug.h b/drivers/usb/musb/musb_debug.h index 3bdb311e820d..4d2794441b15 100644 --- a/drivers/usb/musb/musb_debug.h +++ b/drivers/usb/musb/musb_debug.h | |||
@@ -48,11 +48,7 @@ | |||
48 | __func__, __LINE__ , ## args); \ | 48 | __func__, __LINE__ , ## args); \ |
49 | } } while (0) | 49 | } } while (0) |
50 | 50 | ||
51 | #if MUSB_DEBUG > 0 | ||
52 | extern unsigned debug; | 51 | extern unsigned debug; |
53 | #else | ||
54 | #define debug 0 | ||
55 | #endif | ||
56 | 52 | ||
57 | static inline int _dbg_level(unsigned l) | 53 | static inline int _dbg_level(unsigned l) |
58 | { | 54 | { |