linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: designware: Fix configuration base address
@ 2014-09-23 14:28 Minghuan Lian
  2014-09-23 14:28 ` [PATCH] PCI: designware: Fix IO resource end address calculation Minghuan Lian
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Minghuan Lian @ 2014-09-23 14:28 UTC (permalink / raw)
  To: linux-pci
  Cc: linux-arm-kernel, Zang Roy-R61911, Hu Mingkai-B21284, Scott Wood,
	Yoder Stuart-B08248, Arnd Bergmann, Bjorn Helgaas, Minghuan Lian

The code has calculated cfg0_base and cfg1_base when parsing 'reg'
or 'ranges' property of PCI DTS node. so remove duplicate calculation.
And when using 'reg', resource cfg is not used, the removed code
will get incorrect configuration base.

Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
---
 drivers/pci/host/pcie-designware.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index c28ca05..0f3cb2a 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -515,7 +515,6 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
 	pp->mem_base = pp->mem.start;
 
 	if (!pp->va_cfg0_base) {
-		pp->cfg0_base = pp->cfg.start;
 		pp->va_cfg0_base = devm_ioremap(pp->dev, pp->cfg0_base,
 						pp->cfg0_size);
 		if (!pp->va_cfg0_base) {
@@ -525,7 +524,6 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
 	}
 
 	if (!pp->va_cfg1_base) {
-		pp->cfg1_base = pp->cfg.start + pp->cfg0_size;
 		pp->va_cfg1_base = devm_ioremap(pp->dev, pp->cfg1_base,
 						pp->cfg1_size);
 		if (!pp->va_cfg1_base) {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-09-24 13:27 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-23 14:28 [PATCH] PCI: designware: Fix configuration base address Minghuan Lian
2014-09-23 14:28 ` [PATCH] PCI: designware: Fix IO resource end address calculation Minghuan Lian
2014-09-23 22:53   ` Bjorn Helgaas
2014-09-24  4:14     ` Mohit KUMAR DCG
2014-09-24 13:26   ` Bjorn Helgaas
2014-09-23 14:28 ` [PATCH v3 1/3] PCI: designware: Rename get_msi_data to get_msi_addr Minghuan Lian
2014-09-23 22:45   ` Bjorn Helgaas
2014-09-24  4:12     ` Mohit KUMAR DCG
2014-09-24 13:27   ` Bjorn Helgaas
2014-09-23 14:28 ` [PATCH v3 2/3] PCI: designware: Add get_msi_data() to pcie_host_ops Minghuan Lian
2014-09-23 23:14   ` Bjorn Helgaas
2014-09-24  4:22     ` Mohit KUMAR DCG
2014-09-23 14:29 ` [PATCH v3 3/3] PCI: Layerscape: Add Layerscape PCIe driver Minghuan Lian
2014-09-23 21:25   ` Scott Wood
2014-09-24  2:17     ` Lian Minghuan-B31939
2014-09-23 22:53 ` [PATCH] PCI: designware: Fix configuration base address Bjorn Helgaas
2014-09-24  4:14   ` Mohit KUMAR DCG
2014-09-24 13:25 ` Bjorn Helgaas

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).