linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pratyush Anand <pratyush.anand@gmail.com>
To: Murali Karicheri <m-karicheri2@ti.com>, Jingoo Han <jg1.han@samsung.com>
Cc: Lucas Stach <l.stach@pengutronix.de>,
	KISHON VIJAY <kishon@ti.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	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>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Mohit ST <mohit.kumar.dhaka@gmail.com>
Subject: Re: [RFC] PCI: designware: missing *config* reg space
Date: Sun, 10 May 2015 18:24:11 +0530	[thread overview]
Message-ID: <CAHM4w1krq0vHd6EMpKV-NhHGggDBrrDGZw=V3XLcQDZ7XsXbsQ@mail.gmail.com> (raw)
In-Reply-To: <553E9B9A.5090000@ti.com>

On Tue, Apr 28, 2015 at 1:57 AM, Murali Karicheri <m-karicheri2@ti.com> wrote:
> All,
>
> I would like to take action to resolve the following print message thrown by
> PCI designware core driver when kernel boots up on Keystone.
>
> [    0.415778] keystone-pcie 21801000.pcie: missing *config* reg space
>
> As per DT documentation introduced by commit
> 4dd964df36d0e548e1806ec2ec275b62d4dc46e8 "PCI: designware: Look for
> configuration space in 'reg', not 'ranges'
>
> This is introduced to stop abusing the range property for defining resource
> for config space. However if the device binding doesn't have
> reg-name = "config" defined, this throws out an unnecessary log message
> at boot which seems to me not right. AFAIK, reg-names is not mandatory.
> config space address in Keystone case is defined using index. So for
> keystone this needs to be fixed.
>
> I propose to add the following check in the designware code to address
> this. Keystone uses an older version of the Designware IP and doesn't have
> the ATU support. So va_cfg0_base and va_cfg1_base are already set up in
> ks_dw_pcie_host_init() before calling dw_pcie_host_init() and points to the
> remote config space address (both same for keystone). I think for other DW
> drivers, these variables are NULL. So add a check and avoid this error
> message for Keystone. Any comments?
>

or may be just following one liner should do the job for you.

diff --git a/drivers/pci/host/pcie-designware.c
b/drivers/pci/host/pcie-designware.c
index 2e9f84fdd9ce..4ff5308f0cc6 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -371,7 +371,7 @@ int dw_pcie_host_init(struct pcie_port *pp)
                addrp = of_get_address(np, index, NULL, NULL);
                pp->cfg0_mod_base = of_read_number(addrp, ns);
                pp->cfg1_mod_base = pp->cfg0_mod_base + pp->cfg0_size;
-       } else {
+       } else if (!pp->va_cfg0_base) {
                dev_err(pp->dev, "missing *config* reg space\n");
        }


~Pratyush

  reply	other threads:[~2015-05-10 12:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27 20:27 [RFC] PCI: designware: missing *config* reg space Murali Karicheri
2015-05-10 12:54 ` Pratyush Anand [this message]
2015-05-11 18:11   ` Murali Karicheri

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='CAHM4w1krq0vHd6EMpKV-NhHGggDBrrDGZw=V3XLcQDZ7XsXbsQ@mail.gmail.com' \
    --to=pratyush.anand@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --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=mark.rutland@arm.com \
    --cc=mohit.kumar.dhaka@gmail.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@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).