7 #define ATHR_PHY_CONTROL 0
8 #define ATHR_PHY_STATUS 1
10 #define ATHR_PHY_ID2 3
11 #define ATHR_AUTONEG_ADVERT 4
12 #define ATHR_LINK_PARTNER_ABILITY 5
13 #define ATHR_AUTONEG_EXPANSION 6
14 #define ATHR_NEXT_PAGE_TRANSMIT 7
15 #define ATHR_LINK_PARTNER_NEXT_PAGE 8
16 #define ATHR_1000BASET_CONTROL 9
17 #define ATHR_1000BASET_STATUS 10
18 #define ATHR_PHY_SPEC_CONTROL 16
19 #define ATHR_PHY_SPEC_STATUS 17
20 #define ATHR_DEBUG_PORT_ADDRESS 29
21 #define ATHR_DEBUG_PORT_DATA 30
23 /* ATHR_PHY_CONTROL fields */
24 #define ATHR_CTRL_SOFTWARE_RESET 0x8000
25 #define ATHR_CTRL_SPEED_LSB 0x2000
26 #define ATHR_CTRL_AUTONEGOTIATION_ENABLE 0x1000
27 #define ATHR_CTRL_RESTART_AUTONEGOTIATION 0x0200
28 #define ATHR_CTRL_SPEED_FULL_DUPLEX 0x0100
29 #define ATHR_CTRL_SPEED_MSB 0x0040
31 #define ATHR_RESET_DONE(phy_control) \
32 (((phy_control) & (ATHR_CTRL_SOFTWARE_RESET)) == 0)
34 /* Phy status fields */
35 #define ATHR_STATUS_AUTO_NEG_DONE 0x0020
37 #define ATHR_AUTONEG_DONE(ip_phy_status) \
39 (ATHR_STATUS_AUTO_NEG_DONE)) == \
40 (ATHR_STATUS_AUTO_NEG_DONE))
42 /* Link Partner ability */
43 #define ATHR_LINK_100BASETX_FULL_DUPLEX 0x0100
44 #define ATHR_LINK_100BASETX 0x0080
45 #define ATHR_LINK_10BASETX_FULL_DUPLEX 0x0040
46 #define ATHR_LINK_10BASETX 0x0020
48 /* Advertisement register. */
49 #define ATHR_ADVERTISE_NEXT_PAGE 0x8000
50 #define ATHR_ADVERTISE_ASYM_PAUSE 0x0800
51 #define ATHR_ADVERTISE_PAUSE 0x0400
52 #define ATHR_ADVERTISE_100FULL 0x0100
53 #define ATHR_ADVERTISE_100HALF 0x0080
54 #define ATHR_ADVERTISE_10FULL 0x0040
55 #define ATHR_ADVERTISE_10HALF 0x0020
57 #define ATHR_ADVERTISE_ALL (ATHR_ADVERTISE_10HALF | ATHR_ADVERTISE_10FULL | \
58 ATHR_ADVERTISE_100HALF | ATHR_ADVERTISE_100FULL)
60 /* 1000BASET_CONTROL */
61 #define ATHR_ADVERTISE_1000FULL 0x0200
63 /* Phy Specific status fields */
64 #define ATHER_STATUS_LINK_MASK 0xC000
65 #define ATHER_STATUS_LINK_SHIFT 14
66 #define ATHER_STATUS_FULL_DEPLEX 0x2000
67 #define ATHR_STATUS_LINK_PASS 0x0400
68 #define ATHR_STATUS_RESOVLED 0x0800
70 /*phy debug port register */
71 #define ATHER_DEBUG_SERDES_REG 5
73 /* Serdes debug fields */
74 #define ATHER_SERDES_BEACON 0x0100
82 #define sysMsDelay(_x) udelay((_x) * 1000)
89 #define header_xmit(dev,pkt,len) dev->send(dev,pkt,len) //dev_queue_xmit(skb)
90 #define header_recv_ack(dev) dev->recv(dev) //dev_queue_xmit(skb)
122 void athrs26_reg_init(void);
123 int header_receive_pkt(uchar
*pkt
);
124 void athrs26_reg_dev(struct eth_device
*mac
);
128 int athrs26_phy_is_up(int unit
);
129 int athrs26_phy_is_fdx(int unit
);
130 int athrs26_phy_speed(int unit
);
131 BOOL
athrs26_phy_setup(int unit
);
133 #endif /* _ATHRS26_PHY_H */
This page took 0.059001 seconds and 5 git commands to generate.