staging/octeon: Allow test build on !MIPS
Add compile test support by moving all includes of files under asm/octeon into octeon-ethernet.h, and if we're not on MIPS, stub out all the calls into the octeon support code in octeon-stubs.h Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c51ab067c5
commit
171a9bae68
@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
config OCTEON_ETHERNET
|
config OCTEON_ETHERNET
|
||||||
tristate "Cavium Networks Octeon Ethernet support"
|
tristate "Cavium Networks Octeon Ethernet support"
|
||||||
depends on CAVIUM_OCTEON_SOC && NETDEVICES
|
depends on CAVIUM_OCTEON_SOC && NETDEVICES || COMPILE_TEST
|
||||||
select PHYLIB
|
select PHYLIB
|
||||||
select MDIO_OCTEON
|
select MDIO_OCTEON
|
||||||
help
|
help
|
||||||
|
@ -21,8 +21,6 @@
|
|||||||
#ifndef __ETHERNET_DEFINES_H__
|
#ifndef __ETHERNET_DEFINES_H__
|
||||||
#define __ETHERNET_DEFINES_H__
|
#define __ETHERNET_DEFINES_H__
|
||||||
|
|
||||||
#include <asm/octeon/cvmx-config.h>
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETFILTER
|
#ifdef CONFIG_NETFILTER
|
||||||
#define REUSE_SKBUFFS_WITHOUT_FREE 0
|
#define REUSE_SKBUFFS_WITHOUT_FREE 0
|
||||||
#else
|
#else
|
||||||
|
@ -13,15 +13,11 @@
|
|||||||
#include <generated/utsrelease.h>
|
#include <generated/utsrelease.h>
|
||||||
#include <net/dst.h>
|
#include <net/dst.h>
|
||||||
|
|
||||||
#include <asm/octeon/octeon.h>
|
|
||||||
|
|
||||||
#include "ethernet-defines.h"
|
|
||||||
#include "octeon-ethernet.h"
|
#include "octeon-ethernet.h"
|
||||||
|
#include "ethernet-defines.h"
|
||||||
#include "ethernet-mdio.h"
|
#include "ethernet-mdio.h"
|
||||||
#include "ethernet-util.h"
|
#include "ethernet-util.h"
|
||||||
|
|
||||||
#include <asm/octeon/cvmx-gmxx-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)
|
||||||
{
|
{
|
||||||
|
@ -9,13 +9,10 @@
|
|||||||
#include <linux/netdevice.h>
|
#include <linux/netdevice.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
|
||||||
#include <asm/octeon/octeon.h>
|
#include "octeon-ethernet.h"
|
||||||
|
|
||||||
#include "ethernet-mem.h"
|
#include "ethernet-mem.h"
|
||||||
#include "ethernet-defines.h"
|
#include "ethernet-defines.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
|
||||||
* @pool: Pool to allocate an skbuff for
|
* @pool: Pool to allocate an skbuff for
|
||||||
|
@ -12,19 +12,11 @@
|
|||||||
#include <linux/ratelimit.h>
|
#include <linux/ratelimit.h>
|
||||||
#include <net/dst.h>
|
#include <net/dst.h>
|
||||||
|
|
||||||
#include <asm/octeon/octeon.h>
|
|
||||||
|
|
||||||
#include "ethernet-defines.h"
|
|
||||||
#include "octeon-ethernet.h"
|
#include "octeon-ethernet.h"
|
||||||
|
#include "ethernet-defines.h"
|
||||||
#include "ethernet-util.h"
|
#include "ethernet-util.h"
|
||||||
#include "ethernet-mdio.h"
|
#include "ethernet-mdio.h"
|
||||||
|
|
||||||
#include <asm/octeon/cvmx-helper.h>
|
|
||||||
|
|
||||||
#include <asm/octeon/cvmx-ipd-defs.h>
|
|
||||||
#include <asm/octeon/cvmx-npi-defs.h>
|
|
||||||
#include <asm/octeon/cvmx-gmxx-defs.h>
|
|
||||||
|
|
||||||
static DEFINE_SPINLOCK(global_register_lock);
|
static DEFINE_SPINLOCK(global_register_lock);
|
||||||
|
|
||||||
static void cvm_oct_set_hw_preamble(struct octeon_ethernet *priv, bool enable)
|
static void cvm_oct_set_hw_preamble(struct octeon_ethernet *priv, bool enable)
|
||||||
|
@ -23,23 +23,12 @@
|
|||||||
#include <net/xfrm.h>
|
#include <net/xfrm.h>
|
||||||
#endif /* CONFIG_XFRM */
|
#endif /* CONFIG_XFRM */
|
||||||
|
|
||||||
#include <asm/octeon/octeon.h>
|
#include "octeon-ethernet.h"
|
||||||
|
|
||||||
#include "ethernet-defines.h"
|
#include "ethernet-defines.h"
|
||||||
#include "ethernet-mem.h"
|
#include "ethernet-mem.h"
|
||||||
#include "ethernet-rx.h"
|
#include "ethernet-rx.h"
|
||||||
#include "octeon-ethernet.h"
|
|
||||||
#include "ethernet-util.h"
|
#include "ethernet-util.h"
|
||||||
|
|
||||||
#include <asm/octeon/cvmx-helper.h>
|
|
||||||
#include <asm/octeon/cvmx-wqe.h>
|
|
||||||
#include <asm/octeon/cvmx-fau.h>
|
|
||||||
#include <asm/octeon/cvmx-pow.h>
|
|
||||||
#include <asm/octeon/cvmx-pip.h>
|
|
||||||
#include <asm/octeon/cvmx-scratch.h>
|
|
||||||
|
|
||||||
#include <asm/octeon/cvmx-gmxx-defs.h>
|
|
||||||
|
|
||||||
static atomic_t oct_rx_ready = ATOMIC_INIT(0);
|
static atomic_t oct_rx_ready = ATOMIC_INIT(0);
|
||||||
|
|
||||||
static struct oct_rx_group {
|
static struct oct_rx_group {
|
||||||
|
@ -5,8 +5,6 @@
|
|||||||
* Copyright (c) 2003-2007 Cavium Networks
|
* Copyright (c) 2003-2007 Cavium Networks
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#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);
|
||||||
void cvm_oct_rx_shutdown(void);
|
void cvm_oct_rx_shutdown(void);
|
||||||
|
@ -11,17 +11,11 @@
|
|||||||
#include <linux/ratelimit.h>
|
#include <linux/ratelimit.h>
|
||||||
#include <net/dst.h>
|
#include <net/dst.h>
|
||||||
|
|
||||||
#include <asm/octeon/octeon.h>
|
|
||||||
|
|
||||||
#include "ethernet-defines.h"
|
|
||||||
#include "octeon-ethernet.h"
|
#include "octeon-ethernet.h"
|
||||||
|
#include "ethernet-defines.h"
|
||||||
#include "ethernet-util.h"
|
#include "ethernet-util.h"
|
||||||
#include "ethernet-mdio.h"
|
#include "ethernet-mdio.h"
|
||||||
|
|
||||||
#include <asm/octeon/cvmx-helper.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)
|
||||||
{
|
{
|
||||||
return cvm_oct_common_open(dev, cvm_oct_link_poll);
|
return cvm_oct_common_open(dev, cvm_oct_link_poll);
|
||||||
|
@ -10,18 +10,10 @@
|
|||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <net/dst.h>
|
#include <net/dst.h>
|
||||||
|
|
||||||
#include <asm/octeon/octeon.h>
|
|
||||||
|
|
||||||
#include "ethernet-defines.h"
|
|
||||||
#include "octeon-ethernet.h"
|
#include "octeon-ethernet.h"
|
||||||
|
#include "ethernet-defines.h"
|
||||||
#include "ethernet-util.h"
|
#include "ethernet-util.h"
|
||||||
|
|
||||||
#include <asm/octeon/cvmx-spi.h>
|
|
||||||
|
|
||||||
#include <asm/octeon/cvmx-npi-defs.h>
|
|
||||||
#include <asm/octeon/cvmx-spxx-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 };
|
||||||
|
|
||||||
|
@ -22,21 +22,11 @@
|
|||||||
#include <linux/atomic.h>
|
#include <linux/atomic.h>
|
||||||
#include <net/sch_generic.h>
|
#include <net/sch_generic.h>
|
||||||
|
|
||||||
#include <asm/octeon/octeon.h>
|
|
||||||
|
|
||||||
#include "ethernet-defines.h"
|
|
||||||
#include "octeon-ethernet.h"
|
#include "octeon-ethernet.h"
|
||||||
|
#include "ethernet-defines.h"
|
||||||
#include "ethernet-tx.h"
|
#include "ethernet-tx.h"
|
||||||
#include "ethernet-util.h"
|
#include "ethernet-util.h"
|
||||||
|
|
||||||
#include <asm/octeon/cvmx-wqe.h>
|
|
||||||
#include <asm/octeon/cvmx-fau.h>
|
|
||||||
#include <asm/octeon/cvmx-pip.h>
|
|
||||||
#include <asm/octeon/cvmx-pko.h>
|
|
||||||
#include <asm/octeon/cvmx-helper.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))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -5,10 +5,6 @@
|
|||||||
* Copyright (c) 2003-2007 Cavium Networks
|
* Copyright (c) 2003-2007 Cavium Networks
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <asm/octeon/cvmx-pip.h>
|
|
||||||
#include <asm/octeon/cvmx-helper.h>
|
|
||||||
#include <asm/octeon/cvmx-helper-util.h>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cvm_oct_get_buffer_ptr - convert packet data address to pointer
|
* cvm_oct_get_buffer_ptr - convert packet data address to pointer
|
||||||
* @packet_ptr: Packet data hardware address
|
* @packet_ptr: Packet data hardware address
|
||||||
|
@ -19,24 +19,14 @@
|
|||||||
|
|
||||||
#include <net/dst.h>
|
#include <net/dst.h>
|
||||||
|
|
||||||
#include <asm/octeon/octeon.h>
|
|
||||||
|
|
||||||
#include "ethernet-defines.h"
|
|
||||||
#include "octeon-ethernet.h"
|
#include "octeon-ethernet.h"
|
||||||
|
#include "ethernet-defines.h"
|
||||||
#include "ethernet-mem.h"
|
#include "ethernet-mem.h"
|
||||||
#include "ethernet-rx.h"
|
#include "ethernet-rx.h"
|
||||||
#include "ethernet-tx.h"
|
#include "ethernet-tx.h"
|
||||||
#include "ethernet-mdio.h"
|
#include "ethernet-mdio.h"
|
||||||
#include "ethernet-util.h"
|
#include "ethernet-util.h"
|
||||||
|
|
||||||
#include <asm/octeon/cvmx-pip.h>
|
|
||||||
#include <asm/octeon/cvmx-pko.h>
|
|
||||||
#include <asm/octeon/cvmx-fau.h>
|
|
||||||
#include <asm/octeon/cvmx-ipd.h>
|
|
||||||
#include <asm/octeon/cvmx-helper.h>
|
|
||||||
#include <asm/octeon/cvmx-asxx-defs.h>
|
|
||||||
#include <asm/octeon/cvmx-gmxx-defs.h>
|
|
||||||
|
|
||||||
#define OCTEON_MAX_MTU 65392
|
#define OCTEON_MAX_MTU 65392
|
||||||
|
|
||||||
static int num_packet_buffers = 1024;
|
static int num_packet_buffers = 1024;
|
||||||
|
@ -13,7 +13,34 @@
|
|||||||
|
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/phy.h>
|
#include <linux/phy.h>
|
||||||
#include <asm/octeon/cvmx-helper-board.h>
|
|
||||||
|
#ifdef CONFIG_MIPS
|
||||||
|
|
||||||
|
#include <asm/octeon/octeon.h>
|
||||||
|
|
||||||
|
#include <asm/octeon/cvmx-asxx-defs.h>
|
||||||
|
#include <asm/octeon/cvmx-config.h>
|
||||||
|
#include <asm/octeon/cvmx-fau.h>
|
||||||
|
#include <asm/octeon/cvmx-gmxx-defs.h>
|
||||||
|
#include <asm/octeon/cvmx-helper.h>
|
||||||
|
#include <asm/octeon/cvmx-helper-util.h>
|
||||||
|
#include <asm/octeon/cvmx-ipd.h>
|
||||||
|
#include <asm/octeon/cvmx-ipd-defs.h>
|
||||||
|
#include <asm/octeon/cvmx-npi-defs.h>
|
||||||
|
#include <asm/octeon/cvmx-pip.h>
|
||||||
|
#include <asm/octeon/cvmx-pko.h>
|
||||||
|
#include <asm/octeon/cvmx-pow.h>
|
||||||
|
#include <asm/octeon/cvmx-scratch.h>
|
||||||
|
#include <asm/octeon/cvmx-spi.h>
|
||||||
|
#include <asm/octeon/cvmx-spxx-defs.h>
|
||||||
|
#include <asm/octeon/cvmx-stxx-defs.h>
|
||||||
|
#include <asm/octeon/cvmx-wqe.h>
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include "octeon-stubs.h"
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the definition of the Ethernet driver's private
|
* This is the definition of the Ethernet driver's private
|
||||||
|
1429
drivers/staging/octeon/octeon-stubs.h
Normal file
1429
drivers/staging/octeon/octeon-stubs.h
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user