1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright Altera Corporation (C) 2016. All rights reserved.
3  *
4  * Author: Tien Hock Loh <thloh@altera.com>
5  */
6 
7 #ifndef __TSE_PCS_H__
8 #define __TSE_PCS_H__
9 
10 #include <linux/phy.h>
11 #include <linux/timer.h>
12 
13 struct tse_pcs {
14 	struct device *dev;
15 	void __iomem *tse_pcs_base;
16 	void __iomem *sgmii_adapter_base;
17 	struct timer_list aneg_link_timer;
18 	int autoneg;
19 };
20 
21 int tse_pcs_init(void __iomem *base, struct tse_pcs *pcs);
22 void tse_pcs_fix_mac_speed(struct tse_pcs *pcs, struct phy_device *phy_dev,
23 			   unsigned int speed);
24 
25 #endif /* __TSE_PCS_H__ */
26