summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/udc/amd5536udc.h
diff options
context:
space:
mode:
authorRaviteja Garimella <raviteja.garimella@broadcom.com>2017-05-10 15:51:21 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-06-13 13:21:03 +0300
commit1b9f35adb0ffa143c7972a8459d6979c77d6c3c0 (patch)
treeb04e4a791e5a650133f4e45290c8e9043ace0903 /drivers/usb/gadget/udc/amd5536udc.h
parent92122a60d9f0ef3e3bc760e087588f71b2e86c97 (diff)
downloadlinux-1b9f35adb0ffa143c7972a8459d6979c77d6c3c0.tar.xz
usb: gadget: udc: Add Synopsys UDC Platform driver
This patch adds platform driver support for Synopsys UDC. A new driver file (snps_udc_plat.c) is created for this purpose where the platform driver registration is done based on OF node. Currently, UDC integrated into Broadcom's iProc SoCs (Northstar2 and Cygnus) work with this driver. New members are added to the UDC data structure for having platform device support along with extcon and phy support. Kconfig and Makefiles are modified to select platform driver for compilation. Signed-off-by: Raviteja Garimella <raviteja.garimella@broadcom.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/udc/amd5536udc.h')
-rw-r--r--drivers/usb/gadget/udc/amd5536udc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/amd5536udc.h b/drivers/usb/gadget/udc/amd5536udc.h
index 91aae23b7370..4fe22d432af2 100644
--- a/drivers/usb/gadget/udc/amd5536udc.h
+++ b/drivers/usb/gadget/udc/amd5536udc.h
@@ -16,6 +16,7 @@
/* debug control */
/* #define UDC_VERBOSE */
+#include <linux/extcon.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
@@ -28,6 +29,9 @@
#define UDC_HSA0_REV 1
#define UDC_HSB1_REV 2
+/* Broadcom chip rev. */
+#define UDC_BCM_REV 10
+
/*
* SETUP usb commands
* needed, because some SETUP's are handled in hw, but must be passed to
@@ -112,6 +116,7 @@
#define UDC_DEVCTL_BRLEN_MASK 0x00ff0000
#define UDC_DEVCTL_BRLEN_OFS 16
+#define UDC_DEVCTL_SRX_FLUSH 14
#define UDC_DEVCTL_CSR_DONE 13
#define UDC_DEVCTL_DEVNAK 12
#define UDC_DEVCTL_SD 10
@@ -564,7 +569,15 @@ struct udc {
u16 cur_intf;
u16 cur_alt;
+ /* for platform device and extcon support */
struct device *dev;
+ struct phy *udc_phy;
+ struct extcon_dev *edev;
+ struct extcon_specific_cable_nb extcon_nb;
+ struct notifier_block nb;
+ struct delayed_work drd_work;
+ struct workqueue_struct *drd_wq;
+ u32 conn_type;
};
#define to_amd5536_udc(g) (container_of((g), struct udc, gadget))
@@ -580,6 +593,7 @@ int udc_enable_dev_setup_interrupts(struct udc *dev);
int udc_mask_unused_interrupts(struct udc *dev);
irqreturn_t udc_irq(int irq, void *pdev);
void gadget_release(struct device *pdev);
+void empty_req_queue(struct udc_ep *ep);
void udc_basic_init(struct udc *dev);
void free_dma_pools(struct udc *dev);
int init_dma_pools(struct udc *dev);