From patchwork Mon Jan 14 11:14:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 155437 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3536183jaa; Mon, 14 Jan 2019 03:16:11 -0800 (PST) X-Google-Smtp-Source: ALg8bN6AGJ2m7AvHEumcyF5krAifN1FVDjfXvNDxej6c98COaxK0SbOEJvs5+JyKmh1uX8e3d7Oo X-Received: by 2002:a17:902:d697:: with SMTP id v23mr24557616ply.261.1547464571687; Mon, 14 Jan 2019 03:16:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547464571; cv=none; d=google.com; s=arc-20160816; b=ocgJurtihea2Jm2x7Wr2fPKGcTUvI7DGFJWyg/xO+Btb/JBBmTHsVihhP3KwgGQI3n JMSX9L7S6yyizKlxrIpF/wxCqcOcaBbaVTw55RC3dtZbzUYATQLpE0LnvZhvmrYKKm+w 8bgYh3Tf5Hx6kyA8izSCsbxnfN20/qpqlX7eIGexcC9opyM5aKiBrNn5JZOHDskwyluG pNQh9TrhFmntyDczjID6KpBY0QaVQvlTOOXepgIG4Wuh04pFN4oNT3UzhxFiva/HGkr3 uHlyYnt3hIijLTz9OIuALVCM4at5Joc42atWhLkNBEhlttJEAd2gjUs4dnn5MQgI8Pxa rkzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=7zfWfnCQeG4SmqHvA26Y+pmRNPO6bCuT02zsP3l4mz4=; b=nAvVJJI02fadODSdTZYnG4EhM7leDsM9n5ZZoXrqAYIpR7UpnEEm0LWYWUofRfk6p2 nKuRHEN7F6O6qd30y44wPVZplqRK2M3jdqKn1LD87lAaa52qHtk8JcPYYZ5lSZTiF6KV dZbVpfTIZA7AGnjv1tekNSEqSsaC4EfQgZFkzLrgL1PVWp2kbiGkHfv2yAspfiNSvjK9 802m/WxSItUpe5JnCsaBryd4sdeYxgviCfGFcvoXSr0H3FzRFkPJCtU+YppPlxhmgVuL AypGY08B7TMrYOYYeRLLF4LPu4QbPWxPlRaBwa5V/1pLh2sm8Tjf4eH32G2+vH/z5vRP dhng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="i9hTjCS/"; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10si114504pls.170.2019.01.14.03.16.11; Mon, 14 Jan 2019 03:16:11 -0800 (PST) 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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="i9hTjCS/"; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726728AbfANLQJ (ORCPT + 31 others); Mon, 14 Jan 2019 06:16:09 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:45282 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726542AbfANLQI (ORCPT ); Mon, 14 Jan 2019 06:16:08 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x0EBFmA1112623; Mon, 14 Jan 2019 05:15:48 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1547464548; bh=7zfWfnCQeG4SmqHvA26Y+pmRNPO6bCuT02zsP3l4mz4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=i9hTjCS/NUPQO4ZstIx+7yGt3pVQWFkwD3rmw6yWgqWtxRt6ME/fkhZINKNuh51l9 fBbq9DuhWKCMeg9BOIUBfukGT3OWaEkauKys5wSvN+mMme1DQMdtZy5lAzXDFVfV0c 5xuszTFS43yYbeyMUGY+1yP42P1ghep3Mg5HEJmw= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x0EBFmRZ107813 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 14 Jan 2019 05:15:48 -0600 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 14 Jan 2019 05:15:47 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Mon, 14 Jan 2019 05:15:47 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x0EBFd1T011560; Mon, 14 Jan 2019 05:15:44 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Lorenzo Pieralisi , Gustavo Pimentel , Alan Douglas , Shawn Lin , Heiko Stuebner CC: Bjorn Helgaas , Jingoo Han , , , , , Subject: [PATCH v2 01/15] PCI: endpoint: Add new pci_epc_ops to get EPC features Date: Mon, 14 Jan 2019 16:44:59 +0530 Message-ID: <20190114111513.21618-2-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190114111513.21618-1-kishon@ti.com> References: <20190114111513.21618-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a new pci_epc_ops ->get_features() to get the features supported by EPC. Since EPC can provide different features to different functions, the ->get_features() ops takes _func_no_ as an argument. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/endpoint/pci-epc-core.c | 30 +++++++++++++++++++++++++++++ include/linux/pci-epc.h | 22 +++++++++++++++++++++ 2 files changed, 52 insertions(+) -- 2.17.1 diff --git a/drivers/pci/endpoint/pci-epc-core.c b/drivers/pci/endpoint/pci-epc-core.c index 094dcc3203b8..5a099479d9ab 100644 --- a/drivers/pci/endpoint/pci-epc-core.c +++ b/drivers/pci/endpoint/pci-epc-core.c @@ -83,6 +83,36 @@ struct pci_epc *pci_epc_get(const char *epc_name) } EXPORT_SYMBOL_GPL(pci_epc_get); +/** + * pci_epc_get_features() - get the features supported by EPC + * @epc: the features supported by *this* EPC device will be returned + * @func_no: the features supported by the EPC device specific to the + * endpoint function with func_no will be returned + * + * Invoke to get the features provided by the EPC which may be + * specific to an endpoint function. Returns pci_epc_features on success + * and NULL for any failures. + */ +const struct pci_epc_features *pci_epc_get_features(struct pci_epc *epc, + u8 func_no) +{ + const struct pci_epc_features *epc_features; + unsigned long flags; + + if (IS_ERR_OR_NULL(epc) || func_no >= epc->max_functions) + return NULL; + + if (!epc->ops->get_features) + return NULL; + + spin_lock_irqsave(&epc->lock, flags); + epc_features = epc->ops->get_features(epc, func_no); + spin_unlock_irqrestore(&epc->lock, flags); + + return epc_features; +} +EXPORT_SYMBOL_GPL(pci_epc_get_features); + /** * pci_epc_stop() - stop the PCI link * @epc: the link of the EPC device that has to be stopped diff --git a/include/linux/pci-epc.h b/include/linux/pci-epc.h index 37dab8116901..79fbcf94e14d 100644 --- a/include/linux/pci-epc.h +++ b/include/linux/pci-epc.h @@ -59,6 +59,8 @@ struct pci_epc_ops { enum pci_epc_irq_type type, u16 interrupt_num); int (*start)(struct pci_epc *epc); void (*stop)(struct pci_epc *epc); + const struct pci_epc_features* (*get_features)(struct pci_epc *epc, + u8 func_no); struct module *owner; }; @@ -100,6 +102,24 @@ struct pci_epc { unsigned int features; }; +/** + * struct pci_epc_features - features supported by a EPC device per function + * @linkup_notifier: indicate if the EPC device can notify EPF driver on link up + * @msi_capable: indicate if the endpoint function has MSI capability + * @msix_capable: indicate if the endpoint function has MSI-X capability + * @reserved_bar: bitmap to indicate reserved BAR unavailable to function driver + * @bar_fixed_64bit: bitmap to indicate fixed 64bit BARs + * @bar_fixed_size: Array specifying the size supported by each BAR + */ +struct pci_epc_features { + unsigned int linkup_notifier : 1; + unsigned int msi_capable : 1; + unsigned int msix_capable : 1; + u8 reserved_bar; + u8 bar_fixed_64bit; + u64 bar_fixed_size[BAR_5 + 1]; +}; + #define EPC_FEATURE_NO_LINKUP_NOTIFIER BIT(0) #define EPC_FEATURE_BAR_MASK (BIT(1) | BIT(2) | BIT(3)) #define EPC_FEATURE_MSIX_AVAILABLE BIT(4) @@ -158,6 +178,8 @@ int pci_epc_raise_irq(struct pci_epc *epc, u8 func_no, enum pci_epc_irq_type type, u16 interrupt_num); int pci_epc_start(struct pci_epc *epc); void pci_epc_stop(struct pci_epc *epc); +const struct pci_epc_features *pci_epc_get_features(struct pci_epc *epc, + u8 func_no); struct pci_epc *pci_epc_get(const char *epc_name); void pci_epc_put(struct pci_epc *epc); From patchwork Mon Jan 14 11:15:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 155436 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3536144jaa; Mon, 14 Jan 2019 03:16:09 -0800 (PST) X-Google-Smtp-Source: ALg8bN7A/pL87LbbldJD6sF8e+7ge4oJ9kOIdMG/Xgrhus9TwkxzwLJQ7nw6UiR+3STTETxJfuxp X-Received: by 2002:a63:d252:: with SMTP id t18mr22487273pgi.133.1547464569597; Mon, 14 Jan 2019 03:16:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547464569; cv=none; d=google.com; s=arc-20160816; b=zxzSKM1/rnRV/b8ISsgrigqXY+XJp3QUEJ4R9kdA3sufByNlK1iB7rftvTjLe47NFm JxQJ/TqiX2U62ZNKA8xykXfySeoG/AQlATp/5TqEetWtzaDq0n1GfdY9nu1La7mgQYO0 yPIM6FN7fEuVPxruTW9jn5+N8r4rUEsSfg3AkE4l1MFIX5nzPQQb3tmBIjeUNTu2qt9s KEF20QdJQTL6E2ixJHs73qtj1REJrkrLthK1L+YtVk0FVE1NcIsHa8aV95NcSY1y+4xF 8XAS5mIvGlj3SrGXElV9dthanOijiaUAL6fBABi87jxL5hvAqkT4iMWAJkt6x/WI3f23 j4mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=cErqiu0ARQGyKCvuDtnfQEI4ZlZ26OR+gjwxCf8dAg4=; b=xnfx3fQqUUWamKKapeDSzB3wMOXThpZeDvfH+bJtPVHOV5tXbfyjd1Li3HtUzuXL1h 7c+NfCbztD1Tzw8zByz4dwhQUxtKw9jQumyGTi5vsa+YkBoFB4pXm4SvsEc6OLl2YJxa NhvSbhsLOrIIMhV6Lf/GyK9lggQnA5drTU5ax1Kxs98LGHu2brXHXraevwgLLKAXmZkC g8mFz7tFUtadcUfA2E6Xz6I5O1JmsBE0xtvcWWXvqbVNKpGtyJcSWFt9ZbBc6AGPgrUE Q2rrU0Zq3dAW2HWKXejWkMqYvJaq65cx8tu50NtI8Llg61dcJtCtNRj/enLg6uFZKe+2 XVuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ArSSHRFK; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10si113827pll.179.2019.01.14.03.16.09; Mon, 14 Jan 2019 03:16:09 -0800 (PST) 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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ArSSHRFK; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726690AbfANLQI (ORCPT + 31 others); Mon, 14 Jan 2019 06:16:08 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:45280 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbfANLQH (ORCPT ); Mon, 14 Jan 2019 06:16:07 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x0EBFpMX112650; Mon, 14 Jan 2019 05:15:51 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1547464551; bh=cErqiu0ARQGyKCvuDtnfQEI4ZlZ26OR+gjwxCf8dAg4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ArSSHRFKI9KTPbeQLpaDKqr2K8cmYef0dHeZAzLhnHzythg/5nWvxQMOzh09b7N97 +JhdYkZnO7rFGfWz5sbyyVjD/Sd98XA4KTVpVY4TqUlWiI3zz/Tf1mDwJO3NsKirl4 xgwly+AsGF/t+LF65kZOUEe3cYRhbWSqqVVd90CQ= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x0EBFpah067081 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 14 Jan 2019 05:15:51 -0600 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 14 Jan 2019 05:15:51 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Mon, 14 Jan 2019 05:15:51 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x0EBFd1U011560; Mon, 14 Jan 2019 05:15:47 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Lorenzo Pieralisi , Gustavo Pimentel , Alan Douglas , Shawn Lin , Heiko Stuebner CC: Bjorn Helgaas , Jingoo Han , , , , , Subject: [PATCH v2 02/15] PCI: dwc: Add ->get_features() callback function in dw_pcie_ep_ops Date: Mon, 14 Jan 2019 16:45:00 +0530 Message-ID: <20190114111513.21618-3-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190114111513.21618-1-kishon@ti.com> References: <20190114111513.21618-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Each platform using Designware PCIe core can support different set of endpoint features. Add a new callback function ->get_features() in dw_pcie_ep_ops so that each platform using Designware PCIe core can advertise its supported features to the endpoint function driver. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/controller/dwc/pcie-designware-ep.c | 12 ++++++++++++ drivers/pci/controller/dwc/pcie-designware.h | 1 + 2 files changed, 13 insertions(+) -- 2.17.1 diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c index a543c45c7224..7a2925a16ab8 100644 --- a/drivers/pci/controller/dwc/pcie-designware-ep.c +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c @@ -355,6 +355,17 @@ static int dw_pcie_ep_start(struct pci_epc *epc) return pci->ops->start_link(pci); } +static const struct pci_epc_features* +dw_pcie_ep_get_features(struct pci_epc *epc, u8 func_no) +{ + struct dw_pcie_ep *ep = epc_get_drvdata(epc); + + if (!ep->ops->get_features) + return NULL; + + return ep->ops->get_features(ep); +} + static const struct pci_epc_ops epc_ops = { .write_header = dw_pcie_ep_write_header, .set_bar = dw_pcie_ep_set_bar, @@ -368,6 +379,7 @@ static const struct pci_epc_ops epc_ops = { .raise_irq = dw_pcie_ep_raise_irq, .start = dw_pcie_ep_start, .stop = dw_pcie_ep_stop, + .get_features = dw_pcie_ep_get_features, }; int dw_pcie_ep_raise_legacy_irq(struct dw_pcie_ep *ep, u8 func_no) diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h index 9943d8c68335..1f56e6ae34ff 100644 --- a/drivers/pci/controller/dwc/pcie-designware.h +++ b/drivers/pci/controller/dwc/pcie-designware.h @@ -192,6 +192,7 @@ struct dw_pcie_ep_ops { void (*ep_init)(struct dw_pcie_ep *ep); int (*raise_irq)(struct dw_pcie_ep *ep, u8 func_no, enum pci_epc_irq_type type, u16 interrupt_num); + const struct pci_epc_features* (*get_features)(struct dw_pcie_ep *ep); }; struct dw_pcie_ep { From patchwork Mon Jan 14 11:15:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 155439 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3536315jaa; Mon, 14 Jan 2019 03:16:18 -0800 (PST) X-Google-Smtp-Source: ALg8bN7FQ3tH+UtJt64OwQvy4z9eUxQ6kxpG7WVAnB+APUdrd+nvD+u4aVKW+PK1+h+MW+p9At2i X-Received: by 2002:a17:902:161:: with SMTP id 88mr25478010plb.306.1547464578811; Mon, 14 Jan 2019 03:16:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547464578; cv=none; d=google.com; s=arc-20160816; b=Y0POFDRoOOt8Jf/otopNvFzDfnqSjmsHl7G0+1QX6zEMxJvYiWHRDSTpCtORcsFLKx 4C71UjbGJwj0zrEunwj4NWbIon6YPdJB6BvmfJV/caI3v6YDKWBQ2AxaV+1Np8A8UPP+ 2vBPypZZtTTil6i3beEA+xyPPSujreUTYA0VnVMpJf+r9QafYPBCdqeqsh54i3cBVk7h yRXUOvJgsjWXOb2q6/eORNmbUw9wq3PHey8C9mBkzVKHtQwYcM/CioMnTOebL6rpiENZ gnjAFsghWqN7tBuxiERI1oF93Nl+AmqVAfB5msN8V4BFpeMbut/Zf0vkAlssrHyw3+VT B+zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=UxFV2AA/OxJ+RGbF6mGrC+ScIM/GAuGJn+bhMgD6qEM=; b=AAfE5vRx3Z3QUMDhWK5fBKeCvREjsVW2nduT/Jqg6YS+vOzdpOU8Hexar0vjg8Vx97 xvZ7HnQoIiymkBBP02WOrxtM16sQxMPtYw3rnEa8bZQZYmBVXjDgAaN2+eWHTUMIHWjU sqJSrKIwgDe+RrVHfaRhrFl7dH7lnmsJO+G+5Mb+6S7rJL3ngX/fVVmWYUkTVTMr/D2d L1NqEJh0fjdj0AdH+rNattwk8FjaUAlrYSS28+ar5UYi89wfzaBxSyd2KvR95uQlQbuj RnozqL/pJAHoneUXvUhOQOOYb0ijCO76fXC5HLaS/S0Ljh0cqY7y/lC030o7K/EXXoVF r63A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=f3sD6HNC; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4si99599pgm.487.2019.01.14.03.16.18; Mon, 14 Jan 2019 03:16:18 -0800 (PST) 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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=f3sD6HNC; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726759AbfANLQR (ORCPT + 31 others); Mon, 14 Jan 2019 06:16:17 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:45328 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726469AbfANLQP (ORCPT ); Mon, 14 Jan 2019 06:16:15 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x0EBFtlh112673; Mon, 14 Jan 2019 05:15:55 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1547464555; bh=UxFV2AA/OxJ+RGbF6mGrC+ScIM/GAuGJn+bhMgD6qEM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=f3sD6HNCShsAqDvvThjSjSh6ZV9XuUzizQl/De5staAp3gWhblDVfYwrVM1Y0IDdA o1SAZutWn5iPD4M8o4mwKYlYdj6cde9/5AYd6VpmoZfxB5RqDKrOHQEJnHzXuIe8vC 7SygVG2L7ogoCeO1wWEVIMvv5ADDygDOrOcF8Mvw= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x0EBFtSu107903 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 14 Jan 2019 05:15:55 -0600 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 14 Jan 2019 05:15:55 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Mon, 14 Jan 2019 05:15:54 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x0EBFd1V011560; Mon, 14 Jan 2019 05:15:51 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Lorenzo Pieralisi , Gustavo Pimentel , Alan Douglas , Shawn Lin , Heiko Stuebner CC: Bjorn Helgaas , Jingoo Han , , , , , Subject: [PATCH v2 03/15] PCI: designware-plat: Populate ->get_features() dw_pcie_ep_ops Date: Mon, 14 Jan 2019 16:45:01 +0530 Message-ID: <20190114111513.21618-4-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190114111513.21618-1-kishon@ti.com> References: <20190114111513.21618-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Populate ->get_features() dw_pcie_ep_ops to return the EPC features supported by Designware PCIe endpoint controller. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/controller/dwc/pcie-designware-plat.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) -- 2.17.1 diff --git a/drivers/pci/controller/dwc/pcie-designware-plat.c b/drivers/pci/controller/dwc/pcie-designware-plat.c index c12bf794d69c..bd0516afc86f 100644 --- a/drivers/pci/controller/dwc/pcie-designware-plat.c +++ b/drivers/pci/controller/dwc/pcie-designware-plat.c @@ -100,9 +100,22 @@ static int dw_plat_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no, return 0; } +static const struct pci_epc_features dw_plat_pcie_epc_features = { + .linkup_notifier = false, + .msi_capable = true, + .msix_capable = true, +}; + +static const struct pci_epc_features* +dw_plat_pcie_get_features(struct dw_pcie_ep *ep) +{ + return &dw_plat_pcie_epc_features; +} + static struct dw_pcie_ep_ops pcie_ep_ops = { .ep_init = dw_plat_pcie_ep_init, .raise_irq = dw_plat_pcie_ep_raise_irq, + .get_features = dw_plat_pcie_get_features, }; static int dw_plat_add_pcie_port(struct dw_plat_pcie *dw_plat_pcie, From patchwork Mon Jan 14 11:15:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 155438 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3536256jaa; Mon, 14 Jan 2019 03:16:15 -0800 (PST) X-Google-Smtp-Source: ALg8bN63ZNgY546x3K/+G1vZhPWxOCkIjWyQtkQLwTYG1RoVe8+9uI6wPDPns7ieKPmkj9p6+U+2 X-Received: by 2002:a62:5910:: with SMTP id n16mr24565147pfb.128.1547464575547; Mon, 14 Jan 2019 03:16:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547464575; cv=none; d=google.com; s=arc-20160816; b=dXyqnPTdNlwoOn72YbWPN5b4GcmtsxQLkziA12yTBFF4CjiFk8wjdb2A9vFn5/vU1v uoKRHS4Ghl7gwBHXW0TWGkPQXlnIs/j123Sof41cEsMFxUHiHW1ZGHPgWNINrcXJAQ+S 3uh2VrRJBD7HOR/wJTbMkc5hJTK5KMIe1vsdMxrIsw48OSf9u6ry9KWB554cgTq7ZnbN 8lFNKJDq+jpPEljqegSaAxEt9q39YSSdFbHyLpVVvcpi2Uwelw/CzRSMuA+f/heujE8/ GC+OxONpD6rIboXHJB15lbEi4xzCWiK76XFEUzVVVy6+c8/uW0lDbNNEUhF5HhwHaokG omzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=TmIM90if+baASLKYtEih7oqZRQj9lMMND6SlULCYPWw=; b=y+FNvirgawTXo0inDdLGBW2UpCK2OQcyU0CMb86fbaWHldhHkQ2nh402Grc7irn1Ko vBiMEYepFRvzARn1WLxdoqj8tuv6AZaoMAcklUU+BxaMw5VPWLm8M6Fn1iUzTkmP8cAO mIgZBqiWOUbcuCLd7HF/fgnpgE3njmQVbvjeDSHpyQE2TVve1f62kmPEJzHZPd1fZI0/ +4f1xLhjvhiXGYcneK1atKdfEBSYMKxCnnPtp+2/PUCXCaY0MX140dCbjSBG96eS3MqD cjyx/cSxhJY/K7SBdxXp5zqadlP5f0dc6spK7hTN1p1L9VJ8NJhjrX/LXw7q+bWK89XN LdJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=CPytDNn3; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4si99599pgm.487.2019.01.14.03.16.15; Mon, 14 Jan 2019 03:16:15 -0800 (PST) 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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=CPytDNn3; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726745AbfANLQO (ORCPT + 31 others); Mon, 14 Jan 2019 06:16:14 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:45310 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726469AbfANLQN (ORCPT ); Mon, 14 Jan 2019 06:16:13 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x0EBFx5x112680; Mon, 14 Jan 2019 05:15:59 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1547464559; bh=TmIM90if+baASLKYtEih7oqZRQj9lMMND6SlULCYPWw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=CPytDNn3xx+IvTTGlU+bZhR6tAguBafWGQ+k85DMhgW8OG02CXCtUPgG+BHjxRyeW BEnifF/fqeF4Ba+1AOUAhst5WR8DHgSzHRrccJOz0wKQOGqXVyjUIhTRq/08tNu5qr YY/AftGdx3hZrSPIZRtx3I24eHxUcGNvVZTrA4Q4= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x0EBFxYZ023584 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 14 Jan 2019 05:15:59 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 14 Jan 2019 05:15:58 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Mon, 14 Jan 2019 05:15:58 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x0EBFd1W011560; Mon, 14 Jan 2019 05:15:55 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Lorenzo Pieralisi , Gustavo Pimentel , Alan Douglas , Shawn Lin , Heiko Stuebner CC: Bjorn Helgaas , Jingoo Han , , , , , Subject: [PATCH v2 04/15] PCI: pci-dra7xx: Populate ->get_features() dw_pcie_ep_ops Date: Mon, 14 Jan 2019 16:45:02 +0530 Message-ID: <20190114111513.21618-5-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190114111513.21618-1-kishon@ti.com> References: <20190114111513.21618-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Populate ->get_features() dw_pcie_ep_ops to return the EPC features supported by DRA7xx PCIe endpoint controller. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/controller/dwc/pci-dra7xx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) -- 2.17.1 diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c index a32d6dde7a57..15620cfa617b 100644 --- a/drivers/pci/controller/dwc/pci-dra7xx.c +++ b/drivers/pci/controller/dwc/pci-dra7xx.c @@ -389,9 +389,22 @@ static int dra7xx_pcie_raise_irq(struct dw_pcie_ep *ep, u8 func_no, return 0; } +static const struct pci_epc_features dra7xx_pcie_epc_features = { + .linkup_notifier = true, + .msi_capable = true, + .msix_capable = false, +}; + +static const struct pci_epc_features* +dra7xx_pcie_get_features(struct dw_pcie_ep *ep) +{ + return &dra7xx_pcie_epc_features; +} + static struct dw_pcie_ep_ops pcie_ep_ops = { .ep_init = dra7xx_pcie_ep_init, .raise_irq = dra7xx_pcie_raise_irq, + .get_features = dra7xx_pcie_get_features, }; static int __init dra7xx_add_pcie_ep(struct dra7xx_pcie *dra7xx, From patchwork Mon Jan 14 11:15:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 155441 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3536572jaa; Mon, 14 Jan 2019 03:16:34 -0800 (PST) X-Google-Smtp-Source: ALg8bN5h6QJfAJCKLWEJKYtXycxhFv2EWXU4A28C8ardXJw8+te7B0/ZW0c9O4uGrKZlTK0mvDb4 X-Received: by 2002:a17:902:bc3:: with SMTP id 61mr25049136plr.15.1547464594244; Mon, 14 Jan 2019 03:16:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547464594; cv=none; d=google.com; s=arc-20160816; b=kr/Ec2C61n4+3ZBrNy51OKhKWpIIsny7Xu/xHcqUPA9oNFew6O43jnbR6ucBTi5djY 3xGlHN5gJon+T72JIGnimYwlySvkGeUjRF+epk2ECAFUMMqoQ1Qdcn4nkcSlUZJ5rFyI INMLy81Xize9L9UM52M6maaTWDP4qYcbebsMnLALZxZ21LZNSenMMq8svzfGrzq0tAQn fRfBV2i7TMHjUYuedHNI1nCkX7qlhHkmlUCb98aWwkfCGZNMtmCgP/uTQL/KeKBfodrU e61+jBB7I5cjM30ucklcpXFu6HWVzG2UusfCgosKBGDgptw8mQebatcqv3FN77hrGWWT L74Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=B87URmk8FxmkzbOiUN33pM2ksJFStfqzKpKRhu9JNSU=; b=PS1B5CHxCv7dQ5sGxLol3fArcs4CCgSLxqM+/d8rKNwZ+lRjADhpOmEjiH4V732ClY k1aLphjk39tkNDKGf0beeaXlKDZb3be4NryaWa9jydOIAUw6CEqang6QZ/KuoCDRI6lX IgVixlTjIn5a+PQsvwa2wsJbcIx9+67GeXcUT600cWviFisyq3wsw4d7v2fMBse8XAJM XL8ndj2ahMQU7hCu6eCbKl2hvQkB3jvgjUeSIiJ+NuJatuFQHdj0DTZZEiAB3LiByMP9 FlANuikZgP6FoehEzQd7cysfYQuZhrubZwgdF4wD5uh37d+dCFXWIb5wjW6P/w8tEVwD 7gag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=enDfy+2C; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 87si144516pfs.7.2019.01.14.03.16.33; Mon, 14 Jan 2019 03:16:34 -0800 (PST) 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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=enDfy+2C; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726795AbfANLQd (ORCPT + 31 others); Mon, 14 Jan 2019 06:16:33 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:46868 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726623AbfANLQ1 (ORCPT ); Mon, 14 Jan 2019 06:16:27 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x0EBG31j065515; Mon, 14 Jan 2019 05:16:03 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1547464563; bh=B87URmk8FxmkzbOiUN33pM2ksJFStfqzKpKRhu9JNSU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=enDfy+2CkwQlJL5pG2orA0+8L0UPvpQC1aO4S9pOm3q70K2elptWNMrgClYxz/sxs NyoXk01Vo8+2jA0CHMl8uYbD/XQsNaatfWfT9N4/UplnCxo3jhWfDGl61lynfv7kqB zj9HxLt0SWxx8Aammbv01fyrS46OvNuip7Tv+9+c= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x0EBG3NH067318 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 14 Jan 2019 05:16:03 -0600 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 14 Jan 2019 05:16:02 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Mon, 14 Jan 2019 05:16:02 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x0EBFd1X011560; Mon, 14 Jan 2019 05:15:59 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Lorenzo Pieralisi , Gustavo Pimentel , Alan Douglas , Shawn Lin , Heiko Stuebner CC: Bjorn Helgaas , Jingoo Han , , , , , Subject: [PATCH v2 05/15] PCI: rockchip: Populate ->get_features() dw_pcie_ep_ops Date: Mon, 14 Jan 2019 16:45:03 +0530 Message-ID: <20190114111513.21618-6-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190114111513.21618-1-kishon@ti.com> References: <20190114111513.21618-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Populate ->get_features() dw_pcie_ep_ops to return the EPC features supported by Rockchip PCIe endpoint controller. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/controller/pcie-rockchip-ep.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) -- 2.17.1 diff --git a/drivers/pci/controller/pcie-rockchip-ep.c b/drivers/pci/controller/pcie-rockchip-ep.c index b8163c56a142..9b60ad323ac7 100644 --- a/drivers/pci/controller/pcie-rockchip-ep.c +++ b/drivers/pci/controller/pcie-rockchip-ep.c @@ -505,6 +505,18 @@ static int rockchip_pcie_ep_start(struct pci_epc *epc) return 0; } +static const struct pci_epc_features rockchip_pcie_epc_features = { + .linkup_notifier = false, + .msi_capable = true, + .msix_capable = false, +}; + +static const struct pci_epc_features* +rockchip_pcie_ep_get_features(struct pci_epc *epc, u8 func_no) +{ + return &rockchip_pcie_epc_features; +} + static const struct pci_epc_ops rockchip_pcie_epc_ops = { .write_header = rockchip_pcie_ep_write_header, .set_bar = rockchip_pcie_ep_set_bar, @@ -515,6 +527,7 @@ static const struct pci_epc_ops rockchip_pcie_epc_ops = { .get_msi = rockchip_pcie_ep_get_msi, .raise_irq = rockchip_pcie_ep_raise_irq, .start = rockchip_pcie_ep_start, + .get_features = rockchip_pcie_ep_get_features, }; static int rockchip_pcie_parse_ep_dt(struct rockchip_pcie *rockchip, From patchwork Mon Jan 14 11:15:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 155442 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3536650jaa; Mon, 14 Jan 2019 03:16:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN7M2EK99nsAeciXUWUK3jVPv1L+AN9F74T0FhS8lw48/VP1gilUejKNxMUPKDbyFExCgubY X-Received: by 2002:a63:6c48:: with SMTP id h69mr21405047pgc.139.1547464597824; Mon, 14 Jan 2019 03:16:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547464597; cv=none; d=google.com; s=arc-20160816; b=P6SYI8vXo83Sr492slP1zkEvp5Ei+RBpFqrxmT271nC0T1eEZW9nPWJX7qxorMp4l2 TPmDXnSpZF5W41JyvsA6EXCJvfwNdT3+HmsEItCa0aUYLq4fFs/vfXeeaavOxKllWaZa lfICmBofNZYdT/v222EFeyBxrXyqAqDdOBzTeeSwxX1ggoVwMeAcA3I8S3ozsLuEL3cH XXOqgcoZBP8pdiFWhlbgf/emN9RM9/pfOce23ulKgKaQAz0wnwc0X2dn2EKwKpisW5+o K61GfzoN/zbrxEFIuxanMI7Nsp0+2mszxF5SS1zWCFjGBCl2Uvlp1yUXOM3YXTVlLxoV vbnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=em3nniSoZzdBLeQmpghEPOG4OiEKNFjH6jr71UxEv8A=; b=roT1W1sDXq5nkhRSHXbjkMTUh0XWx5S/6J2qV3/jNbWM7L4CUZT9YHDrdDI0X1yMTt dx4ophhDYcGeHaD0MABzLdgetV4Fr62sGXBbZMz6U7qtwO7CrvO+D5eb8GdwYdzH4aO1 /FJ9D1X7nUFWZTc7TRd2jXAaKqwg17uOOj7E7QPTyPjodvqVPav2vqgjdFFPKyee2Zag f+v51sSrBkN+vEL55brekYnKjn4o31frgm7P1G/K14lQQf1wFngie8NEHMteBA4MIuRH POJahuNMx5J33Y6sw6k+hm2m1WbDkBZeBwAWvAhlCsyQ0s2W6CPb/3xngF1/cKzRuMpk uhEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="XC/wStIe"; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 87si144516pfs.7.2019.01.14.03.16.37; Mon, 14 Jan 2019 03:16:37 -0800 (PST) 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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="XC/wStIe"; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726809AbfANLQg (ORCPT + 31 others); Mon, 14 Jan 2019 06:16:36 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:45416 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726779AbfANLQd (ORCPT ); Mon, 14 Jan 2019 06:16:33 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x0EBGA2j112722; Mon, 14 Jan 2019 05:16:10 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1547464570; bh=em3nniSoZzdBLeQmpghEPOG4OiEKNFjH6jr71UxEv8A=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=XC/wStIeqY/aZOLxjVCCHhzcxgJmCYr7rNxHZ4r1v2r+KUP4nUPg8q9RSdjTXq+FQ DOtgyp4sImkH1gyp0anajHNyO8CVuB3qIHWGUUknwDOpWJhzlGfPqE3mCrczzrb/84 Er3TaP098NTS5pAFzuqaIQ65RFRMAuzjCShTFsIk= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x0EBGAqp023949 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 14 Jan 2019 05:16:10 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 14 Jan 2019 05:16:10 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Mon, 14 Jan 2019 05:16:10 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x0EBFd1Z011560; Mon, 14 Jan 2019 05:16:07 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Lorenzo Pieralisi , Gustavo Pimentel , Alan Douglas , Shawn Lin , Heiko Stuebner CC: Bjorn Helgaas , Jingoo Han , , , , , Subject: [PATCH v2 07/15] PCI: endpoint: Add helper to get first unreserved BAR Date: Mon, 14 Jan 2019 16:45:05 +0530 Message-ID: <20190114111513.21618-8-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190114111513.21618-1-kishon@ti.com> References: <20190114111513.21618-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a helper function pci_epc_get_first_free_bar(), to get the first unreserved BAR that can be used for endpoint function. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/endpoint/pci-epc-core.c | 23 +++++++++++++++++++++++ include/linux/pci-epc.h | 2 ++ 2 files changed, 25 insertions(+) -- 2.17.1 diff --git a/drivers/pci/endpoint/pci-epc-core.c b/drivers/pci/endpoint/pci-epc-core.c index 5a099479d9ab..e4712a0f249c 100644 --- a/drivers/pci/endpoint/pci-epc-core.c +++ b/drivers/pci/endpoint/pci-epc-core.c @@ -83,6 +83,29 @@ struct pci_epc *pci_epc_get(const char *epc_name) } EXPORT_SYMBOL_GPL(pci_epc_get); +/** + * pci_epc_get_first_free_bar() - helper to get first unreserved BAR + * @epc_features: pci_epc_features structure that holds the reserved bar bitmap + * + * Invoke to get the first unreserved BAR that can be used for endpoint + * function. For any incorrect value in reserved_bar return '0'. + */ +unsigned int pci_epc_get_first_free_bar(const struct pci_epc_features + *epc_features) +{ + int free_bar; + + if (!epc_features) + return 0; + + free_bar = ffz(epc_features->reserved_bar); + if (free_bar > 5) + return 0; + + return free_bar; +} +EXPORT_SYMBOL_GPL(pci_epc_get_first_free_bar); + /** * pci_epc_get_features() - get the features supported by EPC * @epc: the features supported by *this* EPC device will be returned diff --git a/include/linux/pci-epc.h b/include/linux/pci-epc.h index 79fbcf94e14d..94e1ecff98ce 100644 --- a/include/linux/pci-epc.h +++ b/include/linux/pci-epc.h @@ -180,6 +180,8 @@ int pci_epc_start(struct pci_epc *epc); void pci_epc_stop(struct pci_epc *epc); const struct pci_epc_features *pci_epc_get_features(struct pci_epc *epc, u8 func_no); +unsigned int pci_epc_get_first_free_bar(const struct pci_epc_features + *epc_features); struct pci_epc *pci_epc_get(const char *epc_name); void pci_epc_put(struct pci_epc *epc); From patchwork Mon Jan 14 11:15:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 155444 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3537063jaa; Mon, 14 Jan 2019 03:17:06 -0800 (PST) X-Google-Smtp-Source: ALg8bN71CWnpnqm5dUzywqsDdZo0VP/elSU8nqaN76Ez18tT37pW81UE0eWBekH6Z/1uAISgFc2r X-Received: by 2002:a62:6f88:: with SMTP id k130mr24715812pfc.234.1547464626696; Mon, 14 Jan 2019 03:17:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547464626; cv=none; d=google.com; s=arc-20160816; b=Qx9uXGDeVmPoi1wyLbVL0visBjDCCI+MZX4vFtFZmXMOZZFNOQCl9I3CuhBU26G4J5 AZ5rDyIab95TZS5gRYBNENV5+48MzM4nRWwKjP1hePr10NifJSGswjJ5nZEW5tMM3J5a LpB00QJtjh3m2mhxxv6I1J47DrT9SFjdq5a21vzZwybvc56LneUhcMZvmBYcjJo2zse0 Zd+9CJnC/aEBeuiInxFq9W3KkfXfJl1SpW5ehJ8wskOeJo1edppUSIKbwwKlXFdRqogF OWvKjd1qa0heTy6aN1kYAASTYHlGpArFfju8G/H8vGXyrJnUQWS2T3dVI/qpNzolB815 a0WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=9uy7oBAgopBKXmOWf1Xu6i0EmqFED+atLS7+JVzPan8=; b=Lc8oE/6JVvKy+EreFOoRF0tINE3OH4Mpf3YRWHxV1gSeeDqBZgeFDrNaqoxEhm13Bk X++YVnMZWgTpjreT3Tuek1H27IPHD9/PprqwI+TD1g9MVIWBQdn7zZ3NJFIRgJA+IEFy hC9PT4qny2P0qvUE3c7wuQMOHsk9fCfs2d71xbmEASvhxrffoN24m0SW/4sVvb1V9pLz z580U5jQhK088kICA0mL6K+Qdpf8IL71yQxjK0c1/KWCo0sDLaBj7+rdq9Hv+thgeAEc Hmx8d2TqZZSh8SErIo+/3T5WAauZ4MZ0ce4JOY2lTEfrJDdBQ3b+YGPqLcfloXAA1r2p sAzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=P7XFzsI5; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5si113260plr.211.2019.01.14.03.17.06; Mon, 14 Jan 2019 03:17:06 -0800 (PST) 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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=P7XFzsI5; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbfANLRF (ORCPT + 31 others); Mon, 14 Jan 2019 06:17:05 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:46922 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726561AbfANLRC (ORCPT ); Mon, 14 Jan 2019 06:17:02 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x0EBGMva065556; Mon, 14 Jan 2019 05:16:22 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1547464582; bh=9uy7oBAgopBKXmOWf1Xu6i0EmqFED+atLS7+JVzPan8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=P7XFzsI5AoIR5lwIf7kdytlIcvYG00NuEKVT4PSzp9QW8AhQvxBUBmmb2XZYz8W8b GKgjjaaZ/1uHaeqpM/3tdbWaQwPnmby9LN5zD/X6UYTmmxqapNrzQcC+UYaDcXkRbv Im82/pbFYLEuc3n10X216xnTWvR7ImNq0PACzjiM= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x0EBGMVu024049 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 14 Jan 2019 05:16:22 -0600 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 14 Jan 2019 05:16:21 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Mon, 14 Jan 2019 05:16:21 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x0EBFd1c011560; Mon, 14 Jan 2019 05:16:18 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Lorenzo Pieralisi , Gustavo Pimentel , Alan Douglas , Shawn Lin , Heiko Stuebner CC: Bjorn Helgaas , Jingoo Han , , , , , Subject: [PATCH v2 10/15] PCI: pci-epf-test: Do not allocate next BARs memory if current BAR is 64Bit Date: Mon, 14 Jan 2019 16:45:08 +0530 Message-ID: <20190114111513.21618-11-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190114111513.21618-1-kishon@ti.com> References: <20190114111513.21618-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's useless to allocate memory for next BAR if the current BAR is a 64Bit BAR. Stop allocating memory for the next BAR, if the current BARs flag indicates this is a 64Bit BAR. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/endpoint/functions/pci-epf-test.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c index 44cc31343a80..ade296180383 100644 --- a/drivers/pci/endpoint/functions/pci-epf-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-test.c @@ -429,6 +429,7 @@ static int pci_epf_test_alloc_space(struct pci_epf *epf) { struct pci_epf_test *epf_test = epf_get_drvdata(epf); struct device *dev = &epf->dev; + struct pci_epf_bar *epf_bar; void *base; int bar; enum pci_barno test_reg_bar = epf_test->test_reg_bar; @@ -442,6 +443,7 @@ static int pci_epf_test_alloc_space(struct pci_epf *epf) epf_test->reg[test_reg_bar] = base; for (bar = BAR_0; bar <= BAR_5; bar++) { + epf_bar = &epf->bar[bar]; if (bar == test_reg_bar) continue; base = pci_epf_alloc_space(epf, bar_size[bar], bar); @@ -449,6 +451,8 @@ static int pci_epf_test_alloc_space(struct pci_epf *epf) dev_err(dev, "Failed to allocate space for BAR%d\n", bar); epf_test->reg[bar] = base; + if (epf_bar->flags & PCI_BASE_ADDRESS_MEM_TYPE_64) + bar++; } return 0; From patchwork Mon Jan 14 11:15:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 155449 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3537647jaa; Mon, 14 Jan 2019 03:17:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN5HjEHA6+b522cfbnTJOXYiXP8c7JOYNWUAZ7xZipoPtrXr2M+gDFpgU03VIP23oiJbSgZK X-Received: by 2002:a65:514c:: with SMTP id g12mr22201558pgq.169.1547464667085; Mon, 14 Jan 2019 03:17:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547464667; cv=none; d=google.com; s=arc-20160816; b=pAaUuujGOPsM7pxGzSCrp6maA6PI2LB5QtiQVXFr/zT/gFop6nklzBxTkJTxIMVW98 e1ETznGGAtFmixpbAig+EWKodaI1+XJtxZw28cNPcxY5rUeSBpXQekItCO6evlo033fn Oi8aWSPPC/VbB0niRmv0zI2DwANx1Zdbs4b5juFUINo9KEUFILQbZ00OgwzBeXKefrXi MUbkTCQdu2mxhopXYxIZgytAhhk4RtUOGIYox7AK6c12GVBJlcV/VWmSqt/KCeAoh7WX ol0ZVcSqZ2MJPXj1C8qcj3aiHu0HtbUJ9ZzX7JlnkWqVbVodG06qqhuVPFNoGW3W3mxY gRKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=JHufpCFiR5hyFNaIpQ75Q1+qFFkM6nzfAJw54s+6OLU=; b=remBcRg6OyuEV41KiL8Ov39WHsbwZr3zxw/YgVJqI6+Ar5s34Cev+coRSYzwRySZUI vCNH79DbPsjM10rvcRD3qw1ctBdDUlN22jAaRiSxHK42gF8UNmqSL8oFqP9CCAI4PdfS mDc1pWSAUBuXkcjJ+GgouCAjtDNWZ8OcpnI8SdcPr1nSoJMQZXAt9dJAJDPSSGmQOi5D 3Q8ZkoittxKj/LEoRrCuPuXHOYgCqVHihY8Q32yZlQIj+Qf72DFfbFZwS8SURT12LJR8 pWpZZSmK1afvLrhK8LBkAfVvZlRGUDyo7Hdd/REj3pS+z7NQeahptzy/QGVvzz4a2BGS SvnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=SqYYJelg; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v8si125204plp.215.2019.01.14.03.17.46; Mon, 14 Jan 2019 03:17:47 -0800 (PST) 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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=SqYYJelg; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726941AbfANLRo (ORCPT + 31 others); Mon, 14 Jan 2019 06:17:44 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:45676 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726700AbfANLRm (ORCPT ); Mon, 14 Jan 2019 06:17:42 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x0EBGT4G112775; Mon, 14 Jan 2019 05:16:29 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1547464589; bh=JHufpCFiR5hyFNaIpQ75Q1+qFFkM6nzfAJw54s+6OLU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=SqYYJelg57ob8Fmhsh2hNCfdSJASPGbHEXplrNom2VAiPgy/fZIAnp5BG/NEcwzEr XzN3DjrE8KEUUYiSOWVNvORanjFQmBeCjImlYzdjLe9dbU40oVggNT+KM8Tg1pSflp hfuGOUlmXMrmB0LDwDqd3aGpN1O/F2iTq6m4tPq8= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x0EBGTWj067961 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 14 Jan 2019 05:16:29 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 14 Jan 2019 05:16:29 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Mon, 14 Jan 2019 05:16:29 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x0EBFd1e011560; Mon, 14 Jan 2019 05:16:26 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Lorenzo Pieralisi , Gustavo Pimentel , Alan Douglas , Shawn Lin , Heiko Stuebner CC: Bjorn Helgaas , Jingoo Han , , , , , Subject: [PATCH v2 12/15] PCI: cadence: Remove pci_epf_linkup from Cadence EP driver Date: Mon, 14 Jan 2019 16:45:10 +0530 Message-ID: <20190114111513.21618-13-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190114111513.21618-1-kishon@ti.com> References: <20190114111513.21618-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pci_epf_linkup is intended to be invoked if the EPC supports linkup notification. Now that pci-epf-test uses get_features callback, which indicates Cadence EP driver doesn't support linkup notification, remove pci_epf_linkup from Cadence EP driver. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/controller/pcie-cadence-ep.c | 12 ------------ 1 file changed, 12 deletions(-) -- 2.17.1 diff --git a/drivers/pci/controller/pcie-cadence-ep.c b/drivers/pci/controller/pcie-cadence-ep.c index 14c2545bb17e..def7820cb824 100644 --- a/drivers/pci/controller/pcie-cadence-ep.c +++ b/drivers/pci/controller/pcie-cadence-ep.c @@ -396,18 +396,6 @@ static int cdns_pcie_ep_start(struct pci_epc *epc) cfg |= BIT(epf->func_no); cdns_pcie_writel(pcie, CDNS_PCIE_LM_EP_FUNC_CFG, cfg); - /* - * The PCIe links are automatically established by the controller - * once for all at powerup: the software can neither start nor stop - * those links later at runtime. - * - * Then we only have to notify the EP core that our links are already - * established. However we don't call directly pci_epc_linkup() because - * we've already locked the epc->lock. - */ - list_for_each_entry(epf, &epc->pci_epf, list) - pci_epf_linkup(epf); - return 0; } From patchwork Mon Jan 14 11:15:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 155450 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3537705jaa; Mon, 14 Jan 2019 03:17:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN5+SxPksHU38px5/rVEgF3OSuQk/N/gmjBDU1HHuNx2Q1CWnS5ns/OoVO4RkhXeIgteKq7m X-Received: by 2002:a63:a064:: with SMTP id u36mr12343464pgn.145.1547464670526; Mon, 14 Jan 2019 03:17:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547464670; cv=none; d=google.com; s=arc-20160816; b=dluUr4d2vMlaV7KS7umBMEcAHgI0ZPemB1NLVWk6H2eyzLKNZPI/0jgkHC+V6JV/JP sp/3irpMFvqQZnhe4WRXI2oj91gFvHgNUfO06NWL62bRPSKLDbp1neTPydmjuV3anXTi 69V4Ql9RUzwnQZSZ1FP5WjSzo+D+TttovrdySG69QSTKkGjBCh8hBeFrt35cvn+yksOS BgSJ6JGcpwlGT4OhjUhEqdLDdDlbvIMYfo3KqtO0xBRFnoSVyYW94jsup2JlCIa5VBih LYYZefGwqDbL8cj83sunEnpHRGX5SffgXJRggfgiV4Q/yrp6aMAN6PLH9IhzpBiiHmQY MCnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=XoRGeo3vT25+3Bl/ejetLFYJrvBGa4ChLOy2A0kveqs=; b=uHVoCM5NG7gCp359zadun6FI/J2Qw/EQZAqxPkit7imMLnatWEe+0dfDLRKamc0jB8 zlaprcxXfWHfNnVvbactUHirXZWhIHvNHR/+ZwE4eqVht29/1nEHjmQZV1JgFZBx5GCV gzjs92RO6OlVK+8AI93KOkFETZ0eisEG+2yspuribhfdGQE5ti24C4Mzp5shB4ArGHPB LHw0BZEYpraOjvWPTJQOhAt/UDVPjcYOXPLLoJBhxu/hdAWgDS0bJuJvwKoO7G3gDmZd JnSzar/OH+GUwiS2M5a3i9Y9oIhZmycSNm6mwLhkpVsGAnI/uMyFjJFIdDp3xvezEnA5 obqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=yDmgZeUU; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v8si125204plp.215.2019.01.14.03.17.50; Mon, 14 Jan 2019 03:17:50 -0800 (PST) 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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=yDmgZeUU; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726928AbfANLRn (ORCPT + 31 others); Mon, 14 Jan 2019 06:17:43 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:45670 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726560AbfANLRm (ORCPT ); Mon, 14 Jan 2019 06:17:42 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x0EBGXIv112802; Mon, 14 Jan 2019 05:16:33 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1547464593; bh=XoRGeo3vT25+3Bl/ejetLFYJrvBGa4ChLOy2A0kveqs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=yDmgZeUU5m/+1m15YIGzEMqT9TdBi5AlJiSwvnUD5c650LeI7FvSQEDbWOpz0mS1U Rjh76FrpYXgd9/Ou+8OPg0g+9wQLaUACjchTHY3MIq6w9agw21iDU1WFAnsiq/WCju HUy8y4w2ItqtPLRX7p/VUg8OzGZmf2O/tl/sFdKw= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x0EBGXtf024151 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 14 Jan 2019 05:16:33 -0600 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 14 Jan 2019 05:16:33 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Mon, 14 Jan 2019 05:16:33 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x0EBFd1f011560; Mon, 14 Jan 2019 05:16:30 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Lorenzo Pieralisi , Gustavo Pimentel , Alan Douglas , Shawn Lin , Heiko Stuebner CC: Bjorn Helgaas , Jingoo Han , , , , , Subject: [PATCH v2 13/15] PCI: rockchip: Remove pci_epf_linkup from Rockchip EP driver Date: Mon, 14 Jan 2019 16:45:11 +0530 Message-ID: <20190114111513.21618-14-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190114111513.21618-1-kishon@ti.com> References: <20190114111513.21618-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pci_epf_linkup is intended to be invoked if the EPC supports linkup notification. Now that pci-epf-test uses get_features callback, which indicates Rockchip EP driver doesn't support linkup notification, remove pci_epf_linkup from Rockchip EP driver. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/controller/pcie-rockchip-ep.c | 3 --- 1 file changed, 3 deletions(-) -- 2.17.1 diff --git a/drivers/pci/controller/pcie-rockchip-ep.c b/drivers/pci/controller/pcie-rockchip-ep.c index 9b60ad323ac7..a5d799e2dff2 100644 --- a/drivers/pci/controller/pcie-rockchip-ep.c +++ b/drivers/pci/controller/pcie-rockchip-ep.c @@ -499,9 +499,6 @@ static int rockchip_pcie_ep_start(struct pci_epc *epc) rockchip_pcie_write(rockchip, cfg, PCIE_CORE_PHY_FUNC_CFG); - list_for_each_entry(epf, &epc->pci_epf, list) - pci_epf_linkup(epf); - return 0; } From patchwork Mon Jan 14 11:15:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 155448 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3537400jaa; Mon, 14 Jan 2019 03:17:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN72PovaPGc/+SzbtADsKNDTDgg/gcoIK4lWGBxcT9wqU0PJRFZGA11CjiMgwyHg3ehGh6Tx X-Received: by 2002:a63:42c1:: with SMTP id p184mr22275733pga.202.1547464652086; Mon, 14 Jan 2019 03:17:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547464652; cv=none; d=google.com; s=arc-20160816; b=UHR0GMalPpdEvb1y0neX56VJLijO1L5raFUGwyxz35IpYB333rpvBHqdP5MIwK4N6q DXgq17scYB/6ZwUmDFKo4tU/j1wRoIHVHgHgB3TR3N3IepfjhH9PeXj+Z+LpCJ2dF/Zb HYDNDxGvHMzJZNPVZM1FKIr4EMlnS6CcgHVrJa4wkiMWa7qhIpajmPDUUIEULaoAjJv0 hAmrWESVQU2EZFyIdhfzvOse1EH90ve4CUuHu1+1r4JqjNLAJ3r/mFYUEmhMd38UUzcZ c/327MEs2oc7QaEtltQVNLrJcNxeqFyv+i33daPc7L3Sa5HIPsL/HBmzvACU/lyktquc komA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=f30RSmXMqhsV1n1NfMeTlD3ATOBh5scl1ryG7fV6mJI=; b=eHNrbRBkbh6QxV/CscfRDyYimBKoc8NEh7Yg5WrD6eAHwVOuRhpSHJnNwbQv31xwTi 6NTqg17DxptuIzI+ptCym0x8ceLMEOIxggnCyP2mGlXxyilJwNNJXYKkmNMeBJhYkAL8 FzofRYa34TKrxi1RKUP9+ZubMdDTGgiZ7YNUsBeV07y1xgxnQ+zQPOO/Iai2ppuE4oOw gA+UACfCrTlY2y4yvde5Xz7ApMhZoQ2nmuZy7cmRD670mPibJxb0+zSeFHVqJCNQz0Ot beEPvnXdK/JYFXI1jrZ628jEImfstZd0aVGuKOBOVTfhFsGYLsGpQ4XyrmM+nXvjrfeb EC/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=SE0tiVNd; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g184si107412pfb.288.2019.01.14.03.17.31; Mon, 14 Jan 2019 03:17:32 -0800 (PST) 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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=SE0tiVNd; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726919AbfANLRa (ORCPT + 31 others); Mon, 14 Jan 2019 06:17:30 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:45784 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726905AbfANLR1 (ORCPT ); Mon, 14 Jan 2019 06:17:27 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x0EBGblh003669; Mon, 14 Jan 2019 05:16:37 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1547464597; bh=f30RSmXMqhsV1n1NfMeTlD3ATOBh5scl1ryG7fV6mJI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=SE0tiVNds2+gqS/c938UfuIh4RziUQlz0qIL3A7BOUs4UPPVZsTUrInYOZLGKCRPA AhXMi31NfnwdASFvt8lRbTqLHuaXkMHtz76Sm1Tvsif4QBxMde/Rwz4dL5w0zX7/t/ 8QLsTIPUM4k4wtzNWwAtCXOv0zfW582SCAxJnS6c= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x0EBGbdY068044 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 14 Jan 2019 05:16:37 -0600 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 14 Jan 2019 05:16:37 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Mon, 14 Jan 2019 05:16:37 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x0EBFd1g011560; Mon, 14 Jan 2019 05:16:33 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Lorenzo Pieralisi , Gustavo Pimentel , Alan Douglas , Shawn Lin , Heiko Stuebner CC: Bjorn Helgaas , Jingoo Han , , , , , Subject: [PATCH v2 14/15] PCI: designware-plat: Remove setting epc->features in Designware plat EP driver Date: Mon, 14 Jan 2019 16:45:12 +0530 Message-ID: <20190114111513.21618-15-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190114111513.21618-1-kishon@ti.com> References: <20190114111513.21618-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that pci-epf-test uses get_features callback and dw_plat_pcie_epc_features in Designware plat EP driver already indicates it doesn't support linkup notification and is MSIX capable, remove setting epc->features which is not used anymore by the endpoint function driver. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/controller/dwc/pcie-designware-plat.c | 4 ---- 1 file changed, 4 deletions(-) -- 2.17.1 diff --git a/drivers/pci/controller/dwc/pcie-designware-plat.c b/drivers/pci/controller/dwc/pcie-designware-plat.c index bd0516afc86f..3be87126aef3 100644 --- a/drivers/pci/controller/dwc/pcie-designware-plat.c +++ b/drivers/pci/controller/dwc/pcie-designware-plat.c @@ -70,14 +70,10 @@ static const struct dw_pcie_ops dw_pcie_ops = { static void dw_plat_pcie_ep_init(struct dw_pcie_ep *ep) { struct dw_pcie *pci = to_dw_pcie_from_ep(ep); - struct pci_epc *epc = ep->epc; enum pci_barno bar; for (bar = BAR_0; bar <= BAR_5; bar++) dw_pcie_ep_reset_bar(pci, bar); - - epc->features |= EPC_FEATURE_NO_LINKUP_NOTIFIER; - epc->features |= EPC_FEATURE_MSIX_AVAILABLE; } static int dw_plat_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no, From patchwork Mon Jan 14 11:15:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 155447 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3537362jaa; Mon, 14 Jan 2019 03:17:28 -0800 (PST) X-Google-Smtp-Source: ALg8bN6DK09pgcVDBkw/1SUDqZ2iCtTVLQQbmi/EeoUsO2MgYfjRuZ+nCsqElTLPi+yvTDflz8Mq X-Received: by 2002:a17:902:4464:: with SMTP id k91mr25240740pld.13.1547464648855; Mon, 14 Jan 2019 03:17:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547464648; cv=none; d=google.com; s=arc-20160816; b=VdVFFAfETgEiXH1lM/HyEMU2wJ+bA55NG35c1RRby8CiFL/qzPZtKU1xilBnz5GYAA iC8mndVIYdLGnv2kEDhJ83JG8M3Fo4zLWVtSZxQwRoOfcFo6CHOfCO58yjiUV5zPhe8T 9FNKd6MHxvhZ3tfrgHQUCZFn8nwFFBWPkPwBA2AHlIq8uFj0Al1+khaEJH90lkVGRfLh 6suCUd/dek//cKD5cn9GLfVmMxYgA8wloi7qHrEACrYm4Zom1+YkIg+YBcWFTfkE4Jg9 2Ur6Jjh7vfzr3rlK6WsEZ8/IQzpPQprIbwNkHOKwHSsTUA1UsM4UkObWmYWNRNUz8Mhk Q5aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=4YRXaHedTxJwSOCNaAmkVolcFGYRNrTlux25tJuWNNM=; b=dDFuvs1c2iR6a1JtjQYeN2JZK3tHhD7kVNs59eu29pw979C8Y276XIM2e01Ku7KPLj OaV628cJwK4jTUfCAVCVeEBtubhlWMWQgM9/NoG2hhG+9Ws4M7nxcrmUjKvoLatG16V2 k0FpvL7RZTujFlQXeMKCJgbXKUp+NjTbL2gQAXN6+WEfs+ZliFcOl9pAUUf5TM+Jxu/T C4CTIQkrg3s7pZU4F+OONQZEn9sXLYmJWATrJEgeooqDtF12PIdqHx1aOADqkCTmlue7 E2hnfd6hNPbICdSSW79RAeanRTYAYu2N2pmtD76UPz2RZByTT8UGPbBejibrln21NrYb c8xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=gcveBGTe; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5si113260plr.211.2019.01.14.03.17.28; Mon, 14 Jan 2019 03:17:28 -0800 (PST) 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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=gcveBGTe; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726916AbfANLR1 (ORCPT + 31 others); Mon, 14 Jan 2019 06:17:27 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:47014 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726649AbfANLR0 (ORCPT ); Mon, 14 Jan 2019 06:17:26 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x0EBGfgq065583; Mon, 14 Jan 2019 05:16:41 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1547464601; bh=4YRXaHedTxJwSOCNaAmkVolcFGYRNrTlux25tJuWNNM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=gcveBGTey529UvNcaC9o3tW3u84kkBK4wU+/DXm2dF9gdk3xF06eCWxhlGKJ1FcEG dwFPRC2IO9lnYOIeXeEps8RFrbNKJJIFjgm0OXvcA0HalC2TgGyQmaklEj8VoX8JZT Q1iENKeugJ4Wz+NbfxFxV2B3JUen4U23hQP27fwM= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x0EBGfiD068063 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 14 Jan 2019 05:16:41 -0600 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 14 Jan 2019 05:16:41 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Mon, 14 Jan 2019 05:16:40 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x0EBFd1h011560; Mon, 14 Jan 2019 05:16:37 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Lorenzo Pieralisi , Gustavo Pimentel , Alan Douglas , Shawn Lin , Heiko Stuebner CC: Bjorn Helgaas , Jingoo Han , , , , , Subject: [PATCH v2 15/15] PCI: endpoint: Remove features member in struct pci_epc Date: Mon, 14 Jan 2019 16:45:13 +0530 Message-ID: <20190114111513.21618-16-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190114111513.21618-1-kishon@ti.com> References: <20190114111513.21618-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since EPC features are now implemented using pci_epc_features and all the EPC drivers are moved to using pci_epc_features, remove features member in struct pci_epc and all the helper macros for configuring the features. Signed-off-by: Kishon Vijay Abraham I --- include/linux/pci-epc.h | 9 --------- 1 file changed, 9 deletions(-) -- 2.17.1 diff --git a/include/linux/pci-epc.h b/include/linux/pci-epc.h index 94e1ecff98ce..c3ffa3917f88 100644 --- a/include/linux/pci-epc.h +++ b/include/linux/pci-epc.h @@ -99,7 +99,6 @@ struct pci_epc { struct config_group *group; /* spinlock to protect against concurrent access of EP controller */ spinlock_t lock; - unsigned int features; }; /** @@ -120,14 +119,6 @@ struct pci_epc_features { u64 bar_fixed_size[BAR_5 + 1]; }; -#define EPC_FEATURE_NO_LINKUP_NOTIFIER BIT(0) -#define EPC_FEATURE_BAR_MASK (BIT(1) | BIT(2) | BIT(3)) -#define EPC_FEATURE_MSIX_AVAILABLE BIT(4) -#define EPC_FEATURE_SET_BAR(features, bar) \ - (features |= (EPC_FEATURE_BAR_MASK & (bar << 1))) -#define EPC_FEATURE_GET_BAR(features) \ - ((features & EPC_FEATURE_BAR_MASK) >> 1) - #define to_pci_epc(device) container_of((device), struct pci_epc, dev) #define pci_epc_create(dev, ops) \