staging: octeon-usb: cvmx_usb_initialize_flags_t -> enum cvmx_usb_initialize_flags
authorAaro Koskinen <aaro.koskinen@iki.fi>
Tue, 30 Jul 2013 20:42:58 +0000 (23:42 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Aug 2013 00:50:06 +0000 (17:50 -0700)
Replace cvmx_usb_initialize_flags_t with enum cvmx_usb_initialize_flags.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/octeon-usb/cvmx-usb.c
drivers/staging/octeon-usb/cvmx-usb.h

index 9e4bf7194ac73e301f4614b1bbb66e3c0d72acb2..3993e3c4b8ccab47c6eeb9bfaa9392c73db4ee5c 100644 (file)
@@ -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;
index 7e1e2986d9538ec5850081ba6aa586dd9272015c..8c46ebd15bfd086c033f77c6cd9eae5ebb0587b0 100644 (file)
@@ -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);