]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
usb: dwc3: fix dwc3 header files
authorKishon Vijay Abraham I <kishon@ti.com>
Mon, 23 Feb 2015 13:09:54 +0000 (18:39 +0530)
committerMarek Vasut <marex@denx.de>
Tue, 14 Apr 2015 03:48:09 +0000 (05:48 +0200)
Changed the header files included in core.h and io.h to the u-boot header
files so that these files can be included in other dwc3 source files and
be compiled in uboot. Also added otg.h which has the defines for dr_mode.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
drivers/usb/dwc3/core.h
drivers/usb/dwc3/io.h
include/linux/usb/otg.h [new file with mode: 0644]

index 09cec53714bce0f122b6c7e90c42c404ec5e933b..a7a7082e52dcf427bf4073dd79c0d4b2c6db9c48 100644 (file)
 #ifndef __DRIVERS_USB_DWC3_CORE_H
 #define __DRIVERS_USB_DWC3_CORE_H
 
-#include <linux/device.h>
-#include <linux/spinlock.h>
 #include <linux/ioport.h>
-#include <linux/list.h>
-#include <linux/dma-mapping.h>
-#include <linux/mm.h>
-#include <linux/debugfs.h>
 
 #include <linux/usb/ch9.h>
-#include <linux/usb/gadget.h>
 #include <linux/usb/otg.h>
 
-#include <linux/phy/phy.h>
-
 #define DWC3_MSG_MAX   500
 
 /* Global constants */
@@ -981,7 +972,7 @@ struct dwc3_gadget_ep_cmd_params {
 void dwc3_set_mode(struct dwc3 *dwc, u32 mode);
 int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc);
 
-#if IS_ENABLED(CONFIG_USB_DWC3_HOST) || IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE)
+#ifdef CONFIG_USB_DWC3_HOST
 int dwc3_host_init(struct dwc3 *dwc);
 void dwc3_host_exit(struct dwc3 *dwc);
 #else
@@ -991,7 +982,7 @@ static inline void dwc3_host_exit(struct dwc3 *dwc)
 { }
 #endif
 
-#if IS_ENABLED(CONFIG_USB_DWC3_GADGET) || IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE)
+#ifdef CONFIG_USB_DWC3_GADGET
 int dwc3_gadget_init(struct dwc3 *dwc);
 void dwc3_gadget_exit(struct dwc3 *dwc);
 int dwc3_gadget_set_test_mode(struct dwc3 *dwc, int mode);
index f9f22b0ea451631177b6a993a4caa113081db136..b6da1352fb8664b8fbccc71f8eed59b7afe3730c 100644 (file)
@@ -18,9 +18,7 @@
 #ifndef __DRIVERS_USB_DWC3_IO_H
 #define __DRIVERS_USB_DWC3_IO_H
 
-#include <linux/io.h>
-#include "debug.h"
-#include "core.h"
+#include <asm/io.h>
 
 static inline u32 dwc3_readl(void __iomem *base, u32 offset)
 {
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
new file mode 100644 (file)
index 0000000..7ec5550
--- /dev/null
@@ -0,0 +1,20 @@
+/* include/linux/usb/otg.h
+ *
+ * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
+ *
+ * USB OTG (On The Go) defines
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#ifndef __LINUX_USB_OTG_H
+#define __LINUX_USB_OTG_H
+
+enum usb_dr_mode {
+       USB_DR_MODE_UNKNOWN,
+       USB_DR_MODE_HOST,
+       USB_DR_MODE_PERIPHERAL,
+       USB_DR_MODE_OTG,
+};
+
+#endif /* __LINUX_USB_OTG_H */