Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3914467pxu; Mon, 12 Oct 2020 04:53:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxC3hD1YY9MwSlqpicCBU5zEUX02y+jK4DN2ca0zr189bVx73Z0tUTH1hkpHSs+dB7NMBtP X-Received: by 2002:a50:ab86:: with SMTP id u6mr13868572edc.158.1602503617691; Mon, 12 Oct 2020 04:53:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602503617; cv=none; d=google.com; s=arc-20160816; b=eQOlMfMUJ6RsN6tIgsen4SOTj+9LudWDHkbSurm34Rsx0Bu5uzbJW7nRgb2mwnYDkR otn16Hq0U+SNmQ28rdiIzbo95f3C6IUExHckrqhqncD5p/b7suO/md0lxXm7uI73jYNJ A7KMlNH+kc2R1RAmfUntvi/2ED9IA+B/TdJn0HQBSHpe+JwN9HAMXlFg/KBihZ3mlBs1 P9wfH6ALCtpkKXznqE52P3ceOhBe/adxGrprT53g0s5+jBj3Mf/nSdUIPWgwfqfNT9Iy H4Rs6UukKZkeRqTuoRff47W7uhajvlx8y+k/LJTt8bCglcdD10sMcRoalNUHaPIKuRhy hdfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JOorC5F8hzcYVcpHhobJkf0YVM1DB38ExWrHjz/Qmvw=; b=O45kDyGXM61V0cdOTEkuEnws42w2yC5K2KpYcv6OV/1RnPpAPMLUNEp6I1Hdn8olF/ lQ5UYgn4ZP8d8ZLtglXvjHOIlDCOjElgUD52enkkDOGOTf7Kauy6yVNr6F48dUwpm/wZ iBtU9NINaI58tWRc9sYq6KSpXfoE/DNm3QbsKKXLbwp2WBbAGTI7NkKAqAE8TQ6h9aTf jiA1diO8kjr2Lj8tOs1NmQnq+yYUteNrz5Q+o4gSr1tthRD+cS+E70aMr4JiYGyrsx9q bXWy8I3ZWBL/GeCG2V/yV0mWos5sVQrgwiSBFyy5mahD6M6DyCmX2OjJ17xPSrE8thbw K9WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=BarmH2mq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lj15si11319916ejb.612.2020.10.12.04.53.15; Mon, 12 Oct 2020 04:53:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=BarmH2mq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388340AbgJLLvR (ORCPT + 99 others); Mon, 12 Oct 2020 07:51:17 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:33194 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388278AbgJLLvJ (ORCPT ); Mon, 12 Oct 2020 07:51:09 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 09CBp6jY044242; Mon, 12 Oct 2020 06:51:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1602503466; bh=JOorC5F8hzcYVcpHhobJkf0YVM1DB38ExWrHjz/Qmvw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=BarmH2mqVBHjXT0QBtsZQp5J24JmTy8PGfXZnO+oKlJCDffKZWJu8d1S+x4Ab2EGi mny2jIx52PSThW9TEQMJXzjIaGcLtfv/QiaDedMCFPptQBijoertFcfVhvaBhULOLa kq3fjWzWZ2Qu3WwKndSonQ2keh7TLT3DDparmyFA= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 09CBp6KY014368 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 12 Oct 2020 06:51:06 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 12 Oct 2020 06:51:05 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Mon, 12 Oct 2020 06:51:05 -0500 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 09CBoswu088613; Mon, 12 Oct 2020 06:51:03 -0500 From: Peter Ujfalusi To: , , , CC: , , 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 Message-ID: <20201012115119.11333-5-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012115119.11333-1-peter.ujfalusi@ti.com> References: <20201012115119.11333-1-peter.ujfalusi@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Allocate MSI entries for both first and second range if they are valid Signed-off-by: Peter Ujfalusi --- 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