From: Pratyush Anand <panand@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: mohit.kumar@st.com, jg1.han@samsung.com, l.stach@pengutronix.de,
shawn.guo@freescale.com, linux-pci@vger.kernel.org,
devicetree@vger.kernel.org,
Kishon Vijay Abraham I <kishon@ti.com>,
Sean Cross <xobs@kosagi.com>,
Murali Karicheri <m-karicheri2@ti.com>,
Minghuan Lian <Minghuan.Lian@freescale.com>
Subject: Re: [PATCH] PCIe: Designware: Do not allow config space through ranges
Date: Tue, 23 Dec 2014 08:24:50 +0530 [thread overview]
Message-ID: <5498D97A.8030105@redhat.com> (raw)
In-Reply-To: <5459567.EisgEvQXh9@wuerfel>
On Monday 22 December 2014 02:00 PM, Arnd Bergmann wrote:
> On Monday 22 December 2014 12:09:04 Pratyush Anand wrote:
>> Config space is need to be allocated using reg property. This patch
>> removes possibility of config space allocation through ranges property.
>>
>> To: Mohit Kumar <mohit.kumar@st.com>
>> To: Jingo Han <jg1.han@samsung.com>
>> To: Lucas Stach <l.stach@pengutronix.de>
>> To: Shawn Guo <shawn.guo@freescale.com>
>> Cc: linux-pci@vger.kernel.org
>> Cc: devicetree@vger.kernel.org
>> Signed-off-by: Pratyush Anand <panand@redhat.com>
>> ---
>> arch/arm/boot/dts/imx6qdl.dtsi | 3 +--
>> arch/arm/boot/dts/imx6sx.dtsi | 8 ++++----
>
> changing the DT files is probably ok.
>
>> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
>> index df781cdf13c1..0b22b42e1ff9 100644
>> --- a/drivers/pci/host/pcie-designware.c
>> +++ b/drivers/pci/host/pcie-designware.c
>> @@ -409,19 +409,6 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
>> pp->mem_mod_base = of_read_number(parser.range -
>> parser.np + na, ns);
>> }
>> - if (restype == 0) {
>> - of_pci_range_to_resource(&range, np, &pp->cfg);
>> - pp->cfg0_size = resource_size(&pp->cfg)/2;
>> - pp->cfg1_size = resource_size(&pp->cfg)/2;
>> - pp->cfg0_base = pp->cfg.start;
>> - pp->cfg1_base = pp->cfg.start + pp->cfg0_size;
>> -
>> - /* Find the untranslated configuration space address */
>> - pp->cfg0_mod_base = of_read_number(parser.range -
>> - parser.np + na, ns);
>> - pp->cfg1_mod_base = pp->cfg0_mod_base +
>> - pp->cfg0_size;
>> - }
>> }
>
> Since we've allowed this for so long, it may be better to leave this
> in for compatibility with old dts files. It would however be good to
> print a warning message. We could also limit it to those machines that
> are known to have been used with this property in the past.
I think, only imx6 is using "config from ranges", for which I made the
change in this patch. Modification need to be tested and acked by IMX6
maintainers.
I do not see any other driver using it. However, I have kept all
designware user in CC here.
~Pratyush
>
> Arnd
>
next prev parent reply other threads:[~2014-12-23 2:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-22 6:39 [PATCH] PCIe: Designware: Do not allow config space through ranges Pratyush Anand
2014-12-22 8:30 ` Arnd Bergmann
2014-12-23 2:54 ` Pratyush Anand [this message]
2014-12-23 20:31 ` Arnd Bergmann
2015-01-05 9:39 ` Lucas Stach
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=5498D97A.8030105@redhat.com \
--to=panand@redhat.com \
--cc=Minghuan.Lian@freescale.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=jg1.han@samsung.com \
--cc=kishon@ti.com \
--cc=l.stach@pengutronix.de \
--cc=linux-pci@vger.kernel.org \
--cc=m-karicheri2@ti.com \
--cc=mohit.kumar@st.com \
--cc=shawn.guo@freescale.com \
--cc=xobs@kosagi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.