linux/drivers/net/ethernet/qualcomm/emac/emac-sgmii.c

// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
 */

/* Qualcomm Technologies, Inc. EMAC SGMII Controller driver.
 */

#include <linux/interrupt.h>
#include <linux/iopoll.h>
#include <linux/acpi.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include "emac.h"
#include "emac-mac.h"
#include "emac-sgmii.h"

/* EMAC_SGMII register offsets */
#define EMAC_SGMII_PHY_AUTONEG_CFG2
#define EMAC_SGMII_PHY_SPEED_CFG1
#define EMAC_SGMII_PHY_IRQ_CMD
#define EMAC_SGMII_PHY_INTERRUPT_CLEAR
#define EMAC_SGMII_PHY_INTERRUPT_MASK
#define EMAC_SGMII_PHY_INTERRUPT_STATUS
#define EMAC_SGMII_PHY_RX_CHK_STATUS

#define FORCE_AN_TX_CFG
#define FORCE_AN_RX_CFG
#define AN_ENABLE

#define DUPLEX_MODE
#define SPDMODE_1000
#define SPDMODE_100
#define SPDMODE_10

#define CDR_ALIGN_DET

#define IRQ_GLOBAL_CLEAR

#define DECODE_CODE_ERR
#define DECODE_DISP_ERR

#define SGMII_PHY_IRQ_CLR_WAIT_TIME

#define SGMII_PHY_INTERRUPT_ERR
#define SGMII_ISR_MASK

#define SERDES_START_WAIT_TIMES

int emac_sgmii_init(struct emac_adapter *adpt)
{}

int emac_sgmii_open(struct emac_adapter *adpt)
{}

void emac_sgmii_close(struct emac_adapter *adpt)
{}

int emac_sgmii_link_change(struct emac_adapter *adpt, bool link_state)
{}

void emac_sgmii_reset(struct emac_adapter *adpt)
{}

/* Initialize the SGMII link between the internal and external PHYs. */
static void emac_sgmii_link_init(struct emac_adapter *adpt)
{}

static int emac_sgmii_irq_clear(struct emac_adapter *adpt, u8 irq_bits)
{}

/* The number of decode errors that triggers a reset */
#define DECODE_ERROR_LIMIT

static irqreturn_t emac_sgmii_interrupt(int irq, void *data)
{}

static void emac_sgmii_reset_prepare(struct emac_adapter *adpt)
{}

static void emac_sgmii_common_reset(struct emac_adapter *adpt)
{}

static int emac_sgmii_common_open(struct emac_adapter *adpt)
{}

static void emac_sgmii_common_close(struct emac_adapter *adpt)
{}

/* The error interrupts are only valid after the link is up */
static int emac_sgmii_common_link_change(struct emac_adapter *adpt, bool linkup)
{}

static struct sgmii_ops fsm9900_ops =;

static struct sgmii_ops qdf2432_ops =;

#ifdef CONFIG_ACPI
static struct sgmii_ops qdf2400_ops =;
#endif

static int emac_sgmii_acpi_match(struct device *dev, void *data)
{}

static const struct of_device_id emac_sgmii_dt_match[] =;

int emac_sgmii_config(struct platform_device *pdev, struct emac_adapter *adpt)
{}