]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
powerpc/t1024: update fman liodn for mac1
authorShengzhou Liu <Shengzhou.Liu@freescale.com>
Thu, 14 May 2015 08:51:39 +0000 (16:51 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 11:50:54 +0000 (13:50 +0200)
MAC1 acts as 1G/10G dual-role MAC on T1024. We introduce
macro SET_FMAN_RX_10G_TYPE2_LIODN for 10G MACs which have
same Port ID and same offset of address with 1G MAC.
Update it to match with the setting of fman in t1024 device
tree, otherwise there is no 'fsl,liodn' in
/proc/device-tree/soc@ffe000000/fman@400000/port@88000/

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
arch/powerpc/cpu/mpc85xx/t1024_ids.c
arch/powerpc/include/asm/fsl_liodn.h

index 132689b26eb71be7cea93b74810eb7666bfb5338..8a1092ea655cf0bfd7a8780e723b56a04a70cdca 100644 (file)
@@ -51,11 +51,10 @@ int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl);
 
 #ifdef CONFIG_SYS_DPAA_FMAN
 struct liodn_id_table fman1_liodn_tbl[] = {
-       SET_FMAN_RX_1G_LIODN(1, 0, 88),
+       SET_FMAN_RX_10G_TYPE2_LIODN(1, 0, 88),
        SET_FMAN_RX_1G_LIODN(1, 1, 89),
        SET_FMAN_RX_1G_LIODN(1, 2, 90),
        SET_FMAN_RX_1G_LIODN(1, 3, 91),
-       SET_FMAN_RX_10G_LIODN(1, 0, 94),
 };
 int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
 #endif
index 811f0342935998a8fbce02e655b2d07eeb569a60..6206bee5d337b2766a3692032240b0129b5c5506 100644 (file)
@@ -145,6 +145,12 @@ extern void fdt_fixup_liodn(void *blob);
                FM_PPID_RX_PORT_OFFSET(fmNum, enetNum + 16), \
                CONFIG_SYS_FSL_FM##fmNum##_RX##enetNum##_10G_OFFSET) \
 
+/* enetNum is 0, 1, 2... so we + 8 for type-2 10g to get to HW Port ID */
+#define SET_FMAN_RX_10G_TYPE2_LIODN(fmNum, enetNum, liodn) \
+       SET_LIODN_ENTRY_1("fsl,fman-port-10g-rx", liodn, \
+               FM_PPID_RX_PORT_OFFSET(fmNum, enetNum + 8), \
+               CONFIG_SYS_FSL_FM##fmNum##_RX##enetNum##_1G_OFFSET) \
+
 /*
  * handle both old and new versioned SEC properties:
  * "fsl,secX.Y" became "fsl,sec-vX.Y" during development