]> git.sur5r.net Git - u-boot/blobdiff - drivers/net/fm/init.c
fm/mEMAC: add mEMAC frame work
[u-boot] / drivers / net / fm / init.c
index 8a5311c74fab5a628658c52af64ae5bafefe814d..ae389b88422f2e88b6817355cd3758676928ba60 100644 (file)
@@ -38,6 +38,15 @@ struct fm_eth_info fm_info[] = {
 #if (CONFIG_SYS_NUM_FM1_DTSEC >= 5)
        FM_DTSEC_INFO_INITIALIZER(1, 5),
 #endif
+#if (CONFIG_SYS_NUM_FM1_DTSEC >= 6)
+       FM_DTSEC_INFO_INITIALIZER(1, 6),
+#endif
+#if (CONFIG_SYS_NUM_FM1_DTSEC >= 7)
+       FM_DTSEC_INFO_INITIALIZER(1, 9),
+#endif
+#if (CONFIG_SYS_NUM_FM1_DTSEC >= 8)
+       FM_DTSEC_INFO_INITIALIZER(1, 10),
+#endif
 #if (CONFIG_SYS_NUM_FM2_DTSEC >= 1)
        FM_DTSEC_INFO_INITIALIZER(2, 1),
 #endif
@@ -53,6 +62,15 @@ struct fm_eth_info fm_info[] = {
 #if (CONFIG_SYS_NUM_FM2_DTSEC >= 5)
        FM_DTSEC_INFO_INITIALIZER(2, 5),
 #endif
+#if (CONFIG_SYS_NUM_FM2_DTSEC >= 6)
+       FM_DTSEC_INFO_INITIALIZER(2, 6),
+#endif
+#if (CONFIG_SYS_NUM_FM2_DTSEC >= 7)
+       FM_DTSEC_INFO_INITIALIZER(2, 9),
+#endif
+#if (CONFIG_SYS_NUM_FM2_DTSEC >= 8)
+       FM_DTSEC_INFO_INITIALIZER(2, 10),
+#endif
 #if (CONFIG_SYS_NUM_FM1_10GEC >= 1)
        FM_TGEC_INFO_INITIALIZER(1, 1),
 #endif
@@ -200,7 +218,8 @@ void board_ft_fman_fixup_port(void *blob, char * prop, phys_addr_t pa,
 
 static void ft_fixup_port(void *blob, struct fm_eth_info *info, char *prop)
 {
-       int off, ph;
+       int off;
+       uint32_t ph;
        phys_addr_t paddr = CONFIG_SYS_CCSRBAR_PHYS + info->compat_offset;
        u64 dtsec1_addr = (u64)CONFIG_SYS_CCSRBAR_PHYS +
                                CONFIG_SYS_FSL_FM1_DTSEC1_OFFSET;
@@ -217,12 +236,10 @@ static void ft_fixup_port(void *blob, struct fm_eth_info *info, char *prop)
        off = fdt_node_offset_by_compat_reg(blob, prop, paddr);
 
        /* Don't disable FM1-DTSEC1 MAC as its used for MDIO */
-       if (paddr != dtsec1_addr) {
-               /* disable the mac node */
-               fdt_setprop_string(blob, off, "status", "disabled");
-       }
+       if (paddr != dtsec1_addr)
+               fdt_status_disabled(blob, off); /* disable the MAC node */
 
-       /* disable the node point to the mac */
+       /* disable the fsl,dpa-ethernet node that points to the MAC */
        ph = fdt_get_phandle(blob, off);
        do_fixup_by_prop(blob, "fsl,fman-mac", &ph, sizeof(ph),
                "status", "disabled", strlen("disabled") + 1, 1);