All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] pci-sh7780: some register value configurable
Date: Wed, 25 Feb 2009 14:26:42 +0900	[thread overview]
Message-ID: <49A4D692.7010204@renesas.com> (raw)

Some register value was hardcoded for System memory size 128MB and
memory offset 0x08000000. This patch fixed the problem.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
---
 drivers/pci/pci_sh7780.c    |    6 +++---
 include/configs/r7780mp.h   |    3 +++
 include/configs/sh7785lcr.h |    3 +++
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/pci_sh7780.c b/drivers/pci/pci_sh7780.c
index 7555d96..bc06f49 100644
--- a/drivers/pci/pci_sh7780.c
+++ b/drivers/pci/pci_sh7780.c
@@ -85,11 +85,11 @@ int pci_sh7780_init(struct pci_controller *hose)
 	p4_out(SH7780_PCICR_PREFIX, SH7780_PCICR);
 	p4_outw(0x0047, SH7780_PCICMD);

-	p4_out(0x07F00001, SH7780_PCILSR0);
-	p4_out(0x08000000, SH7780_PCILAR0);
+	p4_out(CONFIG_SH7780_PCI_LSR, SH7780_PCILSR0);
+	p4_out(CONFIG_SH7780_PCI_LAR, SH7780_PCILAR0);
 	p4_out(0x00000000, SH7780_PCILSR1);
 	p4_out(0, SH7780_PCILAR1);
-	p4_out(0x08000000, SH7780_PCIMBAR0);
+	p4_out(CONFIG_SH7780_PCI_BAR, SH7780_PCIMBAR0);
 	p4_out(0x00000000, SH7780_PCIMBAR1);

 	p4_out(0xFD000000, SH7780_PCIMBR0);
diff --git a/include/configs/r7780mp.h b/include/configs/r7780mp.h
index 72a3b5c..88eb568 100644
--- a/include/configs/r7780mp.h
+++ b/include/configs/r7780mp.h
@@ -129,6 +129,9 @@
 #define CONFIG_PCI
 #define CONFIG_SH4_PCI
 #define CONFIG_SH7780_PCI
+#define CONFIG_SH7780_PCI_LSR	0x07f00001
+#define CONFIG_SH7780_PCI_LAR	CONFIG_SYS_SDRAM_SIZE
+#define CONFIG_SH7780_PCI_BAR	CONFIG_SYS_SDRAM_SIZE
 #define CONFIG_PCI_PNP
 #define CONFIG_PCI_SCAN_SHOW	1
 #define __io
diff --git a/include/configs/sh7785lcr.h b/include/configs/sh7785lcr.h
index 537ec4e..2d562bf 100644
--- a/include/configs/sh7785lcr.h
+++ b/include/configs/sh7785lcr.h
@@ -133,6 +133,9 @@
 #define CONFIG_PCI
 #define CONFIG_SH4_PCI
 #define CONFIG_SH7780_PCI
+#define CONFIG_SH7780_PCI_LSR	0x07f00001
+#define CONFIG_SH7780_PCI_LAR	CONFIG_SYS_SDRAM_SIZE
+#define CONFIG_SH7780_PCI_BAR	CONFIG_SYS_SDRAM_SIZE
 #define CONFIG_PCI_PNP
 #define CONFIG_PCI_SCAN_SHOW	1

-- 
1.5.5

             reply	other threads:[~2009-02-25  5:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-25  5:26 Yoshihiro Shimoda [this message]
2009-02-27  9:21 ` [U-Boot] [PATCH 2/5] pci-sh7780: some register value configurable Nobuhiro Iwamatsu

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=49A4D692.7010204@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.