1
2
3
4
5 #ifndef _EMAC_SGMII_H_
6 #define _EMAC_SGMII_H_
7
8 struct emac_adapter;
9 struct platform_device;
10
11
12
13
14
15
16
17 struct sgmii_ops {
18 int (*init)(struct emac_adapter *adpt);
19 int (*open)(struct emac_adapter *adpt);
20 void (*close)(struct emac_adapter *adpt);
21 int (*link_change)(struct emac_adapter *adpt, bool link_state);
22 void (*reset)(struct emac_adapter *adpt);
23 };
24
25
26
27
28
29
30
31
32 struct emac_sgmii {
33 void __iomem *base;
34 void __iomem *digital;
35 unsigned int irq;
36 atomic_t decode_error_count;
37 struct sgmii_ops *sgmii_ops;
38 };
39
40 int emac_sgmii_config(struct platform_device *pdev, struct emac_adapter *adpt);
41
42 int emac_sgmii_init_fsm9900(struct emac_adapter *adpt);
43 int emac_sgmii_init_qdf2432(struct emac_adapter *adpt);
44 int emac_sgmii_init_qdf2400(struct emac_adapter *adpt);
45
46 int emac_sgmii_init(struct emac_adapter *adpt);
47 int emac_sgmii_open(struct emac_adapter *adpt);
48 void emac_sgmii_close(struct emac_adapter *adpt);
49 int emac_sgmii_link_change(struct emac_adapter *adpt, bool link_state);
50 void emac_sgmii_reset(struct emac_adapter *adpt);
51 #endif