aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/cavium-octeon/Kconfig4
-rw-r--r--arch/mips/cavium-octeon/executive/Makefile7
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c (renamed from drivers/staging/octeon/cvmx-cmd-queue.c)8
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-fpa.c (renamed from drivers/staging/octeon/cvmx-fpa.c)0
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-helper-board.c (renamed from drivers/staging/octeon/cvmx-helper-board.c)18
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-helper-fpa.c (renamed from drivers/staging/octeon/cvmx-helper-fpa.c)0
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-helper-loop.c (renamed from drivers/staging/octeon/cvmx-helper-loop.c)6
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-helper-npi.c (renamed from drivers/staging/octeon/cvmx-helper-npi.c)6
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-helper-rgmii.c (renamed from drivers/staging/octeon/cvmx-helper-rgmii.c)17
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c (renamed from drivers/staging/octeon/cvmx-helper-sgmii.c)12
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-helper-spi.c (renamed from drivers/staging/octeon/cvmx-helper-spi.c)10
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-helper-util.c (renamed from drivers/staging/octeon/cvmx-helper-util.c)16
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c (renamed from drivers/staging/octeon/cvmx-helper-xaui.c)10
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-helper.c (renamed from drivers/staging/octeon/cvmx-helper.c)27
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-interrupt-decodes.c (renamed from drivers/staging/octeon/cvmx-interrupt-decodes.c)10
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-interrupt-rsl.c (renamed from drivers/staging/octeon/cvmx-interrupt-rsl.c)4
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-pko.c (renamed from drivers/staging/octeon/cvmx-pko.c)8
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-spi.c (renamed from drivers/staging/octeon/cvmx-spi.c)12
-rw-r--r--arch/mips/include/asm/octeon/cvmx-address.h (renamed from drivers/staging/octeon/cvmx-address.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-asxx-defs.h (renamed from drivers/staging/octeon/cvmx-asxx-defs.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-cmd-queue.h (renamed from drivers/staging/octeon/cvmx-cmd-queue.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-config.h (renamed from drivers/staging/octeon/cvmx-config.h)1
-rw-r--r--arch/mips/include/asm/octeon/cvmx-dbg-defs.h (renamed from drivers/staging/octeon/cvmx-dbg-defs.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-fau.h (renamed from drivers/staging/octeon/cvmx-fau.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-fpa-defs.h (renamed from drivers/staging/octeon/cvmx-fpa-defs.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-fpa.h (renamed from drivers/staging/octeon/cvmx-fpa.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-gmxx-defs.h (renamed from drivers/staging/octeon/cvmx-gmxx-defs.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-helper-board.h (renamed from drivers/staging/octeon/cvmx-helper-board.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-helper-fpa.h (renamed from drivers/staging/octeon/cvmx-helper-fpa.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-helper-loop.h (renamed from drivers/staging/octeon/cvmx-helper-loop.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-helper-npi.h (renamed from drivers/staging/octeon/cvmx-helper-npi.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-helper-rgmii.h (renamed from drivers/staging/octeon/cvmx-helper-rgmii.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-helper-sgmii.h (renamed from drivers/staging/octeon/cvmx-helper-sgmii.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-helper-spi.h (renamed from drivers/staging/octeon/cvmx-helper-spi.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-helper-util.h (renamed from drivers/staging/octeon/cvmx-helper-util.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-helper-xaui.h (renamed from drivers/staging/octeon/cvmx-helper-xaui.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-helper.h (renamed from drivers/staging/octeon/cvmx-helper.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-ipd.h (renamed from drivers/staging/octeon/cvmx-ipd.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-mdio.h (renamed from drivers/staging/octeon/cvmx-mdio.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-pcsx-defs.h (renamed from drivers/staging/octeon/cvmx-pcsx-defs.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-pcsxx-defs.h (renamed from drivers/staging/octeon/cvmx-pcsxx-defs.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-pip-defs.h (renamed from drivers/staging/octeon/cvmx-pip-defs.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-pip.h (renamed from drivers/staging/octeon/cvmx-pip.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-pko-defs.h (renamed from drivers/staging/octeon/cvmx-pko-defs.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-pko.h (renamed from drivers/staging/octeon/cvmx-pko.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-pow.h (renamed from drivers/staging/octeon/cvmx-pow.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-scratch.h (renamed from drivers/staging/octeon/cvmx-scratch.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-spi.h (renamed from drivers/staging/octeon/cvmx-spi.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-spxx-defs.h (renamed from drivers/staging/octeon/cvmx-spxx-defs.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-srxx-defs.h (renamed from drivers/staging/octeon/cvmx-srxx-defs.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-stxx-defs.h (renamed from drivers/staging/octeon/cvmx-stxx-defs.h)0
-rw-r--r--arch/mips/include/asm/octeon/cvmx-wqe.h (renamed from drivers/staging/octeon/cvmx-wqe.h)0
-rw-r--r--drivers/staging/octeon/Makefile5
-rw-r--r--drivers/staging/octeon/cvmx-packet.h65
-rw-r--r--drivers/staging/octeon/cvmx-smix-defs.h178
-rw-r--r--drivers/staging/octeon/ethernet-defines.h2
-rw-r--r--drivers/staging/octeon/ethernet-mdio.c4
-rw-r--r--drivers/staging/octeon/ethernet-mem.c2
-rw-r--r--drivers/staging/octeon/ethernet-rgmii.c4
-rw-r--r--drivers/staging/octeon/ethernet-rx.c16
-rw-r--r--drivers/staging/octeon/ethernet-rx.h2
-rw-r--r--drivers/staging/octeon/ethernet-sgmii.c4
-rw-r--r--drivers/staging/octeon/ethernet-spi.c6
-rw-r--r--drivers/staging/octeon/ethernet-tx.c12
-rw-r--r--drivers/staging/octeon/ethernet-xaui.c4
-rw-r--r--drivers/staging/octeon/ethernet.c16
66 files changed, 120 insertions, 376 deletions
diff --git a/arch/mips/cavium-octeon/Kconfig b/arch/mips/cavium-octeon/Kconfig
index cad555ebeca3..f9e275a50d98 100644
--- a/arch/mips/cavium-octeon/Kconfig
+++ b/arch/mips/cavium-octeon/Kconfig
@@ -86,10 +86,6 @@ config ARCH_SPARSEMEM_ENABLE
86 def_bool y 86 def_bool y
87 select SPARSEMEM_STATIC 87 select SPARSEMEM_STATIC
88 88
89config CAVIUM_OCTEON_HELPER
90 def_bool y
91 depends on OCTEON_ETHERNET || PCI
92
93config IOMMU_HELPER 89config IOMMU_HELPER
94 bool 90 bool
95 91
diff --git a/arch/mips/cavium-octeon/executive/Makefile b/arch/mips/cavium-octeon/executive/Makefile
index 7f41c5be2190..b6d6e841a984 100644
--- a/arch/mips/cavium-octeon/executive/Makefile
+++ b/arch/mips/cavium-octeon/executive/Makefile
@@ -10,5 +10,10 @@
10# 10#
11 11
12obj-y += cvmx-bootmem.o cvmx-l2c.o cvmx-sysinfo.o octeon-model.o 12obj-y += cvmx-bootmem.o cvmx-l2c.o cvmx-sysinfo.o octeon-model.o
13obj-y += cvmx-pko.o cvmx-spi.o cvmx-cmd-queue.o \
14 cvmx-helper-board.o cvmx-helper.o cvmx-helper-xaui.o \
15 cvmx-helper-rgmii.o cvmx-helper-sgmii.o cvmx-helper-npi.o \
16 cvmx-helper-loop.o cvmx-helper-spi.o cvmx-helper-util.o \
17 cvmx-interrupt-decodes.o cvmx-interrupt-rsl.o
13 18
14obj-$(CONFIG_CAVIUM_OCTEON_HELPER) += cvmx-helper-errata.o cvmx-helper-jtag.o 19obj-y += cvmx-helper-errata.o cvmx-helper-jtag.o
diff --git a/drivers/staging/octeon/cvmx-cmd-queue.c b/arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c
index e9809d375162..132bccc66a93 100644
--- a/drivers/staging/octeon/cvmx-cmd-queue.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c
@@ -34,13 +34,13 @@
34 34
35#include <asm/octeon/octeon.h> 35#include <asm/octeon/octeon.h>
36 36
37#include "cvmx-config.h" 37#include <asm/octeon/cvmx-config.h>
38#include "cvmx-fpa.h" 38#include <asm/octeon/cvmx-fpa.h>
39#include "cvmx-cmd-queue.h" 39#include <asm/octeon/cvmx-cmd-queue.h>
40 40
41#include <asm/octeon/cvmx-npei-defs.h> 41#include <asm/octeon/cvmx-npei-defs.h>
42#include <asm/octeon/cvmx-pexp-defs.h> 42#include <asm/octeon/cvmx-pexp-defs.h>
43#include "cvmx-pko-defs.h" 43#include <asm/octeon/cvmx-pko-defs.h>
44 44
45/** 45/**
46 * This application uses this pointer to access the global queue 46 * This application uses this pointer to access the global queue
diff --git a/drivers/staging/octeon/cvmx-fpa.c b/arch/mips/cavium-octeon/executive/cvmx-fpa.c
index ad44b8bd8057..ad44b8bd8057 100644
--- a/drivers/staging/octeon/cvmx-fpa.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-fpa.c
diff --git a/drivers/staging/octeon/cvmx-helper-board.c b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
index 57d35dc63ddb..71590a35163b 100644
--- a/drivers/staging/octeon/cvmx-helper-board.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
@@ -34,16 +34,16 @@
34#include <asm/octeon/octeon.h> 34#include <asm/octeon/octeon.h>
35#include <asm/octeon/cvmx-bootinfo.h> 35#include <asm/octeon/cvmx-bootinfo.h>
36 36
37#include "cvmx-config.h" 37#include <asm/octeon/cvmx-config.h>
38 38
39#include "cvmx-mdio.h" 39#include <asm/octeon/cvmx-mdio.h>
40 40
41#include "cvmx-helper.h" 41#include <asm/octeon/cvmx-helper.h>
42#include "cvmx-helper-util.h" 42#include <asm/octeon/cvmx-helper-util.h>
43#include "cvmx-helper-board.h" 43#include <asm/octeon/cvmx-helper-board.h>
44 44
45#include "cvmx-gmxx-defs.h" 45#include <asm/octeon/cvmx-gmxx-defs.h>
46#include "cvmx-asxx-defs.h" 46#include <asm/octeon/cvmx-asxx-defs.h>
47 47
48/** 48/**
49 * cvmx_override_board_link_get(int ipd_port) is a function 49 * 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 cvmx_mdio_phy_reg_control_t reg_control; 493 cvmx_mdio_phy_reg_control_t reg_control;
494 cvmx_mdio_phy_reg_status_t reg_status; 494 cvmx_mdio_phy_reg_status_t reg_status;
495 cvmx_mdio_phy_reg_autoneg_adver_t reg_autoneg_adver; 495 cvmx_mdio_phy_reg_autoneg_adver_t reg_autoneg_adver;
496 cvmx_mdio_phy_reg_extended_status_t reg_extended_status;
497 cvmx_mdio_phy_reg_control_1000_t reg_control_1000; 496 cvmx_mdio_phy_reg_control_1000_t reg_control_1000;
498 497
499 reg_status.u16 = 498 reg_status.u16 =
@@ -508,9 +507,6 @@ int cvmx_helper_board_link_set_phy(int phy_addr,
508 reg_autoneg_adver.s.advert_100base_tx_full = 0; 507 reg_autoneg_adver.s.advert_100base_tx_full = 0;
509 reg_autoneg_adver.s.advert_100base_tx_half = 0; 508 reg_autoneg_adver.s.advert_100base_tx_half = 0;
510 if (reg_status.s.capable_extended_status) { 509 if (reg_status.s.capable_extended_status) {
511 reg_extended_status.u16 =
512 cvmx_mdio_read(phy_addr >> 8, phy_addr & 0xff,
513 CVMX_MDIO_PHY_REG_EXTENDED_STATUS);
514 reg_control_1000.u16 = 510 reg_control_1000.u16 =
515 cvmx_mdio_read(phy_addr >> 8, phy_addr & 0xff, 511 cvmx_mdio_read(phy_addr >> 8, phy_addr & 0xff,
516 CVMX_MDIO_PHY_REG_CONTROL_1000); 512 CVMX_MDIO_PHY_REG_CONTROL_1000);
diff --git a/drivers/staging/octeon/cvmx-helper-fpa.c b/arch/mips/cavium-octeon/executive/cvmx-helper-fpa.c
index c239e5f4ab9a..c239e5f4ab9a 100644
--- a/drivers/staging/octeon/cvmx-helper-fpa.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-fpa.c
diff --git a/drivers/staging/octeon/cvmx-helper-loop.c b/arch/mips/cavium-octeon/executive/cvmx-helper-loop.c
index 55a571a69529..bfbd46115e71 100644
--- a/drivers/staging/octeon/cvmx-helper-loop.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-loop.c
@@ -31,10 +31,10 @@
31 */ 31 */
32#include <asm/octeon/octeon.h> 32#include <asm/octeon/octeon.h>
33 33
34#include "cvmx-config.h" 34#include <asm/octeon/cvmx-config.h>
35 35
36#include "cvmx-helper.h" 36#include <asm/octeon/cvmx-helper.h>
37#include "cvmx-pip-defs.h" 37#include <asm/octeon/cvmx-pip-defs.h>
38 38
39/** 39/**
40 * Probe a LOOP interface and determine the number of ports 40 * Probe a LOOP interface and determine the number of ports
diff --git a/drivers/staging/octeon/cvmx-helper-npi.c b/arch/mips/cavium-octeon/executive/cvmx-helper-npi.c
index 7388a1e72b38..cc94cfa545b4 100644
--- a/drivers/staging/octeon/cvmx-helper-npi.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-npi.c
@@ -31,11 +31,11 @@
31 */ 31 */
32#include <asm/octeon/octeon.h> 32#include <asm/octeon/octeon.h>
33 33
34#include "cvmx-config.h" 34#include <asm/octeon/cvmx-config.h>
35 35
36#include "cvmx-helper.h" 36#include <asm/octeon/cvmx-helper.h>
37 37
38#include "cvmx-pip-defs.h" 38#include <asm/octeon/cvmx-pip-defs.h>
39 39
40/** 40/**
41 * Probe a NPI interface and determine the number of ports 41 * Probe a NPI interface and determine the number of ports
diff --git a/drivers/staging/octeon/cvmx-helper-rgmii.c b/arch/mips/cavium-octeon/executive/cvmx-helper-rgmii.c
index aa2d5d7fee2b..82b21843421c 100644
--- a/drivers/staging/octeon/cvmx-helper-rgmii.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-rgmii.c
@@ -31,18 +31,18 @@
31 */ 31 */
32#include <asm/octeon/octeon.h> 32#include <asm/octeon/octeon.h>
33 33
34#include "cvmx-config.h" 34#include <asm/octeon/cvmx-config.h>
35 35
36 36
37#include "cvmx-mdio.h" 37#include <asm/octeon/cvmx-mdio.h>
38#include "cvmx-pko.h" 38#include <asm/octeon/cvmx-pko.h>
39#include "cvmx-helper.h" 39#include <asm/octeon/cvmx-helper.h>
40#include "cvmx-helper-board.h" 40#include <asm/octeon/cvmx-helper-board.h>
41 41
42#include <asm/octeon/cvmx-npi-defs.h> 42#include <asm/octeon/cvmx-npi-defs.h>
43#include "cvmx-gmxx-defs.h" 43#include <asm/octeon/cvmx-gmxx-defs.h>
44#include "cvmx-asxx-defs.h" 44#include <asm/octeon/cvmx-asxx-defs.h>
45#include "cvmx-dbg-defs.h" 45#include <asm/octeon/cvmx-dbg-defs.h>
46 46
47void __cvmx_interrupt_gmxx_enable(int interface); 47void __cvmx_interrupt_gmxx_enable(int interface);
48void __cvmx_interrupt_asxx_enable(int block); 48void __cvmx_interrupt_asxx_enable(int block);
@@ -326,6 +326,7 @@ int __cvmx_helper_rgmii_link_set(int ipd_port,
326 cvmx_read_csr(CVMX_ASXX_RX_PRT_EN(interface)) & 326 cvmx_read_csr(CVMX_ASXX_RX_PRT_EN(interface)) &
327 ~(1 << index)); 327 ~(1 << index));
328 328
329 memset(pko_mem_queue_qos_save, 0, sizeof(pko_mem_queue_qos_save));
329 /* Disable all queues so that TX should become idle */ 330 /* Disable all queues so that TX should become idle */
330 for (i = 0; i < cvmx_pko_get_num_queues(ipd_port); i++) { 331 for (i = 0; i < cvmx_pko_get_num_queues(ipd_port); i++) {
331 int queue = cvmx_pko_get_base_queue(ipd_port) + i; 332 int queue = cvmx_pko_get_base_queue(ipd_port) + i;
diff --git a/drivers/staging/octeon/cvmx-helper-sgmii.c b/arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c
index 6214e3b6d975..464347ffd362 100644
--- a/drivers/staging/octeon/cvmx-helper-sgmii.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c
@@ -32,14 +32,14 @@
32 32
33#include <asm/octeon/octeon.h> 33#include <asm/octeon/octeon.h>
34 34
35#include "cvmx-config.h" 35#include <asm/octeon/cvmx-config.h>
36 36
37#include "cvmx-mdio.h" 37#include <asm/octeon/cvmx-mdio.h>
38#include "cvmx-helper.h" 38#include <asm/octeon/cvmx-helper.h>
39#include "cvmx-helper-board.h" 39#include <asm/octeon/cvmx-helper-board.h>
40 40
41#include "cvmx-gmxx-defs.h" 41#include <asm/octeon/cvmx-gmxx-defs.h>
42#include "cvmx-pcsx-defs.h" 42#include <asm/octeon/cvmx-pcsx-defs.h>
43 43
44void __cvmx_interrupt_gmxx_enable(int interface); 44void __cvmx_interrupt_gmxx_enable(int interface);
45void __cvmx_interrupt_pcsx_intx_en_reg_enable(int index, int block); 45void __cvmx_interrupt_pcsx_intx_en_reg_enable(int index, int block);
diff --git a/drivers/staging/octeon/cvmx-helper-spi.c b/arch/mips/cavium-octeon/executive/cvmx-helper-spi.c
index 8ba6c832471e..02a444230ef7 100644
--- a/drivers/staging/octeon/cvmx-helper-spi.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-spi.c
@@ -35,12 +35,12 @@ void __cvmx_interrupt_stxx_int_msk_enable(int index);
35 */ 35 */
36#include <asm/octeon/octeon.h> 36#include <asm/octeon/octeon.h>
37 37
38#include "cvmx-config.h" 38#include <asm/octeon/cvmx-config.h>
39#include "cvmx-spi.h" 39#include <asm/octeon/cvmx-spi.h>
40#include "cvmx-helper.h" 40#include <asm/octeon/cvmx-helper.h>
41 41
42#include "cvmx-pip-defs.h" 42#include <asm/octeon/cvmx-pip-defs.h>
43#include "cvmx-pko-defs.h" 43#include <asm/octeon/cvmx-pko-defs.h>
44 44
45/* 45/*
46 * CVMX_HELPER_SPI_TIMEOUT is used to determine how long the SPI 46 * CVMX_HELPER_SPI_TIMEOUT is used to determine how long the SPI
diff --git a/drivers/staging/octeon/cvmx-helper-util.c b/arch/mips/cavium-octeon/executive/cvmx-helper-util.c
index 131182bf5abb..116dea17acf5 100644
--- a/drivers/staging/octeon/cvmx-helper-util.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-util.c
@@ -32,16 +32,16 @@
32 32
33#include <asm/octeon/octeon.h> 33#include <asm/octeon/octeon.h>
34 34
35#include "cvmx-config.h" 35#include <asm/octeon/cvmx-config.h>
36 36
37#include "cvmx-fpa.h" 37#include <asm/octeon/cvmx-fpa.h>
38#include "cvmx-pip.h" 38#include <asm/octeon/cvmx-pip.h>
39#include "cvmx-pko.h" 39#include <asm/octeon/cvmx-pko.h>
40#include "cvmx-ipd.h" 40#include <asm/octeon/cvmx-ipd.h>
41#include "cvmx-spi.h" 41#include <asm/octeon/cvmx-spi.h>
42 42
43#include "cvmx-helper.h" 43#include <asm/octeon/cvmx-helper.h>
44#include "cvmx-helper-util.h" 44#include <asm/octeon/cvmx-helper-util.h>
45 45
46#include <asm/octeon/cvmx-ipd-defs.h> 46#include <asm/octeon/cvmx-ipd-defs.h>
47 47
diff --git a/drivers/staging/octeon/cvmx-helper-xaui.c b/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c
index a11e6769e234..667a8e3cb142 100644
--- a/drivers/staging/octeon/cvmx-helper-xaui.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c
@@ -33,13 +33,13 @@
33 33
34#include <asm/octeon/octeon.h> 34#include <asm/octeon/octeon.h>
35 35
36#include "cvmx-config.h" 36#include <asm/octeon/cvmx-config.h>
37 37
38#include "cvmx-helper.h" 38#include <asm/octeon/cvmx-helper.h>
39 39
40#include "cvmx-pko-defs.h" 40#include <asm/octeon/cvmx-pko-defs.h>
41#include "cvmx-gmxx-defs.h" 41#include <asm/octeon/cvmx-gmxx-defs.h>
42#include "cvmx-pcsxx-defs.h" 42#include <asm/octeon/cvmx-pcsxx-defs.h>
43 43
44void __cvmx_interrupt_gmxx_enable(int interface); 44void __cvmx_interrupt_gmxx_enable(int interface);
45void __cvmx_interrupt_pcsx_intx_en_reg_enable(int index, int block); 45void __cvmx_interrupt_pcsx_intx_en_reg_enable(int index, int block);
diff --git a/drivers/staging/octeon/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c
index e9c5c836ceff..daa8c8bbcfe4 100644
--- a/drivers/staging/octeon/cvmx-helper.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c
@@ -32,19 +32,19 @@
32 */ 32 */
33#include <asm/octeon/octeon.h> 33#include <asm/octeon/octeon.h>
34 34
35#include "cvmx-config.h" 35#include <asm/octeon/cvmx-config.h>
36 36
37#include "cvmx-fpa.h" 37#include <asm/octeon/cvmx-fpa.h>
38#include "cvmx-pip.h" 38#include <asm/octeon/cvmx-pip.h>
39#include "cvmx-pko.h" 39#include <asm/octeon/cvmx-pko.h>
40#include "cvmx-ipd.h" 40#include <asm/octeon/cvmx-ipd.h>
41#include "cvmx-spi.h" 41#include <asm/octeon/cvmx-spi.h>
42#include "cvmx-helper.h" 42#include <asm/octeon/cvmx-helper.h>
43#include "cvmx-helper-board.h" 43#include <asm/octeon/cvmx-helper-board.h>
44 44
45#include "cvmx-pip-defs.h" 45#include <asm/octeon/cvmx-pip-defs.h>
46#include "cvmx-smix-defs.h" 46#include <asm/octeon/cvmx-smix-defs.h>
47#include "cvmx-asxx-defs.h" 47#include <asm/octeon/cvmx-asxx-defs.h>
48 48
49/** 49/**
50 * cvmx_override_pko_queue_priority(int ipd_port, uint64_t 50 * cvmx_override_pko_queue_priority(int ipd_port, uint64_t
@@ -548,7 +548,6 @@ int __cvmx_helper_errata_fix_ipd_ptr_alignment(void)
548 union cvmx_gmxx_prtx_cfg gmx_cfg; 548 union cvmx_gmxx_prtx_cfg gmx_cfg;
549 int retry_cnt; 549 int retry_cnt;
550 int retry_loop_cnt; 550 int retry_loop_cnt;
551 int mtu;
552 int i; 551 int i;
553 cvmx_helper_link_info_t link_info; 552 cvmx_helper_link_info_t link_info;
554 553
@@ -662,10 +661,6 @@ int __cvmx_helper_errata_fix_ipd_ptr_alignment(void)
662 cvmx_write_csr(CVMX_ASXX_RX_PRT_EN(INTERFACE(FIX_IPD_OUTPORT)), 661 cvmx_write_csr(CVMX_ASXX_RX_PRT_EN(INTERFACE(FIX_IPD_OUTPORT)),
663 1 << INDEX(FIX_IPD_OUTPORT)); 662 1 << INDEX(FIX_IPD_OUTPORT));
664 663
665 mtu =
666 cvmx_read_csr(CVMX_GMXX_RXX_JABBER
667 (INDEX(FIX_IPD_OUTPORT),
668 INTERFACE(FIX_IPD_OUTPORT)));
669 cvmx_write_csr(CVMX_GMXX_RXX_JABBER 664 cvmx_write_csr(CVMX_GMXX_RXX_JABBER
670 (INDEX(FIX_IPD_OUTPORT), 665 (INDEX(FIX_IPD_OUTPORT),
671 INTERFACE(FIX_IPD_OUTPORT)), 65392 - 14 - 4); 666 INTERFACE(FIX_IPD_OUTPORT)), 65392 - 14 - 4);
diff --git a/drivers/staging/octeon/cvmx-interrupt-decodes.c b/arch/mips/cavium-octeon/executive/cvmx-interrupt-decodes.c
index a3337e382ee9..e59d1b79f24c 100644
--- a/drivers/staging/octeon/cvmx-interrupt-decodes.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-interrupt-decodes.c
@@ -34,11 +34,11 @@
34 34
35#include <asm/octeon/octeon.h> 35#include <asm/octeon/octeon.h>
36 36
37#include "cvmx-gmxx-defs.h" 37#include <asm/octeon/cvmx-gmxx-defs.h>
38#include "cvmx-pcsx-defs.h" 38#include <asm/octeon/cvmx-pcsx-defs.h>
39#include "cvmx-pcsxx-defs.h" 39#include <asm/octeon/cvmx-pcsxx-defs.h>
40#include "cvmx-spxx-defs.h" 40#include <asm/octeon/cvmx-spxx-defs.h>
41#include "cvmx-stxx-defs.h" 41#include <asm/octeon/cvmx-stxx-defs.h>
42 42
43#ifndef PRINT_ERROR 43#ifndef PRINT_ERROR
44#define PRINT_ERROR(format, ...) 44#define PRINT_ERROR(format, ...)
diff --git a/drivers/staging/octeon/cvmx-interrupt-rsl.c b/arch/mips/cavium-octeon/executive/cvmx-interrupt-rsl.c
index df50048cfbc0..bea7538ea4e9 100644
--- a/drivers/staging/octeon/cvmx-interrupt-rsl.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-interrupt-rsl.c
@@ -32,8 +32,8 @@
32 32
33#include <asm/octeon/octeon.h> 33#include <asm/octeon/octeon.h>
34 34
35#include "cvmx-asxx-defs.h" 35#include <asm/octeon/cvmx-asxx-defs.h>
36#include "cvmx-gmxx-defs.h" 36#include <asm/octeon/cvmx-gmxx-defs.h>
37 37
38#ifndef PRINT_ERROR 38#ifndef PRINT_ERROR
39#define PRINT_ERROR(format, ...) 39#define PRINT_ERROR(format, ...)
diff --git a/drivers/staging/octeon/cvmx-pko.c b/arch/mips/cavium-octeon/executive/cvmx-pko.c
index 50a2c9bd5a55..f557084b1092 100644
--- a/drivers/staging/octeon/cvmx-pko.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-pko.c
@@ -31,9 +31,9 @@
31 31
32#include <asm/octeon/octeon.h> 32#include <asm/octeon/octeon.h>
33 33
34#include "cvmx-config.h" 34#include <asm/octeon/cvmx-config.h>
35#include "cvmx-pko.h" 35#include <asm/octeon/cvmx-pko.h>
36#include "cvmx-helper.h" 36#include <asm/octeon/cvmx-helper.h>
37 37
38/** 38/**
39 * Internal state of packet output 39 * Internal state of packet output
@@ -54,7 +54,7 @@ void cvmx_pko_initialize_global(void)
54 /* 54 /*
55 * Set the size of the PKO command buffers to an odd number of 55 * Set the size of the PKO command buffers to an odd number of
56 * 64bit words. This allows the normal two word send to stay 56 * 64bit words. This allows the normal two word send to stay
57 * aligned and never span a command word buffer. 57 * aligned and never span a comamnd word buffer.
58 */ 58 */
59 config.u64 = 0; 59 config.u64 = 0;
60 config.s.pool = CVMX_FPA_OUTPUT_BUFFER_POOL; 60 config.s.pool = CVMX_FPA_OUTPUT_BUFFER_POOL;
diff --git a/drivers/staging/octeon/cvmx-spi.c b/arch/mips/cavium-octeon/executive/cvmx-spi.c
index 82794d920cec..74afb1710cd9 100644
--- a/drivers/staging/octeon/cvmx-spi.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-spi.c
@@ -31,14 +31,14 @@
31 */ 31 */
32#include <asm/octeon/octeon.h> 32#include <asm/octeon/octeon.h>
33 33
34#include "cvmx-config.h" 34#include <asm/octeon/cvmx-config.h>
35 35
36#include "cvmx-pko.h" 36#include <asm/octeon/cvmx-pko.h>
37#include "cvmx-spi.h" 37#include <asm/octeon/cvmx-spi.h>
38 38
39#include "cvmx-spxx-defs.h" 39#include <asm/octeon/cvmx-spxx-defs.h>
40#include "cvmx-stxx-defs.h" 40#include <asm/octeon/cvmx-stxx-defs.h>
41#include "cvmx-srxx-defs.h" 41#include <asm/octeon/cvmx-srxx-defs.h>
42 42
43#define INVOKE_CB(function_p, args...) \ 43#define INVOKE_CB(function_p, args...) \
44 do { \ 44 do { \
diff --git a/drivers/staging/octeon/cvmx-address.h b/arch/mips/include/asm/octeon/cvmx-address.h
index 3c74d826e2e6..3c74d826e2e6 100644
--- a/drivers/staging/octeon/cvmx-address.h
+++ b/arch/mips/include/asm/octeon/cvmx-address.h
diff --git a/drivers/staging/octeon/cvmx-asxx-defs.h b/arch/mips/include/asm/octeon/cvmx-asxx-defs.h
index 91415a85e8d2..91415a85e8d2 100644
--- a/drivers/staging/octeon/cvmx-asxx-defs.h
+++ b/arch/mips/include/asm/octeon/cvmx-asxx-defs.h
diff --git a/drivers/staging/octeon/cvmx-cmd-queue.h b/arch/mips/include/asm/octeon/cvmx-cmd-queue.h
index 614653b686a0..614653b686a0 100644
--- a/drivers/staging/octeon/cvmx-cmd-queue.h
+++ b/arch/mips/include/asm/octeon/cvmx-cmd-queue.h
diff --git a/drivers/staging/octeon/cvmx-config.h b/arch/mips/include/asm/octeon/cvmx-config.h
index 078a520481cf..26835d1b43b8 100644
--- a/drivers/staging/octeon/cvmx-config.h
+++ b/arch/mips/include/asm/octeon/cvmx-config.h
@@ -166,4 +166,3 @@ typedef enum {
166#define CVMX_HELPER_DISABLE_RGMII_BACKPRESSURE 0 166#define CVMX_HELPER_DISABLE_RGMII_BACKPRESSURE 0
167 167
168#endif /* __CVMX_CONFIG_H__ */ 168#endif /* __CVMX_CONFIG_H__ */
169
diff --git a/drivers/staging/octeon/cvmx-dbg-defs.h b/arch/mips/include/asm/octeon/cvmx-dbg-defs.h
index abbf42d05e5a..abbf42d05e5a 100644
--- a/drivers/staging/octeon/cvmx-dbg-defs.h
+++ b/arch/mips/include/asm/octeon/cvmx-dbg-defs.h
diff --git a/drivers/staging/octeon/cvmx-fau.h b/arch/mips/include/asm/octeon/cvmx-fau.h
index a6939fc8ba18..a6939fc8ba18 100644
--- a/drivers/staging/octeon/cvmx-fau.h
+++ b/arch/mips/include/asm/octeon/cvmx-fau.h
diff --git a/drivers/staging/octeon/cvmx-fpa-defs.h b/arch/mips/include/asm/octeon/cvmx-fpa-defs.h
index bf5546b90110..bf5546b90110 100644
--- a/drivers/staging/octeon/cvmx-fpa-defs.h
+++ b/arch/mips/include/asm/octeon/cvmx-fpa-defs.h
diff --git a/drivers/staging/octeon/cvmx-fpa.h b/arch/mips/include/asm/octeon/cvmx-fpa.h
index 1f04f9658736..1f04f9658736 100644
--- a/drivers/staging/octeon/cvmx-fpa.h
+++ b/arch/mips/include/asm/octeon/cvmx-fpa.h
diff --git a/drivers/staging/octeon/cvmx-gmxx-defs.h b/arch/mips/include/asm/octeon/cvmx-gmxx-defs.h
index 946a43a73fd7..946a43a73fd7 100644
--- a/drivers/staging/octeon/cvmx-gmxx-defs.h
+++ b/arch/mips/include/asm/octeon/cvmx-gmxx-defs.h
diff --git a/drivers/staging/octeon/cvmx-helper-board.h b/arch/mips/include/asm/octeon/cvmx-helper-board.h
index b465bec43553..b465bec43553 100644
--- a/drivers/staging/octeon/cvmx-helper-board.h
+++ b/arch/mips/include/asm/octeon/cvmx-helper-board.h
diff --git a/drivers/staging/octeon/cvmx-helper-fpa.h b/arch/mips/include/asm/octeon/cvmx-helper-fpa.h
index 5ff8c93198de..5ff8c93198de 100644
--- a/drivers/staging/octeon/cvmx-helper-fpa.h
+++ b/arch/mips/include/asm/octeon/cvmx-helper-fpa.h
diff --git a/drivers/staging/octeon/cvmx-helper-loop.h b/arch/mips/include/asm/octeon/cvmx-helper-loop.h
index e646a6ccce75..e646a6ccce75 100644
--- a/drivers/staging/octeon/cvmx-helper-loop.h
+++ b/arch/mips/include/asm/octeon/cvmx-helper-loop.h
diff --git a/drivers/staging/octeon/cvmx-helper-npi.h b/arch/mips/include/asm/octeon/cvmx-helper-npi.h
index 908e7b08c214..908e7b08c214 100644
--- a/drivers/staging/octeon/cvmx-helper-npi.h
+++ b/arch/mips/include/asm/octeon/cvmx-helper-npi.h
diff --git a/drivers/staging/octeon/cvmx-helper-rgmii.h b/arch/mips/include/asm/octeon/cvmx-helper-rgmii.h
index ea2652604a57..ea2652604a57 100644
--- a/drivers/staging/octeon/cvmx-helper-rgmii.h
+++ b/arch/mips/include/asm/octeon/cvmx-helper-rgmii.h
diff --git a/drivers/staging/octeon/cvmx-helper-sgmii.h b/arch/mips/include/asm/octeon/cvmx-helper-sgmii.h
index 19b48d60857f..19b48d60857f 100644
--- a/drivers/staging/octeon/cvmx-helper-sgmii.h
+++ b/arch/mips/include/asm/octeon/cvmx-helper-sgmii.h
diff --git a/drivers/staging/octeon/cvmx-helper-spi.h b/arch/mips/include/asm/octeon/cvmx-helper-spi.h
index 69bac036d10e..69bac036d10e 100644
--- a/drivers/staging/octeon/cvmx-helper-spi.h
+++ b/arch/mips/include/asm/octeon/cvmx-helper-spi.h
diff --git a/drivers/staging/octeon/cvmx-helper-util.h b/arch/mips/include/asm/octeon/cvmx-helper-util.h
index 6a6e52fc22c1..6a6e52fc22c1 100644
--- a/drivers/staging/octeon/cvmx-helper-util.h
+++ b/arch/mips/include/asm/octeon/cvmx-helper-util.h
diff --git a/drivers/staging/octeon/cvmx-helper-xaui.h b/arch/mips/include/asm/octeon/cvmx-helper-xaui.h
index 4b4db2f93cd4..4b4db2f93cd4 100644
--- a/drivers/staging/octeon/cvmx-helper-xaui.h
+++ b/arch/mips/include/asm/octeon/cvmx-helper-xaui.h
diff --git a/drivers/staging/octeon/cvmx-helper.h b/arch/mips/include/asm/octeon/cvmx-helper.h
index 51916f3cc40c..51916f3cc40c 100644
--- a/drivers/staging/octeon/cvmx-helper.h
+++ b/arch/mips/include/asm/octeon/cvmx-helper.h
diff --git a/drivers/staging/octeon/cvmx-ipd.h b/arch/mips/include/asm/octeon/cvmx-ipd.h
index 115a552c5c7f..115a552c5c7f 100644
--- a/drivers/staging/octeon/cvmx-ipd.h
+++ b/arch/mips/include/asm/octeon/cvmx-ipd.h
diff --git a/drivers/staging/octeon/cvmx-mdio.h b/arch/mips/include/asm/octeon/cvmx-mdio.h
index d88ab8d8e37d..d88ab8d8e37d 100644
--- a/drivers/staging/octeon/cvmx-mdio.h
+++ b/arch/mips/include/asm/octeon/cvmx-mdio.h
diff --git a/drivers/staging/octeon/cvmx-pcsx-defs.h b/arch/mips/include/asm/octeon/cvmx-pcsx-defs.h
index d45952df5f5b..d45952df5f5b 100644
--- a/drivers/staging/octeon/cvmx-pcsx-defs.h
+++ b/arch/mips/include/asm/octeon/cvmx-pcsx-defs.h
diff --git a/drivers/staging/octeon/cvmx-pcsxx-defs.h b/arch/mips/include/asm/octeon/cvmx-pcsxx-defs.h
index 55d120fe8aed..55d120fe8aed 100644
--- a/drivers/staging/octeon/cvmx-pcsxx-defs.h
+++ b/arch/mips/include/asm/octeon/cvmx-pcsxx-defs.h
diff --git a/drivers/staging/octeon/cvmx-pip-defs.h b/arch/mips/include/asm/octeon/cvmx-pip-defs.h
index 5a369100ca68..5a369100ca68 100644
--- a/drivers/staging/octeon/cvmx-pip-defs.h
+++ b/arch/mips/include/asm/octeon/cvmx-pip-defs.h
diff --git a/drivers/staging/octeon/cvmx-pip.h b/arch/mips/include/asm/octeon/cvmx-pip.h
index 78dbce8f2c5e..78dbce8f2c5e 100644
--- a/drivers/staging/octeon/cvmx-pip.h
+++ b/arch/mips/include/asm/octeon/cvmx-pip.h
diff --git a/drivers/staging/octeon/cvmx-pko-defs.h b/arch/mips/include/asm/octeon/cvmx-pko-defs.h
index 50e779cf1ad8..50e779cf1ad8 100644
--- a/drivers/staging/octeon/cvmx-pko-defs.h
+++ b/arch/mips/include/asm/octeon/cvmx-pko-defs.h
diff --git a/drivers/staging/octeon/cvmx-pko.h b/arch/mips/include/asm/octeon/cvmx-pko.h
index de3412aada5d..de3412aada5d 100644
--- a/drivers/staging/octeon/cvmx-pko.h
+++ b/arch/mips/include/asm/octeon/cvmx-pko.h
diff --git a/drivers/staging/octeon/cvmx-pow.h b/arch/mips/include/asm/octeon/cvmx-pow.h
index 999aefe3274c..999aefe3274c 100644
--- a/drivers/staging/octeon/cvmx-pow.h
+++ b/arch/mips/include/asm/octeon/cvmx-pow.h
diff --git a/drivers/staging/octeon/cvmx-scratch.h b/arch/mips/include/asm/octeon/cvmx-scratch.h
index 96b70cfd6245..96b70cfd6245 100644
--- a/drivers/staging/octeon/cvmx-scratch.h
+++ b/arch/mips/include/asm/octeon/cvmx-scratch.h
diff --git a/drivers/staging/octeon/cvmx-spi.h b/arch/mips/include/asm/octeon/cvmx-spi.h
index e814648953a5..e814648953a5 100644
--- a/drivers/staging/octeon/cvmx-spi.h
+++ b/arch/mips/include/asm/octeon/cvmx-spi.h
diff --git a/drivers/staging/octeon/cvmx-spxx-defs.h b/arch/mips/include/asm/octeon/cvmx-spxx-defs.h
index b16940e32c83..b16940e32c83 100644
--- a/drivers/staging/octeon/cvmx-spxx-defs.h
+++ b/arch/mips/include/asm/octeon/cvmx-spxx-defs.h
diff --git a/drivers/staging/octeon/cvmx-srxx-defs.h b/arch/mips/include/asm/octeon/cvmx-srxx-defs.h
index d82b366c279f..d82b366c279f 100644
--- a/drivers/staging/octeon/cvmx-srxx-defs.h
+++ b/arch/mips/include/asm/octeon/cvmx-srxx-defs.h
diff --git a/drivers/staging/octeon/cvmx-stxx-defs.h b/arch/mips/include/asm/octeon/cvmx-stxx-defs.h
index 4f209b62cae1..4f209b62cae1 100644
--- a/drivers/staging/octeon/cvmx-stxx-defs.h
+++ b/arch/mips/include/asm/octeon/cvmx-stxx-defs.h
diff --git a/drivers/staging/octeon/cvmx-wqe.h b/arch/mips/include/asm/octeon/cvmx-wqe.h
index 653610953d28..653610953d28 100644
--- a/drivers/staging/octeon/cvmx-wqe.h
+++ b/arch/mips/include/asm/octeon/cvmx-wqe.h
diff --git a/drivers/staging/octeon/Makefile b/drivers/staging/octeon/Makefile
index fc850bac88c1..9012dee0c348 100644
--- a/drivers/staging/octeon/Makefile
+++ b/drivers/staging/octeon/Makefile
@@ -20,9 +20,4 @@ octeon-ethernet-y += ethernet-sgmii.o
20octeon-ethernet-y += ethernet-spi.o 20octeon-ethernet-y += ethernet-spi.o
21octeon-ethernet-y += ethernet-tx.o 21octeon-ethernet-y += ethernet-tx.o
22octeon-ethernet-y += ethernet-xaui.o 22octeon-ethernet-y += ethernet-xaui.o
23octeon-ethernet-y += cvmx-pko.o cvmx-spi.o cvmx-cmd-queue.o \
24 cvmx-helper-board.o cvmx-helper.o cvmx-helper-xaui.o \
25 cvmx-helper-rgmii.o cvmx-helper-sgmii.o cvmx-helper-npi.o \
26 cvmx-helper-loop.o cvmx-helper-spi.o cvmx-helper-util.o \
27 cvmx-interrupt-decodes.o cvmx-interrupt-rsl.o
28 23
diff --git a/drivers/staging/octeon/cvmx-packet.h b/drivers/staging/octeon/cvmx-packet.h
deleted file mode 100644
index 62ffe78a8c81..000000000000
--- a/drivers/staging/octeon/cvmx-packet.h
+++ /dev/null
@@ -1,65 +0,0 @@
1/***********************license start***************
2 * Author: Cavium Networks
3 *
4 * Contact: support@caviumnetworks.com
5 * This file is part of the OCTEON SDK
6 *
7 * Copyright (c) 2003-2008 Cavium Networks
8 *
9 * This file is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License, Version 2, as
11 * published by the Free Software Foundation.
12 *
13 * This file is distributed in the hope that it will be useful, but
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
16 * NONINFRINGEMENT. See the GNU General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this file; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 * or visit http://www.gnu.org/licenses/.
23 *
24 * This file may also be available under a different license from Cavium.
25 * Contact Cavium Networks for more information
26 ***********************license end**************************************/
27
28/**
29 *
30 * Packet buffer defines.
31 */
32
33#ifndef __CVMX_PACKET_H__
34#define __CVMX_PACKET_H__
35
36/**
37 * This structure defines a buffer pointer on Octeon
38 */
39union cvmx_buf_ptr {
40 void *ptr;
41 uint64_t u64;
42 struct {
43 /*
44 * if set, invert the "free" pick of the overall
45 * packet. HW always sets this bit to 0 on inbound
46 * packet
47 */
48 uint64_t i:1;
49 /*
50 * Indicates the amount to back up to get to the
51 * buffer start in cache lines. In most cases this is
52 * less than one complete cache line, so the value is
53 * zero.
54 */
55 uint64_t back:4;
56 /* The pool that the buffer came from / goes to */
57 uint64_t pool:3;
58 /* The size of the segment pointed to by addr (in bytes) */
59 uint64_t size:16;
60 /* Pointer to the first byte of the data, NOT buffer */
61 uint64_t addr:40;
62 } s;
63};
64
65#endif /* __CVMX_PACKET_H__ */
diff --git a/drivers/staging/octeon/cvmx-smix-defs.h b/drivers/staging/octeon/cvmx-smix-defs.h
deleted file mode 100644
index 9ae45fcbe3e3..000000000000
--- a/drivers/staging/octeon/cvmx-smix-defs.h
+++ /dev/null
@@ -1,178 +0,0 @@
1/***********************license start***************
2 * Author: Cavium Networks
3 *
4 * Contact: support@caviumnetworks.com
5 * This file is part of the OCTEON SDK
6 *
7 * Copyright (c) 2003-2008 Cavium Networks
8 *
9 * This file is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License, Version 2, as
11 * published by the Free Software Foundation.
12 *
13 * This file is distributed in the hope that it will be useful, but
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
16 * NONINFRINGEMENT. See the GNU General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this file; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 * or visit http://www.gnu.org/licenses/.
23 *
24 * This file may also be available under a different license from Cavium.
25 * Contact Cavium Networks for more information
26 ***********************license end**************************************/
27
28#ifndef __CVMX_SMIX_DEFS_H__
29#define __CVMX_SMIX_DEFS_H__
30
31#define CVMX_SMIX_CLK(offset) \
32 CVMX_ADD_IO_SEG(0x0001180000001818ull + (((offset) & 1) * 256))
33#define CVMX_SMIX_CMD(offset) \
34 CVMX_ADD_IO_SEG(0x0001180000001800ull + (((offset) & 1) * 256))
35#define CVMX_SMIX_EN(offset) \
36 CVMX_ADD_IO_SEG(0x0001180000001820ull + (((offset) & 1) * 256))
37#define CVMX_SMIX_RD_DAT(offset) \
38 CVMX_ADD_IO_SEG(0x0001180000001810ull + (((offset) & 1) * 256))
39#define CVMX_SMIX_WR_DAT(offset) \
40 CVMX_ADD_IO_SEG(0x0001180000001808ull + (((offset) & 1) * 256))
41
42union cvmx_smix_clk {
43 uint64_t u64;
44 struct cvmx_smix_clk_s {
45 uint64_t reserved_25_63:39;
46 uint64_t mode:1;
47 uint64_t reserved_21_23:3;
48 uint64_t sample_hi:5;
49 uint64_t sample_mode:1;
50 uint64_t reserved_14_14:1;
51 uint64_t clk_idle:1;
52 uint64_t preamble:1;
53 uint64_t sample:4;
54 uint64_t phase:8;
55 } s;
56 struct cvmx_smix_clk_cn30xx {
57 uint64_t reserved_21_63:43;
58 uint64_t sample_hi:5;
59 uint64_t reserved_14_15:2;
60 uint64_t clk_idle:1;
61 uint64_t preamble:1;
62 uint64_t sample:4;
63 uint64_t phase:8;
64 } cn30xx;
65 struct cvmx_smix_clk_cn30xx cn31xx;
66 struct cvmx_smix_clk_cn30xx cn38xx;
67 struct cvmx_smix_clk_cn30xx cn38xxp2;
68 struct cvmx_smix_clk_cn50xx {
69 uint64_t reserved_25_63:39;
70 uint64_t mode:1;
71 uint64_t reserved_21_23:3;
72 uint64_t sample_hi:5;
73 uint64_t reserved_14_15:2;
74 uint64_t clk_idle:1;
75 uint64_t preamble:1;
76 uint64_t sample:4;
77 uint64_t phase:8;
78 } cn50xx;
79 struct cvmx_smix_clk_s cn52xx;
80 struct cvmx_smix_clk_cn50xx cn52xxp1;
81 struct cvmx_smix_clk_s cn56xx;
82 struct cvmx_smix_clk_cn50xx cn56xxp1;
83 struct cvmx_smix_clk_cn30xx cn58xx;
84 struct cvmx_smix_clk_cn30xx cn58xxp1;
85};
86
87union cvmx_smix_cmd {
88 uint64_t u64;
89 struct cvmx_smix_cmd_s {
90 uint64_t reserved_18_63:46;
91 uint64_t phy_op:2;
92 uint64_t reserved_13_15:3;
93 uint64_t phy_adr:5;
94 uint64_t reserved_5_7:3;
95 uint64_t reg_adr:5;
96 } s;
97 struct cvmx_smix_cmd_cn30xx {
98 uint64_t reserved_17_63:47;
99 uint64_t phy_op:1;
100 uint64_t reserved_13_15:3;
101 uint64_t phy_adr:5;
102 uint64_t reserved_5_7:3;
103 uint64_t reg_adr:5;
104 } cn30xx;
105 struct cvmx_smix_cmd_cn30xx cn31xx;
106 struct cvmx_smix_cmd_cn30xx cn38xx;
107 struct cvmx_smix_cmd_cn30xx cn38xxp2;
108 struct cvmx_smix_cmd_s cn50xx;
109 struct cvmx_smix_cmd_s cn52xx;
110 struct cvmx_smix_cmd_s cn52xxp1;
111 struct cvmx_smix_cmd_s cn56xx;
112 struct cvmx_smix_cmd_s cn56xxp1;
113 struct cvmx_smix_cmd_cn30xx cn58xx;
114 struct cvmx_smix_cmd_cn30xx cn58xxp1;
115};
116
117union cvmx_smix_en {
118 uint64_t u64;
119 struct cvmx_smix_en_s {
120 uint64_t reserved_1_63:63;
121 uint64_t en:1;
122 } s;
123 struct cvmx_smix_en_s cn30xx;
124 struct cvmx_smix_en_s cn31xx;
125 struct cvmx_smix_en_s cn38xx;
126 struct cvmx_smix_en_s cn38xxp2;
127 struct cvmx_smix_en_s cn50xx;
128 struct cvmx_smix_en_s cn52xx;
129 struct cvmx_smix_en_s cn52xxp1;
130 struct cvmx_smix_en_s cn56xx;
131 struct cvmx_smix_en_s cn56xxp1;
132 struct cvmx_smix_en_s cn58xx;
133 struct cvmx_smix_en_s cn58xxp1;
134};
135
136union cvmx_smix_rd_dat {
137 uint64_t u64;
138 struct cvmx_smix_rd_dat_s {
139 uint64_t reserved_18_63:46;
140 uint64_t pending:1;
141 uint64_t val:1;
142 uint64_t dat:16;
143 } s;
144 struct cvmx_smix_rd_dat_s cn30xx;
145 struct cvmx_smix_rd_dat_s cn31xx;
146 struct cvmx_smix_rd_dat_s cn38xx;
147 struct cvmx_smix_rd_dat_s cn38xxp2;
148 struct cvmx_smix_rd_dat_s cn50xx;
149 struct cvmx_smix_rd_dat_s cn52xx;
150 struct cvmx_smix_rd_dat_s cn52xxp1;
151 struct cvmx_smix_rd_dat_s cn56xx;
152 struct cvmx_smix_rd_dat_s cn56xxp1;
153 struct cvmx_smix_rd_dat_s cn58xx;
154 struct cvmx_smix_rd_dat_s cn58xxp1;
155};
156
157union cvmx_smix_wr_dat {
158 uint64_t u64;
159 struct cvmx_smix_wr_dat_s {
160 uint64_t reserved_18_63:46;
161 uint64_t pending:1;
162 uint64_t val:1;
163 uint64_t dat:16;
164 } s;
165 struct cvmx_smix_wr_dat_s cn30xx;
166 struct cvmx_smix_wr_dat_s cn31xx;
167 struct cvmx_smix_wr_dat_s cn38xx;
168 struct cvmx_smix_wr_dat_s cn38xxp2;
169 struct cvmx_smix_wr_dat_s cn50xx;
170 struct cvmx_smix_wr_dat_s cn52xx;
171 struct cvmx_smix_wr_dat_s cn52xxp1;
172 struct cvmx_smix_wr_dat_s cn56xx;
173 struct cvmx_smix_wr_dat_s cn56xxp1;
174 struct cvmx_smix_wr_dat_s cn58xx;
175 struct cvmx_smix_wr_dat_s cn58xxp1;
176};
177
178#endif
diff --git a/drivers/staging/octeon/ethernet-defines.h b/drivers/staging/octeon/ethernet-defines.h
index 6a2cd50a17df..bdaec8d2ca0c 100644
--- a/drivers/staging/octeon/ethernet-defines.h
+++ b/drivers/staging/octeon/ethernet-defines.h
@@ -59,7 +59,7 @@
59#ifndef __ETHERNET_DEFINES_H__ 59#ifndef __ETHERNET_DEFINES_H__
60#define __ETHERNET_DEFINES_H__ 60#define __ETHERNET_DEFINES_H__
61 61
62#include "cvmx-config.h" 62#include <asm/octeon/cvmx-config.h>
63 63
64 64
65#define OCTEON_ETHERNET_VERSION "1.9" 65#define OCTEON_ETHERNET_VERSION "1.9"
diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c
index f18e3e140413..63800ba71d06 100644
--- a/drivers/staging/octeon/ethernet-mdio.c
+++ b/drivers/staging/octeon/ethernet-mdio.c
@@ -38,9 +38,9 @@
38#include "ethernet-mdio.h" 38#include "ethernet-mdio.h"
39#include "ethernet-util.h" 39#include "ethernet-util.h"
40 40
41#include "cvmx-helper-board.h" 41#include <asm/octeon/cvmx-helper-board.h>
42 42
43#include "cvmx-smix-defs.h" 43#include <asm/octeon/cvmx-smix-defs.h>
44 44
45static void cvm_oct_get_drvinfo(struct net_device *dev, 45static void cvm_oct_get_drvinfo(struct net_device *dev,
46 struct ethtool_drvinfo *info) 46 struct ethtool_drvinfo *info)
diff --git a/drivers/staging/octeon/ethernet-mem.c b/drivers/staging/octeon/ethernet-mem.c
index 635bb86cdcff..78b6cb743769 100644
--- a/drivers/staging/octeon/ethernet-mem.c
+++ b/drivers/staging/octeon/ethernet-mem.c
@@ -32,7 +32,7 @@
32 32
33#include "ethernet-defines.h" 33#include "ethernet-defines.h"
34 34
35#include "cvmx-fpa.h" 35#include <asm/octeon/cvmx-fpa.h>
36 36
37/** 37/**
38 * cvm_oct_fill_hw_skbuff - fill the supplied hardware pool with skbuffs 38 * cvm_oct_fill_hw_skbuff - fill the supplied hardware pool with skbuffs
diff --git a/drivers/staging/octeon/ethernet-rgmii.c b/drivers/staging/octeon/ethernet-rgmii.c
index c3d73f8431ae..d8f5f694ec35 100644
--- a/drivers/staging/octeon/ethernet-rgmii.c
+++ b/drivers/staging/octeon/ethernet-rgmii.c
@@ -37,11 +37,11 @@
37#include "octeon-ethernet.h" 37#include "octeon-ethernet.h"
38#include "ethernet-util.h" 38#include "ethernet-util.h"
39 39
40#include "cvmx-helper.h" 40#include <asm/octeon/cvmx-helper.h>
41 41
42#include <asm/octeon/cvmx-ipd-defs.h> 42#include <asm/octeon/cvmx-ipd-defs.h>
43#include <asm/octeon/cvmx-npi-defs.h> 43#include <asm/octeon/cvmx-npi-defs.h>
44#include "cvmx-gmxx-defs.h" 44#include <asm/octeon/cvmx-gmxx-defs.h>
45 45
46DEFINE_SPINLOCK(global_register_lock); 46DEFINE_SPINLOCK(global_register_lock);
47 47
diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
index 8b307b428791..400df8cbee53 100644
--- a/drivers/staging/octeon/ethernet-rx.c
+++ b/drivers/staging/octeon/ethernet-rx.c
@@ -52,14 +52,14 @@
52#include "octeon-ethernet.h" 52#include "octeon-ethernet.h"
53#include "ethernet-util.h" 53#include "ethernet-util.h"
54 54
55#include "cvmx-helper.h" 55#include <asm/octeon/cvmx-helper.h>
56#include "cvmx-wqe.h" 56#include <asm/octeon/cvmx-wqe.h>
57#include "cvmx-fau.h" 57#include <asm/octeon/cvmx-fau.h>
58#include "cvmx-pow.h" 58#include <asm/octeon/cvmx-pow.h>
59#include "cvmx-pip.h" 59#include <asm/octeon/cvmx-pip.h>
60#include "cvmx-scratch.h" 60#include <asm/octeon/cvmx-scratch.h>
61 61
62#include "cvmx-gmxx-defs.h" 62#include <asm/octeon/cvmx-gmxx-defs.h>
63 63
64struct cvm_napi_wrapper { 64struct cvm_napi_wrapper {
65 struct napi_struct napi; 65 struct napi_struct napi;
diff --git a/drivers/staging/octeon/ethernet-rx.h b/drivers/staging/octeon/ethernet-rx.h
index a0743b85d54e..9240c85ce241 100644
--- a/drivers/staging/octeon/ethernet-rx.h
+++ b/drivers/staging/octeon/ethernet-rx.h
@@ -24,7 +24,7 @@
24 * This file may also be available under a different license from Cavium. 24 * This file may also be available under a different license from Cavium.
25 * Contact Cavium Networks for more information 25 * Contact Cavium Networks for more information
26*********************************************************************/ 26*********************************************************************/
27#include "cvmx-fau.h" 27#include <asm/octeon/cvmx-fau.h>
28 28
29void cvm_oct_poll_controller(struct net_device *dev); 29void cvm_oct_poll_controller(struct net_device *dev);
30void cvm_oct_rx_initialize(void); 30void cvm_oct_rx_initialize(void);
diff --git a/drivers/staging/octeon/ethernet-sgmii.c b/drivers/staging/octeon/ethernet-sgmii.c
index 5e148b512c97..d3e82430eba6 100644
--- a/drivers/staging/octeon/ethernet-sgmii.c
+++ b/drivers/staging/octeon/ethernet-sgmii.c
@@ -35,9 +35,9 @@
35#include "octeon-ethernet.h" 35#include "octeon-ethernet.h"
36#include "ethernet-util.h" 36#include "ethernet-util.h"
37 37
38#include "cvmx-helper.h" 38#include <asm/octeon/cvmx-helper.h>
39 39
40#include "cvmx-gmxx-defs.h" 40#include <asm/octeon/cvmx-gmxx-defs.h>
41 41
42int cvm_oct_sgmii_open(struct net_device *dev) 42int cvm_oct_sgmii_open(struct net_device *dev)
43{ 43{
diff --git a/drivers/staging/octeon/ethernet-spi.c b/drivers/staging/octeon/ethernet-spi.c
index d0e2d514968a..af8d62818f13 100644
--- a/drivers/staging/octeon/ethernet-spi.c
+++ b/drivers/staging/octeon/ethernet-spi.c
@@ -35,11 +35,11 @@
35#include "octeon-ethernet.h" 35#include "octeon-ethernet.h"
36#include "ethernet-util.h" 36#include "ethernet-util.h"
37 37
38#include "cvmx-spi.h" 38#include <asm/octeon/cvmx-spi.h>
39 39
40#include <asm/octeon/cvmx-npi-defs.h> 40#include <asm/octeon/cvmx-npi-defs.h>
41#include "cvmx-spxx-defs.h" 41#include <asm/octeon/cvmx-spxx-defs.h>
42#include "cvmx-stxx-defs.h" 42#include <asm/octeon/cvmx-stxx-defs.h>
43 43
44static int number_spi_ports; 44static int number_spi_ports;
45static int need_retrain[2] = { 0, 0 }; 45static int need_retrain[2] = { 0, 0 };
diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
index 2542c3743904..56d74dc2fbd5 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -47,13 +47,13 @@
47#include "ethernet-tx.h" 47#include "ethernet-tx.h"
48#include "ethernet-util.h" 48#include "ethernet-util.h"
49 49
50#include "cvmx-wqe.h" 50#include <asm/octeon/cvmx-wqe.h>
51#include "cvmx-fau.h" 51#include <asm/octeon/cvmx-fau.h>
52#include "cvmx-pip.h" 52#include <asm/octeon/cvmx-pip.h>
53#include "cvmx-pko.h" 53#include <asm/octeon/cvmx-pko.h>
54#include "cvmx-helper.h" 54#include <asm/octeon/cvmx-helper.h>
55 55
56#include "cvmx-gmxx-defs.h" 56#include <asm/octeon/cvmx-gmxx-defs.h>
57 57
58#define CVM_OCT_SKB_CB(skb) ((u64 *)((skb)->cb)) 58#define CVM_OCT_SKB_CB(skb) ((u64 *)((skb)->cb))
59 59
diff --git a/drivers/staging/octeon/ethernet-xaui.c b/drivers/staging/octeon/ethernet-xaui.c
index 861a4b3fe857..419f8c34ecdf 100644
--- a/drivers/staging/octeon/ethernet-xaui.c
+++ b/drivers/staging/octeon/ethernet-xaui.c
@@ -35,9 +35,9 @@
35#include "octeon-ethernet.h" 35#include "octeon-ethernet.h"
36#include "ethernet-util.h" 36#include "ethernet-util.h"
37 37
38#include "cvmx-helper.h" 38#include <asm/octeon/cvmx-helper.h>
39 39
40#include "cvmx-gmxx-defs.h" 40#include <asm/octeon/cvmx-gmxx-defs.h>
41 41
42int cvm_oct_xaui_open(struct net_device *dev) 42int cvm_oct_xaui_open(struct net_device *dev)
43{ 43{
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index 076f86675ce6..9112cd882154 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -44,14 +44,14 @@
44#include "ethernet-mdio.h" 44#include "ethernet-mdio.h"
45#include "ethernet-util.h" 45#include "ethernet-util.h"
46 46
47#include "cvmx-pip.h" 47#include <asm/octeon/cvmx-pip.h>
48#include "cvmx-pko.h" 48#include <asm/octeon/cvmx-pko.h>
49#include "cvmx-fau.h" 49#include <asm/octeon/cvmx-fau.h>
50#include "cvmx-ipd.h" 50#include <asm/octeon/cvmx-ipd.h>
51#include "cvmx-helper.h" 51#include <asm/octeon/cvmx-helper.h>
52 52
53#include "cvmx-gmxx-defs.h" 53#include <asm/octeon/cvmx-gmxx-defs.h>
54#include "cvmx-smix-defs.h" 54#include <asm/octeon/cvmx-smix-defs.h>
55 55
56#if defined(CONFIG_CAVIUM_OCTEON_NUM_PACKET_BUFFERS) \ 56#if defined(CONFIG_CAVIUM_OCTEON_NUM_PACKET_BUFFERS) \
57 && CONFIG_CAVIUM_OCTEON_NUM_PACKET_BUFFERS 57 && CONFIG_CAVIUM_OCTEON_NUM_PACKET_BUFFERS