From: Gabriel FERNANDEZ <gabriel.fernandez@st.com>
To: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Srinivas Kandagatla <srinivas.kandagatla@gmail.com>,
Maxime Coquelin <maxime.coquelin@st.com>,
Patrice Chotard <patrice.chotard@st.com>,
Russell King <linux@arm.linux.org.uk>,
Bjorn Helgaas <bhelgaas@google.com>,
Mohit Kumar <mohit.kumar@st.com>,
Jingoo Han <jg1.han@samsung.com>,
Grant Likely <grant.likely@linaro.org>,
Gabriel Fernandez <gabriel.fernandez@linaro.org>,
Fabrice Gasnier <fabrice.gasnier@st.com>,
Arnd Bergmann <arnd@arndb.de>,
Viresh Kumar <viresh.kumar@linaro.org>,
Thierry Reding <treding@nvidia.com>,
Minghuan Lian <Minghuan.Lian@freescale.com>,
Magnus Damm <damm@opensource.se>,
Will Deacon <will.deacon@arm.com>,
Tanmay Inamdar <tinamdar@apm.com>, Murali Karicheri <m-karic>
Cc: devicetree@vger.kernel.org, kernel@stlinux.com,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Lee Jones <lee.jones@linaro.org>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] PCI: designware: Add setup bus-related to pcie_host_ops
Date: Wed, 17 Dec 2014 11:34:45 +0100 [thread overview]
Message-ID: <1418812486-12394-5-git-send-email-gabriel.fernandez@linaro.org> (raw)
In-Reply-To: <1418812486-12394-1-git-send-email-gabriel.fernandez@linaro.org>
ST sti SoCs PCIe IPs are built around DesignWare IP Core.
But in these SoCs PCIe IP doesn't support IO.
To support this, add setup_bus() to pcie_host_ops.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@linaro.org>
---
drivers/pci/host/pcie-designware.c | 3 +++
drivers/pci/host/pcie-designware.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index df781cd..98e19bc 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -719,6 +719,9 @@ static int dw_pcie_setup(int nr, struct pci_sys_data *sys)
pci_add_resource_offset(&sys->resources, &pp->mem, sys->mem_offset);
pci_add_resource(&sys->resources, &pp->busn);
+ if (pp->ops->setup_bus)
+ pp->ops->setup_bus(pp, sys);
+
return 1;
}
diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h
index d0bbd27..5c13de7 100644
--- a/drivers/pci/host/pcie-designware.h
+++ b/drivers/pci/host/pcie-designware.h
@@ -73,6 +73,7 @@ struct pcie_host_ops {
u32 (*get_msi_addr)(struct pcie_port *pp);
u32 (*get_msi_data)(struct pcie_port *pp, int pos);
void (*scan_bus)(struct pcie_port *pp);
+ void (*setup_bus)(struct pcie_port *pp, struct pci_sys_data *sys);
int (*msi_host_init)(struct pcie_port *pp, struct msi_controller *chip);
};
--
1.9.1
next prev parent reply other threads:[~2014-12-17 10:34 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 10:34 [PATCH 0/5] PCI: st: provide support for dw pcie Gabriel FERNANDEZ
2014-12-17 10:34 ` [PATCH 1/5] ARM: STi: Kconfig update for PCIe support Gabriel FERNANDEZ
2014-12-17 10:34 ` [PATCH 2/5] PCI: st: Add Device Tree bindings for sti pcie Gabriel FERNANDEZ
2014-12-17 22:01 ` Arnd Bergmann
2015-01-19 12:36 ` Gabriel Fernandez
2015-01-19 13:04 ` Gabriel Fernandez
2014-12-22 4:45 ` Pratyush Anand
2014-12-17 10:34 ` [PATCH 3/5] PCI: st: Provide support for the sti PCIe controller Gabriel FERNANDEZ
2014-12-17 22:14 ` Arnd Bergmann
2015-01-19 12:37 ` Gabriel Fernandez
2015-01-19 13:49 ` Arnd Bergmann
2015-01-21 15:47 ` Gabriel Fernandez
[not found] ` <CAG374jCRByNZuuYxi5+-mKvV7p5-tCf2G+8mTYfzU4rRV4yfYQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-21 19:35 ` Arnd Bergmann
2015-01-21 19:59 ` Lucas Stach
2015-01-19 13:08 ` Gabriel Fernandez
[not found] ` <1418812486-12394-4-git-send-email-gabriel.fernandez-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-12-18 6:03 ` Jingoo Han
2015-01-19 12:38 ` Gabriel Fernandez
[not found] ` <000f01d01a88$60405e50$20c11af0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-19 13:06 ` Gabriel Fernandez
2014-12-22 5:12 ` Pratyush Anand
2015-01-12 18:43 ` Bjorn Helgaas
2015-01-21 15:32 ` Gabriel Fernandez
2014-12-17 10:34 ` Gabriel FERNANDEZ [this message]
2014-12-17 22:16 ` [PATCH 4/5] PCI: designware: Add setup bus-related to pcie_host_ops Arnd Bergmann
2014-12-18 4:58 ` Jingoo Han
2015-01-19 12:38 ` Gabriel Fernandez
2015-01-19 13:54 ` Arnd Bergmann
2015-01-19 15:46 ` Lorenzo Pieralisi
2015-01-19 13:09 ` Gabriel Fernandez
2014-12-17 10:34 ` [PATCH 5/5] PCI: st: disable IO support Gabriel FERNANDEZ
2014-12-17 14:01 ` One Thousand Gnomes
2015-01-21 15:49 ` Gabriel Fernandez
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=1418812486-12394-5-git-send-email-gabriel.fernandez@linaro.org \
--to=gabriel.fernandez@st.com \
--cc=Minghuan.Lian@freescale.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=damm@opensource.se \
--cc=devicetree@vger.kernel.org \
--cc=fabrice.gasnier@st.com \
--cc=gabriel.fernandez@linaro.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jg1.han@samsung.com \
--cc=kernel@stlinux.com \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=maxime.coquelin@st.com \
--cc=mohit.kumar@st.com \
--cc=patrice.chotard@st.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@gmail.com \
--cc=tinamdar@apm.com \
--cc=treding@nvidia.com \
--cc=viresh.kumar@linaro.org \
--cc=will.deacon@arm.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).