public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] sh: add support for SH7785 PCIC
Date: Wed, 09 Jul 2008 21:07:45 +0900	[thread overview]
Message-ID: <4874AA11.1050006@renesas.com> (raw)

modified to check for SH7785 PCIC Device ID.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
---
 drivers/pci/pci_sh7780.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/pci_sh7780.c b/drivers/pci/pci_sh7780.c
index 2d04b4f..d059507 100644
--- a/drivers/pci/pci_sh7780.c
+++ b/drivers/pci/pci_sh7780.c
@@ -31,6 +31,7 @@

 #define SH7780_VENDOR_ID	0x1912
 #define SH7780_DEVICE_ID	0x0002
+#define SH7785_DEVICE_ID	0x0007
 #define SH7780_PCICR_PREFIX	0xA5000000
 #define SH7780_PCICR_PFCS	0x00000800
 #define SH7780_PCICR_FTO	0x00000400
@@ -71,9 +72,18 @@ int pci_sh7780_init(struct pci_controller *hose)
 {
 	p4_out(0x01, SH7780_PCIECR);

-	if (p4_inw(SH7780_PCIVID) != SH7780_VENDOR_ID
-	    && p4_inw(SH7780_PCIDID) != SH7780_DEVICE_ID){
-		printf("PCI: Unknown PCI host bridge.\n");
+	if (p4_inw(SH7780_PCIVID) != SH7780_VENDOR_ID) {
+		printf("PCI: Unknown PCI host bridge. VID=%x\n",
+			p4_inw(SH7780_PCIVID));
+		return;
+	}
+	switch (p4_inw(SH7780_PCIDID)) {
+	case SH7780_DEVICE_ID:
+	case SH7785_DEVICE_ID:
+		break;
+	default:
+		printf("PCI: Unknown PCI host bridge. DID=%x\n",
+			p4_inw(SH7780_PCIDID));
 		return;
 	}
 	printf("PCI: SH7780 PCI host bridge found.\n");

                 reply	other threads:[~2008-07-09 12:07 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=4874AA11.1050006@renesas.com \
    --to=shimoda.yoshihiro@renesas.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