linux/drivers/atm/suni.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * drivers/atm/suni.h - S/UNI PHY driver
 */
 
/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */

#ifndef DRIVER_ATM_SUNI_H
#define DRIVER_ATM_SUNI_H

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

/* SUNI registers */

#define SUNI_MRI
#define SUNI_MC
#define SUNI_MIS
			  /* no 0x03 */
#define SUNI_MCM
#define SUNI_MCT
#define SUNI_CSCS
#define SUNI_CRCS
			     /* 0x08-0x0F reserved */
#define SUNI_RSOP_CIE
#define SUNI_RSOP_SIS
#define SUNI_RSOP_SBL
#define SUNI_RSOP_SBM
#define SUNI_TSOP_CTRL
#define SUNI_TSOP_DIAG
			     /* 0x16-0x17 reserved */
#define SUNI_RLOP_CS
#define SUNI_RLOP_IES
#define SUNI_RLOP_LBL
#define SUNI_RLOP_LB
#define SUNI_RLOP_LBM
#define SUNI_RLOP_LFL
#define SUNI_RLOP_LF
#define SUNI_RLOP_LFM
#define SUNI_TLOP_CTRL
#define SUNI_TLOP_DIAG
			     /* 0x22-0x27 reserved */
#define SUNI_SSTB_CTRL
#define SUNI_RPOP_SC
#define SUNI_RPOP_IS
			     /* 0x32 reserved */
#define SUNI_RPOP_IE
			     /* 0x34-0x36 reserved */
#define SUNI_RPOP_PSL
#define SUNI_RPOP_PBL
#define SUNI_RPOP_PBM
#define SUNI_RPOP_PFL
#define SUNI_RPOP_PFM
			     /* 0x3C reserved */
#define SUNI_RPOP_PBC
#define SUNI_RPOP_RC
			     /* 0x3E-0x3F reserved */
#define SUNI_TPOP_CD
#define SUNI_TPOP_PC
			     /* 0x42-0x44 reserved */
#define SUNI_TPOP_APL
#define SUNI_TPOP_APM
			     /* 0x47 reserved */
#define SUNI_TPOP_PSL
#define SUNI_TPOP_PS
			     /* 0x4A-0x4F reserved */
#define SUNI_RACP_CS
#define SUNI_RACP_IES
#define SUNI_RACP_MHP
#define SUNI_RACP_MHM
#define SUNI_RACP_CHEC
#define SUNI_RACP_UHEC
#define SUNI_RACP_RCCL
#define SUNI_RACP_RCC
#define SUNI_RACP_RCCM
#define SUNI_RACP_CFG
			     /* 0x5A-0x5F reserved */
#define SUNI_TACP_CS
#define SUNI_TACP_IUCHP
#define SUNI_TACP_IUCPOP
#define SUNI_TACP_FIFO
#define SUNI_TACP_TCCL
#define SUNI_TACP_TCC
#define SUNI_TACP_TCCM
#define SUNI_TACP_CFG
#define SUNI_SPTB_CTRL
			     /* 0x69-0x7F reserved */
#define SUNI_MT
			     /* 0x81-0xFF reserved */

/* SUNI register values */


/* MRI is reg 0 */
#define SUNI_MRI_ID
#define SUNI_MRI_ID_SHIFT
#define SUNI_MRI_TYPE
#define SUNI_MRI_TYPE_SHIFT
#define SUNI_MRI_TYPE_PM5346
#define SUNI_MRI_TYPE_PM5347
#define SUNI_MRI_TYPE_PM5350
#define SUNI_MRI_TYPE_PM5355
#define SUNI_MRI_RESET

/* MCM is reg 0x4 */
#define SUNI_MCM_LLE
#define SUNI_MCM_DLE

/* MCT is reg 5 */
#define SUNI_MCT_LOOPT
#define SUNI_MCT_DLE
#define SUNI_MCT_LLE
#define SUNI_MCT_FIXPTR
#define SUNI_MCT_LCDV
#define SUNI_MCT_LCDE
/* RSOP_CIE is reg 0x10 */
#define SUNI_RSOP_CIE_OOFE
#define SUNI_RSOP_CIE_LOFE
#define SUNI_RSOP_CIE_LOSE
#define SUNI_RSOP_CIE_BIPEE
#define SUNI_RSOP_CIE_FOOF
#define SUNI_RSOP_CIE_DDS

/* RSOP_SIS is reg 0x11 */
#define SUNI_RSOP_SIS_OOFV
#define SUNI_RSOP_SIS_LOFV
#define SUNI_RSOP_SIS_LOSV
#define SUNI_RSOP_SIS_OOFI
#define SUNI_RSOP_SIS_LOFI
#define SUNI_RSOP_SIS_LOSI
#define SUNI_RSOP_SIS_BIPEI

/* TSOP_CTRL is reg 0x14 */
#define SUNI_TSOP_CTRL_LAIS
#define SUNI_TSOP_CTRL_DS

/* TSOP_DIAG is reg 0x15 */
#define SUNI_TSOP_DIAG_DFP
#define SUNI_TSOP_DIAG_DBIP8
#define SUNI_TSOP_DIAG_DLOS

/* TLOP_DIAG is reg 0x21 */
#define SUNI_TLOP_DIAG_DBIP

/* SSTB_CTRL is reg 0x28 */
#define SUNI_SSTB_CTRL_LEN16

/* RPOP_RC is reg 0x3D (PM5355) */
#define SUNI_RPOP_RC_ENSS

/* TPOP_DIAG is reg 0x40 */
#define SUNI_TPOP_DIAG_PAIS
#define SUNI_TPOP_DIAG_DB3

/* TPOP_APM is reg 0x46 */
#define SUNI_TPOP_APM_APTR
#define SUNI_TPOP_APM_APTR_SHIFT
#define SUNI_TPOP_APM_S
#define SUNI_TPOP_APM_S_SHIFT
#define SUNI_TPOP_APM_NDF
#define SUNI_TPOP_APM_NDF_SHIFT

#define SUNI_TPOP_S_SONET
#define SUNI_TPOP_S_SDH

/* RACP_IES is reg 0x51 */
#define SUNI_RACP_IES_FOVRI
#define SUNI_RACP_IES_UHCSI
#define SUNI_RACP_IES_CHCSI
#define SUNI_RACP_IES_OOCDI
#define SUNI_RACP_IES_FIFOE
#define SUNI_RACP_IES_HCSE
#define SUNI_RACP_IES_OOCDE

/* TACP_CS is reg 0x60 */
#define SUNI_TACP_CS_FIFORST
#define SUNI_TACP_CS_DSCR
#define SUNI_TACP_CS_HCAADD
#define SUNI_TACP_CS_DHCS
#define SUNI_TACP_CS_FOVRI
#define SUNI_TACP_CS_TSOCI
#define SUNI_TACP_CS_FIFOE

/* TACP_IUCHP is reg 0x61 */
#define SUNI_TACP_IUCHP_CLP
#define SUNI_TACP_IUCHP_PTI
#define SUNI_TACP_IUCHP_PTI_SHIFT
#define SUNI_TACP_IUCHP_GFC
#define SUNI_TACP_IUCHP_GFC_SHIFT

/* SPTB_CTRL is reg 0x68 */
#define SUNI_SPTB_CTRL_LEN16

/* MT is reg 0x80 */
#define SUNI_MT_HIZIO
#define SUNI_MT_HIZDATA
#define SUNI_MT_IOTST
#define SUNI_MT_DBCTRL
#define SUNI_MT_PMCTST
#define SUNI_MT_DS27_53


#define SUNI_IDLE_PATTERN


#ifdef __KERNEL__
struct suni_priv {};

int suni_init(struct atm_dev *dev);
#endif

#endif