diff options
author | Peter Chen <peter.chen@freescale.com> | 2015-10-22 22:33:58 -0400 |
---|---|---|
committer | Peter Chen <peter.chen@freescale.com> | 2015-12-24 01:15:26 -0500 |
commit | 9d8c850d02b01f3e0157a8f9859fe3f04cab68fe (patch) | |
tree | 8973c4e998ce6d32086e7678c4c0e11517916a77 /drivers/usb/chipidea | |
parent | 779debdf26d4b49598e61e0c28ac97146a2b96fe (diff) |
usb: chipidea: support debugfs without CONFIG_USB_CHIPIDEA_DEBUG
Since we need to mount debugfs to show/store the things we
want to debug, it is duplicated to add another configuration
to enable it. Meanwhile, with CONFIG_USB_CHIPIDEA_DEBUG,
we can't support chipidea debugfs at runtime.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Cc: Jun Li <jun.li@freescale.com>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r-- | drivers/usb/chipidea/Makefile | 3 | ||||
-rw-r--r-- | drivers/usb/chipidea/ci.h | 3 | ||||
-rw-r--r-- | drivers/usb/chipidea/core.c | 1 | ||||
-rw-r--r-- | drivers/usb/chipidea/debug.c | 1 | ||||
-rw-r--r-- | drivers/usb/chipidea/debug.h | 30 | ||||
-rw-r--r-- | drivers/usb/chipidea/udc.c | 1 |
6 files changed, 4 insertions, 35 deletions
diff --git a/drivers/usb/chipidea/Makefile b/drivers/usb/chipidea/Makefile index 4decb12f2578..c437d5f1a0d5 100644 --- a/drivers/usb/chipidea/Makefile +++ b/drivers/usb/chipidea/Makefile | |||
@@ -2,10 +2,9 @@ ccflags-$(CONFIG_USB_CHIPIDEA_DEBUG) := -DDEBUG | |||
2 | 2 | ||
3 | obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc.o | 3 | obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc.o |
4 | 4 | ||
5 | ci_hdrc-y := core.o otg.o | 5 | ci_hdrc-y := core.o otg.o debug.o |
6 | ci_hdrc-$(CONFIG_USB_CHIPIDEA_UDC) += udc.o | 6 | ci_hdrc-$(CONFIG_USB_CHIPIDEA_UDC) += udc.o |
7 | ci_hdrc-$(CONFIG_USB_CHIPIDEA_HOST) += host.o | 7 | ci_hdrc-$(CONFIG_USB_CHIPIDEA_HOST) += host.o |
8 | ci_hdrc-$(CONFIG_USB_CHIPIDEA_DEBUG) += debug.o | ||
9 | ci_hdrc-$(CONFIG_USB_OTG_FSM) += otg_fsm.o | 8 | ci_hdrc-$(CONFIG_USB_OTG_FSM) += otg_fsm.o |
10 | 9 | ||
11 | # Glue/Bridge layers go here | 10 | # Glue/Bridge layers go here |
diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h index 41d7cf6d63ba..cd414559040f 100644 --- a/drivers/usb/chipidea/ci.h +++ b/drivers/usb/chipidea/ci.h | |||
@@ -433,4 +433,7 @@ int hw_wait_reg(struct ci_hdrc *ci, enum ci_hw_regs reg, u32 mask, | |||
433 | 433 | ||
434 | void ci_platform_configure(struct ci_hdrc *ci); | 434 | void ci_platform_configure(struct ci_hdrc *ci); |
435 | 435 | ||
436 | int dbg_create_files(struct ci_hdrc *ci); | ||
437 | |||
438 | void dbg_remove_files(struct ci_hdrc *ci); | ||
436 | #endif /* __DRIVERS_USB_CHIPIDEA_CI_H */ | 439 | #endif /* __DRIVERS_USB_CHIPIDEA_CI_H */ |
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 965d0e240dcb..18e77e02842b 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c | |||
@@ -71,7 +71,6 @@ | |||
71 | #include "udc.h" | 71 | #include "udc.h" |
72 | #include "bits.h" | 72 | #include "bits.h" |
73 | #include "host.h" | 73 | #include "host.h" |
74 | #include "debug.h" | ||
75 | #include "otg.h" | 74 | #include "otg.h" |
76 | #include "otg_fsm.h" | 75 | #include "otg_fsm.h" |
77 | 76 | ||
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c index 58c8485a0715..a4f7db2e18dd 100644 --- a/drivers/usb/chipidea/debug.c +++ b/drivers/usb/chipidea/debug.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include "ci.h" | 15 | #include "ci.h" |
16 | #include "udc.h" | 16 | #include "udc.h" |
17 | #include "bits.h" | 17 | #include "bits.h" |
18 | #include "debug.h" | ||
19 | #include "otg.h" | 18 | #include "otg.h" |
20 | 19 | ||
21 | /** | 20 | /** |
diff --git a/drivers/usb/chipidea/debug.h b/drivers/usb/chipidea/debug.h deleted file mode 100644 index e16478c4a943..000000000000 --- a/drivers/usb/chipidea/debug.h +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | /* | ||
2 | * debug.h - ChipIdea USB driver debug interfaces | ||
3 | * | ||
4 | * Copyright (C) 2008 Chipidea - MIPS Technologies, Inc. All rights reserved. | ||
5 | * | ||
6 | * Author: David Lopo | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __DRIVERS_USB_CHIPIDEA_DEBUG_H | ||
14 | #define __DRIVERS_USB_CHIPIDEA_DEBUG_H | ||
15 | |||
16 | #ifdef CONFIG_USB_CHIPIDEA_DEBUG | ||
17 | int dbg_create_files(struct ci_hdrc *ci); | ||
18 | void dbg_remove_files(struct ci_hdrc *ci); | ||
19 | #else | ||
20 | static inline int dbg_create_files(struct ci_hdrc *ci) | ||
21 | { | ||
22 | return 0; | ||
23 | } | ||
24 | |||
25 | static inline void dbg_remove_files(struct ci_hdrc *ci) | ||
26 | { | ||
27 | } | ||
28 | #endif | ||
29 | |||
30 | #endif /* __DRIVERS_USB_CHIPIDEA_DEBUG_H */ | ||
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index b1e7b716e8c9..3eafa2c9a2ba 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include "ci.h" | 26 | #include "ci.h" |
27 | #include "udc.h" | 27 | #include "udc.h" |
28 | #include "bits.h" | 28 | #include "bits.h" |
29 | #include "debug.h" | ||
30 | #include "otg.h" | 29 | #include "otg.h" |
31 | #include "otg_fsm.h" | 30 | #include "otg_fsm.h" |
32 | 31 | ||