[U-Boot] [PATCH] net/fm: Update FMan Compatibels
Igal.Liberman
igal.liberman at freescale.com
Mon May 18 13:46:30 CEST 2015
From: Igal Liberman <igal.liberman at freescale.com>
During FMan upstreaming, the FMan Port and MAC compatibles changed.
This patch aligns the FMan Port and MAC compatibles to the FMan
device tree binding document.
The FMan device tree binding document can be found in the Linux kernel:
./Documentation/devicetree/bindings/powerpc/fsl/fman.txt
Signed-off-by: Igal Liberman <igal.liberman at freescale.com>
---
arch/powerpc/include/asm/fsl_liodn.h | 20 ++++++++++++++++----
drivers/net/fm/init.c | 4 ++--
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/include/asm/fsl_liodn.h b/arch/powerpc/include/asm/fsl_liodn.h
index 811f034..d493f8c 100644
--- a/arch/powerpc/include/asm/fsl_liodn.h
+++ b/arch/powerpc/include/asm/fsl_liodn.h
@@ -133,15 +133,27 @@ extern void fdt_fixup_liodn(void *blob);
CONFIG_SYS_FSL_FM##fmNum##_OFFSET + \
offsetof(struct ccsr_fman, fm_bmi_common.fmbm_ppid[portID - 1])
-/* enetNum is 0, 1, 2... so we + 8 for 1g to get to HW Port ID */
+#ifdef CONFIG_SYS_FMAN_V3
+#define SET_FMAN_RX_1G_LIODN(fmNum, enetNum, liodn) \
+ _SET_FMAN_RX_1G_LIODN("fsl,fman-v3-port-rx", fmNum, enetNum, liodn)
+#define SET_FMAN_RX_10G_LIODN(fmNum, enetNum, liodn) \
+ _SET_FMAN_RX_10G_LION("fsl,fman-v3-port-rx", fmNum, enetNum, liodn)
+#else
#define SET_FMAN_RX_1G_LIODN(fmNum, enetNum, liodn) \
- SET_LIODN_ENTRY_1("fsl,fman-port-1g-rx", liodn, \
+ _SET_FMAN_RX_1G_LIODN("fsl,fman-v2-port-rx", fmNum, enetNum, liodn)
+#define SET_FMAN_RX_10G_LIODN(fmNum, enetNum, liodn) \
+ _SET_FMAN_RX_10G_LIODN("fsl,fman-v2-port-rx", fmNum, enetNum, liodn)
+#endif
+
+/* enetNum is 0, 1, 2... so we + 8 for 1g to get to HW Port ID */
+#define _SET_FMAN_RX_1G_LIODN(compatible, fmNum, enetNum, liodn) \
+ SET_LIODN_ENTRY_1(compatible, liodn, \
FM_PPID_RX_PORT_OFFSET(fmNum, enetNum + 8), \
CONFIG_SYS_FSL_FM##fmNum##_RX##enetNum##_1G_OFFSET) \
/* enetNum is 0, 1, 2... so we + 16 for 10g to get to HW Port ID */
-#define SET_FMAN_RX_10G_LIODN(fmNum, enetNum, liodn) \
- SET_LIODN_ENTRY_1("fsl,fman-port-10g-rx", liodn, \
+#define _SET_FMAN_RX_10G_LIODN(compatible, fmNum, enetNum, liodn) \
+ SET_LIODN_ENTRY_1(compatible, liodn, \
FM_PPID_RX_PORT_OFFSET(fmNum, enetNum + 16), \
CONFIG_SYS_FSL_FM##fmNum##_RX##enetNum##_10G_OFFSET) \
diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index 9a8a007..4e43cca 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -306,9 +306,9 @@ void fdt_fixup_fman_ethernet(void *blob)
#else
for (i = 0; i < ARRAY_SIZE(fm_info); i++) {
if (fm_info[i].type == FM_ETH_1G_E)
- ft_fixup_port(blob, &fm_info[i], "fsl,fman-1g-mac");
+ ft_fixup_port(blob, &fm_info[i], "fsl,fman-dtsec");
else
- ft_fixup_port(blob, &fm_info[i], "fsl,fman-10g-mac");
+ ft_fixup_port(blob, &fm_info[i], "fsl,fman-xgec");
}
#endif
}
--
1.7.9.5
More information about the U-Boot
mailing list