public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] fsl_pci_init Fix command register initialization issue.
@ 2007-09-18 10:37 Jason Jin
  0 siblings, 0 replies; only message in thread
From: Jason Jin @ 2007-09-18 10:37 UTC (permalink / raw)
  To: u-boot

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@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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-09-18 10:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-18 10:37 [U-Boot-Users] [PATCH] fsl_pci_init Fix command register initialization issue Jason Jin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox