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

staging: octeon-usb: cvmx_usb_speed_t -> enum cvmx_usb_speed

Replace cvmx_usb_speed_t with enum cvmx_usb_speed.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8fd07007
......@@ -151,7 +151,7 @@ typedef struct cvmx_usb_pipe {
uint64_t interval; /**< For periodic pipes, the interval between packets in frames */
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_speed_t 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 */
cvmx_usb_direction_t transfer_dir; /**< IN or OUT. Ignored for Control */
int multi_count; /**< Max packet in a row for the device */
......@@ -1103,7 +1103,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 device_addr, int endpoint_num,
cvmx_usb_speed_t device_speed, int max_packet,
enum cvmx_usb_speed device_speed, int max_packet,
cvmx_usb_transfer_t transfer_type,
cvmx_usb_direction_t transfer_dir, int interval,
int multi_count, int hub_device_addr, int hub_port)
......
......@@ -235,14 +235,17 @@
#define __CVMX_USB_H__
/**
* Enumerations representing the possible USB device speeds
* enum cvmx_usb_speed - the possible USB device speeds
*
* @CVMX_USB_SPEED_HIGH: Device is operation at 480Mbps
* @CVMX_USB_SPEED_FULL: Device is operation at 12Mbps
* @CVMX_USB_SPEED_LOW: Device is operation at 1.5Mbps
*/
typedef enum
{
CVMX_USB_SPEED_HIGH = 0, /**< Device is operation at 480Mbps */
CVMX_USB_SPEED_FULL = 1, /**< Device is operation at 12Mbps */
CVMX_USB_SPEED_LOW = 2, /**< Device is operation at 1.5Mbps */
} cvmx_usb_speed_t;
enum cvmx_usb_speed {
CVMX_USB_SPEED_HIGH = 0,
CVMX_USB_SPEED_FULL = 1,
CVMX_USB_SPEED_LOW = 2,
};
/**
* Enumeration representing the possible USB transfer types.
......@@ -290,7 +293,7 @@ typedef struct
uint32_t port_enabled : 1; /**< 1 = Usb port is enabled, 0 = disabled */
uint32_t port_over_current : 1; /**< 1 = Over current detected, 0 = Over current not detected. Octeon doesn't support over current detection */
uint32_t port_powered : 1; /**< 1 = Port power is being supplied to the device, 0 = power is off. Octeon doesn't support turning port power off */
cvmx_usb_speed_t port_speed : 2; /**< Current port speed */
enum cvmx_usb_speed port_speed : 2; /**< Current port speed */
uint32_t connected : 1; /**< 1 = A device is connected to the port, 0 = No device is connected */
uint32_t connect_change : 1; /**< 1 = Device connected state changed since the last set status call */
} cvmx_usb_port_status_t;
......@@ -413,7 +416,7 @@ extern void cvmx_usb_set_status(cvmx_usb_state_t *state, cvmx_usb_port_status_t
extern int cvmx_usb_open_pipe(cvmx_usb_state_t *state,
cvmx_usb_pipe_flags_t flags,
int device_addr, int endpoint_num,
cvmx_usb_speed_t device_speed, int max_packet,
enum cvmx_usb_speed device_speed, int max_packet,
cvmx_usb_transfer_t transfer_type,
cvmx_usb_direction_t transfer_dir, int interval,
int multi_count, int hub_device_addr,
......
......@@ -217,7 +217,7 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd,
if (!ep->hcpriv) {
cvmx_usb_transfer_t transfer_type;
cvmx_usb_speed_t speed;
enum cvmx_usb_speed speed;
int split_device = 0;
int split_port = 0;
switch (usb_pipetype(urb->pipe)) {
......
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