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

staging: octeon-usb: cvmx_usb_transfer_t -> enum cvmx_usb_transfer

Replace cvmx_usb_transfer_t with enum cvmx_usb_transfer.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4918072e
...@@ -122,7 +122,7 @@ typedef enum { ...@@ -122,7 +122,7 @@ typedef enum {
typedef struct cvmx_usb_transaction { typedef struct cvmx_usb_transaction {
struct cvmx_usb_transaction *prev; /**< Transaction before this one in the pipe */ struct cvmx_usb_transaction *prev; /**< Transaction before this one in the pipe */
struct cvmx_usb_transaction *next; /**< Transaction after this one in the pipe */ struct cvmx_usb_transaction *next; /**< Transaction after this one in the pipe */
cvmx_usb_transfer_t type; /**< Type of transaction, duplicated of the pipe */ enum cvmx_usb_transfer type; /**< Type of transaction, duplicated of the pipe */
cvmx_usb_transaction_flags_t flags; /**< State flags for this transaction */ cvmx_usb_transaction_flags_t flags; /**< State flags for this transaction */
uint64_t buffer; /**< User's physical buffer address to read/write */ uint64_t buffer; /**< User's physical buffer address to read/write */
int buffer_length; /**< Size of the user's buffer in bytes */ int buffer_length; /**< Size of the user's buffer in bytes */
...@@ -152,7 +152,7 @@ typedef struct cvmx_usb_pipe { ...@@ -152,7 +152,7 @@ typedef struct cvmx_usb_pipe {
uint64_t next_tx_frame; /**< The next frame this pipe is allowed to transmit on */ uint64_t next_tx_frame; /**< The next frame this pipe is allowed to transmit on */
cvmx_usb_pipe_flags_t flags; /**< State flags for this pipe */ cvmx_usb_pipe_flags_t flags; /**< State flags for this pipe */
enum cvmx_usb_speed device_speed; /**< Speed of device connected to this pipe */ enum cvmx_usb_speed device_speed; /**< Speed of device connected to this pipe */
cvmx_usb_transfer_t transfer_type; /**< Type of transaction supported by this pipe */ enum cvmx_usb_transfer transfer_type; /**< Type of transaction supported by this pipe */
cvmx_usb_direction_t transfer_dir; /**< IN or OUT. Ignored for Control */ cvmx_usb_direction_t transfer_dir; /**< IN or OUT. Ignored for Control */
int multi_count; /**< Max packet in a row for the device */ int multi_count; /**< Max packet in a row for the device */
uint16_t max_packet; /**< The device's maximum packet size in bytes */ uint16_t max_packet; /**< The device's maximum packet size in bytes */
...@@ -1104,7 +1104,7 @@ static inline int __cvmx_usb_get_pipe_handle(cvmx_usb_internal_state_t *usb, ...@@ -1104,7 +1104,7 @@ static inline int __cvmx_usb_get_pipe_handle(cvmx_usb_internal_state_t *usb,
int cvmx_usb_open_pipe(cvmx_usb_state_t *state, cvmx_usb_pipe_flags_t flags, int cvmx_usb_open_pipe(cvmx_usb_state_t *state, cvmx_usb_pipe_flags_t 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,
cvmx_usb_transfer_t transfer_type, enum cvmx_usb_transfer transfer_type,
cvmx_usb_direction_t transfer_dir, int interval, cvmx_usb_direction_t transfer_dir, int interval,
int multi_count, int hub_device_addr, int hub_port) int multi_count, int hub_device_addr, int hub_port)
{ {
...@@ -1825,7 +1825,7 @@ static void __cvmx_usb_schedule(cvmx_usb_internal_state_t *usb, int is_sof) ...@@ -1825,7 +1825,7 @@ static void __cvmx_usb_schedule(cvmx_usb_internal_state_t *usb, int is_sof)
int channel; int channel;
cvmx_usb_pipe_t *pipe; cvmx_usb_pipe_t *pipe;
int need_sof; int need_sof;
cvmx_usb_transfer_t ttype; enum cvmx_usb_transfer ttype;
if (usb->init_flags & CVMX_USB_INITIALIZE_FLAGS_NO_DMA) { if (usb->init_flags & CVMX_USB_INITIALIZE_FLAGS_NO_DMA) {
/* Without DMA we need to be careful to not schedule something at the end of a frame and cause an overrun */ /* Without DMA we need to be careful to not schedule something at the end of a frame and cause an overrun */
...@@ -2025,7 +2025,7 @@ static void __cvmx_usb_perform_complete(cvmx_usb_internal_state_t *usb, ...@@ -2025,7 +2025,7 @@ static void __cvmx_usb_perform_complete(cvmx_usb_internal_state_t *usb,
*/ */
static int __cvmx_usb_submit_transaction(cvmx_usb_internal_state_t *usb, static int __cvmx_usb_submit_transaction(cvmx_usb_internal_state_t *usb,
int pipe_handle, int pipe_handle,
cvmx_usb_transfer_t type, enum cvmx_usb_transfer type,
int flags, int flags,
uint64_t buffer, uint64_t buffer,
int buffer_length, int buffer_length,
......
...@@ -248,15 +248,23 @@ enum cvmx_usb_speed { ...@@ -248,15 +248,23 @@ enum cvmx_usb_speed {
}; };
/** /**
* Enumeration representing the possible USB transfer types. * enum cvmx_usb_transfer - the possible USB transfer types
*
* @CVMX_USB_TRANSFER_CONTROL: USB transfer type control for hub and status
* transfers
* @CVMX_USB_TRANSFER_ISOCHRONOUS: USB transfer type isochronous for low
* priority periodic transfers
* @CVMX_USB_TRANSFER_BULK: USB transfer type bulk for large low priority
* transfers
* @CVMX_USB_TRANSFER_INTERRUPT: USB transfer type interrupt for high priority
* periodic transfers
*/ */
typedef enum enum cvmx_usb_transfer {
{ CVMX_USB_TRANSFER_CONTROL = 0,
CVMX_USB_TRANSFER_CONTROL = 0, /**< USB transfer type control for hub and status transfers */ CVMX_USB_TRANSFER_ISOCHRONOUS = 1,
CVMX_USB_TRANSFER_ISOCHRONOUS = 1, /**< USB transfer type isochronous for low priority periodic transfers */ CVMX_USB_TRANSFER_BULK = 2,
CVMX_USB_TRANSFER_BULK = 2, /**< USB transfer type bulk for large low priority transfers */ CVMX_USB_TRANSFER_INTERRUPT = 3,
CVMX_USB_TRANSFER_INTERRUPT = 3, /**< USB transfer type interrupt for high priority periodic transfers */ };
} cvmx_usb_transfer_t;
/** /**
* Enumeration of the transfer directions * Enumeration of the transfer directions
...@@ -417,7 +425,7 @@ extern int cvmx_usb_open_pipe(cvmx_usb_state_t *state, ...@@ -417,7 +425,7 @@ extern int cvmx_usb_open_pipe(cvmx_usb_state_t *state,
cvmx_usb_pipe_flags_t flags, cvmx_usb_pipe_flags_t 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,
cvmx_usb_transfer_t transfer_type, enum cvmx_usb_transfer transfer_type,
cvmx_usb_direction_t transfer_dir, int interval, cvmx_usb_direction_t transfer_dir, int interval,
int multi_count, int hub_device_addr, int multi_count, int hub_device_addr,
int hub_port); int hub_port);
......
...@@ -216,7 +216,7 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd, ...@@ -216,7 +216,7 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd,
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
if (!ep->hcpriv) { if (!ep->hcpriv) {
cvmx_usb_transfer_t transfer_type; enum cvmx_usb_transfer transfer_type;
enum cvmx_usb_speed speed; enum cvmx_usb_speed speed;
int split_device = 0; int split_device = 0;
int split_port = 0; int split_port = 0;
......
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