Patchwork [1/2] sparc32,leon: add support for PCI busn resource for LEON

login
register
mail settings
Submitter Daniel Hellstrom
Date Feb. 28, 2013, 2:30 p.m.
Message ID <1362061821-31584-1-git-send-email-daniel@gaisler.com>
Download mbox | patch
Permalink /patch/223969/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

Daniel Hellstrom - Feb. 28, 2013, 2:30 p.m.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
---
 arch/sparc/include/asm/leon_pci.h |    1 +
 arch/sparc/kernel/leon_pci.c      |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)
David Miller - March 1, 2013, 9:37 p.m.
From: Daniel Hellstrom <daniel@gaisler.com>
Date: Thu, 28 Feb 2013 15:30:20 +0100

> Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>

This and the next patch should be combined into one.  You're now registering
&info->busn but callers aren't setting it up properly.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Daniel Hellstrom - March 4, 2013, 7:28 a.m.
On 03/01/2013 10:37 PM, David Miller wrote:
> From: Daniel Hellstrom <daniel@gaisler.com>
> Date: Thu, 28 Feb 2013 15:30:20 +0100
>
>> Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
> This and the next patch should be combined into one.  You're now registering
> &info->busn but callers aren't setting it up properly.
Ok, good point. I will resend.

Thanks,
Daniel

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/sparc/include/asm/leon_pci.h b/arch/sparc/include/asm/leon_pci.h
index f48527e..bfd3ab3 100644
--- a/arch/sparc/include/asm/leon_pci.h
+++ b/arch/sparc/include/asm/leon_pci.h
@@ -12,6 +12,7 @@  struct leon_pci_info {
 	struct pci_ops *ops;
 	struct resource	io_space;
 	struct resource	mem_space;
+	struct resource	busn;
 	int (*map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
 };
 
diff --git a/arch/sparc/kernel/leon_pci.c b/arch/sparc/kernel/leon_pci.c
index 852dc84..88aaaa5 100644
--- a/arch/sparc/kernel/leon_pci.c
+++ b/arch/sparc/kernel/leon_pci.c
@@ -29,6 +29,8 @@  void leon_pci_init(struct platform_device *ofdev, struct leon_pci_info *info)
 	pci_add_resource_offset(&resources, &info->io_space,
 				info->io_space.start - 0x1000);
 	pci_add_resource(&resources, &info->mem_space);
+	info->busn.flags = IORESOURCE_BUS;
+	pci_add_resource(&resources, &info->busn);
 
 	root_bus = pci_scan_root_bus(&ofdev->dev, 0, info->ops, info,
 				     &resources);