mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 10:08:59 +00:00
cddd459140
Add patches for linux-5.4. The patches are from NXP LSDK-20.04 release which was tagged LSDK-20.04-V5.4. https://source.codeaurora.org/external/qoriq/qoriq-components/linux/ For boards LS1021A-IOT, and Traverse-LS1043 which are not involved in LSDK, port the dts patches from 4.14. The patches are sorted into the following categories: 301-arch-xxxx 302-dts-xxxx 303-core-xxxx 701-net-xxxx 801-audio-xxxx 802-can-xxxx 803-clock-xxxx 804-crypto-xxxx 805-display-xxxx 806-dma-xxxx 807-gpio-xxxx 808-i2c-xxxx 809-jailhouse-xxxx 810-keys-xxxx 811-kvm-xxxx 812-pcie-xxxx 813-pm-xxxx 814-qe-xxxx 815-sata-xxxx 816-sdhc-xxxx 817-spi-xxxx 818-thermal-xxxx 819-uart-xxxx 820-usb-xxxx 821-vfio-xxxx Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
88 lines
3.3 KiB
Diff
88 lines
3.3 KiB
Diff
From 7dd27606d9b7f28a7367e4b9444bed7d573f4b6c Mon Sep 17 00:00:00 2001
|
|
From: Camelia Groza <camelia.groza@nxp.com>
|
|
Date: Fri, 23 Mar 2018 16:33:19 +0200
|
|
Subject: [PATCH] sdk_fman: fix probing of 10G ports on T102x
|
|
|
|
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
|
|
---
|
|
.../sdk_fman/src/wrapper/lnxwrp_fm_port.c | 24 +++++++++++++++++-----
|
|
1 file changed, 19 insertions(+), 5 deletions(-)
|
|
|
|
--- a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm_port.c
|
|
+++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm_port.c
|
|
@@ -388,7 +388,14 @@ static t_LnxWrpFmPortDev *ReadFmPortDevT
|
|
settings.param.specificParams.nonRxParams.qmChannel =
|
|
p_LnxWrpFmPortDev->txCh;
|
|
} else if (of_device_is_compatible(port_node, "fsl,fman-port-10g-tx")) {
|
|
+#ifndef CONFIG_FMAN_ARM
|
|
+ /* On T102x, the 10G TX port IDs start from 0x28 */
|
|
+ if (IS_T1023_T1024)
|
|
+ tmp_prop -= 0x28;
|
|
+ else
|
|
+#endif
|
|
tmp_prop -= 0x30;
|
|
+
|
|
if (unlikely(tmp_prop>= FM_MAX_NUM_OF_10G_TX_PORTS)) {
|
|
REPORT_ERROR(MAJOR, E_INVALID_VALUE,
|
|
("of_get_property(%s, cell-index) failed",
|
|
@@ -399,7 +406,7 @@ static t_LnxWrpFmPortDev *ReadFmPortDevT
|
|
FM_MAX_NUM_OF_1G_TX_PORTS];
|
|
#ifndef CONFIG_FMAN_ARM
|
|
if (IS_T1023_T1024)
|
|
- p_LnxWrpFmPortDev = &p_LnxWrpFmDev->txPorts[*uint32_prop];
|
|
+ p_LnxWrpFmPortDev = &p_LnxWrpFmDev->txPorts[tmp_prop];
|
|
#endif
|
|
|
|
p_LnxWrpFmPortDev->id = tmp_prop;
|
|
@@ -437,7 +444,14 @@ static t_LnxWrpFmPortDev *ReadFmPortDevT
|
|
if (p_LnxWrpFmDev->pcdActive)
|
|
p_LnxWrpFmPortDev->defPcd = p_LnxWrpFmDev->defPcd;
|
|
} else if (of_device_is_compatible(port_node, "fsl,fman-port-10g-rx")) {
|
|
+#ifndef CONFIG_FMAN_ARM
|
|
+ /* On T102x, the 10G RX port IDs start from 0x08 */
|
|
+ if (IS_T1023_T1024)
|
|
+ tmp_prop -= 0x8;
|
|
+ else
|
|
+#endif
|
|
tmp_prop -= 0x10;
|
|
+
|
|
if (unlikely(tmp_prop >= FM_MAX_NUM_OF_10G_RX_PORTS)) {
|
|
REPORT_ERROR(MAJOR, E_INVALID_VALUE,
|
|
("of_get_property(%s, cell-index) failed",
|
|
@@ -449,7 +463,7 @@ static t_LnxWrpFmPortDev *ReadFmPortDevT
|
|
|
|
#ifndef CONFIG_FMAN_ARM
|
|
if (IS_T1023_T1024)
|
|
- p_LnxWrpFmPortDev = &p_LnxWrpFmDev->rxPorts[*uint32_prop];
|
|
+ p_LnxWrpFmPortDev = &p_LnxWrpFmDev->rxPorts[tmp_prop];
|
|
#endif
|
|
|
|
p_LnxWrpFmPortDev->id = tmp_prop;
|
|
@@ -637,7 +651,7 @@ static t_Error CheckNConfigFmPortAdvArgs
|
|
uint32_prop = (uint32_t *)of_get_property(port_node, "ar-tables-sizes",
|
|
&lenp);
|
|
if (uint32_prop) {
|
|
-
|
|
+
|
|
if (WARN_ON(lenp != sizeof(uint32_t)*8))
|
|
RETURN_ERROR(MINOR, E_INVALID_VALUE, NO_MSG);
|
|
if (WARN_ON(p_LnxWrpFmPortDev->settings.param.portType !=
|
|
@@ -671,7 +685,7 @@ static t_Error CheckNConfigFmPortAdvArgs
|
|
if (uint32_prop) {
|
|
if (WARN_ON(lenp != sizeof(uint32_t)*3))
|
|
RETURN_ERROR(MINOR, E_INVALID_VALUE, NO_MSG);
|
|
-
|
|
+
|
|
p_LnxWrpFmPortDev->dsar_table_sizes.max_num_of_ip_prot_filtering =
|
|
(uint16_t)be32_to_cpu(uint32_prop[0]);
|
|
p_LnxWrpFmPortDev->dsar_table_sizes.max_num_of_tcp_port_filtering =
|
|
@@ -679,7 +693,7 @@ static t_Error CheckNConfigFmPortAdvArgs
|
|
p_LnxWrpFmPortDev->dsar_table_sizes.max_num_of_udp_port_filtering =
|
|
(uint16_t)be32_to_cpu(uint32_prop[2]);
|
|
}
|
|
-
|
|
+
|
|
if ((err = FM_PORT_ConfigDsarSupport(p_LnxWrpFmPortDev->h_Dev,
|
|
(t_FmPortDsarTablesSizes*)&p_LnxWrpFmPortDev->dsar_table_sizes)) != E_OK)
|
|
RETURN_ERROR(MINOR, err, NO_MSG);
|