usb: dwc3: fix randconfig build errors
commit 388e5c5
(usb: dwc3: remove dwc3 dependency
on host AND gadget.) created the possibility for
host-only and peripheral-only dwc3 builds but
left a possible randconfig build error when host-only
builds are selected.
Cc: <stable@vger.kernel.org> # v3.8+
Reported-by: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Родитель
b997ada5db
Коммит
610183051d
|
@ -872,6 +872,19 @@ union dwc3_event {
|
||||||
struct dwc3_event_gevt gevt;
|
struct dwc3_event_gevt gevt;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct dwc3_gadget_ep_cmd_params - representation of endpoint command
|
||||||
|
* parameters
|
||||||
|
* @param2: third parameter
|
||||||
|
* @param1: second parameter
|
||||||
|
* @param0: first parameter
|
||||||
|
*/
|
||||||
|
struct dwc3_gadget_ep_cmd_params {
|
||||||
|
u32 param2;
|
||||||
|
u32 param1;
|
||||||
|
u32 param0;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DWC3 Features to be used as Driver Data
|
* DWC3 Features to be used as Driver Data
|
||||||
*/
|
*/
|
||||||
|
@ -897,11 +910,31 @@ static inline void dwc3_host_exit(struct dwc3 *dwc)
|
||||||
#if IS_ENABLED(CONFIG_USB_DWC3_GADGET) || IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE)
|
#if IS_ENABLED(CONFIG_USB_DWC3_GADGET) || IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE)
|
||||||
int dwc3_gadget_init(struct dwc3 *dwc);
|
int dwc3_gadget_init(struct dwc3 *dwc);
|
||||||
void dwc3_gadget_exit(struct dwc3 *dwc);
|
void dwc3_gadget_exit(struct dwc3 *dwc);
|
||||||
|
int dwc3_gadget_set_test_mode(struct dwc3 *dwc, int mode);
|
||||||
|
int dwc3_gadget_get_link_state(struct dwc3 *dwc);
|
||||||
|
int dwc3_gadget_set_link_state(struct dwc3 *dwc, enum dwc3_link_state state);
|
||||||
|
int dwc3_send_gadget_ep_cmd(struct dwc3 *dwc, unsigned ep,
|
||||||
|
unsigned cmd, struct dwc3_gadget_ep_cmd_params *params);
|
||||||
|
int dwc3_send_gadget_generic_command(struct dwc3 *dwc, int cmd, u32 param);
|
||||||
#else
|
#else
|
||||||
static inline int dwc3_gadget_init(struct dwc3 *dwc)
|
static inline int dwc3_gadget_init(struct dwc3 *dwc)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
static inline void dwc3_gadget_exit(struct dwc3 *dwc)
|
static inline void dwc3_gadget_exit(struct dwc3 *dwc)
|
||||||
{ }
|
{ }
|
||||||
|
static inline int dwc3_gadget_set_test_mode(struct dwc3 *dwc, int mode)
|
||||||
|
{ return 0; }
|
||||||
|
static inline int dwc3_gadget_get_link_state(struct dwc3 *dwc)
|
||||||
|
{ return 0; }
|
||||||
|
static inline int dwc3_gadget_set_link_state(struct dwc3 *dwc,
|
||||||
|
enum dwc3_link_state state)
|
||||||
|
{ return 0; }
|
||||||
|
|
||||||
|
static inline int dwc3_send_gadget_ep_cmd(struct dwc3 *dwc, unsigned ep,
|
||||||
|
unsigned cmd, struct dwc3_gadget_ep_cmd_params *params)
|
||||||
|
{ return 0; }
|
||||||
|
static inline int dwc3_send_gadget_generic_command(struct dwc3 *dwc,
|
||||||
|
int cmd, u32 param)
|
||||||
|
{ return 0; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* power management interface */
|
/* power management interface */
|
||||||
|
|
|
@ -56,12 +56,6 @@ struct dwc3;
|
||||||
/* DEPXFERCFG parameter 0 */
|
/* DEPXFERCFG parameter 0 */
|
||||||
#define DWC3_DEPXFERCFG_NUM_XFER_RES(n) ((n) & 0xffff)
|
#define DWC3_DEPXFERCFG_NUM_XFER_RES(n) ((n) & 0xffff)
|
||||||
|
|
||||||
struct dwc3_gadget_ep_cmd_params {
|
|
||||||
u32 param2;
|
|
||||||
u32 param1;
|
|
||||||
u32 param0;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#define to_dwc3_request(r) (container_of(r, struct dwc3_request, request))
|
#define to_dwc3_request(r) (container_of(r, struct dwc3_request, request))
|
||||||
|
@ -85,10 +79,6 @@ static inline void dwc3_gadget_move_request_queued(struct dwc3_request *req)
|
||||||
void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,
|
void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,
|
||||||
int status);
|
int status);
|
||||||
|
|
||||||
int dwc3_gadget_set_test_mode(struct dwc3 *dwc, int mode);
|
|
||||||
int dwc3_gadget_get_link_state(struct dwc3 *dwc);
|
|
||||||
int dwc3_gadget_set_link_state(struct dwc3 *dwc, enum dwc3_link_state state);
|
|
||||||
|
|
||||||
void dwc3_ep0_interrupt(struct dwc3 *dwc,
|
void dwc3_ep0_interrupt(struct dwc3 *dwc,
|
||||||
const struct dwc3_event_depevt *event);
|
const struct dwc3_event_depevt *event);
|
||||||
void dwc3_ep0_out_start(struct dwc3 *dwc);
|
void dwc3_ep0_out_start(struct dwc3 *dwc);
|
||||||
|
@ -96,9 +86,6 @@ int dwc3_gadget_ep0_set_halt(struct usb_ep *ep, int value);
|
||||||
int dwc3_gadget_ep0_queue(struct usb_ep *ep, struct usb_request *request,
|
int dwc3_gadget_ep0_queue(struct usb_ep *ep, struct usb_request *request,
|
||||||
gfp_t gfp_flags);
|
gfp_t gfp_flags);
|
||||||
int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value);
|
int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value);
|
||||||
int dwc3_send_gadget_ep_cmd(struct dwc3 *dwc, unsigned ep,
|
|
||||||
unsigned cmd, struct dwc3_gadget_ep_cmd_params *params);
|
|
||||||
int dwc3_send_gadget_generic_command(struct dwc3 *dwc, int cmd, u32 param);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dwc3_gadget_ep_get_transfer_index - Gets transfer index from HW
|
* dwc3_gadget_ep_get_transfer_index - Gets transfer index from HW
|
||||||
|
|
Загрузка…
Ссылка в новой задаче