Skip to content

Commit

Permalink
sparc32,leon: add support for PCI busn resource for GRPCI2
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Daniel Hellstrom authored and David S. Miller committed Mar 20, 2013
1 parent 2ffdd7e commit aa90b69
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/sparc/include/asm/leon_pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down
2 changes: 2 additions & 0 deletions arch/sparc/kernel/leon_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions arch/sparc/kernel/leon_pci_grpci2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/*
Expand Down

0 comments on commit aa90b69

Please sign in to comment.