summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpannan <pannan@allwinnertech.com>2012-11-30 06:13:31 +0400
committerpannan <pannan@allwinnertech.com>2012-11-30 06:13:31 +0400
commita0d4fb7f2ecc05673303fb31b27d7b96f1473e45 (patch)
treedadb7d0d74ab54c91268da4f99af05e3a326116e
parentdaeb3e764d43ec0e9fe14ad8d6fcc03d64a18e54 (diff)
downloadlinux-sunxi-lichee/a10-dev-test.tar.xz
usb: use macro sunxi_test_selectlichee/a10-dev-test
-rwxr-xr-x[-rw-r--r--]drivers/usb/core/otg_whitelist.h2
-rwxr-xr-xdrivers/usb/host/ehci-hcd.c4
-rwxr-xr-xdrivers/usb/host/ehci_sun4i.c8
-rwxr-xr-xdrivers/usb/host/ohci_sun4i.c6
-rwxr-xr-xdrivers/usb/host/sw_hci_sun4i.h2
-rwxr-xr-x[-rw-r--r--]drivers/usb/misc/Kconfig3
-rwxr-xr-xdrivers/usb/storage/usb.c6
-rwxr-xr-xdrivers/usb/storage/usb.h2
-rwxr-xr-xdrivers/usb/sun4i_usb/manager/usb_manager.c4
-rwxr-xr-xdrivers/usb/sun4i_usb/manager/usb_msg_center.c2
-rwxr-xr-xdrivers/usb/sun4i_usb/manager/usb_msg_center.h2
11 files changed, 21 insertions, 20 deletions
diff --git a/drivers/usb/core/otg_whitelist.h b/drivers/usb/core/otg_whitelist.h
index e8cdce571bb1..a27a3824033c 100644..100755
--- a/drivers/usb/core/otg_whitelist.h
+++ b/drivers/usb/core/otg_whitelist.h
@@ -38,7 +38,7 @@ static struct usb_device_id whitelist_table [] = {
{ USB_DEVICE(0x0525, 0xa4a2), },
#endif
-#if defined(CONFIG_USB_TEST) || defined(CONFIG_USB_TEST_MODULE)
+#if defined(CONFIG_SUNXI_TEST_SELECT) || defined(CONFIG_USB_TEST_MODULE)
/* gadget zero, for testing */
{ USB_DEVICE(0x0525, 0xa4a0), },
#endif
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index a34578307798..8dd83486deb9 100755
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -761,7 +761,7 @@ static int ehci_run (struct usb_hcd *hcd)
}
/*-------------------------------------------------------------------------*/
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
extern int connect_count_en;
extern int connect_count;
extern int disconnect_count;
@@ -852,7 +852,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
continue;
pstatus = ehci_readl(ehci,
&ehci->regs->port_status[i]);
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
if (connect_count_en)
{
if (pstatus & PORT_CONNECT)
diff --git a/drivers/usb/host/ehci_sun4i.c b/drivers/usb/host/ehci_sun4i.c
index ece1f98b7c21..b1cba3071451 100755
--- a/drivers/usb/host/ehci_sun4i.c
+++ b/drivers/usb/host/ehci_sun4i.c
@@ -32,7 +32,7 @@
#include <mach/clock.h>
#include "sw_hci_sun4i.h"
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
#include "../storage/usb.h"
#endif
@@ -353,7 +353,7 @@ static const struct hc_driver sw_ehci_hc_driver = {
.clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
};
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
int connect_count_en = 0;
int connect_count = 0;
int disconnect_count = 0;
@@ -484,7 +484,7 @@ static int sw_ehci_hcd_probe(struct platform_device *pdev)
struct ehci_hcd *ehci = NULL;
struct sw_hci_hcd *sw_ehci = NULL;
int ret = 0;
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
int i;
#endif
@@ -569,7 +569,7 @@ static int sw_ehci_hcd_probe(struct platform_device *pdev)
}
}
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
for (i = 0; i < ARRAY_SIZE(test_attrs); i++) {
ret = device_create_file(&pdev->dev, &test_attrs[i]);
if (ret)
diff --git a/drivers/usb/host/ohci_sun4i.c b/drivers/usb/host/ohci_sun4i.c
index 4ff6350b72ab..a1820e105018 100755
--- a/drivers/usb/host/ohci_sun4i.c
+++ b/drivers/usb/host/ohci_sun4i.c
@@ -289,7 +289,7 @@ static const struct hc_driver sw_ohci_hc_driver ={
.start_port_reset = ohci_start_port_reset,
};
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
static int sw_ohci_hcd_suspend(struct device *dev);
static int sw_ohci_hcd_resume(struct device *dev);
@@ -355,7 +355,7 @@ static int sw_ohci_hcd_probe(struct platform_device *pdev)
int ret;
struct usb_hcd *hcd = NULL;
struct sw_hci_hcd *sw_ohci = NULL;
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
int i;
#endif
@@ -449,7 +449,7 @@ static int sw_ohci_hcd_probe(struct platform_device *pdev)
}
#endif
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
for (i = 0; i < ARRAY_SIZE(test_attrs); i++) {
ret = device_create_file(&pdev->dev, &test_attrs[i]);
if (ret)
diff --git a/drivers/usb/host/sw_hci_sun4i.h b/drivers/usb/host/sw_hci_sun4i.h
index 01905d7433da..5b4d71cb6a99 100755
--- a/drivers/usb/host/sw_hci_sun4i.h
+++ b/drivers/usb/host/sw_hci_sun4i.h
@@ -237,7 +237,7 @@ struct sw_hci_hcd{
void (* usb_passby)(struct sw_hci_hcd *sw_hci, u32 enable);
};
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
extern int connect_count_en;
extern int connect_count;
extern int disconnect_count;
diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig
index 1bfcd02ebeb5..e9df55e15b95 100644..100755
--- a/drivers/usb/misc/Kconfig
+++ b/drivers/usb/misc/Kconfig
@@ -209,7 +209,8 @@ config USB_IOWARRIOR
config USB_TEST
tristate "USB testing driver"
- depends on USB
+ depends on USB && SUNXI_TEST_SELECT
+ default m
help
This driver is for testing host controller software. It is used
with specialized device firmware for regression and stress testing,
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 158da337b910..d9864299b993 100755
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -1001,7 +1001,7 @@ BadDevice:
}
EXPORT_SYMBOL_GPL(usb_stor_probe2);
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
int probe_count = 0;
int remove_count = 0;
#endif
@@ -1010,7 +1010,7 @@ int remove_count = 0;
void usb_stor_disconnect(struct usb_interface *intf)
{
struct us_data *us = usb_get_intfdata(intf);
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
remove_count++;
#endif
US_DEBUGP("storage_disconnect() called\n");
@@ -1025,7 +1025,7 @@ static int storage_probe(struct usb_interface *intf,
{
struct us_data *us;
int result;
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
probe_count++;
#endif
/*
diff --git a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h
index ba828bf78596..b8776bed4e2d 100755
--- a/drivers/usb/storage/usb.h
+++ b/drivers/usb/storage/usb.h
@@ -200,7 +200,7 @@ extern int usb_stor_probe1(struct us_data **pus,
extern int usb_stor_probe2(struct us_data *us);
extern void usb_stor_disconnect(struct usb_interface *intf);
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
extern int probe_count;
extern int remove_count;
#endif
diff --git a/drivers/usb/sun4i_usb/manager/usb_manager.c b/drivers/usb/sun4i_usb/manager/usb_manager.c
index af676d908b0a..d53a2c4cae12 100755
--- a/drivers/usb/sun4i_usb/manager/usb_manager.c
+++ b/drivers/usb/sun4i_usb/manager/usb_manager.c
@@ -88,11 +88,11 @@ static int usb_hardware_scan_thread(void * pArg)
while(thread_run_flag){
DMSG_DBG_MANAGER("\n\n");
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
if(auto_scan_otg_flag){
#endif
usb_hw_scan(cfg);
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
}
#endif
usb_msg_center(cfg);
diff --git a/drivers/usb/sun4i_usb/manager/usb_msg_center.c b/drivers/usb/sun4i_usb/manager/usb_msg_center.c
index 3aaab7bcbe37..66c9d47b7dc7 100755
--- a/drivers/usb/sun4i_usb/manager/usb_msg_center.c
+++ b/drivers/usb/sun4i_usb/manager/usb_msg_center.c
@@ -489,7 +489,7 @@ s32 usb_msg_center_exit(struct usb_cfg *cfg)
return 0;
}
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
int auto_scan_otg_flag = 1;
static ssize_t host_store(struct device *dev,
diff --git a/drivers/usb/sun4i_usb/manager/usb_msg_center.h b/drivers/usb/sun4i_usb/manager/usb_msg_center.h
index 2f6c87b01af2..879d274c451f 100755
--- a/drivers/usb/sun4i_usb/manager/usb_msg_center.h
+++ b/drivers/usb/sun4i_usb/manager/usb_msg_center.h
@@ -65,7 +65,7 @@ void usb_msg_center(struct usb_cfg *cfg);
s32 usb_msg_center_init(struct usb_cfg *cfg);
s32 usb_msg_center_exit(struct usb_cfg *cfg);
-#ifdef CONFIG_USB_TEST
+#ifdef CONFIG_SUNXI_TEST_SELECT
extern int auto_scan_otg_flag;
#endif