public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jason Jin <Jason.jin@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] fsl_pci_init Fix command register initialization issue.
Date: Tue, 18 Sep 2007 18:37:36 +0800	[thread overview]
Message-ID: <1190111856327-git-send-email-Jason.jin@freescale.com> (raw)

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

                 reply	other threads:[~2007-09-18 10:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1190111856327-git-send-email-Jason.jin@freescale.com \
    --to=jason.jin@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox