From: Andrew Murray <Andrew.Murray-5wv7dgnIgG8@public.gmane.org>
To: linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Cc: siva.kallam-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Liviu.Dudau-5wv7dgnIgG8@public.gmane.org,
paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org,
kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
suren.reddy-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
Andrew Murray <Andrew.Murray-5wv7dgnIgG8@public.gmane.org>
Subject: [PATCH v7 0/3] of/pci: Provide common support for PCI DT parsing
Date: Tue, 16 Apr 2013 11:18:25 +0100 [thread overview]
Message-ID: <1366107508-12672-1-git-send-email-Andrew.Murray@arm.com> (raw)
This patchset factors out duplicated code associated with parsing PCI
DT "ranges" properties across the architectures and introduces a
"ranges" parser. This parser "of_pci_range_parser" can be used directly
by ARM host bridge drivers enabling them to obtain ranges from device
trees.
I've included the Reviewed-by and Tested-by's received from v5/v6 in this
patchset, earlier versions of this patchset (v3) have been tested-by:
Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
I've tested that this patchset builds and runs on ARM and that it builds on
PowerPC and x86_64.
Compared to the v6 sent by Andrew Murray, the following changes have
been made in response to build errors/warnings:
* Inclusion of linux/of_address.h in of_pci.c as suggested by Michal
Simek to prevent compilation failures on Microblaze (and others) and his
ack.
* Use of externs, static inlines and a typo in linux/of_address.h in response
to linker errors (multiple defination) on x86_64 as spotted by a kbuild test
robot on (jcooper/linux.git mvebu/drivers)
* Add EXPORT_SYMBOL_GPL to of_pci_range_parser function to be consistent
with of_pci_process_ranges function
Compared to the v5 sent by Andrew Murray, the following changes have
been made:
* Use of CONFIG_64BIT instead of CONFIG_[a32bitarch] as suggested by
Rob Herring in drivers/of/of_pci.c
* Added forward declaration of struct pci_controller in linux/of_pci.h
to prevent compiler warning as suggested by Thomas Petazzoni
* Improved error checking (!range check), removal of unnecessary be32_to_cpup
call, improved formatting of struct of_pci_range_parser layout and
replacement of macro with a static inline. All suggested by Rob Herring.
Compared to the v4 (incorrectly labelled v3) sent by Andrew Murray,
the following changes have been made:
* Split the patch as suggested by Rob Herring
Compared to the v3 sent by Andrew Murray, the following changes have
been made:
* Unify and move duplicate pci_process_bridge_OF_ranges functions to
drivers/of/of_pci.c as suggested by Rob Herring
* Fix potential build errors with Microblaze/MIPS
Compared to "[PATCH v5 01/17] of/pci: Provide support for parsing PCI DT
ranges property", the following changes have been made:
* Correct use of IORESOURCE_* as suggested by Russell King
* Improved interface and naming as suggested by Thierry Reding
Compared to the v2 sent by Andrew Murray, Thomas Petazzoni did:
* Add a memset() on the struct of_pci_range_iter when starting the
for loop in for_each_pci_range(). Otherwise, with an uninitialized
of_pci_range_iter, of_pci_process_ranges() may crash.
* Add parenthesis around 'res', 'np' and 'iter' in the
for_each_of_pci_range macro definitions. Otherwise, passing
something like &foobar as 'res' didn't work.
* Rebased on top of 3.9-rc2, which required fixing a few conflicts in
the Microblaze code.
v2:
This follows on from suggestions made by Grant Likely
(marc.info/?l=linux-kernel&m=136079602806328)
Andrew Murray (3):
of/pci: Unify pci_process_bridge_OF_ranges from Microblaze and
PowerPC
of/pci: Provide support for parsing PCI DT ranges property
of/pci: mips: convert to common of_pci_range_parser
arch/microblaze/include/asm/pci-bridge.h | 5 +-
arch/microblaze/pci/pci-common.c | 192 ------------------------------
arch/mips/pci/pci.c | 50 +++------
arch/powerpc/include/asm/pci-bridge.h | 5 +-
arch/powerpc/kernel/pci-common.c | 192 ------------------------------
drivers/of/address.c | 67 +++++++++++
drivers/of/of_pci.c | 169 ++++++++++++++++++++++++++
include/linux/of_address.h | 46 +++++++
include/linux/of_pci.h | 4 +
9 files changed, 304 insertions(+), 426 deletions(-)
next reply other threads:[~2013-04-16 10:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 10:18 Andrew Murray [this message]
2013-04-16 10:18 ` [PATCH v7 1/3] of/pci: Unify pci_process_bridge_OF_ranges from Microblaze and PowerPC Andrew Murray
[not found] ` <1366107508-12672-2-git-send-email-Andrew.Murray-5wv7dgnIgG8@public.gmane.org>
2013-04-16 10:30 ` Andrew Murray
2013-04-17 16:00 ` Grant Likely
2013-04-17 16:10 ` Jason Cooper
2013-04-17 16:17 ` Grant Likely
2013-04-17 16:22 ` Jason Cooper
[not found] ` <20130417162223.GC27197-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2013-04-18 12:48 ` Grant Likely
2013-04-18 13:06 ` Jason Cooper
2013-04-16 10:18 ` [PATCH v7 2/3] of/pci: Provide support for parsing PCI DT ranges property Andrew Murray
2013-04-18 13:44 ` Grant Likely
2013-04-18 14:24 ` Andrew Murray
2013-04-18 15:29 ` Grant Likely
2013-04-18 15:38 ` Andrew Murray
2013-04-22 10:57 ` Andrew Murray
2013-04-16 10:18 ` [PATCH v7 3/3] of/pci: mips: convert to common of_pci_range_parser Andrew Murray
[not found] ` <1366107508-12672-4-git-send-email-Andrew.Murray-5wv7dgnIgG8@public.gmane.org>
2013-04-17 15:42 ` Linus Walleij
2013-04-18 12:59 ` Andrew Murray
[not found] ` <20130418125910.GA17128-5wv7dgnIgG8@public.gmane.org>
2013-04-18 13:09 ` Jason Cooper
2013-04-19 7:19 ` Gabor Juhos
[not found] ` <5170F016.6050502-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
2013-04-20 22:33 ` Jason Cooper
[not found] ` <20130420223343.GB25724-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2013-04-21 7:27 ` Gabor Juhos
[not found] ` <517394C6.2060407-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
2013-04-22 10:49 ` Andrew Murray
2013-04-18 13:45 ` Grant Likely
2013-04-18 14:26 ` Andrew Murray
2013-04-16 15:05 ` [PATCH v7 0/3] of/pci: Provide common support for PCI DT parsing Jason Cooper
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=1366107508-12672-1-git-send-email-Andrew.Murray@arm.com \
--to=andrew.murray-5wv7dgnigg8@public.gmane.org \
--cc=Liviu.Dudau-5wv7dgnIgG8@public.gmane.org \
--cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
--cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
--cc=linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=siva.kallam-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=suren.reddy-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.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).