• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/net/chelsio/

Lines Matching defs:cphy

40 #include "cphy.h"
50 static int led_init(struct cphy *cphy)
56 mdio_write(cphy, 0x3, 0x8304, 0xdddd);
60 static int led_link(struct cphy *cphy, u32 do_enable)
65 mdio_read(cphy, 0x1, 0x7, &led);
69 mdio_write(cphy, 0x1, 0x7, led);
72 mdio_write(cphy, 0x1, 0x7, led);
78 static int mv88x201x_reset(struct cphy *cphy, int wait)
86 static int mv88x201x_interrupt_enable(struct cphy *cphy)
89 mdio_write(cphy, 0x1, 0x9002, 0x1);
92 if (t1_is_asic(cphy->adapter)) {
95 t1_tpi_read(cphy->adapter, A_ELMER0_INT_ENABLE, &elmer);
97 t1_tpi_write(cphy->adapter, A_ELMER0_INT_ENABLE, elmer);
102 static int mv88x201x_interrupt_disable(struct cphy *cphy)
105 mdio_write(cphy, 0x1, 0x9002, 0x0);
108 if (t1_is_asic(cphy->adapter)) {
111 t1_tpi_read(cphy->adapter, A_ELMER0_INT_ENABLE, &elmer);
113 t1_tpi_write(cphy->adapter, A_ELMER0_INT_ENABLE, elmer);
118 static int mv88x201x_interrupt_clear(struct cphy *cphy)
125 mdio_read(cphy, 0x1, 0x9003, &val);
126 mdio_read(cphy, 0x1, 0x9004, &val);
127 mdio_read(cphy, 0x1, 0x9005, &val);
132 mdio_read(cphy, 0x1, 0x1, &val);
136 mdio_read(cphy, 0x1, 0x1, &val);
138 mdio_read(cphy, 0x1, 0x9005, &val);
142 mdio_read(cphy, 0x1, 0x9003, &val);
143 mdio_read(cphy, 0x1, 0x9004, &val);
147 if (t1_is_asic(cphy->adapter)) {
148 t1_tpi_read(cphy->adapter, A_ELMER0_INT_CAUSE, &elmer);
150 t1_tpi_write(cphy->adapter, A_ELMER0_INT_CAUSE, elmer);
155 static int mv88x201x_interrupt_handler(struct cphy *cphy)
158 mv88x201x_interrupt_clear(cphy);
166 static int mv88x201x_set_loopback(struct cphy *cphy, int on)
171 static int mv88x201x_get_link_status(struct cphy *cphy, int *link_ok,
179 mdio_read(cphy, 0x1, 0x1, &val);
183 led_link(cphy, *link_ok);
194 static void mv88x201x_destroy(struct cphy *cphy)
196 kfree(cphy);
210 static struct cphy *mv88x201x_phy_create(adapter_t *adapter, int phy_addr,
214 struct cphy *cphy = kzalloc(sizeof(*cphy), GFP_KERNEL);
216 if (!cphy)
219 cphy_init(cphy, adapter, phy_addr, &mv88x201x_ops, mdio_ops);
222 mdio_read(cphy, 0x3, 0x8300, &val);
223 mdio_write(cphy, 0x3, 0x8300, val | 1);
226 mdio_read(cphy, 0x1, 0x8, &val);
227 mdio_read(cphy, 0x3, 0x8, &val);
230 led_init(cphy);
231 return cphy;