linux/drivers/net/ethernet/atheros/alx/hw.c

/*
 * Copyright (c) 2013 Johannes Berg <[email protected]>
 *
 *  This file is free software: you may copy, redistribute and/or modify it
 *  under the terms of the GNU General Public License as published by the
 *  Free Software Foundation, either version 2 of the License, or (at your
 *  option) any later version.
 *
 *  This file is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * This file incorporates work covered by the following copyright and
 * permission notice:
 *
 * Copyright (c) 2012 Qualcomm Atheros, Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */
#include <linux/etherdevice.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/mdio.h>
#include "reg.h"
#include "hw.h"

static inline bool alx_is_rev_a(u8 rev)
{}

static int alx_wait_mdio_idle(struct alx_hw *hw)
{}

static int alx_read_phy_core(struct alx_hw *hw, bool ext, u8 dev,
			     u16 reg, u16 *phy_data)
{}

static int alx_write_phy_core(struct alx_hw *hw, bool ext, u8 dev,
			      u16 reg, u16 phy_data)
{}

static int __alx_read_phy_reg(struct alx_hw *hw, u16 reg, u16 *phy_data)
{}

static int __alx_write_phy_reg(struct alx_hw *hw, u16 reg, u16 phy_data)
{}

static int __alx_read_phy_ext(struct alx_hw *hw, u8 dev, u16 reg, u16 *pdata)
{}

static int __alx_write_phy_ext(struct alx_hw *hw, u8 dev, u16 reg, u16 data)
{}

static int __alx_read_phy_dbg(struct alx_hw *hw, u16 reg, u16 *pdata)
{}

static int __alx_write_phy_dbg(struct alx_hw *hw, u16 reg, u16 data)
{}

int alx_read_phy_reg(struct alx_hw *hw, u16 reg, u16 *phy_data)
{}

int alx_write_phy_reg(struct alx_hw *hw, u16 reg, u16 phy_data)
{}

int alx_read_phy_ext(struct alx_hw *hw, u8 dev, u16 reg, u16 *pdata)
{}

int alx_write_phy_ext(struct alx_hw *hw, u8 dev, u16 reg, u16 data)
{}

static int alx_read_phy_dbg(struct alx_hw *hw, u16 reg, u16 *pdata)
{}

static int alx_write_phy_dbg(struct alx_hw *hw, u16 reg, u16 data)
{}

static u16 alx_get_phy_config(struct alx_hw *hw)
{}

static bool alx_wait_reg(struct alx_hw *hw, u32 reg, u32 wait, u32 *val)
{}

static bool alx_read_macaddr(struct alx_hw *hw, u8 *addr)
{}

int alx_get_perm_macaddr(struct alx_hw *hw, u8 *addr)
{}

void alx_set_macaddr(struct alx_hw *hw, const u8 *addr)
{}

static void alx_reset_osc(struct alx_hw *hw, u8 rev)
{}

static int alx_stop_mac(struct alx_hw *hw)
{}

int alx_reset_mac(struct alx_hw *hw)
{}

void alx_reset_phy(struct alx_hw *hw)
{}

#define ALX_PCI_CMD

void alx_reset_pcie(struct alx_hw *hw)
{}

void alx_start_mac(struct alx_hw *hw)
{}

void alx_cfg_mac_flowcontrol(struct alx_hw *hw, u8 fc)
{}

void alx_enable_aspm(struct alx_hw *hw, bool l0s_en, bool l1_en)
{}


static u32 ethadv_to_hw_cfg(struct alx_hw *hw, u32 ethadv_cfg)
{}

int alx_setup_speed_duplex(struct alx_hw *hw, u32 ethadv, u8 flowctrl)
{}


void alx_post_phy_link(struct alx_hw *hw)
{}

bool alx_phy_configured(struct alx_hw *hw)
{}

int alx_read_phy_link(struct alx_hw *hw)
{}

int alx_clear_phy_intr(struct alx_hw *hw)
{}

void alx_disable_rss(struct alx_hw *hw)
{}

void alx_configure_basic(struct alx_hw *hw)
{}

void alx_mask_msix(struct alx_hw *hw, int index, bool mask)
{}


bool alx_get_phy_info(struct alx_hw *hw)
{}

void alx_update_hw_stats(struct alx_hw *hw)
{}