devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robherring2@gmail.com>
To: Andrew Murray <Andrew.Murray@arm.com>
Cc: rob.herring@calxeda.com, siva.kallam@samsung.com,
	linux-pci@vger.kernel.org, Liviu.Dudau@arm.com, paulus@samba.org,
	linux-samsung-soc@vger.kernel.org, linux@arm.linux.org.uk,
	jg1.han@samsung.com, jgunthorpe@obsidianresearch.com,
	devicetree-discuss@lists.ozlabs.org, kgene.kim@samsung.com,
	bhelgaas@google.com, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, suren.reddy@samsung.com,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Michal Simek <monstr@monstr.eu>
Subject: Re: [PATCH v5 1/3] of/pci: Unify pci_process_bridge_OF_ranges from Microblaze and PowerPC
Date: Wed, 10 Apr 2013 08:13:54 -0500	[thread overview]
Message-ID: <51656592.7070806@gmail.com> (raw)
In-Reply-To: <1365578969-30966-2-git-send-email-Andrew.Murray@arm.com>

Adding Ben H and Michal...

On 04/10/2013 02:29 AM, Andrew Murray wrote:
> The pci_process_bridge_OF_ranges function, used to parse the "ranges"
> property of a PCI host device, is found in both Microblaze and PowerPC
> architectures. These implementations are nearly identical. This patch
> moves this common code to a common place.
> 
> Signed-off-by: Andrew Murray <Andrew.Murray@arm.com>
> Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>

One comment below. Otherwise,

Reviewed-by: Rob Herring <rob.herring@calxeda.com>

You need also need acks from Ben and Michal.

[...]

> +		/* Act based on address space type */
> +		res = NULL;
> +		switch ((pci_space >> 24) & 0x3) {
> +		case 1:		/* PCI IO space */
> +			pr_info("  IO 0x%016llx..0x%016llx -> 0x%016llx\n",
> +			       cpu_addr, cpu_addr + size - 1, pci_addr);
> +
> +			/* We support only one IO range */
> +			if (hose->pci_io_size) {
> +				pr_info(" \\--> Skipped (too many) !\n");
> +				continue;
> +			}
> +#if defined(CONFIG_PPC32) || defined(CONFIG_MICROBLAZE)

How about "if (!IS_ENABLED(CONFIG_64BIT))" instead.

> +			/* On 32 bits, limit I/O space to 16MB */
> +			if (size > 0x01000000)
> +				size = 0x01000000;
> +
> +			/* 32 bits needs to map IOs here */
> +			hose->io_base_virt = ioremap(cpu_addr, size);
> +
> +			/* Expect trouble if pci_addr is not 0 */
> +			if (primary)
> +				isa_io_base =
> +					(unsigned long)hose->io_base_virt;
> +#endif /* CONFIG_PPC32 || CONFIG_MICROBLAZE */
> +			/* pci_io_size and io_base_phys always represent IO
> +			 * space starting at 0 so we factor in pci_addr
> +			 */
> +			hose->pci_io_size = pci_addr + size;
> +			hose->io_base_phys = cpu_addr - pci_addr;

  reply	other threads:[~2013-04-10 13:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10  7:29 [PATCH v5 0/3] of/pci: Provide common support for PCI DT parsing Andrew Murray
     [not found] ` <1365578969-30966-1-git-send-email-Andrew.Murray-5wv7dgnIgG8@public.gmane.org>
2013-04-10  7:29   ` [PATCH v5 1/3] of/pci: Unify pci_process_bridge_OF_ranges from Microblaze and PowerPC Andrew Murray
2013-04-10 13:13     ` Rob Herring [this message]
2013-04-10 21:30       ` Thomas Petazzoni
2013-04-11 16:57         ` Linus Walleij
     [not found]       ` <51656592.7070806-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-04-11 12:03         ` Andrew Murray
2013-04-10 21:33     ` Thomas Petazzoni
2013-04-11 12:12       ` Andrew Murray
     [not found]         ` <20130411121242.GB28981-5wv7dgnIgG8@public.gmane.org>
2013-04-11 15:28           ` Thomas Petazzoni
2013-04-10  7:29   ` [PATCH v5 2/3] of/pci: Provide support for parsing PCI DT ranges property Andrew Murray
     [not found]     ` <1365578969-30966-3-git-send-email-Andrew.Murray-5wv7dgnIgG8@public.gmane.org>
2013-04-10 18:26       ` Rob Herring
     [not found]         ` <5165AEBA.7000803-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-04-11 13:11           ` Andrew Murray
2013-04-10  7:29   ` [PATCH v5 3/3] of/pci: mips: convert to common of_pci_range_parser Andrew Murray
2013-04-10 18:28     ` Rob Herring

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=51656592.7070806@gmail.com \
    --to=robherring2@gmail.com \
    --cc=Andrew.Murray@arm.com \
    --cc=Liviu.Dudau@arm.com \
    --cc=benh@kernel.crashing.org \
    --cc=bhelgaas@google.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=jg1.han@samsung.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=monstr@monstr.eu \
    --cc=paulus@samba.org \
    --cc=rob.herring@calxeda.com \
    --cc=siva.kallam@samsung.com \
    --cc=suren.reddy@samsung.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).