[U-Boot-Users] [PATCH] Fix MPC8544DS PCIe3 scsi.

Kumar Gala galak at kernel.crashing.org
Mon Aug 20 16:44:11 CEST 2007


On Mon, 20 Aug 2007, Kumar Gala wrote:
> I don't understand why this is needed.  It seems like something more
> fundamental in the u-boot allocator if it can't handle all the
> devices in 1M of memory space.  No devices memory space requirement
> is greater than 4k and there are only 5 or 6 of them.
>

This 'hack' seems to workaround the issue in slightly better way.  Not
sure if we can do anything better.

The problem is pciauto_setup_device() getting called from fsl_pci_init.c
is allocating memory space it doesn't need.

- k

diff --git a/drivers/fsl_pci_init.c b/drivers/fsl_pci_init.c
index 1084dc6..193343b 100644
--- a/drivers/fsl_pci_init.c
+++ b/drivers/fsl_pci_init.c
@@ -54,6 +54,7 @@ fsl_pci_init(struct pci_controller *hose)
 	u8 temp8;
 	int r;
 	int bridge;
+	unsigned long bus_lower_temp;
 	volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) hose->cfg_addr;
 	pci_dev_t dev = PCI_BDF(busno,0,0);

@@ -131,8 +132,11 @@ fsl_pci_init(struct pci_controller *hose)
 	}

 	/* Call setup to allocate PCSRBAR window */
+	bus_lower_temp = hose->pci_mem->bus_lower;
 	pciauto_setup_device(hose, dev, 1, hose->pci_mem,
 			     hose->pci_prefetch, hose->pci_io);
+	hose->pci_mem->bus_lower = bus_lower_temp;
+
 #ifndef CONFIG_PCI_NOSCAN
 	printf ("               Scanning PCI bus %02x\n", hose->current_busno);
 	hose->last_busno = pci_hose_scan_bus(hose,hose->current_busno);
diff --git a/drivers/pci_auto.c b/drivers/pci_auto.c




More information about the U-Boot mailing list