Re: [PATCH] pci: Provide support for parsing PCI DT ranges property
From: Andrew Murray <hidden>
Date: 2012-12-13 10:34:12
Also in:
linux-devicetree, linux-pci
On Thu, Dec 13, 2012 at 10:03:18AM +0000, Thierry Reding wrote:
On Thu, Dec 13, 2012 at 09:45:43AM +0000, Andrew Murray wrote:quoted
On Thu, Dec 13, 2012 at 09:13:33AM +0000, Thierry Reding wrote:quoted
Hi Andrew, =20 I don't like iterator interfaces too much, but I can live with that. Other than that the patch looks good to me and I'll try to work it in=
to
quoted
quoted
my Tegra PCIe patch series. =20 Just two minor comments below. =20quoted
diff --git a/drivers/of/address.c b/drivers/of/address.c[...]quoted
@@ -421,7 +472,7 @@ u64 __of_translate_address(struct device_node *=
dev, const __be32 *in_addr,
quoted
quoted
quoted
=09=09goto bail; =09bus =3D of_match_bus(parent); =20 -=09/* Cound address cells & copy address locally */ +=09/* Count address cells & copy address locally */ =09bus->count_cells(dev, &na, &ns); =09if (!OF_CHECK_COUNTS(na, ns)) { =09=09printk(KERN_ERR "prom_parse: Bad cell count for %s\n",=20 This is really minor, but it should still go into a separate patch. =20quoted
diff --git a/include/linux/of_address.h b/include/linux/of_address.=
h
quoted
quoted
quoted
index 01b925a..4582b20 100644--- a/include/linux/of_address.h +++ b/include/linux/of_address.h@@ -26,6 +26,8 @@ static inline unsigned long pci_address_to_pio(ph=
ys_addr_t addr) { return -1; }quoted
quoted
quoted
#define pci_address_to_pio pci_address_to_pio #endif =20 +const __be32 *of_pci_process_ranges(struct device_node *node, +=09=09=09=09 struct resource *res, const __be32 *from); #else /* CONFIG_OF_ADDRESS */ static inline int of_address_to_resource(struct device_node *dev, =
int index,
quoted
quoted
quoted
=09=09=09=09=09 struct resource *r)@@ -48,6 +50,11 @@ static inline const u32 *of_get_address(struct d=
evice_node *dev, int index,
quoted
quoted
quoted
{ =09return NULL; } +const __be32 *of_pci_process_ranges(struct device_node *node,=20 There should be a blank line to separate the above two lines. =20=20 Thanks for the feedback. =20 I will send another patch for the typo and leave this patch with you fo=
r
quoted
working into your existing series.=20 I suppose you have your own series that uses this patch?
Not yet, it may be some time before I submit my PCI host bridge driver. Tho= ugh I am making changes else where (e.g. this patch) which I'm hoping to submit= as early as possible. I can rebase my work for these upstream dependencies. I can re-spin this patch with your suggested changes if you prefer? Andrew Murray