sparc32,leon: add support for PCI busn resource for GRPCI2
authorDaniel Hellstrom <daniel@gaisler.com>
Mon, 4 Mar 2013 00:24:27 +0000 (00:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Mar 2013 18:06:53 +0000 (11:06 -0700)
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/leon_pci.h
arch/sparc/kernel/leon_pci.c
arch/sparc/kernel/leon_pci_grpci2.c

index f48527ebdd8f1011eacc97bfca29ef56af5387a5..bfd3ab3092b562c9c22a412f9265f28afd32e417 100644 (file)
@@ -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);
 };
 
index 852dc843052861f12ca4ee1ca3a03252e6efec68..88aaaa57bb6439270e6674ec8ad0d536fb538556 100644 (file)
@@ -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);
index 4d1487138d260553005af8036734ef519395dd22..5f0402aab7fb3677ad08517d189a8722cb015adc 100644 (file)
@@ -799,6 +799,11 @@ static int grpci2_of_probe(struct platform_device *ofdev)
        if (request_resource(&ioport_resource, &priv->info.io_space) < 0)
                goto err4;
 
+       /* setup maximum supported PCI buses */
+       priv->info.busn.name = "GRPCI2 busn";
+       priv->info.busn.start = 0;
+       priv->info.busn.end = 255;
+
        grpci2_hw_init(priv);
 
        /*