1 From 11a68a2d48fee4524163c5ce36477bafb6515a98 Mon Sep 17 00:00:00 2001
2 From: Camelia Groza <camelia.groza@nxp.com>
3 Date: Mon, 26 Mar 2018 10:48:19 +0300
4 Subject: [PATCH] sdk_fman: probe OH ports on PPC
6 Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
8 .../ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm_port.c | 12 +++++++++++-
9 1 file changed, 11 insertions(+), 1 deletion(-)
11 --- a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm_port.c
12 +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm_port.c
13 @@ -303,7 +303,13 @@ static t_LnxWrpFmPortDev *ReadFmPortDevT
14 tmp_prop = be32_to_cpu(*uint32_prop);
15 if (WARN_ON(lenp != sizeof(uint32_t)))
17 - if (of_device_is_compatible(port_node, "fsl,fman-port-oh")) {
18 + if (of_device_is_compatible(port_node, "fsl,fman-port-oh") ||
19 + of_device_is_compatible(port_node, "fsl,fman-v2-port-oh") ||
20 + of_device_is_compatible(port_node, "fsl,fman-v3-port-oh")) {
21 +#ifndef CONFIG_FMAN_ARM
22 + /* On PPC, OH ports start from cell-index 0x2 */
25 if (unlikely(tmp_prop >= FM_MAX_NUM_OF_OH_PORTS)) {
26 REPORT_ERROR(MAJOR, E_INVALID_VALUE,
27 ("of_get_property(%s, cell-index) failed",
28 @@ -1433,6 +1439,10 @@ static const struct of_device_id fm_port
30 .compatible = "fsl,fman-port-oh"},
32 + .compatible = "fsl,fman-v2-port-oh"},
34 + .compatible = "fsl,fman-v3-port-oh"},
36 .compatible = "fsl,fman-port-1g-rx"},
38 .compatible = "fsl,fman-port-10g-rx"},