net: macb: Add support for sgmii phy interface
This patch adds support for the sgmii phy interface. Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
0208e951d5
commit
022be25c24
@@ -1682,6 +1682,8 @@ static void macb_init_hw(struct macb *bp)
|
||||
macb_set_hwaddr(bp);
|
||||
|
||||
config = macb_mdc_clk_div(bp);
|
||||
if (bp->phy_interface == PHY_INTERFACE_MODE_SGMII)
|
||||
config |= GEM_BIT(SGMIIEN) | GEM_BIT(PCSSEL);
|
||||
config |= MACB_BF(RBOF, NET_IP_ALIGN); /* Make eth data aligned */
|
||||
config |= MACB_BIT(PAE); /* PAuse Enable */
|
||||
config |= MACB_BIT(DRFCS); /* Discard Rx FCS */
|
||||
@@ -2416,6 +2418,8 @@ static int macb_init(struct platform_device *pdev)
|
||||
/* Set MII management clock divider */
|
||||
val = macb_mdc_clk_div(bp);
|
||||
val |= macb_dbw(bp);
|
||||
if (bp->phy_interface == PHY_INTERFACE_MODE_SGMII)
|
||||
val |= GEM_BIT(SGMIIEN) | GEM_BIT(PCSSEL);
|
||||
macb_writel(bp, NCFGR, val);
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user