From 1c25754815e6ff06048afb1104754b016acc4202 Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Tue, 30 Jul 2013 23:42:58 +0300 Subject: [PATCH] staging: octeon-usb: cvmx_usb_initialize_flags_t -> enum cvmx_usb_initialize_flags Replace cvmx_usb_initialize_flags_t with enum cvmx_usb_initialize_flags. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/octeon-usb/cvmx-usb.c | 4 +-- drivers/staging/octeon-usb/cvmx-usb.h | 47 +++++++++++++++++---------- 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/drivers/staging/octeon-usb/cvmx-usb.c b/drivers/staging/octeon-usb/cvmx-usb.c index 9e4bf7194ac7..3993e3c4b8cc 100644 --- a/drivers/staging/octeon-usb/cvmx-usb.c +++ b/drivers/staging/octeon-usb/cvmx-usb.c @@ -486,13 +486,13 @@ static inline void __cvmx_usb_remove_pipe(cvmx_usb_pipe_list_t *list, cvmx_usb_p * @usb_port_number: * Which Octeon USB port to initialize. * @flags: Flags to control hardware initialization. See - * cvmx_usb_initialize_flags_t for the flag + * enum cvmx_usb_initialize_flags for the flag * definitions. Some flags are mandatory. * * Returns: 0 or a negative error code. */ int cvmx_usb_initialize(cvmx_usb_state_t *state, int usb_port_number, - cvmx_usb_initialize_flags_t flags) + enum cvmx_usb_initialize_flags flags) { cvmx_usbnx_clk_ctl_t usbn_clk_ctl; cvmx_usbnx_usbp_ctl_status_t usbn_usbp_ctl_status; diff --git a/drivers/staging/octeon-usb/cvmx-usb.h b/drivers/staging/octeon-usb/cvmx-usb.h index 7e1e2986d953..8c46ebd15bfd 100644 --- a/drivers/staging/octeon-usb/cvmx-usb.h +++ b/drivers/staging/octeon-usb/cvmx-usb.h @@ -408,23 +408,36 @@ typedef void (*cvmx_usb_callback_func_t)(cvmx_usb_state_t *state, int bytes_transferred, void *user_data); /** - * Flags to pass the initialization function. + * enum cvmx_usb_initialize_flags - flags to pass the initialization function + * + * @CVMX_USB_INITIALIZE_FLAGS_CLOCK_XO_XI: The USB port uses a 12MHz crystal + * as clock source at USB_XO and + * USB_XI. + * @CVMX_USB_INITIALIZE_FLAGS_CLOCK_XO_GND: The USB port uses 12/24/48MHz 2.5V + * board clock source at USB_XO. + * USB_XI should be tied to GND. + * @CVMX_USB_INITIALIZE_FLAGS_CLOCK_AUTO: Automatically determine clock type + * based on function in + * cvmx-helper-board.c. + * @CVMX_USB_INITIALIZE_FLAGS_CLOCK_MHZ_MASK: Mask for clock speed field + * @CVMX_USB_INITIALIZE_FLAGS_CLOCK_12MHZ: Speed of reference clock or + * crystal + * @CVMX_USB_INITIALIZE_FLAGS_CLOCK_24MHZ: Speed of reference clock + * @CVMX_USB_INITIALIZE_FLAGS_CLOCK_48MHZ: Speed of reference clock + * @CVMX_USB_INITIALIZE_FLAGS_NO_DMA: Disable DMA and used polled IO for + * data transfer use for the USB */ -typedef enum -{ - CVMX_USB_INITIALIZE_FLAGS_CLOCK_XO_XI = 1<<0, /**< The USB port uses a 12MHz crystal as clock source - at USB_XO and USB_XI. */ - CVMX_USB_INITIALIZE_FLAGS_CLOCK_XO_GND = 1<<1, /**< The USB port uses 12/24/48MHz 2.5V board clock - source at USB_XO. USB_XI should be tied to GND.*/ - CVMX_USB_INITIALIZE_FLAGS_CLOCK_AUTO = 0, /**< Automatically determine clock type based on function - in cvmx-helper-board.c. */ - CVMX_USB_INITIALIZE_FLAGS_CLOCK_MHZ_MASK = 3<<3, /**< Mask for clock speed field */ - CVMX_USB_INITIALIZE_FLAGS_CLOCK_12MHZ = 1<<3, /**< Speed of reference clock or crystal */ - CVMX_USB_INITIALIZE_FLAGS_CLOCK_24MHZ = 2<<3, /**< Speed of reference clock */ - CVMX_USB_INITIALIZE_FLAGS_CLOCK_48MHZ = 3<<3, /**< Speed of reference clock */ - /* Bits 3-4 used to encode the clock frequency */ - CVMX_USB_INITIALIZE_FLAGS_NO_DMA = 1<<5, /**< Disable DMA and used polled IO for data transfer use for the USB */ -} cvmx_usb_initialize_flags_t; +enum cvmx_usb_initialize_flags { + CVMX_USB_INITIALIZE_FLAGS_CLOCK_XO_XI = 1 << 0, + CVMX_USB_INITIALIZE_FLAGS_CLOCK_XO_GND = 1 << 1, + CVMX_USB_INITIALIZE_FLAGS_CLOCK_AUTO = 0, + CVMX_USB_INITIALIZE_FLAGS_CLOCK_MHZ_MASK = 3 << 3, + CVMX_USB_INITIALIZE_FLAGS_CLOCK_12MHZ = 1 << 3, + CVMX_USB_INITIALIZE_FLAGS_CLOCK_24MHZ = 2 << 3, + CVMX_USB_INITIALIZE_FLAGS_CLOCK_48MHZ = 3 << 3, + /* Bits 3-4 used to encode the clock frequency */ + CVMX_USB_INITIALIZE_FLAGS_NO_DMA = 1 << 5, +}; /** * Flags for passing when a pipe is created. Currently no flags @@ -439,7 +452,7 @@ typedef enum extern int cvmx_usb_get_num_ports(void); extern int cvmx_usb_initialize(cvmx_usb_state_t *state, int usb_port_number, - cvmx_usb_initialize_flags_t flags); + enum cvmx_usb_initialize_flags flags); extern int cvmx_usb_shutdown(cvmx_usb_state_t *state); extern int cvmx_usb_enable(cvmx_usb_state_t *state); extern int cvmx_usb_disable(cvmx_usb_state_t *state); -- 2.30.2