From 51347053b8fa490f2e5a20ce0693ef32dc6a3018 Mon Sep 17 00:00:00 2001 From: Daniel Hellstrom Date: Mon, 1 Jul 2013 15:00:21 +0200 Subject: LEON PCI: host bridge driver support for probing dev0=AD16 Before the LIBPCI didn't probe device0 (AD16), the host bridge drivers used bus=dev=func=0 to internally probe the host bridge's target interface. Now that LIBPCI uses bus=dev=func=0 to access device0, bus=0xff is introduced internally to identify the host bridge target configuration space. --- c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'c/src/lib/libbsp/sparc/leon2') diff --git a/c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c b/c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c index 2387cc0bf7..76b9c4d943 100644 --- a/c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c +++ b/c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c @@ -161,7 +161,6 @@ struct at697pci_priv { struct at697pci_regs *regs; int minor; - uint32_t devVend; /* PCI Device and Vendor ID of Host */ uint32_t bar1_pci_adr; uint32_t bar2_pci_adr; @@ -228,7 +227,7 @@ int at697pci_cfg_r32(pci_dev_t dev, int offset, uint32_t *val) int func = PCI_DEV_FUNC(dev); int retval; - if (slot > 21 || (offset & ~0xfc)) { + if (slot > 15 || (offset & ~0xfc)) { *val = 0xffffffff; return PCISTS_EINVAL; } @@ -239,7 +238,7 @@ int at697pci_cfg_r32(pci_dev_t dev, int offset, uint32_t *val) if ( bus == 0 ) { /* PCI Access - TYPE 0 */ - address = (1<<(11+slot)) | (func << 8) | offset; + address = (1<<(16+slot)) | (func << 8) | offset; } else { /* PCI access - TYPE 1 */ address = ((bus & 0xff) << 16) | ((slot & 0x1f) << 11) | @@ -462,9 +461,6 @@ int at697pci_hw_init(struct at697pci_priv *priv) /* Set Inititator configuration so that AHB slave accesses generate memory read/write commands */ regs->pciic = 0x41; - /* Get the AT697PCI Host PCI ID */ - at697pci_cfg_r32(host, PCI_VENDOR_ID, &priv->devVend); - return 0; } -- cgit v1.2.3