summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authorjhibbits <jhibbits@FreeBSD.org>2017-06-18 17:20:48 +0000
committerjhibbits <jhibbits@FreeBSD.org>2017-06-18 17:20:48 +0000
commit30284de78a8b210cea42e446baa2e7705751e0e6 (patch)
treedba6a350a3a20ef7cab6093a169516790d16efe9 /sys/contrib
parente340be854df0eb7ec67a37b106ad7a501dc7c8a7 (diff)
downloadFreeBSD-src-30284de78a8b210cea42e446baa2e7705751e0e6.zip
FreeBSD-src-30284de78a8b210cea42e446baa2e7705751e0e6.tar.gz
MFC r317928
Add necessary bits to get FreeBSD booting on the Unifi Security Gateway Summary: The Ubiquiti Unifi Security Gateway is virtually identical to the EdgeRouter Lite, with a smaller PCB and apparently a different board identifier. Simply adding the new board identifier alongside the ERL identifier, FreeBSD boots successfully, and can access the needed peripherals. Approved by: re(bdrewery)
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/octeon-sdk/cvmx-app-init.h2
-rw-r--r--sys/contrib/octeon-sdk/cvmx-helper-board.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/sys/contrib/octeon-sdk/cvmx-app-init.h b/sys/contrib/octeon-sdk/cvmx-app-init.h
index beab38e..9870a6f 100644
--- a/sys/contrib/octeon-sdk/cvmx-app-init.h
+++ b/sys/contrib/octeon-sdk/cvmx-app-init.h
@@ -311,6 +311,7 @@ enum cvmx_board_types_enum {
#endif
#if defined(OCTEON_VENDOR_UBIQUITI)
CVMX_BOARD_TYPE_CUST_UBIQUITI_E100=20002,
+ CVMX_BOARD_TYPE_CUST_UBIQUITI_USG= 20004,
#endif
#if defined(OCTEON_VENDOR_RADISYS)
CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE=20002,
@@ -457,6 +458,7 @@ static inline const char *cvmx_board_type_to_string(enum cvmx_board_types_enum t
#endif
#if defined(OCTEON_VENDOR_UBIQUITI)
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_UBIQUITI_E100)
+ ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_UBIQUITI_USG)
#endif
#if defined(OCTEON_VENDOR_RADISYS)
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE)
diff --git a/sys/contrib/octeon-sdk/cvmx-helper-board.c b/sys/contrib/octeon-sdk/cvmx-helper-board.c
index 49e52d4..b7375e5 100644
--- a/sys/contrib/octeon-sdk/cvmx-helper-board.c
+++ b/sys/contrib/octeon-sdk/cvmx-helper-board.c
@@ -598,6 +598,7 @@ int cvmx_helper_board_get_mii_address(int ipd_port)
#endif
#if defined(OCTEON_VENDOR_UBIQUITI)
case CVMX_BOARD_TYPE_CUST_UBIQUITI_E100:
+ case CVMX_BOARD_TYPE_CUST_UBIQUITI_USG:
if (ipd_port > 2)
return -1;
return (7 - ipd_port);
@@ -1499,7 +1500,8 @@ int __cvmx_helper_board_hardware_enable(int interface)
}
}
#if defined(OCTEON_VENDOR_UBIQUITI)
- else if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_E100)
+ else if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_E100 ||
+ cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_USG)
{
/* Configure ASX cloks for all ports on interface 0. */
if (interface == 0)
@@ -1590,6 +1592,7 @@ cvmx_helper_board_usb_clock_types_t __cvmx_helper_board_usb_get_clock_type(void)
#endif
#if defined(OCTEON_VENDOR_UBIQUITI)
case CVMX_BOARD_TYPE_CUST_UBIQUITI_E100:
+ case CVMX_BOARD_TYPE_CUST_UBIQUITI_USG:
#endif
#if defined(OCTEON_BOARD_CAPK_0100ND)
case CVMX_BOARD_TYPE_CN3010_EVB_HS5:
OpenPOWER on IntegriCloud