1 From 7eb5f0a192efbe1fa94490881858ed45c5373233 Mon Sep 17 00:00:00 2001
2 From: Camelia Groza <camelia.groza@nxp.com>
3 Date: Mon, 2 Apr 2018 18:19:27 +0300
4 Subject: [PATCH] sdk_fman: on P-series platforms, the OH ports start at offset
7 Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
9 .../ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm_port.c | 12 ++++++++++--
10 1 file changed, 10 insertions(+), 2 deletions(-)
12 --- a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm_port.c
13 +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm_port.c
14 @@ -307,9 +307,17 @@ static t_LnxWrpFmPortDev *ReadFmPortDevT
15 of_device_is_compatible(port_node, "fsl,fman-v2-port-oh") ||
16 of_device_is_compatible(port_node, "fsl,fman-v3-port-oh")) {
17 #ifndef CONFIG_FMAN_ARM
18 - /* On PPC, OH ports start from cell-index 0x2 */
19 +#ifdef CONFIG_FMAN_P3040_P4080_P5020
20 + /* On PPC FMan v2, OH ports start from cell-index 0x1 */
23 + /* On PPC FMan v3 (Low and High), OH ports start from
28 +#endif // CONFIG_FMAN_P3040_P4080_P5020
29 +#endif // CONFIG_FMAN_ARM
31 if (unlikely(tmp_prop >= FM_MAX_NUM_OF_OH_PORTS)) {
32 REPORT_ERROR(MAJOR, E_INVALID_VALUE,
33 ("of_get_property(%s, cell-index) failed",