aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc2/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/dwc2/core.h')
-rw-r--r--drivers/usb/dwc2/core.h52
1 files changed, 26 insertions, 26 deletions
diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
index 0ed87620941b..9655b1ec4f34 100644
--- a/drivers/usb/dwc2/core.h
+++ b/drivers/usb/dwc2/core.h
@@ -58,8 +58,8 @@ static inline void do_write(u32 value, void *addr)
58/* Maximum number of Endpoints/HostChannels */ 58/* Maximum number of Endpoints/HostChannels */
59#define MAX_EPS_CHANNELS 16 59#define MAX_EPS_CHANNELS 16
60 60
61/* s3c-hsotg declarations */ 61/* dwc2-hsotg declarations */
62static const char * const s3c_hsotg_supply_names[] = { 62static const char * const dwc2_hsotg_supply_names[] = {
63 "vusb_d", /* digital USB supply, 1.2V */ 63 "vusb_d", /* digital USB supply, 1.2V */
64 "vusb_a", /* analog USB supply, 1.1V */ 64 "vusb_a", /* analog USB supply, 1.1V */
65}; 65};
@@ -85,10 +85,10 @@ static const char * const s3c_hsotg_supply_names[] = {
85#define EP0_MPS_LIMIT 64 85#define EP0_MPS_LIMIT 64
86 86
87struct dwc2_hsotg; 87struct dwc2_hsotg;
88struct s3c_hsotg_req; 88struct dwc2_hsotg_req;
89 89
90/** 90/**
91 * struct s3c_hsotg_ep - driver endpoint definition. 91 * struct dwc2_hsotg_ep - driver endpoint definition.
92 * @ep: The gadget layer representation of the endpoint. 92 * @ep: The gadget layer representation of the endpoint.
93 * @name: The driver generated name for the endpoint. 93 * @name: The driver generated name for the endpoint.
94 * @queue: Queue of requests for this endpoint. 94 * @queue: Queue of requests for this endpoint.
@@ -127,11 +127,11 @@ struct s3c_hsotg_req;
127 * as in shared-fifo mode periodic in acts like a single-frame packet 127 * as in shared-fifo mode periodic in acts like a single-frame packet
128 * buffer than a fifo) 128 * buffer than a fifo)
129 */ 129 */
130struct s3c_hsotg_ep { 130struct dwc2_hsotg_ep {
131 struct usb_ep ep; 131 struct usb_ep ep;
132 struct list_head queue; 132 struct list_head queue;
133 struct dwc2_hsotg *parent; 133 struct dwc2_hsotg *parent;
134 struct s3c_hsotg_req *req; 134 struct dwc2_hsotg_req *req;
135 struct dentry *debugfs; 135 struct dentry *debugfs;
136 136
137 unsigned long total_data; 137 unsigned long total_data;
@@ -155,12 +155,12 @@ struct s3c_hsotg_ep {
155}; 155};
156 156
157/** 157/**
158 * struct s3c_hsotg_req - data transfer request 158 * struct dwc2_hsotg_req - data transfer request
159 * @req: The USB gadget request 159 * @req: The USB gadget request
160 * @queue: The list of requests for the endpoint this is queued for. 160 * @queue: The list of requests for the endpoint this is queued for.
161 * @saved_req_buf: variable to save req.buf when bounce buffers are used. 161 * @saved_req_buf: variable to save req.buf when bounce buffers are used.
162 */ 162 */
163struct s3c_hsotg_req { 163struct dwc2_hsotg_req {
164 struct usb_request req; 164 struct usb_request req;
165 struct list_head queue; 165 struct list_head queue;
166 void *saved_req_buf; 166 void *saved_req_buf;
@@ -693,7 +693,7 @@ struct dwc2_hsotg {
693 693
694 struct phy *phy; 694 struct phy *phy;
695 struct usb_phy *uphy; 695 struct usb_phy *uphy;
696 struct regulator_bulk_data supplies[ARRAY_SIZE(s3c_hsotg_supply_names)]; 696 struct regulator_bulk_data supplies[ARRAY_SIZE(dwc2_hsotg_supply_names)];
697 697
698 spinlock_t lock; 698 spinlock_t lock;
699 struct mutex init_mutex; 699 struct mutex init_mutex;
@@ -796,7 +796,7 @@ struct dwc2_hsotg {
796#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE) 796#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)
797 /* Gadget structures */ 797 /* Gadget structures */
798 struct usb_gadget_driver *driver; 798 struct usb_gadget_driver *driver;
799 struct s3c_hsotg_plat *plat; 799 struct dwc2_hsotg_plat *plat;
800 800
801 u32 phyif; 801 u32 phyif;
802 int fifo_mem; 802 int fifo_mem;
@@ -815,8 +815,8 @@ struct dwc2_hsotg {
815 unsigned int enabled:1; 815 unsigned int enabled:1;
816 unsigned int connected:1; 816 unsigned int connected:1;
817 unsigned long last_rst; 817 unsigned long last_rst;
818 struct s3c_hsotg_ep *eps_in[MAX_EPS_CHANNELS]; 818 struct dwc2_hsotg_ep *eps_in[MAX_EPS_CHANNELS];
819 struct s3c_hsotg_ep *eps_out[MAX_EPS_CHANNELS]; 819 struct dwc2_hsotg_ep *eps_out[MAX_EPS_CHANNELS];
820 u32 g_using_dma; 820 u32 g_using_dma;
821 u32 g_rx_fifo_sz; 821 u32 g_rx_fifo_sz;
822 u32 g_np_g_tx_fifo_sz; 822 u32 g_np_g_tx_fifo_sz;
@@ -1104,30 +1104,30 @@ extern u16 dwc2_get_otg_version(struct dwc2_hsotg *hsotg);
1104 1104
1105/* Gadget defines */ 1105/* Gadget defines */
1106#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE) 1106#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)
1107extern int s3c_hsotg_remove(struct dwc2_hsotg *hsotg); 1107extern int dwc2_hsotg_remove(struct dwc2_hsotg *hsotg);
1108extern int s3c_hsotg_suspend(struct dwc2_hsotg *dwc2); 1108extern int dwc2_hsotg_suspend(struct dwc2_hsotg *dwc2);
1109extern int s3c_hsotg_resume(struct dwc2_hsotg *dwc2); 1109extern int dwc2_hsotg_resume(struct dwc2_hsotg *dwc2);
1110extern int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq); 1110extern int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq);
1111extern void s3c_hsotg_core_init_disconnected(struct dwc2_hsotg *dwc2, 1111extern void dwc2_hsotg_core_init_disconnected(struct dwc2_hsotg *dwc2,
1112 bool reset); 1112 bool reset);
1113extern void s3c_hsotg_core_connect(struct dwc2_hsotg *hsotg); 1113extern void dwc2_hsotg_core_connect(struct dwc2_hsotg *hsotg);
1114extern void s3c_hsotg_disconnect(struct dwc2_hsotg *dwc2); 1114extern void dwc2_hsotg_disconnect(struct dwc2_hsotg *dwc2);
1115extern int s3c_hsotg_set_test_mode(struct dwc2_hsotg *hsotg, int testmode); 1115extern int dwc2_hsotg_set_test_mode(struct dwc2_hsotg *hsotg, int testmode);
1116#define dwc2_is_device_connected(hsotg) (hsotg->connected) 1116#define dwc2_is_device_connected(hsotg) (hsotg->connected)
1117#else 1117#else
1118static inline int s3c_hsotg_remove(struct dwc2_hsotg *dwc2) 1118static inline int dwc2_hsotg_remove(struct dwc2_hsotg *dwc2)
1119{ return 0; } 1119{ return 0; }
1120static inline int s3c_hsotg_suspend(struct dwc2_hsotg *dwc2) 1120static inline int dwc2_hsotg_suspend(struct dwc2_hsotg *dwc2)
1121{ return 0; } 1121{ return 0; }
1122static inline int s3c_hsotg_resume(struct dwc2_hsotg *dwc2) 1122static inline int dwc2_hsotg_resume(struct dwc2_hsotg *dwc2)
1123{ return 0; } 1123{ return 0; }
1124static inline int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq) 1124static inline int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq)
1125{ return 0; } 1125{ return 0; }
1126static inline void s3c_hsotg_core_init_disconnected(struct dwc2_hsotg *dwc2, 1126static inline void dwc2_hsotg_core_init_disconnected(struct dwc2_hsotg *dwc2,
1127 bool reset) {} 1127 bool reset) {}
1128static inline void s3c_hsotg_core_connect(struct dwc2_hsotg *hsotg) {} 1128static inline void dwc2_hsotg_core_connect(struct dwc2_hsotg *hsotg) {}
1129static inline void s3c_hsotg_disconnect(struct dwc2_hsotg *dwc2) {} 1129static inline void dwc2_hsotg_disconnect(struct dwc2_hsotg *dwc2) {}
1130static inline int s3c_hsotg_set_test_mode(struct dwc2_hsotg *hsotg, 1130static inline int dwc2_hsotg_set_test_mode(struct dwc2_hsotg *hsotg,
1131 int testmode) 1131 int testmode)
1132{ return 0; } 1132{ return 0; }
1133#define dwc2_is_device_connected(hsotg) (0) 1133#define dwc2_is_device_connected(hsotg) (0)