From: Bjorn Helgaas <bhelgaas@google.com>
To: Joao Pinto <jpinto@synopsys.com>,
Pratyush Anand <pratyush.anand@gmail.com>
Cc: Jingoo Han <jingoohan1@gmail.com>,
Krzysztof Kozlowski <k.kozlowski@samsung.com>,
Kukjin Kim <kgene@kernel.org>,
linux-samsung-soc@vger.kernel.org, linux-pci@vger.kernel.org
Subject: [PATCH v2 05/10] PCI: designware: Export dw_pcie_readl_rc(), dw_pcie_writel_rc()
Date: Wed, 12 Oct 2016 08:18:23 -0500 [thread overview]
Message-ID: <20161012131823.26443.73009.stgit@bhelgaas-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <20161012131616.26443.89407.stgit@bhelgaas-glaptop2.roam.corp.google.com>
Export dw_pcie_readl_rc() and dw_pcie_writel_rc(). Many other drivers can
use these instead of implementing their own versions. No functional change
intended.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/pci/host/pcie-designware.c | 4 ++--
drivers/pci/host/pcie-designware.h | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index f91c7b3..b8feea4 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -141,7 +141,7 @@ int dw_pcie_cfg_write(void __iomem *addr, int size, u32 val)
return PCIBIOS_SUCCESSFUL;
}
-static inline u32 dw_pcie_readl_rc(struct pcie_port *pp, u32 reg)
+u32 dw_pcie_readl_rc(struct pcie_port *pp, u32 reg)
{
if (pp->ops->readl_rc)
return pp->ops->readl_rc(pp, reg);
@@ -149,7 +149,7 @@ static inline u32 dw_pcie_readl_rc(struct pcie_port *pp, u32 reg)
return readl(pp->dbi_base + reg);
}
-static inline void dw_pcie_writel_rc(struct pcie_port *pp, u32 reg, u32 val)
+void dw_pcie_writel_rc(struct pcie_port *pp, u32 reg, u32 val)
{
if (pp->ops->writel_rc)
pp->ops->writel_rc(pp, reg, val);
diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h
index c413848..a567ea2 100644
--- a/drivers/pci/host/pcie-designware.h
+++ b/drivers/pci/host/pcie-designware.h
@@ -72,6 +72,8 @@ struct pcie_host_ops {
int (*msi_host_init)(struct pcie_port *pp, struct msi_controller *chip);
};
+u32 dw_pcie_readl_rc(struct pcie_port *pp, u32 reg);
+void dw_pcie_writel_rc(struct pcie_port *pp, u32 reg, u32 val);
int dw_pcie_cfg_read(void __iomem *addr, int size, u32 *val);
int dw_pcie_cfg_write(void __iomem *addr, int size, u32 val);
irqreturn_t dw_handle_msi_irq(struct pcie_port *pp);
next prev parent reply other threads:[~2016-10-12 13:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-12 13:17 [PATCH v2 00/10] PCI: designware: Cleanups Bjorn Helgaas
2016-10-12 13:17 ` [PATCH v2 01/10] PCI: designware: Rename dw_pcie_valid_config() to dw_pcie_valid_device() Bjorn Helgaas
2016-10-12 13:17 ` [PATCH v2 02/10] PCI: designware: Simplify dw_pcie_readl_unroll(), dw_pcie_writel_unroll() Bjorn Helgaas
2016-10-12 13:18 ` [PATCH v2 03/10] PCI: designware: Simplify pcie_host_ops.readl_rc() and .writel_rc() interfaces Bjorn Helgaas
2016-10-12 13:18 ` [PATCH v2 04/10] PCI: designware: Swap order of dw_pcie_writel_rc() reg/val arguments Bjorn Helgaas
2016-10-12 13:18 ` Bjorn Helgaas [this message]
2016-10-12 13:18 ` [PATCH v2 06/10] PCI: designware: Uninline register accessors Bjorn Helgaas
2016-10-12 13:18 ` [PATCH v2 07/10] PCI: designware: Swap order of dw_pcie_writel_unroll() reg/val arguments Bjorn Helgaas
2016-10-12 13:18 ` [PATCH v2 08/10] PCI: designware-plat: Remove redundant dw_plat_pcie.mem_base Bjorn Helgaas
2016-10-12 13:18 ` [PATCH v2 09/10] PCI: designware-plat: Add local struct device pointers Bjorn Helgaas
2016-10-12 13:19 ` [PATCH v2 10/10] PCI: designware-plat: Remove unused platform data Bjorn Helgaas
2016-10-12 16:04 ` [PATCH v2 00/10] PCI: designware: Cleanups Bjorn Helgaas
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=20161012131823.26443.73009.stgit@bhelgaas-glaptop2.roam.corp.google.com \
--to=bhelgaas@google.com \
--cc=jingoohan1@gmail.com \
--cc=jpinto@synopsys.com \
--cc=k.kozlowski@samsung.com \
--cc=kgene@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=pratyush.anand@gmail.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).