linux/drivers/atm/idt77105.h

/* SPDX-License-Identifier: GPL-2.0 */
/* drivers/atm/idt77105.h - IDT77105 (PHY) declarations */
 
/* Written 1999 by Greg Banks, NEC Australia <[email protected]>. Based on suni.h */
 

#ifndef DRIVER_ATM_IDT77105_H
#define DRIVER_ATM_IDT77105_H

#include <linux/atmdev.h>
#include <linux/atmioc.h>


/* IDT77105 registers */

#define IDT77105_MCR
#define IDT77105_ISTAT
#define IDT77105_DIAG
#define IDT77105_LEDHEC
#define IDT77105_CTRLO
#define IDT77105_CTRHI
#define IDT77105_CTRSEL

/* IDT77105 register values */

/* MCR */
#define IDT77105_MCR_UPLO
#define IDT77105_MCR_DREC
#define IDT77105_MCR_ECEIO
#define IDT77105_MCR_TDPC
#define IDT77105_MCR_DRIC
#define IDT77105_MCR_HALTTX
#define IDT77105_MCR_UMODE
#define IDT77105_MCR_EIP

/* ISTAT */
#define IDT77105_ISTAT_GOODSIG
#define IDT77105_ISTAT_HECERR
#define IDT77105_ISTAT_SCR
#define IDT77105_ISTAT_TPE
#define IDT77105_ISTAT_RSCC
#define IDT77105_ISTAT_RSE
#define IDT77105_ISTAT_RFO

/* DIAG */
#define IDT77105_DIAG_FTD
#define IDT77105_DIAG_ROS
#define IDT77105_DIAG_MPCS
#define IDT77105_DIAG_RFLUSH
#define IDT77105_DIAG_ITPE
#define IDT77105_DIAG_ITHE
#define IDT77105_DIAG_UMODE
#define IDT77105_DIAG_LCMASK

#define IDT77105_DIAG_LC_NORMAL
#define IDT77105_DIAG_LC_PHY_LOOPBACK
#define IDT77105_DIAG_LC_LINE_LOOPBACK

/* LEDHEC */
#define IDT77105_LEDHEC_DRHC
#define IDT77105_LEDHEC_DTHC
#define IDT77105_LEDHEC_RPWMASK
#define IDT77105_LEDHEC_TFS
#define IDT77105_LEDHEC_TLS
#define IDT77105_LEDHEC_RLS

#define IDT77105_LEDHEC_RPW_1
#define IDT77105_LEDHEC_RPW_2
#define IDT77105_LEDHEC_RPW_4
#define IDT77105_LEDHEC_RPW_8

/* CTRSEL */
#define IDT77105_CTRSEL_SEC
#define IDT77105_CTRSEL_TCC
#define IDT77105_CTRSEL_RCC
#define IDT77105_CTRSEL_RHEC

#ifdef __KERNEL__
int idt77105_init(struct atm_dev *dev);
#endif

/*
 * Tunable parameters
 */
 
/* Time between samples of the hardware cell counters. Should be <= 1 sec */
#define IDT77105_STATS_TIMER_PERIOD 
/* Time between checks to see if the signal has been found again */
#define IDT77105_RESTART_TIMER_PERIOD

#endif