Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /* Copyright Altera Corporation (C) 2016. All rights reserved.
0003  *
0004  * Author: Tien Hock Loh <thloh@altera.com>
0005  */
0006 
0007 #ifndef __TSE_PCS_H__
0008 #define __TSE_PCS_H__
0009 
0010 #include <linux/phy.h>
0011 #include <linux/timer.h>
0012 
0013 #define SGMII_ADAPTER_CTRL_REG      0x00
0014 #define SGMII_ADAPTER_ENABLE        0x0000
0015 #define SGMII_ADAPTER_DISABLE       0x0001
0016 
0017 struct tse_pcs {
0018     struct device *dev;
0019     void __iomem *tse_pcs_base;
0020     void __iomem *sgmii_adapter_base;
0021     struct timer_list aneg_link_timer;
0022     int autoneg;
0023 };
0024 
0025 int tse_pcs_init(void __iomem *base, struct tse_pcs *pcs);
0026 void tse_pcs_fix_mac_speed(struct tse_pcs *pcs, struct phy_device *phy_dev,
0027                unsigned int speed);
0028 
0029 #endif /* __TSE_PCS_H__ */