public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: bhelgaas@google•com (Bjorn Helgaas)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 3/3] pci: add DT based ARM Versatile PCI host driver
Date: Thu, 24 Apr 2014 17:24:31 -0600	[thread overview]
Message-ID: <20140424232431.GO29593@google.com> (raw)
In-Reply-To: <1395960398-4238-4-git-send-email-robherring2@gmail.com>

On Thu, Mar 27, 2014 at 05:46:38PM -0500, Rob Herring wrote:
> From: Rob Herring <robh@kernel•org>
> 
> This converts the Versatile PCI host code to a platform driver using
> of_create_pci_host_bridge for parsing DT and setup.
> 
> I think more of this setup could be done by the core code. There are
> accesses to the host's config space (accesses using local_pci_cfg_base)
> which seem like they could be done by the core code or using standard
> config space accessors. The problem is bridge->bus->self is needed, but
> it does not get setup. I'm not exactly sure how that should work.
> 
> Signed-off-by: Rob Herring <robh@kernel•org>
> Cc: Bjorn Helgaas <bhelgaas@google•com>
> ...

> +static int versatile_pci_probe(struct platform_device *pdev)
> +{
> +	struct resource *res;
> +	int ret, i, mem = 1, myslot = -1;
> +	unsigned int lastbus;
> +	u32 val;
> +	struct pci_host_bridge *bridge;
> +	void __iomem *local_pci_cfg_base;
> +
> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +	if (!res)
> +		return -ENODEV;
> +	versatile_pci_base = devm_ioremap_resource(&pdev->dev, res);
> +
> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> +	if (!res)
> +		return -ENODEV;
> +	versatile_cfg_base[0] = devm_ioremap_resource(&pdev->dev, res);
> +
> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
> +	if (!res)
> +		return -ENODEV;
> +	versatile_cfg_base[1] = devm_ioremap_resource(&pdev->dev, res);
> +
> +	bridge = of_create_pci_host_bridge(&pdev->dev, &pci_versatile_ops, &sys);

Are we still relying on the PCI core to default to a bus number range of
00-ff?  Can we not do that?

Bjorn

  reply	other threads:[~2014-04-24 23:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27 22:46 [PATCH 0/3] Versatile PCI DT support Rob Herring
2014-03-27 22:46 ` [PATCH 1/3] ARM: hackup pcibios support for commmon bridge code Rob Herring
2014-04-24 23:20   ` Bjorn Helgaas
2014-04-24 23:54     ` Rob Herring
2014-03-27 22:46 ` [PATCH 2/3] dt/bindings: add versatile PCI binding Rob Herring
2014-03-27 22:46 ` [PATCH 3/3] pci: add DT based ARM Versatile PCI host driver Rob Herring
2014-04-24 23:24   ` Bjorn Helgaas [this message]
2014-04-24 23:37     ` Rob Herring
2014-04-25  0:06       ` Bjorn Helgaas
2014-03-28 11:46 ` [PATCH 0/3] Versatile PCI DT support Liviu Dudau
2014-04-24 23:10 ` 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=20140424232431.GO29593@google.com \
    --to=bhelgaas@google$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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