1 /* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
13 #ifndef _EMAC_SGMII_H_
14 #define _EMAC_SGMII_H_
17 struct platform_device
;
19 typedef int (*emac_sgmii_function
)(struct emac_adapter
*adpt
);
21 /** emac_sgmii - internal emac phy
23 * @digital per-lane digital block
24 * @irq the interrupt number
25 * @decode_error_count reference count of consecutive decode errors
26 * @initialize initialization function
27 * @open called when the driver is opened
28 * @close called when the driver is closed
29 * @link_up called when the link comes up
30 * @link_down called when the link comes down
34 void __iomem
*digital
;
36 atomic_t decode_error_count
;
37 emac_sgmii_function initialize
;
38 emac_sgmii_function open
;
39 emac_sgmii_function close
;
40 emac_sgmii_function link_up
;
41 emac_sgmii_function link_down
;
44 int emac_sgmii_config(struct platform_device
*pdev
, struct emac_adapter
*adpt
);
45 void emac_sgmii_reset(struct emac_adapter
*adpt
);
47 int emac_sgmii_init_fsm9900(struct emac_adapter
*adpt
);
48 int emac_sgmii_init_qdf2432(struct emac_adapter
*adpt
);
49 int emac_sgmii_init_qdf2400(struct emac_adapter
*adpt
);