diff options
Diffstat (limited to 'arch/mips/cavium-octeon/executive/cvmx-helper-board.c')
-rw-r--r-- | arch/mips/cavium-octeon/executive/cvmx-helper-board.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c index 0a1283ce47f5..b764df64be40 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c +++ b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c | |||
@@ -722,3 +722,30 @@ int __cvmx_helper_board_hardware_enable(int interface) | |||
722 | } | 722 | } |
723 | return 0; | 723 | return 0; |
724 | } | 724 | } |
725 | |||
726 | /** | ||
727 | * Get the clock type used for the USB block based on board type. | ||
728 | * Used by the USB code for auto configuration of clock type. | ||
729 | * | ||
730 | * Return USB clock type enumeration | ||
731 | */ | ||
732 | enum cvmx_helper_board_usb_clock_types __cvmx_helper_board_usb_get_clock_type(void) | ||
733 | { | ||
734 | switch (cvmx_sysinfo_get()->board_type) { | ||
735 | case CVMX_BOARD_TYPE_BBGW_REF: | ||
736 | case CVMX_BOARD_TYPE_LANAI2_A: | ||
737 | case CVMX_BOARD_TYPE_LANAI2_U: | ||
738 | case CVMX_BOARD_TYPE_LANAI2_G: | ||
739 | case CVMX_BOARD_TYPE_NIC10E_66: | ||
740 | case CVMX_BOARD_TYPE_UBNT_E100: | ||
741 | return USB_CLOCK_TYPE_CRYSTAL_12; | ||
742 | case CVMX_BOARD_TYPE_NIC10E: | ||
743 | return USB_CLOCK_TYPE_REF_12; | ||
744 | default: | ||
745 | break; | ||
746 | } | ||
747 | /* Most boards except NIC10e use a 12MHz crystal */ | ||
748 | if (OCTEON_IS_MODEL(OCTEON_FAM_2)) | ||
749 | return USB_CLOCK_TYPE_CRYSTAL_12; | ||
750 | return USB_CLOCK_TYPE_REF_48; | ||
751 | } | ||