diff mbox series

[v3,1/6] mhi: pci_generic: Parametrable element count for events

Message ID 1614971808-22156-1-git-send-email-loic.poulain@linaro.org
State Accepted
Commit 9ea48efdc528b019588a03417517c25fe7368684
Headers show
Series [v3,1/6] mhi: pci_generic: Parametrable element count for events | expand

Commit Message

Loic Poulain March 5, 2021, 7:16 p.m. UTC
Not all hardwares need to use the same number of event ring elements.
This change makes this parametrable.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

---
 v2: no change
 v3: no change

 drivers/bus/mhi/pci_generic.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

-- 
2.7.4

Comments

Manivannan Sadhasivam March 10, 2021, 1:34 p.m. UTC | #1
On Fri, Mar 05, 2021 at 08:16:43PM +0100, Loic Poulain wrote:
> Not all hardwares need to use the same number of event ring elements.

> This change makes this parametrable.

> 

> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>

> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>


Applied to mhi-next!

Thanks,
Mani

> ---

>  v2: no change

>  v3: no change

> 

>  drivers/bus/mhi/pci_generic.c | 20 ++++++++++----------

>  1 file changed, 10 insertions(+), 10 deletions(-)

> 

> diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c

> index 8187fcf..c58bf96 100644

> --- a/drivers/bus/mhi/pci_generic.c

> +++ b/drivers/bus/mhi/pci_generic.c

> @@ -71,9 +71,9 @@ struct mhi_pci_dev_info {

>  		.doorbell_mode_switch = false,		\

>  	}

>  

> -#define MHI_EVENT_CONFIG_CTRL(ev_ring)		\

> +#define MHI_EVENT_CONFIG_CTRL(ev_ring, el_count) \

>  	{					\

> -		.num_elements = 64,		\

> +		.num_elements = el_count,	\

>  		.irq_moderation_ms = 0,		\

>  		.irq = (ev_ring) + 1,		\

>  		.priority = 1,			\

> @@ -114,9 +114,9 @@ struct mhi_pci_dev_info {

>  		.doorbell_mode_switch = true,		\

>  	}

>  

> -#define MHI_EVENT_CONFIG_DATA(ev_ring)		\

> +#define MHI_EVENT_CONFIG_DATA(ev_ring, el_count) \

>  	{					\

> -		.num_elements = 128,		\

> +		.num_elements = el_count,	\

>  		.irq_moderation_ms = 5,		\

>  		.irq = (ev_ring) + 1,		\

>  		.priority = 1,			\

> @@ -127,9 +127,9 @@ struct mhi_pci_dev_info {

>  		.offload_channel = false,	\

>  	}

>  

> -#define MHI_EVENT_CONFIG_HW_DATA(ev_ring, ch_num) \

> +#define MHI_EVENT_CONFIG_HW_DATA(ev_ring, el_count, ch_num) \

>  	{					\

> -		.num_elements = 2048,		\

> +		.num_elements = el_count,	\

>  		.irq_moderation_ms = 1,		\

>  		.irq = (ev_ring) + 1,		\

>  		.priority = 1,			\

> @@ -156,12 +156,12 @@ static const struct mhi_channel_config modem_qcom_v1_mhi_channels[] = {

>  

>  static struct mhi_event_config modem_qcom_v1_mhi_events[] = {

>  	/* first ring is control+data ring */

> -	MHI_EVENT_CONFIG_CTRL(0),

> +	MHI_EVENT_CONFIG_CTRL(0, 64),

>  	/* DIAG dedicated event ring */

> -	MHI_EVENT_CONFIG_DATA(1),

> +	MHI_EVENT_CONFIG_DATA(1, 128),

>  	/* Hardware channels request dedicated hardware event rings */

> -	MHI_EVENT_CONFIG_HW_DATA(2, 100),

> -	MHI_EVENT_CONFIG_HW_DATA(3, 101)

> +	MHI_EVENT_CONFIG_HW_DATA(2, 1024, 100),

> +	MHI_EVENT_CONFIG_HW_DATA(3, 2048, 101)

>  };

>  

>  static struct mhi_controller_config modem_qcom_v1_mhiv_config = {

> -- 

> 2.7.4

>
patchwork-bot+linux-arm-msm@kernel.org May 26, 2021, 7:03 p.m. UTC | #2
Hello:

This series was applied to qcom/linux.git (refs/heads/for-next):

On Fri,  5 Mar 2021 20:16:43 +0100 you wrote:
> Not all hardwares need to use the same number of event ring elements.

> This change makes this parametrable.

> 

> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>

> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

> ---

>  v2: no change

>  v3: no change

> 

> [...]


Here is the summary with links:
  - [v3,1/6] mhi: pci_generic: Parametrable element count for events
    https://git.kernel.org/qcom/c/9ea48efdc528
  - [v3,2/6] mhi: pci_generic: Introduce quectel EM1XXGR-L support
    https://git.kernel.org/qcom/c/ac4bf60bbaa0
  - [v3,3/6] mhi: pci_generic: Add SDX24 based modem support
    https://git.kernel.org/qcom/c/59d05b71729b
  - [v3,4/6] mhi: pci_generic: No-Op for device_wake operations
    https://git.kernel.org/qcom/c/e3e5e6508fc1
  - [v3,5/6] mhi: pci_generic: Use generic PCI power management
    https://git.kernel.org/qcom/c/e89878aa4b79
  - [v3,6/6] mhi: pci_generic: Add support for runtime PM
    https://git.kernel.org/qcom/c/d3800c1dce24

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c
index 8187fcf..c58bf96 100644
--- a/drivers/bus/mhi/pci_generic.c
+++ b/drivers/bus/mhi/pci_generic.c
@@ -71,9 +71,9 @@  struct mhi_pci_dev_info {
 		.doorbell_mode_switch = false,		\
 	}
 
-#define MHI_EVENT_CONFIG_CTRL(ev_ring)		\
+#define MHI_EVENT_CONFIG_CTRL(ev_ring, el_count) \
 	{					\
-		.num_elements = 64,		\
+		.num_elements = el_count,	\
 		.irq_moderation_ms = 0,		\
 		.irq = (ev_ring) + 1,		\
 		.priority = 1,			\
@@ -114,9 +114,9 @@  struct mhi_pci_dev_info {
 		.doorbell_mode_switch = true,		\
 	}
 
-#define MHI_EVENT_CONFIG_DATA(ev_ring)		\
+#define MHI_EVENT_CONFIG_DATA(ev_ring, el_count) \
 	{					\
-		.num_elements = 128,		\
+		.num_elements = el_count,	\
 		.irq_moderation_ms = 5,		\
 		.irq = (ev_ring) + 1,		\
 		.priority = 1,			\
@@ -127,9 +127,9 @@  struct mhi_pci_dev_info {
 		.offload_channel = false,	\
 	}
 
-#define MHI_EVENT_CONFIG_HW_DATA(ev_ring, ch_num) \
+#define MHI_EVENT_CONFIG_HW_DATA(ev_ring, el_count, ch_num) \
 	{					\
-		.num_elements = 2048,		\
+		.num_elements = el_count,	\
 		.irq_moderation_ms = 1,		\
 		.irq = (ev_ring) + 1,		\
 		.priority = 1,			\
@@ -156,12 +156,12 @@  static const struct mhi_channel_config modem_qcom_v1_mhi_channels[] = {
 
 static struct mhi_event_config modem_qcom_v1_mhi_events[] = {
 	/* first ring is control+data ring */
-	MHI_EVENT_CONFIG_CTRL(0),
+	MHI_EVENT_CONFIG_CTRL(0, 64),
 	/* DIAG dedicated event ring */
-	MHI_EVENT_CONFIG_DATA(1),
+	MHI_EVENT_CONFIG_DATA(1, 128),
 	/* Hardware channels request dedicated hardware event rings */
-	MHI_EVENT_CONFIG_HW_DATA(2, 100),
-	MHI_EVENT_CONFIG_HW_DATA(3, 101)
+	MHI_EVENT_CONFIG_HW_DATA(2, 1024, 100),
+	MHI_EVENT_CONFIG_HW_DATA(3, 2048, 101)
 };
 
 static struct mhi_controller_config modem_qcom_v1_mhiv_config = {