Commit a24ed35a authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

staging: octeon-usb: cvmx_usb_state_t -> struct cvmx_usb_state

Replace cvmx_usb_state_t with struct cvmx_usb_state.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6e0e1b00
...@@ -358,7 +358,7 @@ static inline int __cvmx_usb_get_data_pid(cvmx_usb_pipe_t *pipe) ...@@ -358,7 +358,7 @@ static inline int __cvmx_usb_get_data_pid(cvmx_usb_pipe_t *pipe)
* by this API, a zero will be returned. Most Octeon chips * by this API, a zero will be returned. Most Octeon chips
* support one usb port, but some support two ports. * support one usb port, but some support two ports.
* cvmx_usb_initialize() must be called on independent * cvmx_usb_initialize() must be called on independent
* cvmx_usb_state_t structures. * struct cvmx_usb_state.
* *
* Returns: Number of port, zero if usb isn't supported * Returns: Number of port, zero if usb isn't supported
*/ */
...@@ -479,7 +479,7 @@ static inline void __cvmx_usb_remove_pipe(cvmx_usb_pipe_list_t *list, cvmx_usb_p ...@@ -479,7 +479,7 @@ static inline void __cvmx_usb_remove_pipe(cvmx_usb_pipe_list_t *list, cvmx_usb_p
* other access to the Octeon USB port is made. The port starts * other access to the Octeon USB port is made. The port starts
* off in the disabled state. * off in the disabled state.
* *
* @state: Pointer to an empty cvmx_usb_state_t structure * @state: Pointer to an empty struct cvmx_usb_state
* that will be populated by the initialize call. * that will be populated by the initialize call.
* This structure is then passed to all other USB * This structure is then passed to all other USB
* functions. * functions.
...@@ -491,7 +491,7 @@ static inline void __cvmx_usb_remove_pipe(cvmx_usb_pipe_list_t *list, cvmx_usb_p ...@@ -491,7 +491,7 @@ static inline void __cvmx_usb_remove_pipe(cvmx_usb_pipe_list_t *list, cvmx_usb_p
* *
* Returns: 0 or a negative error code. * Returns: 0 or a negative error code.
*/ */
int cvmx_usb_initialize(cvmx_usb_state_t *state, int usb_port_number, int cvmx_usb_initialize(struct cvmx_usb_state *state, int usb_port_number,
enum cvmx_usb_initialize_flags flags) enum cvmx_usb_initialize_flags flags)
{ {
cvmx_usbnx_clk_ctl_t usbn_clk_ctl; cvmx_usbnx_clk_ctl_t usbn_clk_ctl;
...@@ -818,7 +818,7 @@ int cvmx_usb_initialize(cvmx_usb_state_t *state, int usb_port_number, ...@@ -818,7 +818,7 @@ int cvmx_usb_initialize(cvmx_usb_state_t *state, int usb_port_number,
* *
* Returns: 0 or a negative error code. * Returns: 0 or a negative error code.
*/ */
int cvmx_usb_shutdown(cvmx_usb_state_t *state) int cvmx_usb_shutdown(struct cvmx_usb_state *state)
{ {
cvmx_usbnx_clk_ctl_t usbn_clk_ctl; cvmx_usbnx_clk_ctl_t usbn_clk_ctl;
cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state; cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state;
...@@ -853,7 +853,7 @@ int cvmx_usb_shutdown(cvmx_usb_state_t *state) ...@@ -853,7 +853,7 @@ int cvmx_usb_shutdown(cvmx_usb_state_t *state)
* *
* Returns: 0 or a negative error code. * Returns: 0 or a negative error code.
*/ */
int cvmx_usb_enable(cvmx_usb_state_t *state) int cvmx_usb_enable(struct cvmx_usb_state *state)
{ {
cvmx_usbcx_ghwcfg3_t usbcx_ghwcfg3; cvmx_usbcx_ghwcfg3_t usbcx_ghwcfg3;
cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state; cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state;
...@@ -947,7 +947,7 @@ int cvmx_usb_enable(cvmx_usb_state_t *state) ...@@ -947,7 +947,7 @@ int cvmx_usb_enable(cvmx_usb_state_t *state)
* *
* Returns: 0 or a negative error code. * Returns: 0 or a negative error code.
*/ */
int cvmx_usb_disable(cvmx_usb_state_t *state) int cvmx_usb_disable(struct cvmx_usb_state *state)
{ {
cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state; cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state;
...@@ -971,7 +971,7 @@ int cvmx_usb_disable(cvmx_usb_state_t *state) ...@@ -971,7 +971,7 @@ int cvmx_usb_disable(cvmx_usb_state_t *state)
* *
* Returns: Port status information * Returns: Port status information
*/ */
struct cvmx_usb_port_status cvmx_usb_get_status(cvmx_usb_state_t *state) struct cvmx_usb_port_status cvmx_usb_get_status(struct cvmx_usb_state *state)
{ {
cvmx_usbcx_hprt_t usbc_hprt; cvmx_usbcx_hprt_t usbc_hprt;
struct cvmx_usb_port_status result; struct cvmx_usb_port_status result;
...@@ -1003,7 +1003,7 @@ struct cvmx_usb_port_status cvmx_usb_get_status(cvmx_usb_state_t *state) ...@@ -1003,7 +1003,7 @@ struct cvmx_usb_port_status cvmx_usb_get_status(cvmx_usb_state_t *state)
* @port_status: * @port_status:
* Port status to set, most like returned by cvmx_usb_get_status() * Port status to set, most like returned by cvmx_usb_get_status()
*/ */
void cvmx_usb_set_status(cvmx_usb_state_t *state, struct cvmx_usb_port_status port_status) void cvmx_usb_set_status(struct cvmx_usb_state *state, struct cvmx_usb_port_status port_status)
{ {
cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state; cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state;
usb->port_status = port_status; usb->port_status = port_status;
...@@ -1101,7 +1101,7 @@ static inline int __cvmx_usb_get_pipe_handle(cvmx_usb_internal_state_t *usb, ...@@ -1101,7 +1101,7 @@ static inline int __cvmx_usb_get_pipe_handle(cvmx_usb_internal_state_t *usb,
* Returns: A non negative value is a pipe handle. Negative * Returns: A non negative value is a pipe handle. Negative
* values are error codes. * values are error codes.
*/ */
int cvmx_usb_open_pipe(cvmx_usb_state_t *state, enum cvmx_usb_pipe_flags flags, int cvmx_usb_open_pipe(struct cvmx_usb_state *state, enum cvmx_usb_pipe_flags flags,
int device_addr, int endpoint_num, int device_addr, int endpoint_num,
enum cvmx_usb_speed device_speed, int max_packet, enum cvmx_usb_speed device_speed, int max_packet,
enum cvmx_usb_transfer transfer_type, enum cvmx_usb_transfer transfer_type,
...@@ -1926,7 +1926,7 @@ static void __cvmx_usb_perform_callback(cvmx_usb_internal_state_t *usb, ...@@ -1926,7 +1926,7 @@ static void __cvmx_usb_perform_callback(cvmx_usb_internal_state_t *usb,
if (!callback) if (!callback)
return; return;
callback((cvmx_usb_state_t *)usb, reason, complete_code, pipe_handle, submit_handle, callback((struct cvmx_usb_state *)usb, reason, complete_code, pipe_handle, submit_handle,
bytes_transferred, user_data); bytes_transferred, user_data);
} }
...@@ -2122,7 +2122,7 @@ static int __cvmx_usb_submit_transaction(cvmx_usb_internal_state_t *usb, ...@@ -2122,7 +2122,7 @@ static int __cvmx_usb_submit_transaction(cvmx_usb_internal_state_t *usb,
* Returns: A submitted transaction handle or negative on * Returns: A submitted transaction handle or negative on
* failure. Negative values are error codes. * failure. Negative values are error codes.
*/ */
int cvmx_usb_submit_bulk(cvmx_usb_state_t *state, int pipe_handle, int cvmx_usb_submit_bulk(struct cvmx_usb_state *state, int pipe_handle,
uint64_t buffer, int buffer_length, uint64_t buffer, int buffer_length,
cvmx_usb_callback_func_t callback, cvmx_usb_callback_func_t callback,
void *user_data) void *user_data)
...@@ -2181,7 +2181,7 @@ int cvmx_usb_submit_bulk(cvmx_usb_state_t *state, int pipe_handle, ...@@ -2181,7 +2181,7 @@ int cvmx_usb_submit_bulk(cvmx_usb_state_t *state, int pipe_handle,
* Returns: A submitted transaction handle or negative on * Returns: A submitted transaction handle or negative on
* failure. Negative values are error codes. * failure. Negative values are error codes.
*/ */
int cvmx_usb_submit_interrupt(cvmx_usb_state_t *state, int pipe_handle, int cvmx_usb_submit_interrupt(struct cvmx_usb_state *state, int pipe_handle,
uint64_t buffer, int buffer_length, uint64_t buffer, int buffer_length,
cvmx_usb_callback_func_t callback, cvmx_usb_callback_func_t callback,
void *user_data) void *user_data)
...@@ -2244,7 +2244,7 @@ int cvmx_usb_submit_interrupt(cvmx_usb_state_t *state, int pipe_handle, ...@@ -2244,7 +2244,7 @@ int cvmx_usb_submit_interrupt(cvmx_usb_state_t *state, int pipe_handle,
* Returns: A submitted transaction handle or negative on * Returns: A submitted transaction handle or negative on
* failure. Negative values are error codes. * failure. Negative values are error codes.
*/ */
int cvmx_usb_submit_control(cvmx_usb_state_t *state, int pipe_handle, int cvmx_usb_submit_control(struct cvmx_usb_state *state, int pipe_handle,
uint64_t control_header, uint64_t control_header,
uint64_t buffer, int buffer_length, uint64_t buffer, int buffer_length,
cvmx_usb_callback_func_t callback, cvmx_usb_callback_func_t callback,
...@@ -2324,7 +2324,7 @@ int cvmx_usb_submit_control(cvmx_usb_state_t *state, int pipe_handle, ...@@ -2324,7 +2324,7 @@ int cvmx_usb_submit_control(cvmx_usb_state_t *state, int pipe_handle,
* Returns: A submitted transaction handle or negative on * Returns: A submitted transaction handle or negative on
* failure. Negative values are error codes. * failure. Negative values are error codes.
*/ */
int cvmx_usb_submit_isochronous(cvmx_usb_state_t *state, int pipe_handle, int cvmx_usb_submit_isochronous(struct cvmx_usb_state *state, int pipe_handle,
int start_frame, int flags, int start_frame, int flags,
int number_packets, int number_packets,
struct cvmx_usb_iso_packet packets[], struct cvmx_usb_iso_packet packets[],
...@@ -2380,7 +2380,7 @@ int cvmx_usb_submit_isochronous(cvmx_usb_state_t *state, int pipe_handle, ...@@ -2380,7 +2380,7 @@ int cvmx_usb_submit_isochronous(cvmx_usb_state_t *state, int pipe_handle,
* *
* Returns: 0 or a negative error code. * Returns: 0 or a negative error code.
*/ */
int cvmx_usb_cancel(cvmx_usb_state_t *state, int pipe_handle, int submit_handle) int cvmx_usb_cancel(struct cvmx_usb_state *state, int pipe_handle, int submit_handle)
{ {
cvmx_usb_transaction_t *transaction; cvmx_usb_transaction_t *transaction;
cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state; cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state;
...@@ -2437,7 +2437,7 @@ int cvmx_usb_cancel(cvmx_usb_state_t *state, int pipe_handle, int submit_handle) ...@@ -2437,7 +2437,7 @@ int cvmx_usb_cancel(cvmx_usb_state_t *state, int pipe_handle, int submit_handle)
* *
* Returns: 0 or a negative error code. * Returns: 0 or a negative error code.
*/ */
int cvmx_usb_cancel_all(cvmx_usb_state_t *state, int pipe_handle) int cvmx_usb_cancel_all(struct cvmx_usb_state *state, int pipe_handle)
{ {
cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state; cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state;
cvmx_usb_pipe_t *pipe = usb->pipe + pipe_handle; cvmx_usb_pipe_t *pipe = usb->pipe + pipe_handle;
...@@ -2471,7 +2471,7 @@ int cvmx_usb_cancel_all(cvmx_usb_state_t *state, int pipe_handle) ...@@ -2471,7 +2471,7 @@ int cvmx_usb_cancel_all(cvmx_usb_state_t *state, int pipe_handle)
* Returns: 0 or a negative error code. EBUSY is returned if the pipe has * Returns: 0 or a negative error code. EBUSY is returned if the pipe has
* outstanding transfers. * outstanding transfers.
*/ */
int cvmx_usb_close_pipe(cvmx_usb_state_t *state, int pipe_handle) int cvmx_usb_close_pipe(struct cvmx_usb_state *state, int pipe_handle)
{ {
cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state; cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state;
cvmx_usb_pipe_t *pipe = usb->pipe + pipe_handle; cvmx_usb_pipe_t *pipe = usb->pipe + pipe_handle;
...@@ -2506,7 +2506,7 @@ int cvmx_usb_close_pipe(cvmx_usb_state_t *state, int pipe_handle) ...@@ -2506,7 +2506,7 @@ int cvmx_usb_close_pipe(cvmx_usb_state_t *state, int pipe_handle)
* *
* Returns: 0 or a negative error code. * Returns: 0 or a negative error code.
*/ */
int cvmx_usb_register_callback(cvmx_usb_state_t *state, int cvmx_usb_register_callback(struct cvmx_usb_state *state,
enum cvmx_usb_callback reason, enum cvmx_usb_callback reason,
cvmx_usb_callback_func_t callback, cvmx_usb_callback_func_t callback,
void *user_data) void *user_data)
...@@ -2534,7 +2534,7 @@ int cvmx_usb_register_callback(cvmx_usb_state_t *state, ...@@ -2534,7 +2534,7 @@ int cvmx_usb_register_callback(cvmx_usb_state_t *state,
* *
* Returns: USB frame number * Returns: USB frame number
*/ */
int cvmx_usb_get_frame_number(cvmx_usb_state_t *state) int cvmx_usb_get_frame_number(struct cvmx_usb_state *state)
{ {
int frame_number; int frame_number;
cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state; cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state;
...@@ -2965,7 +2965,7 @@ static int __cvmx_usb_poll_channel(cvmx_usb_internal_state_t *usb, int channel) ...@@ -2965,7 +2965,7 @@ static int __cvmx_usb_poll_channel(cvmx_usb_internal_state_t *usb, int channel)
(usb->frame_number - pipe->next_tx_frame) % pipe->interval; (usb->frame_number - pipe->next_tx_frame) % pipe->interval;
} else { } else {
struct cvmx_usb_port_status port; struct cvmx_usb_port_status port;
port = cvmx_usb_get_status((cvmx_usb_state_t *)usb); port = cvmx_usb_get_status((struct cvmx_usb_state *)usb);
if (port.port_enabled) { if (port.port_enabled) {
/* We'll retry the exact same transaction again */ /* We'll retry the exact same transaction again */
transaction->retries++; transaction->retries++;
...@@ -2992,7 +2992,7 @@ static int __cvmx_usb_poll_channel(cvmx_usb_internal_state_t *usb, int channel) ...@@ -2992,7 +2992,7 @@ static int __cvmx_usb_poll_channel(cvmx_usb_internal_state_t *usb, int channel)
* *
* Returns: 0 or a negative error code. * Returns: 0 or a negative error code.
*/ */
int cvmx_usb_poll(cvmx_usb_state_t *state) int cvmx_usb_poll(struct cvmx_usb_state *state)
{ {
cvmx_usbcx_hfnum_t usbc_hfnum; cvmx_usbcx_hfnum_t usbc_hfnum;
cvmx_usbcx_gintsts_t usbc_gintsts; cvmx_usbcx_gintsts_t usbc_gintsts;
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
* In the probe phase you should: * In the probe phase you should:
* - Use cvmx_usb_get_num_ports() to determine the number of * - Use cvmx_usb_get_num_ports() to determine the number of
* USB port to be supported. * USB port to be supported.
* - Allocate space for a cvmx_usb_state_t structure for each * - Allocate space for a struct cvmx_usb_state for each
* port. * port.
* - Tell the operating system about each port * - Tell the operating system about each port
* *
...@@ -114,14 +114,14 @@ ...@@ -114,14 +114,14 @@
* *
* The port callback prototype needs to look as follows: * The port callback prototype needs to look as follows:
* *
* void port_callback(cvmx_usb_state_t *usb, * void port_callback(struct cvmx_usb_state *usb,
* enum cvmx_usb_callback reason, * enum cvmx_usb_callback reason,
* enum cvmx_usb_complete status, * enum cvmx_usb_complete status,
* int pipe_handle, * int pipe_handle,
* int submit_handle, * int submit_handle,
* int bytes_transferred, * int bytes_transferred,
* void *user_data); * void *user_data);
* - "usb" is the cvmx_usb_state_t for the port. * - "usb" is the struct cvmx_usb_state for the port.
* - "reason" will always be CVMX_USB_CALLBACK_PORT_CHANGED. * - "reason" will always be CVMX_USB_CALLBACK_PORT_CHANGED.
* - "status" will always be CVMX_USB_COMPLETE_SUCCESS. * - "status" will always be CVMX_USB_COMPLETE_SUCCESS.
* - "pipe_handle" will always be -1. * - "pipe_handle" will always be -1.
...@@ -146,14 +146,14 @@ ...@@ -146,14 +146,14 @@
* *
* The completion callback prototype needs to look as follows: * The completion callback prototype needs to look as follows:
* *
* void complete_callback(cvmx_usb_state_t *usb, * void complete_callback(struct cvmx_usb_state *usb,
* enum cvmx_usb_callback reason, * enum cvmx_usb_callback reason,
* enum cvmx_usb_complete status, * enum cvmx_usb_complete status,
* int pipe_handle, * int pipe_handle,
* int submit_handle, * int submit_handle,
* int bytes_transferred, * int bytes_transferred,
* void *user_data); * void *user_data);
* - "usb" is the cvmx_usb_state_t for the port. * - "usb" is the struct cvmx_usb_state for the port.
* - "reason" will always be CVMX_USB_CALLBACK_TRANSFER_COMPLETE. * - "reason" will always be CVMX_USB_CALLBACK_TRANSFER_COMPLETE.
* - "status" will be one of the cvmx_usb_complete enumerations. * - "status" will be one of the cvmx_usb_complete enumerations.
* - "pipe_handle" is the handle to the pipe the transaction * - "pipe_handle" is the handle to the pipe the transaction
...@@ -393,10 +393,9 @@ enum cvmx_usb_callback { ...@@ -393,10 +393,9 @@ enum cvmx_usb_callback {
* may change in future SDKs. No data in it should be referenced * may change in future SDKs. No data in it should be referenced
* by user's of this API. * by user's of this API.
*/ */
typedef struct struct cvmx_usb_state {
{ char data[65536];
char data[65536]; };
} cvmx_usb_state_t;
/** /**
* USB callback functions are always of the following type. * USB callback functions are always of the following type.
...@@ -416,7 +415,7 @@ typedef struct ...@@ -416,7 +415,7 @@ typedef struct
* - user_data = The user pointer supplied to the * - user_data = The user pointer supplied to the
* function cvmx_usb_submit() or * function cvmx_usb_submit() or
* cvmx_usb_register_callback() */ * cvmx_usb_register_callback() */
typedef void (*cvmx_usb_callback_func_t)(cvmx_usb_state_t *state, typedef void (*cvmx_usb_callback_func_t)(struct cvmx_usb_state *state,
enum cvmx_usb_callback reason, enum cvmx_usb_callback reason,
enum cvmx_usb_complete status, enum cvmx_usb_complete status,
int pipe_handle, int submit_handle, int pipe_handle, int submit_handle,
...@@ -473,14 +472,14 @@ enum cvmx_usb_pipe_flags { ...@@ -473,14 +472,14 @@ enum cvmx_usb_pipe_flags {
}; };
extern int cvmx_usb_get_num_ports(void); extern int cvmx_usb_get_num_ports(void);
extern int cvmx_usb_initialize(cvmx_usb_state_t *state, int usb_port_number, extern int cvmx_usb_initialize(struct cvmx_usb_state *state, int usb_port_number,
enum cvmx_usb_initialize_flags flags); enum cvmx_usb_initialize_flags flags);
extern int cvmx_usb_shutdown(cvmx_usb_state_t *state); extern int cvmx_usb_shutdown(struct cvmx_usb_state *state);
extern int cvmx_usb_enable(cvmx_usb_state_t *state); extern int cvmx_usb_enable(struct cvmx_usb_state *state);
extern int cvmx_usb_disable(cvmx_usb_state_t *state); extern int cvmx_usb_disable(struct cvmx_usb_state *state);
extern struct cvmx_usb_port_status cvmx_usb_get_status(cvmx_usb_state_t *state); extern struct cvmx_usb_port_status cvmx_usb_get_status(struct cvmx_usb_state *state);
extern void cvmx_usb_set_status(cvmx_usb_state_t *state, struct cvmx_usb_port_status port_status); extern void cvmx_usb_set_status(struct cvmx_usb_state *state, struct cvmx_usb_port_status port_status);
extern int cvmx_usb_open_pipe(cvmx_usb_state_t *state, extern int cvmx_usb_open_pipe(struct cvmx_usb_state *state,
enum cvmx_usb_pipe_flags flags, enum cvmx_usb_pipe_flags flags,
int device_addr, int endpoint_num, int device_addr, int endpoint_num,
enum cvmx_usb_speed device_speed, int max_packet, enum cvmx_usb_speed device_speed, int max_packet,
...@@ -488,15 +487,15 @@ extern int cvmx_usb_open_pipe(cvmx_usb_state_t *state, ...@@ -488,15 +487,15 @@ extern int cvmx_usb_open_pipe(cvmx_usb_state_t *state,
enum cvmx_usb_direction transfer_dir, int interval, enum cvmx_usb_direction transfer_dir, int interval,
int multi_count, int hub_device_addr, int multi_count, int hub_device_addr,
int hub_port); int hub_port);
extern int cvmx_usb_submit_bulk(cvmx_usb_state_t *state, int pipe_handle, extern int cvmx_usb_submit_bulk(struct cvmx_usb_state *state, int pipe_handle,
uint64_t buffer, int buffer_length, uint64_t buffer, int buffer_length,
cvmx_usb_callback_func_t callback, cvmx_usb_callback_func_t callback,
void *user_data); void *user_data);
extern int cvmx_usb_submit_interrupt(cvmx_usb_state_t *state, int pipe_handle, extern int cvmx_usb_submit_interrupt(struct cvmx_usb_state *state, int pipe_handle,
uint64_t buffer, int buffer_length, uint64_t buffer, int buffer_length,
cvmx_usb_callback_func_t callback, cvmx_usb_callback_func_t callback,
void *user_data); void *user_data);
extern int cvmx_usb_submit_control(cvmx_usb_state_t *state, int pipe_handle, extern int cvmx_usb_submit_control(struct cvmx_usb_state *state, int pipe_handle,
uint64_t control_header, uint64_t control_header,
uint64_t buffer, int buffer_length, uint64_t buffer, int buffer_length,
cvmx_usb_callback_func_t callback, cvmx_usb_callback_func_t callback,
...@@ -517,22 +516,22 @@ enum cvmx_usb_isochronous_flags { ...@@ -517,22 +516,22 @@ enum cvmx_usb_isochronous_flags {
CVMX_USB_ISOCHRONOUS_FLAGS_ASAP = 1 << 1, CVMX_USB_ISOCHRONOUS_FLAGS_ASAP = 1 << 1,
}; };
extern int cvmx_usb_submit_isochronous(cvmx_usb_state_t *state, int pipe_handle, extern int cvmx_usb_submit_isochronous(struct cvmx_usb_state *state, int pipe_handle,
int start_frame, int flags, int start_frame, int flags,
int number_packets, int number_packets,
struct cvmx_usb_iso_packet packets[], struct cvmx_usb_iso_packet packets[],
uint64_t buffer, int buffer_length, uint64_t buffer, int buffer_length,
cvmx_usb_callback_func_t callback, cvmx_usb_callback_func_t callback,
void *user_data); void *user_data);
extern int cvmx_usb_cancel(cvmx_usb_state_t *state, int pipe_handle, extern int cvmx_usb_cancel(struct cvmx_usb_state *state, int pipe_handle,
int submit_handle); int submit_handle);
extern int cvmx_usb_cancel_all(cvmx_usb_state_t *state, int pipe_handle); extern int cvmx_usb_cancel_all(struct cvmx_usb_state *state, int pipe_handle);
extern int cvmx_usb_close_pipe(cvmx_usb_state_t *state, int pipe_handle); extern int cvmx_usb_close_pipe(struct cvmx_usb_state *state, int pipe_handle);
extern int cvmx_usb_register_callback(cvmx_usb_state_t *state, extern int cvmx_usb_register_callback(struct cvmx_usb_state *state,
enum cvmx_usb_callback reason, enum cvmx_usb_callback reason,
cvmx_usb_callback_func_t callback, cvmx_usb_callback_func_t callback,
void *user_data); void *user_data);
extern int cvmx_usb_get_frame_number(cvmx_usb_state_t *state); extern int cvmx_usb_get_frame_number(struct cvmx_usb_state *state);
extern int cvmx_usb_poll(cvmx_usb_state_t *state); extern int cvmx_usb_poll(struct cvmx_usb_state *state);
#endif /* __CVMX_USB_H__ */ #endif /* __CVMX_USB_H__ */
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
struct octeon_hcd { struct octeon_hcd {
spinlock_t lock; spinlock_t lock;
cvmx_usb_state_t usb; struct cvmx_usb_state usb;
struct tasklet_struct dequeue_tasklet; struct tasklet_struct dequeue_tasklet;
struct list_head dequeue_list; struct list_head dequeue_list;
}; };
...@@ -42,7 +42,7 @@ static inline struct usb_hcd *octeon_to_hcd(struct octeon_hcd *p) ...@@ -42,7 +42,7 @@ static inline struct usb_hcd *octeon_to_hcd(struct octeon_hcd *p)
return container_of((void *)p, struct usb_hcd, hcd_priv); return container_of((void *)p, struct usb_hcd, hcd_priv);
} }
static inline struct octeon_hcd *cvmx_usb_to_octeon(cvmx_usb_state_t *p) static inline struct octeon_hcd *cvmx_usb_to_octeon(struct cvmx_usb_state *p)
{ {
return container_of(p, struct octeon_hcd, usb); return container_of(p, struct octeon_hcd, usb);
} }
...@@ -58,7 +58,7 @@ static irqreturn_t octeon_usb_irq(struct usb_hcd *hcd) ...@@ -58,7 +58,7 @@ static irqreturn_t octeon_usb_irq(struct usb_hcd *hcd)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static void octeon_usb_port_callback(cvmx_usb_state_t *usb, static void octeon_usb_port_callback(struct cvmx_usb_state *usb,
enum cvmx_usb_callback reason, enum cvmx_usb_callback reason,
enum cvmx_usb_complete status, enum cvmx_usb_complete status,
int pipe_handle, int pipe_handle,
...@@ -105,7 +105,7 @@ static int octeon_usb_get_frame_number(struct usb_hcd *hcd) ...@@ -105,7 +105,7 @@ static int octeon_usb_get_frame_number(struct usb_hcd *hcd)
return cvmx_usb_get_frame_number(&priv->usb); return cvmx_usb_get_frame_number(&priv->usb);
} }
static void octeon_usb_urb_complete_callback(cvmx_usb_state_t *usb, static void octeon_usb_urb_complete_callback(struct cvmx_usb_state *usb,
enum cvmx_usb_callback reason, enum cvmx_usb_callback reason,
enum cvmx_usb_complete status, enum cvmx_usb_complete status,
int pipe_handle, int pipe_handle,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment