diff options
Diffstat (limited to 'cvmx-mgmt-port.c')
-rw-r--r-- | cvmx-mgmt-port.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cvmx-mgmt-port.c b/cvmx-mgmt-port.c index 108ef0053788..0b1401297eba 100644 --- a/cvmx-mgmt-port.c +++ b/cvmx-mgmt-port.c @@ -1,5 +1,5 @@ /***********************license start*************** - * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights + * Copyright (c) 2003-2010 Cavium Inc. (support@cavium.com). All rights * reserved. * * @@ -15,7 +15,7 @@ * disclaimer in the documentation and/or other materials provided * with the distribution. - * * Neither the name of Cavium Networks nor the names of + * * Neither the name of Cavium Inc. nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -26,7 +26,7 @@ * countries. * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" - * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR + * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM @@ -48,7 +48,7 @@ * * Support functions for managing the MII management port * - * <hr>$Revision: 49628 $<hr> + * <hr>$Revision: 70030 $<hr> */ #include "cvmx.h" #include "cvmx-bootmem.h" @@ -114,9 +114,9 @@ CVMX_SHARED cvmx_mgmt_port_state_t *cvmx_mgmt_port_state_ptr = NULL; */ int __cvmx_mgmt_port_num_ports(void) { - if (OCTEON_IS_MODEL(OCTEON_CN56XX)) + if (OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN68XX)) return 1; - else if (OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN63XX)) + else if (OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN6XXX)) return 2; else return 0; @@ -140,7 +140,7 @@ cvmx_mgmt_port_result_t cvmx_mgmt_port_initialize(int port) if ((port < 0) || (port >= __cvmx_mgmt_port_num_ports())) return CVMX_MGMT_PORT_INVALID_PARAM; - cvmx_mgmt_port_state_ptr = cvmx_bootmem_alloc_named(CVMX_MGMT_PORT_NUM_PORTS * sizeof(cvmx_mgmt_port_state_t), 128, alloc_name); + cvmx_mgmt_port_state_ptr = cvmx_bootmem_alloc_named_flags(CVMX_MGMT_PORT_NUM_PORTS * sizeof(cvmx_mgmt_port_state_t), 128, alloc_name, CVMX_BOOTMEM_FLAG_END_ALLOC); if (cvmx_mgmt_port_state_ptr) { memset(cvmx_mgmt_port_state_ptr, 0, CVMX_MGMT_PORT_NUM_PORTS * sizeof(cvmx_mgmt_port_state_t)); @@ -363,6 +363,7 @@ cvmx_mgmt_port_result_t cvmx_mgmt_port_initialize(int port) /* Enable the componsation controller */ agl_prtx_ctl.s.comp = 1; + agl_prtx_ctl.s.drv_byp = 0; cvmx_write_csr(CVMX_AGL_PRTX_CTL(port), agl_prtx_ctl.u64); cvmx_read_csr(CVMX_AGL_PRTX_CTL(port)); /* Force write out before wait */ cvmx_wait(1024 * clock_scale); // for componsation state to lock. |