aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-helper-board.c13
-rw-r--r--arch/mips/include/asm/octeon/cvmx-bootinfo.h2
2 files changed, 15 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 7c6497781895..0a1283ce47f5 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
@@ -181,6 +181,11 @@ int cvmx_helper_board_get_mii_address(int ipd_port)
181 return ipd_port - 16 + 4; 181 return ipd_port - 16 + 4;
182 else 182 else
183 return -1; 183 return -1;
184 case CVMX_BOARD_TYPE_UBNT_E100:
185 if (ipd_port >= 0 && ipd_port <= 2)
186 return 7 - ipd_port;
187 else
188 return -1;
184 } 189 }
185 190
186 /* Some unknown board. Somebody forgot to update this function... */ 191 /* Some unknown board. Somebody forgot to update this function... */
@@ -706,6 +711,14 @@ int __cvmx_helper_board_hardware_enable(int interface)
706 } 711 }
707 } 712 }
708 } 713 }
714 } else if (cvmx_sysinfo_get()->board_type ==
715 CVMX_BOARD_TYPE_UBNT_E100) {
716 cvmx_write_csr(CVMX_ASXX_RX_CLK_SETX(0, interface), 0);
717 cvmx_write_csr(CVMX_ASXX_TX_CLK_SETX(0, interface), 0x10);
718 cvmx_write_csr(CVMX_ASXX_RX_CLK_SETX(1, interface), 0);
719 cvmx_write_csr(CVMX_ASXX_TX_CLK_SETX(1, interface), 0x10);
720 cvmx_write_csr(CVMX_ASXX_RX_CLK_SETX(2, interface), 0);
721 cvmx_write_csr(CVMX_ASXX_TX_CLK_SETX(2, interface), 0x10);
709 } 722 }
710 return 0; 723 return 0;
711} 724}
diff --git a/arch/mips/include/asm/octeon/cvmx-bootinfo.h b/arch/mips/include/asm/octeon/cvmx-bootinfo.h
index 284fa8d773ba..7b7818d1e4d5 100644
--- a/arch/mips/include/asm/octeon/cvmx-bootinfo.h
+++ b/arch/mips/include/asm/octeon/cvmx-bootinfo.h
@@ -227,6 +227,7 @@ enum cvmx_board_types_enum {
227 * use any numbers in this range. 227 * use any numbers in this range.
228 */ 228 */
229 CVMX_BOARD_TYPE_CUST_PRIVATE_MIN = 20001, 229 CVMX_BOARD_TYPE_CUST_PRIVATE_MIN = 20001,
230 CVMX_BOARD_TYPE_UBNT_E100 = 20002,
230 CVMX_BOARD_TYPE_CUST_PRIVATE_MAX = 30000, 231 CVMX_BOARD_TYPE_CUST_PRIVATE_MAX = 30000,
231 232
232 /* The remaining range is reserved for future use. */ 233 /* The remaining range is reserved for future use. */
@@ -325,6 +326,7 @@ static inline const char *cvmx_board_type_to_string(enum
325 326
326 /* Customer private range */ 327 /* Customer private range */
327 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MIN) 328 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MIN)
329 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E100)
328 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MAX) 330 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MAX)
329 } 331 }
330 return "Unsupported Board"; 332 return "Unsupported Board";