Received: by 10.213.65.68 with SMTP id h4csp2391297imn; Mon, 9 Apr 2018 02:47:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx48AGsPtOCT3dRC04uiRMyjR97NRBleqjrWCAjnF0wjK55u1ae0NRyVoLwt3yqBIIJShRTCJ X-Received: by 10.98.163.68 with SMTP id s65mr28679123pfe.13.1523267222159; Mon, 09 Apr 2018 02:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523267222; cv=none; d=google.com; s=arc-20160816; b=yAAQ4UuE+yakPCHGn2sh0OUGtwBKJq/qL+517j3U9ZXjLe1+WFu6Wo8Xlu9DtTF57O C62HezxOPmjZulVREBKw8HN1laF3e+jMQBAaz6AyLw5ucZvUFp27krATrE+XWWBLRhjY CONWi/w0K7LCf1Hvq4oRlZKwiPClWR6CqcCCoxBK3Ub4nxvmdAO62tjAKEz6sZ5W0fQ9 GopzKtUff6P/Vyn0Y7mtFBJpxtEz/mN1rVdZTxyyonkgPz5Kn8wYJbETRoEPIcEPa2Ys HMuXUYWoDz4Np5pImkvih4/G+TI/ouSrImFVhcTurMaiu/x2q8/srNaTTfXwm4X3wKdd YmRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=RR3BUEb4HNQ8/7WvavTbYhddU8dgOiQ50HzPmLpN8Jk=; b=CO3k1VRfQSbtThjtRM/jSEzHGqJonkjiIiMlGAFKjId4pMNPaQVF29FaXGPldHtl+f eLpkQXh37k6eCyRJFstPSFcRCkP/YYr0VzyCZoe6LkfT9va9ML0QrqGnr5i1otQzWAn7 jP1T3gS5nJUwKrXuVE6osBiLyKqkqtvkCJqZE56wb09Yf/vwgudBcybsUlRxxqJUMVbX sNwT/8d+YnfiZGweHfA+E8NNj2wPdlFZvE7yOjQMBfC7cQJLa3Ktefq9TL8EGX9m5vBR E1amPyF/2LEnLK6Y3C7RkUlR8CwdwRZoI4TczDXV3SkrD7UgsASBn4yAoF+MwiwSa7DW 3cBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 202si11340035pgb.408.2018.04.09.02.46.25; Mon, 09 Apr 2018 02:47:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752807AbeDIJmr (ORCPT + 99 others); Mon, 9 Apr 2018 05:42:47 -0400 Received: from smtprelay.synopsys.com ([198.182.47.9]:56241 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752501AbeDIJlZ (ORCPT ); Mon, 9 Apr 2018 05:41:25 -0400 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 2665424E1345; Mon, 9 Apr 2018 02:41:25 -0700 (PDT) Received: from pt02.synopsys.com (pt02.synopsys.com [10.107.23.240]) by mailhost.synopsys.com (Postfix) with ESMTP id D6BB5578C; Mon, 9 Apr 2018 02:41:24 -0700 (PDT) Received: from UbuntuMate-64Bits.internal.synopsys.com (gustavo-e7480.internal.synopsys.com [10.107.25.102]) by pt02.synopsys.com (Postfix) with ESMTP id 88EA03E9E9; Mon, 9 Apr 2018 10:41:23 +0100 (WEST) From: Gustavo Pimentel To: bhelgaas@google.com, lorenzo.pieralisi@arm.com, Joao.Pinto@synopsys.com, jingoohan1@gmail.com, kishon@ti.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, gustavo.pimentel@synopsys.com Subject: [PATCH v2 6/9] PCI: dwc: Define maximum number of vectors Date: Mon, 9 Apr 2018 10:41:15 +0100 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adds a callback that defines the maximum number of vectors that can be use by the Root Complex. Since this is a parameter associated to each SoC IP setting, makes sense to be configurable and easily visible to future modifications. The designware IP supports a maximum of 256 vectors. Signed-off-by: Gustavo Pimentel --- Change v1->v2: - Nothing changed, just to follow the patch set version. drivers/pci/dwc/pcie-designware-plat.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/pci/dwc/pcie-designware-plat.c b/drivers/pci/dwc/pcie-designware-plat.c index 5382a7a..94da252 100644 --- a/drivers/pci/dwc/pcie-designware-plat.c +++ b/drivers/pci/dwc/pcie-designware-plat.c @@ -48,8 +48,14 @@ static int dw_plat_pcie_host_init(struct pcie_port *pp) return 0; } +static void dw_plat_set_num_vectors(struct pcie_port *pp) +{ + pp->num_vectors = MAX_MSI_IRQS; +} + static const struct dw_pcie_host_ops dw_plat_pcie_host_ops = { .host_init = dw_plat_pcie_host_init, + .set_num_vectors = dw_plat_set_num_vectors, }; static int dw_plat_pcie_establish_link(struct dw_pcie *pci) -- 2.7.4