mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jingoo Han <jg1.han@samsung.com>
To: "'Thierry Reding'" <thierry.reding@avionic-design.de>,
	"'Andrew Murray'" <Andrew.Murray@arm.com>
Cc: "'Bjorn Helgaas'" <bhelgaas@google.com>,
	"'Grant Likely'" <grant.likely@secretlab.ca>,
	"'Russell King - ARM Linux'" <linux@arm.linux.org.uk>,
	"'Thomas Petazzoni'" <thomas.petazzoni@free-electrons.com>,
	"'Kukjin Kim'" <kgene.kim@samsung.com>,
	"'Jason Gunthorpe'" <jgunthorpe@obsidianresearch.com>,
	linux-samsung-soc@vger.kernel.org,
	"'Siva Reddy Kallam'" <siva.kallam@samsung.com>,
	linux-pci@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	linux-kernel@vger.kernel.org,
	"'Surendranath Gurivireddy Balla'" <suren.reddy@samsung.com>,
	"'Thomas Abraham'" <thomas.abraham@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	"'Arnd Bergmann'" <arnd@arndb.de>,
	"'Liviu Dudau'" <Liviu.Dudau@arm.com>,
	"'Jingoo Han'" <jg1.han@samsung.com>
Subject: Re: [PATCH v3] of/pci: Provide support for parsing PCI DT ranges property
Date: Thu, 04 Apr 2013 09:57:34 +0900	[thread overview]
Message-ID: <002b01ce30cf$64da6180$2e8f2480$%han@samsung.com> (raw)
In-Reply-To: <20130327130418.GA10480@avionic-0098.mockup.avionic-design.de>

On Wednesday, March 27, 2013 10:04 PM, Thierry Reding wrote:
> 
> On Tue, Mar 26, 2013 at 04:20:23PM +0000, Andrew Murray wrote:
> > This patch factors out common implementation patterns to reduce overall kernel
> > code and provide a means for host bridge drivers to directly obtain struct
> > resources from the DT's ranges property without relying on architecture specific
> > DT handling. This will make it easier to write archiecture independent host bridge
> > drivers and mitigate against further duplication of DT parsing code.
> >
> > This patch can be used in the following way:
> >
> > 	struct of_pci_range_parser parser;
> > 	struct of_pci_range range;
> >
> > 	if (of_pci_range_parser(&parser, np))
> > 		; //no ranges property
> >
> > 	for_each_of_pci_range(&parser, &range) {
> >
> > 		/*
> > 			directly access properties of the address range, e.g.:
> > 			range.pci_space, range.pci_addr, range.cpu_addr,
> > 			range.size, range.flags
> >
> > 			alternatively obtain a struct resource, e.g.:
> > 			struct resource res;
> > 			of_pci_range_to_resource(&range, np, &res);
> > 		*/
> > 	}
> >
> > Additionally the implementation takes care of adjacent ranges and merges them
> > into a single range (as was the case with powerpc and microblaze).
> >
> > The modifications to microblaze, mips and powerpc have not been tested.
> >
> > Signed-off-by: Andrew Murray <Andrew.Murray@arm.com>
> > Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> Tested-by: Thierry Reding <thierry.reding@avionic-design.de>

It works properly with Exynos5440.

Tested-by: Jingoo Han <jg1.han@samsung.com>




  reply	other threads:[~2013-04-04  0:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-26 16:20 Andrew Murray
2013-03-27 13:04 ` Thierry Reding
2013-04-04  0:57   ` Jingoo Han [this message]
2013-04-08 14:33 Andrew Murray
2013-04-08 16:58 ` 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='002b01ce30cf$64da6180$2e8f2480$%han@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=Andrew.Murray@arm.com \
    --cc=Liviu.Dudau@arm.com \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --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=siva.kallam@samsung.com \
    --cc=suren.reddy@samsung.com \
    --cc=thierry.reding@avionic-design.de \
    --cc=thomas.abraham@linaro.org \
    --cc=thomas.petazzoni@free-electrons.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

Powered by JetHome