From: Nathan Williams Date: Fri, 6 Feb 2009 23:19:13 +0000 (+1100) Subject: solos: Automatically determine number of ports X-Git-Tag: firefly_0821_release~11864^2~298^2~5 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0fc36aa52a602bfe2aeb7ded7e90b0fa70df24c2;p=firefly-linux-kernel-4.4.55.git solos: Automatically determine number of ports Signed-off-by: Nathan Williams Signed-off-by: David Woodhouse --- diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c index 1ff730497217..6fe8f8fc8553 100644 --- a/drivers/atm/solos-pci.c +++ b/drivers/atm/solos-pci.c @@ -1104,7 +1104,8 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id) iowrite32(0xF0, card->config_regs + FLAGS_ADDR); } - card->nr_ports = 2; /* FIXME: Detect daughterboard */ + data32 = ioread32(card->config_regs + PORTS); + card->nr_ports = (data32 & 0x000000FF); pci_set_drvdata(dev, card);