From: Jisheng Zhang <jszhang@marvell.com>
To: Fabrice Gasnier <fabrice.gasnier@st.com>
Cc: "jg1.han@samsung.com" <jg1.han@samsung.com>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"Minghuan.Lian@freescale.com" <Minghuan.Lian@freescale.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/2] PCI: designware: use iATU0 for cfg and IO, iATU1 for MEM
Date: Thu, 23 Apr 2015 15:47:00 +0800 [thread overview]
Message-ID: <20150423154700.2f2043c3@xhacker> (raw)
In-Reply-To: <5538A0AE.6050005@st.com>
Hi Fabrice,
On Thu, 23 Apr 2015 00:35:10 -0700
Fabrice Gasnier <fabrice.gasnier@st.com> wrote:
> Hi Jisheng,
>
> On 04/22/2015 02:58 PM, Jisheng Zhang wrote:
> > Most transactions' type are cfg0 and MEM, so the Current iATU usage is not
> > balanced, iATU0 is hot while iATU1 is rarely used. This patch refactors
> > the iATU usage: iATU0 for cfg and IO, iATU1 for MEM. This allocation
> > ideas comes from Minghuan Lian<Minghuan.Lian@freescale.com>:
> >
> > http://www.spinics.net/lists/linux-pci/msg40440.html
> >
> > Signed-off-by: Jisheng Zhang<jszhang@marvell.com>
> > ---
> > drivers/pci/host/pcie-designware.c | 83 +++++++++++++++++++++-----------------
> > 1 file changed, 47 insertions(+), 36 deletions(-)
> >
> > diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> > index 1da1446..bb81c8ad 100644
> > --- a/drivers/pci/host/pcie-designware.c
> > +++ b/drivers/pci/host/pcie-designware.c
> > @@ -508,6 +508,13 @@ int dw_pcie_host_init(struct pcie_port *pp)
> > if (pp->ops->host_init)
> > pp->ops->host_init(pp);
> >
> > + dw_pcie_prog_outbound_atu(pp, PCIE_ATU_REGION_INDEX0,
> > + PCIE_ATU_TYPE_IO, pp->io_mod_base,
> > + pp->io_bus_addr, pp->io_size);
> > + dw_pcie_prog_outbound_atu(pp, PCIE_ATU_REGION_INDEX1,
> > + PCIE_ATU_TYPE_MEM, pp->mem_mod_base,
> > + pp->mem_bus_addr, pp->mem_size);
> > +
> Some platforms doesn't have support for ATU. I think this is the reason
> to have
> rd_other_conf / wr_other_conf ops in the driver.
oops. Thanks for the information. So what about something like:
if (!pp->ops->rd_other_conf) {
dw_pcie_prog_outbound_atu(...);
dw_pcie_prog_outbound_atu(...);
}
Thanks,
Jisheng
> IMO, this is not suitable to have this in the initialization routine for
> all platforms.
>
> Regards,
> Fabrice
prev parent reply other threads:[~2015-04-23 7:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-22 12:58 [PATCH 0/2] PCI: designware: improve iATU programming and usage Jisheng Zhang
2015-04-22 12:58 ` [PATCH 1/2] PCI: designware: consolidate outbound iATU programming functions Jisheng Zhang
2015-04-22 12:58 ` [PATCH 2/2] PCI: designware: use iATU0 for cfg and IO, iATU1 for MEM Jisheng Zhang
2015-04-23 7:35 ` Fabrice Gasnier
2015-04-23 7:47 ` Jisheng Zhang [this message]
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=20150423154700.2f2043c3@xhacker \
--to=jszhang@marvell.com \
--cc=Minghuan.Lian@freescale.com \
--cc=bhelgaas@google.com \
--cc=fabrice.gasnier@st.com \
--cc=jg1.han@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/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).