net: ipa: fully support IPA v5.0
v2 cover net: ipa: fully support IPA v5.0
At long last, add the IPA and GSI register definitions, and the configuration data required to support IPA v5.0. This enables IPA support for the Qualcomm SDX65 SoC.
The first version of this series had build errors due to a non-existent source file being required. This version addresses that by changing how required files are specified in the Makefile.
Note that the second patch has some warnings about lines starting with spaces; those spaces align text with the open parenthesis on the previous line.
-Alex
Alex Elder (3):
net: ipa: add IPA v5.0 register definitions
net: ipa: add IPA v5.0 GSI register definitions
net: ipa: add IPA v5.0 configuration data
drivers/net/ipa/Makefile | 12 +- drivers/net/ipa/data/ipa_data-v5.0.c | 481 +++++++++++++++++++++++ drivers/net/ipa/gsi.h | 4 +- drivers/net/ipa/gsi_reg.c | 3 + drivers/net/ipa/gsi_reg.h | 1 + drivers/net/ipa/ipa_data.h | 3 +- drivers/net/ipa/ipa_main.c | 6 +- drivers/net/ipa/ipa_reg.c | 2 + drivers/net/ipa/ipa_reg.h | 1 + drivers/net/ipa/reg/gsi_reg-v5.0.c | 317 +++++++++++++++ drivers/net/ipa/reg/ipa_reg-v5.0.c | 564 +++++++++++++++++++++++++++ 11 files changed, 1385 insertions(+), 9 deletions(-) create mode 100644 drivers/net/ipa/data/ipa_data-v5.0.c create mode 100644 drivers/net/ipa/reg/gsi_reg-v5.0.c create mode 100644 drivers/net/ipa/reg/ipa_reg-v5.0.c
Signature · 1 line
2.34.1
PATCH v2 1/3 net: ipa: add IPA v5.0 register definitions
Add the definitions of IPA register offsets and fields for IPA v5.0. These are used for the SDX65 SoC.
In the Makefile, split IPA_VERSIONS to use IPA_REG_VERSIONS and IPA_DATA_VERSIONS instead, to allow IPA register definitions for a new version to be added separate from the IPA data.
Rename GSI_IPA_VERSIONS to be GSI_REG_VERSIONS for consistency.
---
v2: Split Makefile variables to correct the build problem
drivers/net/ipa/Makefile | 12 +- drivers/net/ipa/ipa_reg.c | 2 + drivers/net/ipa/ipa_reg.h | 1 + drivers/net/ipa/reg/ipa_reg-v5.0.c | 564 +++++++++++++++++++++++++++++ 4 files changed, 574 insertions(+), 5 deletions(-) create mode 100644 drivers/net/ipa/reg/ipa_reg-v5.0.c
drivers/net/ipa/Makefile +7 -5
@@ -2,10 +2,12 @@ # # Makefile for the Qualcomm IPA driver. -IPA_VERSIONS := 3.1 3.5.1 4.2 4.5 4.7 4.9 4.11 +IPA_REG_VERSIONS := 3.1 3.5.1 4.2 4.5 4.7 4.9 4.11 5.0 # Some IPA versions can reuse another set of GSI register definitions. -GSI_IPA_VERSIONS := 3.1 3.5.1 4.0 4.5 4.9 4.11 +GSI_REG_VERSIONS := 3.1 3.5.1 4.0 4.5 4.9 4.11 + +IPA_DATA_VERSIONS := 3.1 3.5.1 4.2 4.5 4.7 4.9 4.11 obj-$(CONFIG_QCOM_IPA) += ipa.o
@@ -16,8 +18,8 @@ ipa-y := ipa_main.o ipa_power.o ipa_reg.o ipa_mem.o \ ipa_resource.o ipa_qmi.o ipa_qmi_msg.o \ ipa_sysfs.o -ipa-y += $(GSI_IPA_VERSIONS:%=reg/gsi_reg-v%.o) +ipa-y += $(IPA_REG_VERSIONS:%=reg/ipa_reg-v%.o) -ipa-y += $(IPA_VERSIONS:%=reg/ipa_reg-v%.o) +ipa-y += $(GSI_REG_VERSIONS:%=reg/gsi_reg-v%.o) -ipa-y += $(IPA_VERSIONS:%=data/ipa_data-v%.o) +ipa-y += $(IPA_DATA_VERSIONS:%=data/ipa_data-v%.o)
drivers/net/ipa/ipa_reg.c +2 -0
@@ -123,6 +123,8 @@ static const struct regs *ipa_regs(enum ipa_version version)return &ipa_regs_v4_9;case IPA_VERSION_4_11 :return &ipa_regs_v4_11; +case IPA_VERSION_5_0 : +return &ipa_regs_v5_0;default :return NULL ; }
drivers/net/ipa/ipa_reg.h +1 -0
@@ -636,6 +636,7 @@ extern const struct regs ipa_regs_v4_5;extern const struct regs ipa_regs_v4_7;extern const struct regs ipa_regs_v4_9;extern const struct regs ipa_regs_v4_11; +extern const struct regs ipa_regs_v5_0;const struct reg *ipa_reg (struct ipa *ipa,enum ipa_reg_id reg_id);
drivers/net/ipa/reg/ipa_reg-v5.0.c new file +564 -0
564 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 2/3 net: ipa: add IPA v5.0 GSI register definitions
In reply to Alex ElderAdd the definitions of GSI register offsets and fields for IPA v5.0. These are used for the SDX65 SoC. Increase the maximum channel and event ring counts supported by the driver, so those implemented by the SDX65 are supported.
--- drivers/net/ipa/Makefile | 2 +- drivers/net/ipa/gsi.h | 4 +- drivers/net/ipa/gsi_reg.c | 3 + drivers/net/ipa/gsi_reg.h | 1 + drivers/net/ipa/reg/gsi_reg-v5.0.c | 317 +++++++++++++++++++++++++++++ 5 files changed, 324 insertions(+), 3 deletions(-) create mode 100644 drivers/net/ipa/reg/gsi_reg-v5.0.c
drivers/net/ipa/Makefile +1 -1
@@ -5,7 +5,7 @@ IPA_REG_VERSIONS := 3.1 3.5.1 4.2 4.5 4.7 4.9 4.11 5.0 # Some IPA versions can reuse another set of GSI register definitions. -GSI_REG_VERSIONS := 3.1 3.5.1 4.0 4.5 4.9 4.11 +GSI_REG_VERSIONS := 3.1 3.5.1 4.0 4.5 4.9 4.11 5.0 IPA_DATA_VERSIONS := 3.1 3.5.1 4.2 4.5 4.7 4.9 4.11
drivers/net/ipa/gsi.h +2 -2
@@ -16,8 +16,8 @@#include "ipa_version.h" /* Maximum number of channels and event rings supported by the driver */ -#define GSI_CHANNEL_COUNT_MAX 23 -#define GSI_EVT_RING_COUNT_MAX 24 +#define GSI_CHANNEL_COUNT_MAX 28 +#define GSI_EVT_RING_COUNT_MAX 28/* Maximum TLV FIFO size for a channel; 64 here is arbitrary (and high) */ #define GSI_TLV_MAX 64
drivers/net/ipa/gsi_reg.c +3 -0
@@ -109,6 +109,9 @@ static const struct regs *gsi_regs(struct gsi *gsi)case IPA_VERSION_4_11 :return &gsi_regs_v4_11; +case IPA_VERSION_5_0 : +return &gsi_regs_v5_0; +default :return NULL ; }
drivers/net/ipa/gsi_reg.h +1 -0
@@ -355,6 +355,7 @@ extern const struct regs gsi_regs_v4_0;extern const struct regs gsi_regs_v4_5;extern const struct regs gsi_regs_v4_9;extern const struct regs gsi_regs_v4_11; +extern const struct regs gsi_regs_v5_0;/** * gsi_reg() - Return the structure describing a GSI register
drivers/net/ipa/reg/gsi_reg-v5.0.c new file +317 -0
317 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 3/3 net: ipa: add IPA v5.0 configuration data
In reply to Alex ElderAdd the configuration data required for IPA v5.0, which is used in the SDX65 SoC.
--- drivers/net/ipa/Makefile | 2 +- drivers/net/ipa/data/ipa_data-v5.0.c | 481 +++++++++++++++++++++++++++ drivers/net/ipa/ipa_data.h | 3 +- drivers/net/ipa/ipa_main.c | 6 +- 4 files changed, 489 insertions(+), 3 deletions(-) create mode 100644 drivers/net/ipa/data/ipa_data-v5.0.c
drivers/net/ipa/Makefile +1 -1
@@ -7,7 +7,7 @@ IPA_REG_VERSIONS := 3.1 3.5.1 4.2 4.5 4.7 4.9 4.11 5.0 # Some IPA versions can reuse another set of GSI register definitions. GSI_REG_VERSIONS := 3.1 3.5.1 4.0 4.5 4.9 4.11 5.0 -IPA_DATA_VERSIONS := 3.1 3.5.1 4.2 4.5 4.7 4.9 4.11 +IPA_DATA_VERSIONS := 3.1 3.5.1 4.2 4.5 4.7 4.9 4.11 5.0 obj-$(CONFIG_QCOM_IPA) += ipa.o
drivers/net/ipa/data/ipa_data-v5.0.c new file +481 -0
481 lines not on this page · raw message
drivers/net/ipa/ipa_data.h +2 -1
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. -* Copyright (C) 2019-2022 Linaro Ltd. +* Copyright (C) 2019-2023 Linaro Ltd. */ #ifndef _IPA_DATA_H_#define _IPA_DATA_H_
@@ -249,5 +249,6 @@ extern const struct ipa_data ipa_data_v4_5;extern const struct ipa_data ipa_data_v4_7;extern const struct ipa_data ipa_data_v4_9;extern const struct ipa_data ipa_data_v4_11; +extern const struct ipa_data ipa_data_v5_0;#endif /* _IPA_DATA_H_ */
drivers/net/ipa/ipa_main.c +5 -1
@@ -285,7 +285,7 @@ static void ipa_hardware_config_comp(struct ipa *ipa) }else if (ipa->version <IPA_VERSION_4_5 ) { val |=reg_bit (reg,GSI_MULTI_AXI_MASTERS_DIS ); }else { -/* For IPA v4.5 FULL_FLUSH_WAIT_RS_CLOSURE_EN is 0 */ +/* For IPA v4.5+ FULL_FLUSH_WAIT_RS_CLOSURE_EN is 0 */ } val |=reg_bit (reg,GSI_MULTI_INORDER_RD_DIS );
@@ -684,6 +684,10 @@ static const struct of_device_id ipa_match[] = { .compatible = "qcom,sc7280-ipa", .data = &ipa_data_v4_11, }, + { + .compatible = "qcom,sdx65-ipa", + .data = &ipa_data_v5_0, + }, { }, };MODULE_DEVICE_TABLE (of, ipa_match);
Signature · 1 line
2.34.1
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Tue, 21 Mar 2023 13:26:41 -0500 you wrote:
At long last, add the IPA and GSI register definitions, and the configuration data required to support IPA v5.0. This enables IPA support for the Qualcomm SDX65 SoC.
The first version of this series had build errors due to a non-existent source file being required. This version addresses that by changing how required files are specified in the
Makefile.[...]
Here is the summary with links:
- [net-next,v2,1/3] net: ipa: add IPA v5.0 register definitions
https://git.kernel.org/netdev/net-next/c/ed4c7d616289 - [net-next,v2,2/3] net: ipa: add IPA v5.0 GSI register definitions https://git.kernel.org/netdev/net-next/c/faf0678ec8a0 - [net-next,v2,3/3] net: ipa: add IPA v5.0 configuration data https://git.kernel.org/netdev/net-next/c/cb7550b44383
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html