0001
0002
0003
0004
0005 #ifndef _EMAC_SGMII_H_
0006 #define _EMAC_SGMII_H_
0007
0008 struct emac_adapter;
0009 struct platform_device;
0010
0011
0012
0013
0014
0015
0016
0017 struct sgmii_ops {
0018 int (*init)(struct emac_adapter *adpt);
0019 int (*open)(struct emac_adapter *adpt);
0020 void (*close)(struct emac_adapter *adpt);
0021 int (*link_change)(struct emac_adapter *adpt, bool link_state);
0022 void (*reset)(struct emac_adapter *adpt);
0023 };
0024
0025
0026
0027
0028
0029
0030
0031
0032 struct emac_sgmii {
0033 void __iomem *base;
0034 void __iomem *digital;
0035 unsigned int irq;
0036 atomic_t decode_error_count;
0037 struct sgmii_ops *sgmii_ops;
0038 };
0039
0040 int emac_sgmii_config(struct platform_device *pdev, struct emac_adapter *adpt);
0041
0042 int emac_sgmii_init_fsm9900(struct emac_adapter *adpt);
0043 int emac_sgmii_init_qdf2432(struct emac_adapter *adpt);
0044 int emac_sgmii_init_qdf2400(struct emac_adapter *adpt);
0045
0046 int emac_sgmii_init(struct emac_adapter *adpt);
0047 int emac_sgmii_open(struct emac_adapter *adpt);
0048 void emac_sgmii_close(struct emac_adapter *adpt);
0049 int emac_sgmii_link_change(struct emac_adapter *adpt, bool link_state);
0050 void emac_sgmii_reset(struct emac_adapter *adpt);
0051 #endif