]> git.sur5r.net Git - u-boot/blobdiff - drivers/net/fm/eth.c
powerpc/mpc85xx: Add T4160 SoC
[u-boot] / drivers / net / fm / eth.c
index ed23fdd4ac5c1898bf4025444ef1d5fb39e0060b..9b139eeb05102d29286ae8121ebf62068c2dc64b 100644 (file)
@@ -46,7 +46,7 @@ static int num_controllers;
                        TBICR_FULL_DUPLEX | TBICR_SPEED1_SET)
 
 /* Configure the TBI for SGMII operation */
-void dtsec_configure_serdes(struct fm_eth *priv)
+static void dtsec_configure_serdes(struct fm_eth *priv)
 {
 #ifdef CONFIG_SYS_FMAN_V3
        u32 value;
@@ -89,9 +89,9 @@ void dtsec_configure_serdes(struct fm_eth *priv)
 static void dtsec_init_phy(struct eth_device *dev)
 {
        struct fm_eth *fm_eth = dev->priv;
-
 #ifndef CONFIG_SYS_FMAN_V3
-       struct dtsec *regs = (struct dtsec *)fm_eth->mac->base;
+       struct dtsec *regs = (struct dtsec *)CONFIG_SYS_FSL_FM1_DTSEC1_ADDR;
+
        /* Assign a Physical address to the TBI */
        out_be32(&regs->tbipa, CONFIG_SYS_TBIPA_VALUE);
 #endif
@@ -568,6 +568,8 @@ static int fm_eth_init_mac(struct fm_eth *fm_eth, struct ccsr_fman *reg)
        num = fm_eth->num;
 
 #ifdef CONFIG_SYS_FMAN_V3
+       if (fm_eth->type == FM_ETH_10G_E)
+               num += 8;
        base = &reg->memac[num].fm_memac;
        phyregs = &reg->memac[num].fm_memac_mdio;
 #else