Commit af866496 authored by David Daney's avatar David Daney Committed by Ralf Baechle

MIPS: Octeon: Move some Ethernet support files out of staging.

Signed-off-by: default avatarDavid Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Cc: netdev@vger.kernel.org
Cc: devel@driverdev.osuosl.org
Acked-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
Patchwork: https://patchwork.linux-mips.org/patch/2942/
Patchwork: https://patchwork.linux-mips.org/patch/3012/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 751c9f68
...@@ -86,10 +86,6 @@ config ARCH_SPARSEMEM_ENABLE ...@@ -86,10 +86,6 @@ config ARCH_SPARSEMEM_ENABLE
def_bool y def_bool y
select SPARSEMEM_STATIC select SPARSEMEM_STATIC
config CAVIUM_OCTEON_HELPER
def_bool y
depends on OCTEON_ETHERNET || PCI
config IOMMU_HELPER config IOMMU_HELPER
bool bool
......
...@@ -10,5 +10,10 @@ ...@@ -10,5 +10,10 @@
# #
obj-y += cvmx-bootmem.o cvmx-l2c.o cvmx-sysinfo.o octeon-model.o obj-y += cvmx-bootmem.o cvmx-l2c.o cvmx-sysinfo.o octeon-model.o
obj-y += cvmx-pko.o cvmx-spi.o cvmx-cmd-queue.o \
cvmx-helper-board.o cvmx-helper.o cvmx-helper-xaui.o \
cvmx-helper-rgmii.o cvmx-helper-sgmii.o cvmx-helper-npi.o \
cvmx-helper-loop.o cvmx-helper-spi.o cvmx-helper-util.o \
cvmx-interrupt-decodes.o cvmx-interrupt-rsl.o
obj-$(CONFIG_CAVIUM_OCTEON_HELPER) += cvmx-helper-errata.o cvmx-helper-jtag.o obj-y += cvmx-helper-errata.o cvmx-helper-jtag.o
...@@ -34,13 +34,13 @@ ...@@ -34,13 +34,13 @@
#include <asm/octeon/octeon.h> #include <asm/octeon/octeon.h>
#include "cvmx-config.h" #include <asm/octeon/cvmx-config.h>
#include "cvmx-fpa.h" #include <asm/octeon/cvmx-fpa.h>
#include "cvmx-cmd-queue.h" #include <asm/octeon/cvmx-cmd-queue.h>
#include <asm/octeon/cvmx-npei-defs.h> #include <asm/octeon/cvmx-npei-defs.h>
#include <asm/octeon/cvmx-pexp-defs.h> #include <asm/octeon/cvmx-pexp-defs.h>
#include "cvmx-pko-defs.h" #include <asm/octeon/cvmx-pko-defs.h>
/** /**
* This application uses this pointer to access the global queue * This application uses this pointer to access the global queue
......
...@@ -34,16 +34,16 @@ ...@@ -34,16 +34,16 @@
#include <asm/octeon/octeon.h> #include <asm/octeon/octeon.h>
#include <asm/octeon/cvmx-bootinfo.h> #include <asm/octeon/cvmx-bootinfo.h>
#include "cvmx-config.h" #include <asm/octeon/cvmx-config.h>
#include "cvmx-mdio.h" #include <asm/octeon/cvmx-mdio.h>
#include "cvmx-helper.h" #include <asm/octeon/cvmx-helper.h>
#include "cvmx-helper-util.h" #include <asm/octeon/cvmx-helper-util.h>
#include "cvmx-helper-board.h" #include <asm/octeon/cvmx-helper-board.h>
#include "cvmx-gmxx-defs.h" #include <asm/octeon/cvmx-gmxx-defs.h>
#include "cvmx-asxx-defs.h" #include <asm/octeon/cvmx-asxx-defs.h>
/** /**
* cvmx_override_board_link_get(int ipd_port) is a function * cvmx_override_board_link_get(int ipd_port) is a function
...@@ -493,7 +493,6 @@ int cvmx_helper_board_link_set_phy(int phy_addr, ...@@ -493,7 +493,6 @@ int cvmx_helper_board_link_set_phy(int phy_addr,
cvmx_mdio_phy_reg_control_t reg_control; cvmx_mdio_phy_reg_control_t reg_control;
cvmx_mdio_phy_reg_status_t reg_status; cvmx_mdio_phy_reg_status_t reg_status;
cvmx_mdio_phy_reg_autoneg_adver_t reg_autoneg_adver; cvmx_mdio_phy_reg_autoneg_adver_t reg_autoneg_adver;
cvmx_mdio_phy_reg_extended_status_t reg_extended_status;
cvmx_mdio_phy_reg_control_1000_t reg_control_1000; cvmx_mdio_phy_reg_control_1000_t reg_control_1000;
reg_status.u16 = reg_status.u16 =
...@@ -508,9 +507,6 @@ int cvmx_helper_board_link_set_phy(int phy_addr, ...@@ -508,9 +507,6 @@ int cvmx_helper_board_link_set_phy(int phy_addr,
reg_autoneg_adver.s.advert_100base_tx_full = 0; reg_autoneg_adver.s.advert_100base_tx_full = 0;
reg_autoneg_adver.s.advert_100base_tx_half = 0; reg_autoneg_adver.s.advert_100base_tx_half = 0;
if (reg_status.s.capable_extended_status) { if (reg_status.s.capable_extended_status) {
reg_extended_status.u16 =
cvmx_mdio_read(phy_addr >> 8, phy_addr & 0xff,
CVMX_MDIO_PHY_REG_EXTENDED_STATUS);
reg_control_1000.u16 = reg_control_1000.u16 =
cvmx_mdio_read(phy_addr >> 8, phy_addr & 0xff, cvmx_mdio_read(phy_addr >> 8, phy_addr & 0xff,
CVMX_MDIO_PHY_REG_CONTROL_1000); CVMX_MDIO_PHY_REG_CONTROL_1000);
......
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
*/ */
#include <asm/octeon/octeon.h> #include <asm/octeon/octeon.h>
#include "cvmx-config.h" #include <asm/octeon/cvmx-config.h>
#include "cvmx-helper.h" #include <asm/octeon/cvmx-helper.h>
#include "cvmx-pip-defs.h" #include <asm/octeon/cvmx-pip-defs.h>
/** /**
* Probe a LOOP interface and determine the number of ports * Probe a LOOP interface and determine the number of ports
......
...@@ -31,11 +31,11 @@ ...@@ -31,11 +31,11 @@
*/ */
#include <asm/octeon/octeon.h> #include <asm/octeon/octeon.h>
#include "cvmx-config.h" #include <asm/octeon/cvmx-config.h>
#include "cvmx-helper.h" #include <asm/octeon/cvmx-helper.h>
#include "cvmx-pip-defs.h" #include <asm/octeon/cvmx-pip-defs.h>
/** /**
* Probe a NPI interface and determine the number of ports * Probe a NPI interface and determine the number of ports
......
...@@ -31,18 +31,18 @@ ...@@ -31,18 +31,18 @@
*/ */
#include <asm/octeon/octeon.h> #include <asm/octeon/octeon.h>
#include "cvmx-config.h" #include <asm/octeon/cvmx-config.h>
#include "cvmx-mdio.h" #include <asm/octeon/cvmx-mdio.h>
#include "cvmx-pko.h" #include <asm/octeon/cvmx-pko.h>
#include "cvmx-helper.h" #include <asm/octeon/cvmx-helper.h>
#include "cvmx-helper-board.h" #include <asm/octeon/cvmx-helper-board.h>
#include <asm/octeon/cvmx-npi-defs.h> #include <asm/octeon/cvmx-npi-defs.h>
#include "cvmx-gmxx-defs.h" #include <asm/octeon/cvmx-gmxx-defs.h>
#include "cvmx-asxx-defs.h" #include <asm/octeon/cvmx-asxx-defs.h>
#include "cvmx-dbg-defs.h" #include <asm/octeon/cvmx-dbg-defs.h>
void __cvmx_interrupt_gmxx_enable(int interface); void __cvmx_interrupt_gmxx_enable(int interface);
void __cvmx_interrupt_asxx_enable(int block); void __cvmx_interrupt_asxx_enable(int block);
...@@ -326,6 +326,7 @@ int __cvmx_helper_rgmii_link_set(int ipd_port, ...@@ -326,6 +326,7 @@ int __cvmx_helper_rgmii_link_set(int ipd_port,
cvmx_read_csr(CVMX_ASXX_RX_PRT_EN(interface)) & cvmx_read_csr(CVMX_ASXX_RX_PRT_EN(interface)) &
~(1 << index)); ~(1 << index));
memset(pko_mem_queue_qos_save, 0, sizeof(pko_mem_queue_qos_save));
/* Disable all queues so that TX should become idle */ /* Disable all queues so that TX should become idle */
for (i = 0; i < cvmx_pko_get_num_queues(ipd_port); i++) { for (i = 0; i < cvmx_pko_get_num_queues(ipd_port); i++) {
int queue = cvmx_pko_get_base_queue(ipd_port) + i; int queue = cvmx_pko_get_base_queue(ipd_port) + i;
......
...@@ -32,14 +32,14 @@ ...@@ -32,14 +32,14 @@
#include <asm/octeon/octeon.h> #include <asm/octeon/octeon.h>
#include "cvmx-config.h" #include <asm/octeon/cvmx-config.h>
#include "cvmx-mdio.h" #include <asm/octeon/cvmx-mdio.h>
#include "cvmx-helper.h" #include <asm/octeon/cvmx-helper.h>
#include "cvmx-helper-board.h" #include <asm/octeon/cvmx-helper-board.h>
#include "cvmx-gmxx-defs.h" #include <asm/octeon/cvmx-gmxx-defs.h>
#include "cvmx-pcsx-defs.h" #include <asm/octeon/cvmx-pcsx-defs.h>
void __cvmx_interrupt_gmxx_enable(int interface); void __cvmx_interrupt_gmxx_enable(int interface);
void __cvmx_interrupt_pcsx_intx_en_reg_enable(int index, int block); void __cvmx_interrupt_pcsx_intx_en_reg_enable(int index, int block);
......
...@@ -35,12 +35,12 @@ void __cvmx_interrupt_stxx_int_msk_enable(int index); ...@@ -35,12 +35,12 @@ void __cvmx_interrupt_stxx_int_msk_enable(int index);
*/ */
#include <asm/octeon/octeon.h> #include <asm/octeon/octeon.h>
#include "cvmx-config.h" #include <asm/octeon/cvmx-config.h>
#include "cvmx-spi.h" #include <asm/octeon/cvmx-spi.h>
#include "cvmx-helper.h" #include <asm/octeon/cvmx-helper.h>
#include "cvmx-pip-defs.h" #include <asm/octeon/cvmx-pip-defs.h>
#include "cvmx-pko-defs.h" #include <asm/octeon/cvmx-pko-defs.h>
/* /*
* CVMX_HELPER_SPI_TIMEOUT is used to determine how long the SPI * CVMX_HELPER_SPI_TIMEOUT is used to determine how long the SPI
......
...@@ -32,16 +32,16 @@ ...@@ -32,16 +32,16 @@
#include <asm/octeon/octeon.h> #include <asm/octeon/octeon.h>
#include "cvmx-config.h" #include <asm/octeon/cvmx-config.h>
#include "cvmx-fpa.h" #include <asm/octeon/cvmx-fpa.h>
#include "cvmx-pip.h" #include <asm/octeon/cvmx-pip.h>
#include "cvmx-pko.h" #include <asm/octeon/cvmx-pko.h>
#include "cvmx-ipd.h" #include <asm/octeon/cvmx-ipd.h>
#include "cvmx-spi.h" #include <asm/octeon/cvmx-spi.h>
#include "cvmx-helper.h" #include <asm/octeon/cvmx-helper.h>
#include "cvmx-helper-util.h" #include <asm/octeon/cvmx-helper-util.h>
#include <asm/octeon/cvmx-ipd-defs.h> #include <asm/octeon/cvmx-ipd-defs.h>
......
...@@ -33,13 +33,13 @@ ...@@ -33,13 +33,13 @@
#include <asm/octeon/octeon.h> #include <asm/octeon/octeon.h>
#include "cvmx-config.h" #include <asm/octeon/cvmx-config.h>
#include "cvmx-helper.h" #include <asm/octeon/cvmx-helper.h>
#include "cvmx-pko-defs.h" #include <asm/octeon/cvmx-pko-defs.h>
#include "cvmx-gmxx-defs.h" #include <asm/octeon/cvmx-gmxx-defs.h>
#include "cvmx-pcsxx-defs.h" #include <asm/octeon/cvmx-pcsxx-defs.h>
void __cvmx_interrupt_gmxx_enable(int interface); void __cvmx_interrupt_gmxx_enable(int interface);
void __cvmx_interrupt_pcsx_intx_en_reg_enable(int index, int block); void __cvmx_interrupt_pcsx_intx_en_reg_enable(int index, int block);
......
...@@ -32,19 +32,19 @@ ...@@ -32,19 +32,19 @@
*/ */
#include <asm/octeon/octeon.h> #include <asm/octeon/octeon.h>
#include "cvmx-config.h" #include <asm/octeon/cvmx-config.h>
#include "cvmx-fpa.h" #include <asm/octeon/cvmx-fpa.h>
#include "cvmx-pip.h" #include <asm/octeon/cvmx-pip.h>
#include "cvmx-pko.h" #include <asm/octeon/cvmx-pko.h>
#include "cvmx-ipd.h" #include <asm/octeon/cvmx-ipd.h>
#include "cvmx-spi.h" #include <asm/octeon/cvmx-spi.h>
#include "cvmx-helper.h" #include <asm/octeon/cvmx-helper.h>
#include "cvmx-helper-board.h" #include <asm/octeon/cvmx-helper-board.h>
#include "cvmx-pip-defs.h" #include <asm/octeon/cvmx-pip-defs.h>
#include "cvmx-smix-defs.h" #include <asm/octeon/cvmx-smix-defs.h>
#include "cvmx-asxx-defs.h" #include <asm/octeon/cvmx-asxx-defs.h>
/** /**
* cvmx_override_pko_queue_priority(int ipd_port, uint64_t * cvmx_override_pko_queue_priority(int ipd_port, uint64_t
...@@ -548,7 +548,6 @@ int __cvmx_helper_errata_fix_ipd_ptr_alignment(void) ...@@ -548,7 +548,6 @@ int __cvmx_helper_errata_fix_ipd_ptr_alignment(void)
union cvmx_gmxx_prtx_cfg gmx_cfg; union cvmx_gmxx_prtx_cfg gmx_cfg;
int retry_cnt; int retry_cnt;
int retry_loop_cnt; int retry_loop_cnt;
int mtu;
int i; int i;
cvmx_helper_link_info_t link_info; cvmx_helper_link_info_t link_info;
...@@ -662,10 +661,6 @@ int __cvmx_helper_errata_fix_ipd_ptr_alignment(void) ...@@ -662,10 +661,6 @@ int __cvmx_helper_errata_fix_ipd_ptr_alignment(void)
cvmx_write_csr(CVMX_ASXX_RX_PRT_EN(INTERFACE(FIX_IPD_OUTPORT)), cvmx_write_csr(CVMX_ASXX_RX_PRT_EN(INTERFACE(FIX_IPD_OUTPORT)),
1 << INDEX(FIX_IPD_OUTPORT)); 1 << INDEX(FIX_IPD_OUTPORT));
mtu =
cvmx_read_csr(CVMX_GMXX_RXX_JABBER
(INDEX(FIX_IPD_OUTPORT),
INTERFACE(FIX_IPD_OUTPORT)));
cvmx_write_csr(CVMX_GMXX_RXX_JABBER cvmx_write_csr(CVMX_GMXX_RXX_JABBER
(INDEX(FIX_IPD_OUTPORT), (INDEX(FIX_IPD_OUTPORT),
INTERFACE(FIX_IPD_OUTPORT)), 65392 - 14 - 4); INTERFACE(FIX_IPD_OUTPORT)), 65392 - 14 - 4);
......
...@@ -34,11 +34,11 @@ ...@@ -34,11 +34,11 @@
#include <asm/octeon/octeon.h> #include <asm/octeon/octeon.h>
#include "cvmx-gmxx-defs.h" #include <asm/octeon/cvmx-gmxx-defs.h>
#include "cvmx-pcsx-defs.h" #include <asm/octeon/cvmx-pcsx-defs.h>
#include "cvmx-pcsxx-defs.h" #include <asm/octeon/cvmx-pcsxx-defs.h>
#include "cvmx-spxx-defs.h" #include <asm/octeon/cvmx-spxx-defs.h>
#include "cvmx-stxx-defs.h" #include <asm/octeon/cvmx-stxx-defs.h>
#ifndef PRINT_ERROR #ifndef PRINT_ERROR
#define PRINT_ERROR(format, ...) #define PRINT_ERROR(format, ...)
......
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
#include <asm/octeon/octeon.h> #include <asm/octeon/octeon.h>
#include "cvmx-asxx-defs.h" #include <asm/octeon/cvmx-asxx-defs.h>
#include "cvmx-gmxx-defs.h" #include <asm/octeon/cvmx-gmxx-defs.h>
#ifndef PRINT_ERROR #ifndef PRINT_ERROR
#define PRINT_ERROR(format, ...) #define PRINT_ERROR(format, ...)
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
#include <asm/octeon/octeon.h> #include <asm/octeon/octeon.h>
#include "cvmx-config.h" #include <asm/octeon/cvmx-config.h>
#include "cvmx-pko.h" #include <asm/octeon/cvmx-pko.h>
#include "cvmx-helper.h" #include <asm/octeon/cvmx-helper.h>
/** /**
* Internal state of packet output * Internal state of packet output
...@@ -54,7 +54,7 @@ void cvmx_pko_initialize_global(void) ...@@ -54,7 +54,7 @@ void cvmx_pko_initialize_global(void)
/* /*
* Set the size of the PKO command buffers to an odd number of * Set the size of the PKO command buffers to an odd number of
* 64bit words. This allows the normal two word send to stay * 64bit words. This allows the normal two word send to stay
* aligned and never span a command word buffer. * aligned and never span a comamnd word buffer.
*/ */
config.u64 = 0; config.u64 = 0;
config.s.pool = CVMX_FPA_OUTPUT_BUFFER_POOL; config.s.pool = CVMX_FPA_OUTPUT_BUFFER_POOL;
......
...@@ -31,14 +31,14 @@ ...@@ -31,14 +31,14 @@
*/ */
#include <asm/octeon/octeon.h> #include <asm/octeon/octeon.h>
#include "cvmx-config.h" #include <asm/octeon/cvmx-config.h>
#include "cvmx-pko.h" #include <asm/octeon/cvmx-pko.h>
#include "cvmx-spi.h" #include <asm/octeon/cvmx-spi.h>
#include "cvmx-spxx-defs.h" #include <asm/octeon/cvmx-spxx-defs.h>
#include "cvmx-stxx-defs.h" #include <asm/octeon/cvmx-stxx-defs.h>
#include "cvmx-srxx-defs.h" #include <asm/octeon/cvmx-srxx-defs.h>
#define INVOKE_CB(function_p, args...) \ #define INVOKE_CB(function_p, args...) \
do { \ do { \
......
...@@ -166,4 +166,3 @@ typedef enum { ...@@ -166,4 +166,3 @@ typedef enum {
#define CVMX_HELPER_DISABLE_RGMII_BACKPRESSURE 0 #define CVMX_HELPER_DISABLE_RGMII_BACKPRESSURE 0
#endif /* __CVMX_CONFIG_H__ */ #endif /* __CVMX_CONFIG_H__ */
...@@ -20,9 +20,4 @@ octeon-ethernet-y += ethernet-sgmii.o ...@@ -20,9 +20,4 @@ octeon-ethernet-y += ethernet-sgmii.o
octeon-ethernet-y += ethernet-spi.o octeon-ethernet-y += ethernet-spi.o
octeon-ethernet-y += ethernet-tx.o octeon-ethernet-y += ethernet-tx.o
octeon-ethernet-y += ethernet-xaui.o octeon-ethernet-y += ethernet-xaui.o
octeon-ethernet-y += cvmx-pko.o cvmx-spi.o cvmx-cmd-queue.o \
cvmx-helper-board.o cvmx-helper.o cvmx-helper-xaui.o \
cvmx-helper-rgmii.o cvmx-helper-sgmii.o cvmx-helper-npi.o \
cvmx-helper-loop.o cvmx-helper-spi.o cvmx-helper-util.o \
cvmx-interrupt-decodes.o cvmx-interrupt-rsl.o
/***********************license start***************
* Author: Cavium Networks
*
* Contact: support@caviumnetworks.com
* This file is part of the OCTEON SDK
*
* Copyright (c) 2003-2008 Cavium Networks
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, Version 2, as
* published by the Free Software Foundation.
*
* This file is distributed in the hope that it will be useful, but
* AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
* NONINFRINGEMENT. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License
* along with this file; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* or visit http://www.gnu.org/licenses/.
*
* This file may also be available under a different license from Cavium.
* Contact Cavium Networks for more information
***********************license end**************************************/
/**
*
* Packet buffer defines.
*/
#ifndef __CVMX_PACKET_H__
#define __CVMX_PACKET_H__
/**
* This structure defines a buffer pointer on Octeon
*/
union cvmx_buf_ptr {
void *ptr;
uint64_t u64;
struct {
/*
* if set, invert the "free" pick of the overall
* packet. HW always sets this bit to 0 on inbound
* packet
*/
uint64_t i:1;
/*
* Indicates the amount to back up to get to the
* buffer start in cache lines. In most cases this is
* less than one complete cache line, so the value is
* zero.
*/
uint64_t back:4;
/* The pool that the buffer came from / goes to */
uint64_t pool:3;
/* The size of the segment pointed to by addr (in bytes) */
uint64_t size:16;
/* Pointer to the first byte of the data, NOT buffer */
uint64_t addr:40;
} s;
};
#endif /* __CVMX_PACKET_H__ */
/***********************license start***************
* Author: Cavium Networks
*
* Contact: support@caviumnetworks.com
* This file is part of the OCTEON SDK
*
* Copyright (c) 2003-2008 Cavium Networks
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, Version 2, as
* published by the Free Software Foundation.
*
* This file is distributed in the hope that it will be useful, but
* AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
* NONINFRINGEMENT. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License
* along with this file; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* or visit http://www.gnu.org/licenses/.
*
* This file may also be available under a different license from Cavium.
* Contact Cavium Networks for more information
***********************license end**************************************/
#ifndef __CVMX_SMIX_DEFS_H__
#define __CVMX_SMIX_DEFS_H__
#define CVMX_SMIX_CLK(offset) \
CVMX_ADD_IO_SEG(0x0001180000001818ull + (((offset) & 1) * 256))
#define CVMX_SMIX_CMD(offset) \
CVMX_ADD_IO_SEG(0x0001180000001800ull + (((offset) & 1) * 256))
#define CVMX_SMIX_EN(offset) \
CVMX_ADD_IO_SEG(0x0001180000001820ull + (((offset) & 1) * 256))
#define CVMX_SMIX_RD_DAT(offset) \
CVMX_ADD_IO_SEG(0x0001180000001810ull + (((offset) & 1) * 256))
#define CVMX_SMIX_WR_DAT(offset) \
CVMX_ADD_IO_SEG(0x0001180000001808ull + (((offset) & 1) * 256))
union cvmx_smix_clk {
uint64_t u64;
struct cvmx_smix_clk_s {
uint64_t reserved_25_63:39;
uint64_t mode:1;
uint64_t reserved_21_23:3;
uint64_t sample_hi:5;
uint64_t sample_mode:1;
uint64_t reserved_14_14:1;
uint64_t clk_idle:1;
uint64_t preamble:1;
uint64_t sample:4;
uint64_t phase:8;
} s;
struct cvmx_smix_clk_cn30xx {
uint64_t reserved_21_63:43;
uint64_t sample_hi:5;
uint64_t reserved_14_15:2;
uint64_t clk_idle:1;
uint64_t preamble:1;
uint64_t sample:4;
uint64_t phase:8;
} cn30xx;
struct cvmx_smix_clk_cn30xx cn31xx;
struct cvmx_smix_clk_cn30xx cn38xx;
struct cvmx_smix_clk_cn30xx cn38xxp2;
struct cvmx_smix_clk_cn50xx {
uint64_t reserved_25_63:39;
uint64_t mode:1;
uint64_t reserved_21_23:3;
uint64_t sample_hi:5;
uint64_t reserved_14_15:2;
uint64_t clk_idle:1;
uint64_t preamble:1;
uint64_t sample:4;
uint64_t phase:8;
} cn50xx;
struct cvmx_smix_clk_s cn52xx;
struct cvmx_smix_clk_cn50xx cn52xxp1;
struct cvmx_smix_clk_s cn56xx;
struct cvmx_smix_clk_cn50xx cn56xxp1;
struct cvmx_smix_clk_cn30xx cn58xx;
struct cvmx_smix_clk_cn30xx cn58xxp1;
};
union cvmx_smix_cmd {
uint64_t u64;
struct cvmx_smix_cmd_s {
uint64_t reserved_18_63:46;
uint64_t phy_op:2;
uint64_t reserved_13_15:3;
uint64_t phy_adr:5;
uint64_t reserved_5_7:3;
uint64_t reg_adr:5;
} s;
struct cvmx_smix_cmd_cn30xx {
uint64_t reserved_17_63:47;
uint64_t phy_op:1;
uint64_t reserved_13_15:3;
uint64_t phy_adr:5;
uint64_t reserved_5_7:3;
uint64_t reg_adr:5;
} cn30xx;
struct cvmx_smix_cmd_cn30xx cn31xx;
struct cvmx_smix_cmd_cn30xx cn38xx;
struct cvmx_smix_cmd_cn30xx cn38xxp2;
struct cvmx_smix_cmd_s cn50xx;
struct cvmx_smix_cmd_s cn52xx;
struct cvmx_smix_cmd_s cn52xxp1;
struct cvmx_smix_cmd_s cn56xx;
struct cvmx_smix_cmd_s cn56xxp1;
struct cvmx_smix_cmd_cn30xx cn58xx;
struct cvmx_smix_cmd_cn30xx cn58xxp1;
};
union cvmx_smix_en {
uint64_t u64;
struct cvmx_smix_en_s {
uint64_t reserved_1_63:63;
uint64_t en:1;
} s;
struct cvmx_smix_en_s cn30xx;
struct cvmx_smix_en_s cn31xx;
struct cvmx_smix_en_s cn38xx;
struct cvmx_smix_en_s cn38xxp2;
struct cvmx_smix_en_s cn50xx;
struct cvmx_smix_en_s cn52xx;
struct cvmx_smix_en_s cn52xxp1;
struct cvmx_smix_en_s cn56xx;
struct cvmx_smix_en_s cn56xxp1;
struct cvmx_smix_en_s cn58xx;
struct cvmx_smix_en_s cn58xxp1;
};
union cvmx_smix_rd_dat {
uint64_t u64;
struct cvmx_smix_rd_dat_s {
uint64_t reserved_18_63:46;
uint64_t pending:1;
uint64_t val:1;
uint64_t dat:16;
} s;
struct cvmx_smix_rd_dat_s cn30xx;
struct cvmx_smix_rd_dat_s cn31xx;
struct cvmx_smix_rd_dat_s cn38xx;
struct cvmx_smix_rd_dat_s cn38xxp2;
struct cvmx_smix_rd_dat_s cn50xx;
struct cvmx_smix_rd_dat_s cn52xx;
struct cvmx_smix_rd_dat_s cn52xxp1;
struct cvmx_smix_rd_dat_s cn56xx;
struct cvmx_smix_rd_dat_s cn56xxp1;
struct cvmx_smix_rd_dat_s cn58xx;
struct cvmx_smix_rd_dat_s cn58xxp1;
};
union cvmx_smix_wr_dat {
uint64_t u64;
struct cvmx_smix_wr_dat_s {
uint64_t reserved_18_63:46;
uint64_t pending:1;
uint64_t val:1;
uint64_t dat:16;
} s;
struct cvmx_smix_wr_dat_s cn30xx;
struct cvmx_smix_wr_dat_s cn31xx;
struct cvmx_smix_wr_dat_s cn38xx;
struct cvmx_smix_wr_dat_s cn38xxp2;
struct cvmx_smix_wr_dat_s cn50xx;
struct cvmx_smix_wr_dat_s cn52xx;
struct cvmx_smix_wr_dat_s cn52xxp1;
struct cvmx_smix_wr_dat_s cn56xx;
struct cvmx_smix_wr_dat_s cn56xxp1;
struct cvmx_smix_wr_dat_s cn58xx;
struct cvmx_smix_wr_dat_s cn58xxp1;
};
#endif
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
#ifndef __ETHERNET_DEFINES_H__ #ifndef __ETHERNET_DEFINES_H__
#define __ETHERNET_DEFINES_H__ #define __ETHERNET_DEFINES_H__
#include "cvmx-config.h" #include <asm/octeon/cvmx-config.h>
#define OCTEON_ETHERNET_VERSION "1.9" #define OCTEON_ETHERNET_VERSION "1.9"
......
...@@ -38,9 +38,9 @@ ...@@ -38,9 +38,9 @@
#include "ethernet-mdio.h" #include "ethernet-mdio.h"
#include "ethernet-util.h" #include "ethernet-util.h"
#include "cvmx-helper-board.h" #include <asm/octeon/cvmx-helper-board.h>
#include "cvmx-smix-defs.h" #include <asm/octeon/cvmx-smix-defs.h>
static void cvm_oct_get_drvinfo(struct net_device *dev, static void cvm_oct_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info) struct ethtool_drvinfo *info)
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "ethernet-defines.h" #include "ethernet-defines.h"
#include "cvmx-fpa.h" #include <asm/octeon/cvmx-fpa.h>
/** /**
* cvm_oct_fill_hw_skbuff - fill the supplied hardware pool with skbuffs * cvm_oct_fill_hw_skbuff - fill the supplied hardware pool with skbuffs
......
...@@ -37,11 +37,11 @@ ...@@ -37,11 +37,11 @@
#include "octeon-ethernet.h" #include "octeon-ethernet.h"
#include "ethernet-util.h" #include "ethernet-util.h"
#include "cvmx-helper.h" #include <asm/octeon/cvmx-helper.h>
#include <asm/octeon/cvmx-ipd-defs.h> #include <asm/octeon/cvmx-ipd-defs.h>
#include <asm/octeon/cvmx-npi-defs.h> #include <asm/octeon/cvmx-npi-defs.h>
#include "cvmx-gmxx-defs.h" #include <asm/octeon/cvmx-gmxx-defs.h>
DEFINE_SPINLOCK(global_register_lock); DEFINE_SPINLOCK(global_register_lock);
......
...@@ -52,14 +52,14 @@ ...@@ -52,14 +52,14 @@
#include "octeon-ethernet.h" #include "octeon-ethernet.h"
#include "ethernet-util.h" #include "ethernet-util.h"
#include "cvmx-helper.h" #include <asm/octeon/cvmx-helper.h>
#include "cvmx-wqe.h" #include <asm/octeon/cvmx-wqe.h>
#include "cvmx-fau.h" #include <asm/octeon/cvmx-fau.h>
#include "cvmx-pow.h" #include <asm/octeon/cvmx-pow.h>
#include "cvmx-pip.h" #include <asm/octeon/cvmx-pip.h>
#include "cvmx-scratch.h" #include <asm/octeon/cvmx-scratch.h>
#include "cvmx-gmxx-defs.h" #include <asm/octeon/cvmx-gmxx-defs.h>
struct cvm_napi_wrapper { struct cvm_napi_wrapper {
struct napi_struct napi; struct napi_struct napi;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
* This file may also be available under a different license from Cavium. * This file may also be available under a different license from Cavium.
* Contact Cavium Networks for more information * Contact Cavium Networks for more information
*********************************************************************/ *********************************************************************/
#include "cvmx-fau.h" #include <asm/octeon/cvmx-fau.h>
void cvm_oct_poll_controller(struct net_device *dev); void cvm_oct_poll_controller(struct net_device *dev);
void cvm_oct_rx_initialize(void); void cvm_oct_rx_initialize(void);
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
#include "octeon-ethernet.h" #include "octeon-ethernet.h"
#include "ethernet-util.h" #include "ethernet-util.h"
#include "cvmx-helper.h" #include <asm/octeon/cvmx-helper.h>
#include "cvmx-gmxx-defs.h" #include <asm/octeon/cvmx-gmxx-defs.h>
int cvm_oct_sgmii_open(struct net_device *dev) int cvm_oct_sgmii_open(struct net_device *dev)
{ {
......
...@@ -35,11 +35,11 @@ ...@@ -35,11 +35,11 @@
#include "octeon-ethernet.h" #include "octeon-ethernet.h"
#include "ethernet-util.h" #include "ethernet-util.h"
#include "cvmx-spi.h" #include <asm/octeon/cvmx-spi.h>
#include <asm/octeon/cvmx-npi-defs.h> #include <asm/octeon/cvmx-npi-defs.h>
#include "cvmx-spxx-defs.h" #include <asm/octeon/cvmx-spxx-defs.h>
#include "cvmx-stxx-defs.h" #include <asm/octeon/cvmx-stxx-defs.h>
static int number_spi_ports; static int number_spi_ports;
static int need_retrain[2] = { 0, 0 }; static int need_retrain[2] = { 0, 0 };
......
...@@ -47,13 +47,13 @@ ...@@ -47,13 +47,13 @@
#include "ethernet-tx.h" #include "ethernet-tx.h"
#include "ethernet-util.h" #include "ethernet-util.h"
#include "cvmx-wqe.h" #include <asm/octeon/cvmx-wqe.h>
#include "cvmx-fau.h" #include <asm/octeon/cvmx-fau.h>
#include "cvmx-pip.h" #include <asm/octeon/cvmx-pip.h>
#include "cvmx-pko.h" #include <asm/octeon/cvmx-pko.h>
#include "cvmx-helper.h" #include <asm/octeon/cvmx-helper.h>
#include "cvmx-gmxx-defs.h" #include <asm/octeon/cvmx-gmxx-defs.h>
#define CVM_OCT_SKB_CB(skb) ((u64 *)((skb)->cb)) #define CVM_OCT_SKB_CB(skb) ((u64 *)((skb)->cb))
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
#include "octeon-ethernet.h" #include "octeon-ethernet.h"
#include "ethernet-util.h" #include "ethernet-util.h"
#include "cvmx-helper.h" #include <asm/octeon/cvmx-helper.h>
#include "cvmx-gmxx-defs.h" #include <asm/octeon/cvmx-gmxx-defs.h>
int cvm_oct_xaui_open(struct net_device *dev) int cvm_oct_xaui_open(struct net_device *dev)
{ {
......
...@@ -44,14 +44,14 @@ ...@@ -44,14 +44,14 @@
#include "ethernet-mdio.h" #include "ethernet-mdio.h"
#include "ethernet-util.h" #include "ethernet-util.h"
#include "cvmx-pip.h" #include <asm/octeon/cvmx-pip.h>
#include "cvmx-pko.h" #include <asm/octeon/cvmx-pko.h>
#include "cvmx-fau.h" #include <asm/octeon/cvmx-fau.h>
#include "cvmx-ipd.h" #include <asm/octeon/cvmx-ipd.h>
#include "cvmx-helper.h" #include <asm/octeon/cvmx-helper.h>
#include "cvmx-gmxx-defs.h" #include <asm/octeon/cvmx-gmxx-defs.h>
#include "cvmx-smix-defs.h" #include <asm/octeon/cvmx-smix-defs.h>
#if defined(CONFIG_CAVIUM_OCTEON_NUM_PACKET_BUFFERS) \ #if defined(CONFIG_CAVIUM_OCTEON_NUM_PACKET_BUFFERS) \
&& CONFIG_CAVIUM_OCTEON_NUM_PACKET_BUFFERS && CONFIG_CAVIUM_OCTEON_NUM_PACKET_BUFFERS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment