usb: rename board_usb_init_type to usb_init_type

This will be used by usb_lowlevel_init so it will
no longer be used by only board specific functions.

Move definition of enum usb_init_type higher in file
so that it will be available for usb_low_level_init.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
diff --git a/board/amcc/canyonlands/canyonlands.c b/board/amcc/canyonlands/canyonlands.c
index 395095e..2b5f1a6 100644
--- a/board/amcc/canyonlands/canyonlands.c
+++ b/board/amcc/canyonlands/canyonlands.c
@@ -189,7 +189,7 @@
 }
 
 #if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_BOARD_INIT)
-int board_usb_init(int index, enum board_usb_init_type init)
+int board_usb_init(int index, enum usb_init_type init)
 {
 	struct board_bcsr *bcsr_data =
 		(struct board_bcsr *)CONFIG_SYS_BCSR_BASE;
@@ -230,7 +230,7 @@
 	return 0;
 }
 
-int board_usb_cleanup(int index, enum board_usb_init_type init)
+int board_usb_cleanup(int index, enum usb_init_type init)
 {
 	return usb_board_stop();
 }
diff --git a/board/balloon3/balloon3.c b/board/balloon3/balloon3.c
index 19c0e02..04e0574 100644
--- a/board/balloon3/balloon3.c
+++ b/board/balloon3/balloon3.c
@@ -60,7 +60,7 @@
 }
 
 #ifdef	CONFIG_CMD_USB
-int board_usb_init(int index, enum board_usb_init_type init)
+int board_usb_init(int index, enum usb_init_type init)
 {
 	writel((readl(UHCHR) | UHCHR_PCPL | UHCHR_PSPL) &
 		~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE),
@@ -91,7 +91,7 @@
 	return 0;
 }
 
-int board_usb_cleanup(int index, enum board_usb_init_type init)
+int board_usb_cleanup(int index, enum usb_init_type init)
 {
 	return 0;
 }
diff --git a/board/esd/apc405/apc405.c b/board/esd/apc405/apc405.c
index 79341f5..5cc1d0d 100644
--- a/board/esd/apc405/apc405.c
+++ b/board/esd/apc405/apc405.c
@@ -429,7 +429,7 @@
 }
 
 #if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_BOARD_INIT)
-int board_usb_init(int index, enum board_usb_init_type init)
+int board_usb_init(int index, enum usb_init_type init)
 {
 	return 0;
 }
@@ -454,7 +454,7 @@
 	return 0;
 }
 
-int board_usb_cleanup(int index, enum board_usb_init_type init)
+int board_usb_cleanup(int index, enum usb_init_type init)
 {
 	return usb_board_stop();
 }
diff --git a/board/esd/pmc440/pmc440.c b/board/esd/pmc440/pmc440.c
index 44b86da..88fc5f7 100644
--- a/board/esd/pmc440/pmc440.c
+++ b/board/esd/pmc440/pmc440.c
@@ -822,7 +822,7 @@
 }
 
 #if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_BOARD_INIT)
-int board_usb_init(int index, enum board_usb_init_type init)
+int board_usb_init(int index, enum usb_init_type init)
 {
 	char *act = getenv("usbact");
 	int i;
@@ -846,7 +846,7 @@
 	return 0;
 }
 
-int board_usb_cleanup(int index, enum board_usb_init_type init)
+int board_usb_cleanup(int index, enum usb_init_type init)
 {
 	return usb_board_stop();
 }
diff --git a/board/icpdas/lp8x4x/lp8x4x.c b/board/icpdas/lp8x4x/lp8x4x.c
index a96bed6..92dd4ff 100644
--- a/board/icpdas/lp8x4x/lp8x4x.c
+++ b/board/icpdas/lp8x4x/lp8x4x.c
@@ -59,7 +59,7 @@
 #endif
 
 #ifdef	CONFIG_CMD_USB
-int board_usb_init(int index, enum board_usb_init_type init)
+int board_usb_init(int index, enum usb_init_type init)
 {
 	writel((UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
 		~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE),
@@ -90,7 +90,7 @@
 	return 0;
 }
 
-int board_usb_cleanup(int index, enum board_usb_init_type init)
+int board_usb_cleanup(int index, enum usb_init_type init)
 {
 	return 0;
 }
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index 58d925f..d31d511 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -496,7 +496,7 @@
 	.usb_flags	= PHY0_SLEEP,
 };
 
-int board_usb_init(int index, enum board_usb_init_type init)
+int board_usb_init(int index, enum usb_init_type init)
 {
 	debug("USB_udc_probe\n");
 	return s3c_udc_probe(&s5pc210_otg_data);
diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c
index b70c1e3..8d95e4d 100644
--- a/board/toradex/colibri_pxa270/colibri_pxa270.c
+++ b/board/toradex/colibri_pxa270/colibri_pxa270.c
@@ -40,7 +40,7 @@
 }
 
 #ifdef	CONFIG_CMD_USB
-int board_usb_init(int index, enum board_usb_init_type init)
+int board_usb_init(int index, enum usb_init_type init)
 {
 	writel((readl(UHCHR) | UHCHR_PCPL | UHCHR_PSPL) &
 		~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE),
@@ -71,7 +71,7 @@
 	return 0;
 }
 
-int board_usb_cleanup(int index, enum board_usb_init_type init)
+int board_usb_cleanup(int index, enum usb_init_type init)
 {
 	return 0;
 }
diff --git a/board/trizepsiv/conxs.c b/board/trizepsiv/conxs.c
index 830d5a8..1ddf05d 100644
--- a/board/trizepsiv/conxs.c
+++ b/board/trizepsiv/conxs.c
@@ -43,7 +43,7 @@
  * Miscelaneous platform dependent initialisations
  */
 
-int board_usb_init(int index, enum board_usb_init_type init)
+int board_usb_init(int index, enum usb_init_type init)
 {
 	writel((readl(UHCHR) | UHCHR_PCPL | UHCHR_PSPL) &
 		~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE),
@@ -70,7 +70,7 @@
 	return 0;
 }
 
-int board_usb_cleanup(int index, enum board_usb_init_type init)
+int board_usb_cleanup(int index, enum usb_init_type init)
 {
 	return 0;
 }
diff --git a/board/vpac270/vpac270.c b/board/vpac270/vpac270.c
index fab4636..8d777df 100644
--- a/board/vpac270/vpac270.c
+++ b/board/vpac270/vpac270.c
@@ -67,7 +67,7 @@
 #endif
 
 #ifdef	CONFIG_CMD_USB
-int board_usb_init(int index, enum board_usb_init_type init)
+int board_usb_init(int index, enum usb_init_type init)
 {
 	writel((UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
 		~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE),
@@ -98,7 +98,7 @@
 	return 0;
 }
 
-int board_usb_cleanup(int index, enum board_usb_init_type init)
+int board_usb_cleanup(int index, enum usb_init_type init)
 {
 	return 0;
 }
diff --git a/common/usb.c b/common/usb.c
index a61fcac..414f9c2 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -1068,7 +1068,7 @@
 }
 
 __weak
-int board_usb_init(int index, enum board_usb_init_type init)
+int board_usb_init(int index, enum usb_init_type init)
 {
 	return 0;
 }
diff --git a/include/usb.h b/include/usb.h
index 17fb68c..b4fea52 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -129,6 +129,16 @@
 	unsigned int slot_id;
 };
 
+/*
+ * You can initialize platform's USB host or device
+ * ports by passing this enum as an argument to
+ * board_usb_init().
+ */
+enum usb_init_type {
+	USB_INIT_HOST,
+	USB_INIT_DEVICE
+};
+
 /**********************************************************************
  * this is how the lowlevel part communicate with the outer world
  */
@@ -170,32 +180,22 @@
 #endif
 
 /*
- * You can initialize platform's USB host or device
- * ports by passing this enum as an argument to
- * board_usb_init().
- */
-enum board_usb_init_type {
-	USB_INIT_HOST,
-	USB_INIT_DEVICE
-};
-
-/*
  * board-specific hardware initialization, called by
  * usb drivers and u-boot commands
  *
  * @param index USB controller number
  * @param init initializes controller as USB host or device
  */
-int board_usb_init(int index, enum board_usb_init_type init);
+int board_usb_init(int index, enum usb_init_type init);
 
 /*
  * can be used to clean up after failed USB initialization attempt
  * vide: board_usb_init()
  *
  * @param index USB controller number for selective cleanup
- * @param init board_usb_init_type passed to board_usb_init()
+ * @param init usb_init_type passed to board_usb_init()
  */
-int board_usb_cleanup(int index, enum board_usb_init_type init);
+int board_usb_cleanup(int index, enum usb_init_type init);
 
 #ifdef CONFIG_USB_STORAGE