WARN_ONCE(!octeon_is_simulation(), "Using deprecated link status - please update your DT");
/* Unless we fix it later, all links are defaulted to down */
result.u64 = 0;
if (octeon_is_simulation()) { /* The simulator gives you a simulated 1Gbps full duplex link */
result.s.link_up = 1;
result.s.full_duplex = 1;
result.s.speed = 1000; return result;
}
if (OCTEON_IS_MODEL(OCTEON_CN3XXX)
|| OCTEON_IS_MODEL(OCTEON_CN58XX)
|| OCTEON_IS_MODEL(OCTEON_CN50XX)) { /* *Wedon'thaveaPHYaddress,soattempttouse *in-bandstatus.Itisreallyimportantthatboards *notsupportingin-bandstatusneverget *here.Readingbrokenin-bandstatustendstodobad *things
*/ union cvmx_gmxx_rxx_rx_inbnd inband_status; int interface = cvmx_helper_get_interface_num(ipd_port); int index = cvmx_helper_get_interface_index_num(ipd_port);
inband_status.u64 =
cvmx_read_csr(CVMX_GMXX_RXX_RX_INBND(index, interface));
/* If link is down, return all fields as zero. */ if (!result.s.link_up)
result.u64 = 0;
return result;
}
/* *Thisfunctioniscalledbycvmx_helper_interface_probe()afterit *determinesthenumberofportsOcteoncansupportonaspecific *interface.Thisfunctionistheperboardlocationtooverride *thisvalue.ItiscalledwiththenumberofportsOcteonmight *supportandshouldreturnthenumberofactualportsonthe *board. * *ThisfunctionmustbemodifiedforeverynewOcteonboard. *Internallyitusesswitchstatementsbasedonthecvmx_sysinfo *datatodetermineboardtypesandrevisions.Itreliesonthe *factthateveryOcteonboardreceivesauniqueboardtype *enumerationfromthebootloader. * *@interface:Interfacetoprobe *@supported_ports: *NumberofportsOcteonsupports. * *ReturnsNumberofportstheactualboardsupports.Manytimesthiswill *simplebe"support_ports".
*/ int __cvmx_helper_board_interface_probe(int interface, int supported_ports)
{ switch (cvmx_sysinfo_get()->board_type) { case CVMX_BOARD_TYPE_CN3005_EVB_HS5: if (interface == 0) return2; break; case CVMX_BOARD_TYPE_BBGW_REF: if (interface == 0) return2; break; case CVMX_BOARD_TYPE_NIC_XLE_4G: if (interface == 0) return0; break; /* The 2nd interface on the EBH5600 is connected to the Marvel switch,
which we don't support. Disable ports connected to it */ case CVMX_BOARD_TYPE_EBH5600: if (interface == 1) return0; break;
} return supported_ports;
}
/* *GettheclocktypeusedfortheUSBblockbasedonboardtype. *UsedbytheUSBcodeforautoconfigurationofclocktype. * *ReturnUSBclocktypeenumeration
*/ enum cvmx_helper_board_usb_clock_types __cvmx_helper_board_usb_get_clock_type(void)
{ switch (cvmx_sysinfo_get()->board_type) { case CVMX_BOARD_TYPE_BBGW_REF: case CVMX_BOARD_TYPE_LANAI2_A: case CVMX_BOARD_TYPE_LANAI2_U: case CVMX_BOARD_TYPE_LANAI2_G: case CVMX_BOARD_TYPE_NIC10E_66: case CVMX_BOARD_TYPE_UBNT_E100: return USB_CLOCK_TYPE_CRYSTAL_12; case CVMX_BOARD_TYPE_NIC10E: return USB_CLOCK_TYPE_REF_12; default: break;
} /* Most boards except NIC10e use a 12MHz crystal */ if (OCTEON_IS_OCTEON2()) return USB_CLOCK_TYPE_CRYSTAL_12; return USB_CLOCK_TYPE_REF_48;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.