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

Lines Matching refs:port_num

168 static void titan_ge_gmii_config(int port_num)
173 err = titan_ge_mdio_read(port_num, TITAN_GE_MDIO_PHY_STATUS, &phy_reg);
184 err = titan_ge_mdio_write(port_num, TITAN_GE_MDIO_PHY_IE, 0);
190 (port_num << 12)), 0x201);
194 (port_num << 12)), 0x2201);
201 (port_num << 12)), 0x100);
205 (port_num << 12)), 0x2100);
209 (port_num << 12));
212 (port_num << 12)), reg_data);
218 static void titan_ge_enable_tx(unsigned int port_num)
222 reg_data = TITAN_GE_READ(TITAN_GE_TMAC_CONFIG_1 + (port_num << 12));
224 printk("TMAC disabled for port %d!! \n", port_num);
233 (port_num << 12)), reg_data);
256 int port = titan_ge_eth->port_num;
310 int port = titan_ge_eth->port_num;
328 titan_ge_port_reset(titan_ge_eth->port_num);
376 unsigned int port_num = titan_ge_eth->port_num;
386 switch (port_num) {
429 (port_num << 8));
456 if (port_num == 0)
458 if (port_num == 1)
461 if (port_num == 2)
475 eth_int_cause_error, port_num);
479 TITAN_GE_READ(0x5008 + (port_num << 8)), port_num);
483 TITAN_GE_READ(0x5048 + (port_num << 8)));
487 TITAN_GE_READ(0x505c + (port_num << 8)));
490 (port_num << 8)), eth_int_cause_error);
500 titan_ge_mdio_read(port_num,
505 titan_ge_mdio_read(port_num,
517 titan_ge_enable_tx(port_num);
534 unsigned int port_num = titan_ge_eth->port_num;
538 (port_num << 12));
552 (port_num << 12)), reg_data);
555 (port_num << 12)), 0xffff);
557 (port_num << 12)), 0xffff);
559 (port_num << 12)), 0xffff);
561 (port_num << 12)), 0xffff);
571 unsigned int port_num = titan_ge_eth->port_num;
572 unsigned int irq = TITAN_ETH_PORT_IRQ - port_num;
584 printk(KERN_INFO "Assigned IRQ %d to port %d\n", irq, port_num);
607 struct device *device = &titan_ge_device[titan_ge_port->port_num]->dev;
662 titan_ge_port_reset(titan_ge_eth->port_num);
696 int port_num = titan_port->port_num;
728 TITAN_GE_WRITE((TITAN_GE_CHANNEL0_TX_DESC + (port_num << 8)),
730 TITAN_GE_WRITE((TITAN_GE_CHANNEL0_RX_DESC + (port_num << 8)),
745 reg_data = TITAN_GE_READ(TITAN_GE_GDI_INTERRUPT_ENABLE + (port_num << 8));
747 TITAN_GE_WRITE((TITAN_GE_GDI_INTERRUPT_ENABLE + (port_num << 8)), reg_data);
750 reg_data = TITAN_GE_READ(TITAN_GE_CHANNEL0_CONFIG + (port_num << 8));
765 TITAN_GE_WRITE((TITAN_GE_CHANNEL0_CONFIG + (port_num << 8)), reg_data);
769 TITAN_GE_WRITE((0x5048 + (port_num << 8)), count);
770 count = TITAN_GE_READ(0x5048 + (port_num << 8));
797 if (port_num == 0) {
840 if (port_num == 1) {
883 if (port_num == 2) {
926 if (port_num == 2) {
969 reg_data = TITAN_GE_READ(TITAN_GE_TRTG_CONFIG + (port_num << 12));
978 reg_data_1 = TITAN_GE_READ(0x103c + (port_num << 12));
980 TITAN_GE_WRITE((0x103c + (port_num << 12)), reg_data_1);
983 TITAN_GE_WRITE((0x103c + (port_num << 12)), reg_data_1);
988 TITAN_GE_WRITE((0x103c + (port_num << 12)), reg_data_1);
993 TITAN_GE_WRITE((TITAN_GE_TRTG_CONFIG + (port_num << 12)), reg_data);
998 TITAN_GE_WRITE((TITAN_GE_TMAC_CONFIG_2 + (port_num << 12)), 0xe197);
1000 TITAN_GE_WRITE((0x1258 + (port_num << 12)), 0x4000);
1002 reg_data = TITAN_GE_READ(TITAN_GE_TMAC_CONFIG_1 + (port_num << 12));
1006 TITAN_GE_WRITE((TITAN_GE_TMAC_CONFIG_1 + (port_num << 12)), reg_data);
1011 reg_data = TITAN_GE_READ(TITAN_GE_RMAC_CONFIG_2 + (port_num << 12));
1013 TITAN_GE_WRITE((TITAN_GE_RMAC_CONFIG_2 + (port_num << 12)), reg_data);
1015 TITAN_GE_WRITE((0x1218 + (port_num << 12)), 0x3);
1018 TITAN_GE_WRITE((0x1208 + (port_num << 12)), 0x4000);
1021 reg_data = TITAN_GE_READ(TITAN_GE_RMAC_CONFIG_1 + (port_num << 12));
1027 TITAN_GE_WRITE((TITAN_GE_RMAC_CONFIG_1 + (port_num << 12)), reg_data);
1036 if (port_num == 0) {
1045 if (port_num == 1) {
1049 if (port_num == 2)
1061 reg_data = TITAN_GE_READ(0x1038 + (port_num << 12));
1063 TITAN_GE_WRITE((0x1038 + (port_num << 12)), reg_data);
1066 titan_ge_gmii_config(port_num);
1082 struct device *device = &titan_ge_device[titan_ge_eth->port_num]->dev;
1085 int port_num = titan_ge_eth->port_num;
1099 TITAN_GE_WRITE((0x5044 + (port_num << 8)), 0x1);
1115 unsigned int port_num = titan_ge_eth->port_num;
1116 struct device *device = &titan_ge_device[port_num]->dev;
1122 reg_data = TITAN_GE_READ(TITAN_GE_RMAC_CONFIG_1 + (port_num << 12));
1124 TITAN_GE_WRITE((TITAN_GE_RMAC_CONFIG_1 + (port_num << 12)), reg_data);
1127 TITAN_GE_WRITE((TITAN_GE_CHANNEL0_INTERRUPT + (port_num << 8)), 0x0);
1148 (titan_ge_sram + TITAN_TX_RING_BYTES * port_num);
1149 titan_ge_eth->tx_dma = TITAN_SRAM_BASE + TITAN_TX_RING_BYTES * port_num;
1154 netdev->name, TITAN_TX_RING_BYTES, port_num);
1171 (titan_ge_rx_desc *)(titan_ge_sram + 0x1000 + TITAN_RX_RING_BYTES * port_num);
1173 titan_ge_eth->rx_dma = TITAN_SRAM_BASE + 0x1000 + TITAN_RX_RING_BYTES * port_num;
1217 titan_ge_tx_coal(TITAN_GE_TX_COAL, port_num);
1220 err = titan_ge_mdio_read(port_num, TITAN_GE_MDIO_PHY_STATUS, &phy_reg);
1284 static int titan_ge_rx(struct net_device *netdev, int port_num,
1332 while (titan_ge_return_tx_desc(titan_ge_eth, titan_ge_eth->port_num) == 0)
1355 unsigned int port_num = titan_ge_eth->port_num;
1365 && (titan_ge_rx(netdev, port_num, titan_ge_eth, &packet) == TITAN_OK)) {
1405 TITAN_GE_WRITE((0x5048 + (port_num << 8)), ack);
1425 static void titan_ge_enable_int(unsigned int port_num,
1431 if (port_num == 0)
1433 if (port_num == 1)
1435 if (port_num == 2)
1450 int port_num = titan_ge_eth->port_num;
1463 if (port_num == 0)
1465 if (port_num == 1)
1467 if (port_num == 2)
1516 titan_ge_enable_int(port_num, titan_ge_eth, netdev);
1544 unsigned int port_num = titan_ge_eth->port_num;
1550 (port_num << 8));
1553 (port_num << 8)), reg_data);
1557 (port_num << 12));
1560 (port_num << 12)), reg_data);
1578 dma_free_coherent(&titan_ge_device[port_num]->dev,
1591 unsigned int port_num = titan_ge_eth->port_num;
1597 (port_num << 8));
1600 (port_num << 8)), reg_data);
1604 (port_num << 12));
1607 (port_num << 12)), reg_data);
1625 dma_free_coherent(&titan_ge_device[port_num]->dev,
1641 titan_ge_port_reset(titan_ge_eth->port_num);
1658 unsigned int port_num = titan_ge_eth->port_num;
1672 TITAN_GE_WRITE((TITAN_GE_TMAC_STATION_HI + (port_num << 12)),
1674 TITAN_GE_WRITE((TITAN_GE_TMAC_STATION_MID + (port_num << 12)),
1676 TITAN_GE_WRITE((TITAN_GE_TMAC_STATION_LOW + (port_num << 12)),
1679 TITAN_GE_WRITE((TITAN_GE_RMAC_STATION_HI + (port_num << 12)),
1681 TITAN_GE_WRITE((TITAN_GE_RMAC_STATION_MID + (port_num << 12)),
1683 TITAN_GE_WRITE((TITAN_GE_RMAC_STATION_LOW + (port_num << 12)),
1843 titan_ge_eth->port_num = port;
1885 static void titan_ge_port_reset(unsigned int port_num)
1891 (port_num << 12));
1894 (port_num << 12)), reg_data);
1898 (port_num << 12));
1901 (port_num << 12)), reg_data);