Forum Discussion
Altera_Forum
Honored Contributor
14 years agohi friend,
Now, I have changed my profile by --- Quote Start --- alt_tse_phy_profile KSZ8893 = {"National DP83848C", /* National DP83848C */ KSZ8893_OUI, /* OUI */ KSZ8893_MODEL, /* Vender Model Number */ KSZ8893_REV, /* Model Revision Number */ 0, /* Location of Status Register (ignored) */ 0, /* Location of Speed Status (ignored) */ 0, /* Location of Duplex Status (ignored) */ 0, /* Location of Link Status (ignored) */ 0, /* No function pointer configure National DP83848C */ &KSZ8893_link_status_read /* Function pointer to read from PHY specific status register */ }; alt_tse_phy_add_profile(&KSZ8893); alt_u32 KSZ8893_link_status_read(np_tse_mac *pmac) { alt_u32 link_status = 0; alt_u32 reg_status = IORD(&pmac->mdio1.reg1f, 0); /* If speed == 10 Mbps */ if(reg_status & 0x4) { link_status |= 0x4; } /* Else speed = 100 Mbps */ else { link_status |= 0x8; } /* If duplex == Full */ if(reg_status & 0x2) { link_status |= 0x1; } return link_status; } --- Quote End --- but I get the report is --- Quote Start --- [tse_mac_init] INFO : TSE MAC 0 found at address 0x0a005000 WARNING : Unknown PHY found at PHY address 0x03 of MAC Group[0] WARNING : Please add PHY information to PHY profile INFO : PHY[0.0] - Automatically mapped to tse_mac_device[0] INFO : PHY[0.0] - Restart Auto-Negotiation, checking PHY link... WARNING : PHY[0.0] - Auto-Negotiation FAILED INFO : PHY[0.0] - Restart Auto-Negotiation, checking PHY link... WARNING : PHY[0.0] - Auto-Negotiation FAILED INFO : PHY[0.0] - Checking link... INFO : PHY[0.0] - Link not yet established, restart auto-negotiation... INFO : PHY[0.0] - Restart Auto-Negotiation, checking PHY link... WARNING : PHY[0.0] - Auto-Negotiation FAILED WARNING : PHY[0.0] - Link could not established WARNING : PHY[0.0] - Auto-Negotiation not completed! Speed = 100, Duplex = Full OK, x=0, CMD_CONFIG=0x01000000 MAC post-initialization: CMD_CONFIG=0x05000203 [tse_sgdma_read_init] RX descriptor chain desc (1 depth) created mctest init called IP address of et1 : 192.168.1.30 Simple Socket Server starting up [sss_task] Simple Socket Server listening on port 30 Created "simple socket server" task (Prio: 4) --- Quote End --- My 3th mac(mii phy mode) can't link. I have some question. 1.what is mean "alt_u32 reg_status = IORD(&pmac->mdio1.reg1f, 0); "? My 3th mac register at 0x3f, if I change 3f, the IDE cannot complie. 2.whether I use 3th mac (phy mode) is right? 3.I am a fresh about ksz8893 hardware, could you teach me how configuration about it . Thanks very much. Good luck