[U-Boot-Users] [PATCH] fsl_pci_init Fix command register initialization issue.
Jason Jin
Jason.jin at freescale.com
Tue Sep 18 12:37:36 CEST 2007
Use generic setup_device to initialize standard pci regs
for the host will lost the initilization for the command
register. This patch initilize those regs including
command register directly.
Signed-off-by: Jason Jin <Jason.jin at freescale.com>
---
drivers/fsl_pci_init.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/fsl_pci_init.c b/drivers/fsl_pci_init.c
index 3a13eea..5335fdb 100644
--- a/drivers/fsl_pci_init.c
+++ b/drivers/fsl_pci_init.c
@@ -130,13 +130,14 @@ fsl_pci_init(struct pci_controller *hose)
}
- /* Use generic setup_device to initialize standard pci regs,
- * but do not allocate any windows since any BAR found (such
- * as PCSRBAR) is not in this cpu's memory space.
- */
-
- pciauto_setup_device(hose, dev, 0, hose->pci_mem,
- hose->pci_prefetch, hose->pci_io);
+ /* Initialize standard pci regs directly, do not allocate any windows
+ * since any BAR found (such as PCSRBAR) is not in this cpu's memory space.
+ */
+ pci_hose_read_config_dword(hose, dev, PCI_COMMAND, &temp32);
+ temp32 |= (PCI_COMMAND_IO | PCI_COMMAND_MEMORY);
+ pci_hose_write_config_dword(hose, dev, PCI_COMMAND, temp32);
+ pci_hose_write_config_byte(hose, dev, PCI_CACHE_LINE_SIZE, 0x08);
+ pci_hose_write_config_byte(hose, dev, PCI_LATENCY_TIMER, 0x80);
#ifndef CONFIG_PCI_NOSCAN
printf (" Scanning PCI bus %02x\n", hose->current_busno);
--
1.5.2
More information about the U-Boot
mailing list