diff options
Diffstat (limited to 'kernel/drivers/staging/octeon/octeon-ethernet.h')
-rw-r--r-- | kernel/drivers/staging/octeon/octeon-ethernet.h | 57 |
1 files changed, 20 insertions, 37 deletions
diff --git a/kernel/drivers/staging/octeon/octeon-ethernet.h b/kernel/drivers/staging/octeon/octeon-ethernet.h index f48dc766f..fdf24d120 100644 --- a/kernel/drivers/staging/octeon/octeon-ethernet.h +++ b/kernel/drivers/staging/octeon/octeon-ethernet.h @@ -1,29 +1,12 @@ -/********************************************************************** - * Author: Cavium Networks - * - * Contact: support@caviumnetworks.com - * This file is part of the OCTEON SDK +/* + * This file is based on code from OCTEON SDK by Cavium Networks. * * Copyright (c) 2003-2010 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 -**********************************************************************/ + */ /* * External interface for the Cavium Octeon ethernet driver. @@ -33,6 +16,8 @@ #include <linux/of.h> +#include <asm/octeon/cvmx-helper-board.h> + /** * This is the definition of the Ethernet driver's private * driver state stored in netdev_priv(dev). @@ -58,7 +43,7 @@ struct octeon_ethernet { struct phy_device *phydev; unsigned int last_link; /* Last negotiated link state */ - uint64_t link_info; + u64 link_info; /* Called periodically to check link status */ void (*poll)(struct net_device *dev); struct delayed_work port_periodic_work; @@ -68,27 +53,25 @@ struct octeon_ethernet { int cvm_oct_free_work(void *work_queue_entry); -extern int cvm_oct_rgmii_init(struct net_device *dev); -extern void cvm_oct_rgmii_uninit(struct net_device *dev); -extern int cvm_oct_rgmii_open(struct net_device *dev); -extern int cvm_oct_rgmii_stop(struct net_device *dev); +int cvm_oct_rgmii_init(struct net_device *dev); +void cvm_oct_rgmii_uninit(struct net_device *dev); +int cvm_oct_rgmii_open(struct net_device *dev); -extern int cvm_oct_sgmii_init(struct net_device *dev); -extern void cvm_oct_sgmii_uninit(struct net_device *dev); -extern int cvm_oct_sgmii_open(struct net_device *dev); -extern int cvm_oct_sgmii_stop(struct net_device *dev); +int cvm_oct_sgmii_init(struct net_device *dev); +int cvm_oct_sgmii_open(struct net_device *dev); -extern int cvm_oct_spi_init(struct net_device *dev); -extern void cvm_oct_spi_uninit(struct net_device *dev); -extern int cvm_oct_xaui_init(struct net_device *dev); -extern void cvm_oct_xaui_uninit(struct net_device *dev); -extern int cvm_oct_xaui_open(struct net_device *dev); -extern int cvm_oct_xaui_stop(struct net_device *dev); +int cvm_oct_spi_init(struct net_device *dev); +void cvm_oct_spi_uninit(struct net_device *dev); -extern int cvm_oct_common_init(struct net_device *dev); -extern void cvm_oct_common_uninit(struct net_device *dev); +int cvm_oct_common_init(struct net_device *dev); +void cvm_oct_common_uninit(struct net_device *dev); void cvm_oct_adjust_link(struct net_device *dev); int cvm_oct_common_stop(struct net_device *dev); +int cvm_oct_common_open(struct net_device *dev, + void (*link_poll)(struct net_device *)); +void cvm_oct_note_carrier(struct octeon_ethernet *priv, + cvmx_helper_link_info_t li); +void cvm_oct_link_poll(struct net_device *dev); extern int always_use_pow; extern int pow_send_group; |