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.mur...@arm.com>
> > Signed-off-by: Liviu Dudau <liviu.du...@arm.com>
> > Signed-off-by: Thomas Petazzoni <thomas.petazz...@free-electrons.com>
> 
> Tested-by: Thierry Reding <thierry.red...@avionic-design.de>

It works properly with Exynos5440.

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



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to