linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: <nm@ti.com>, <t-kristo@ti.com>, <ssantosh@kernel.org>,
	<lokeshvutla@ti.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <grygorii.strashko@ti.com>
Subject: [PATCH v3 04/11] soc: ti: ti_sci_inta_msi: Add support for second range in resource ranges
Date: Mon, 12 Oct 2020 14:51:12 +0300	[thread overview]
Message-ID: <20201012115119.11333-5-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <20201012115119.11333-1-peter.ujfalusi@ti.com>

Allocate MSI entries for both first and second range if they are valid

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/soc/ti/ti_sci_inta_msi.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/soc/ti/ti_sci_inta_msi.c b/drivers/soc/ti/ti_sci_inta_msi.c
index 0eb9462f609e..a1d9c027022a 100644
--- a/drivers/soc/ti/ti_sci_inta_msi.c
+++ b/drivers/soc/ti/ti_sci_inta_msi.c
@@ -89,6 +89,18 @@ static int ti_sci_inta_msi_alloc_descs(struct device *dev,
 			list_add_tail(&msi_desc->list, dev_to_msi_list(dev));
 			count++;
 		}
+		for (i = 0; i < res->desc[set].num_sec; i++) {
+			msi_desc = alloc_msi_entry(dev, 1, NULL);
+			if (!msi_desc) {
+				ti_sci_inta_msi_free_descs(dev);
+				return -ENOMEM;
+			}
+
+			msi_desc->inta.dev_index = res->desc[set].start_sec + i;
+			INIT_LIST_HEAD(&msi_desc->list);
+			list_add_tail(&msi_desc->list, dev_to_msi_list(dev));
+			count++;
+		}
 	}
 
 	return count;
-- 
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


  parent reply	other threads:[~2020-10-12 11:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-12 11:51 [PATCH v3 00/11] firmware/soc: ti_sci, ringacc/inta: Preparation for AM64 DMA support Peter Ujfalusi
2020-10-12 11:51 ` [PATCH v3 01/11] firmware: ti_sci: rm: Add support for tx_tdtype parameter for tx channel Peter Ujfalusi
2020-10-12 11:51 ` [PATCH v3 02/11] firmware: ti_sci: Use struct ti_sci_resource_desc in get_range ops Peter Ujfalusi
2020-10-12 11:51 ` [PATCH v3 03/11] firmware: ti_sci: rm: Add support for second resource range Peter Ujfalusi
2020-10-12 11:51 ` Peter Ujfalusi [this message]
2020-10-12 11:51 ` [PATCH v3 05/11] firmware: ti_sci: rm: Add support for extended_ch_type for tx channel Peter Ujfalusi
2020-10-12 11:51 ` [PATCH v3 06/11] firmware: ti_sci: rm: Remove ring_get_config support Peter Ujfalusi
2020-10-12 11:51 ` [PATCH v3 07/11] firmware: ti_sci: rm: Add new ops for ring configuration Peter Ujfalusi
2020-10-12 11:51 ` [PATCH v3 08/11] soc: ti: k3-ringacc: Use the ti_sci set_cfg callback " Peter Ujfalusi
2020-10-12 11:51 ` [PATCH v3 09/11] firmware: ti_sci: rm: Remove unused config() from ti_sci_rm_ringacc_ops Peter Ujfalusi
2020-10-12 11:51 ` [PATCH v3 10/11] soc: ti: k3-ringacc: Use correct device for allocation in RING mode Peter Ujfalusi
2020-10-12 11:51 ` [PATCH v3 11/11] soc: ti: k3-socinfo: Add entry for AM64X SoC family Peter Ujfalusi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201012115119.11333-5-peter.ujfalusi@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lokeshvutla@ti.com \
    --cc=nm@ti.com \
    --cc=ssantosh@kernel.org \
    --cc=t-kristo@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).