Skip to contentSkip to conversation

pci-sh7780: some register value configurable

PATCH Superseded Yoshihiro Shimoda 2 participants 2 messages Feb 25, 2009 – Feb 27, 2009 PCI

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 2/5 pci-sh7780: some register value configurable

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

---
 drivers/pci/pci_sh7780.c    |    6 +++---
 include/configs/r7780mp.h   |    3 +++
 include/configs/sh7785lcr.h |    3 +++
 3 files changed, 9 insertions(+), 3 deletions(-)
drivers/pci/pci_sh7780.c +3 -3
index 7555d96..bc06f49 100644
@@ -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);
include/configs/r7780mp.h +3 -0
index 72a3b5c..88eb568 100644
@@ -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
include/configs/sh7785lcr.h +3 -0
index 537ec4e..2d562bf 100644
@@ -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
 
Signature · 1 line
1.5.5
#1 lore raw

PATCH 2/5 pci-sh7780: some register value configurable

Quoted 4 lines · On Wed, 25 Feb 2009 14:26:42 +0900 Yoshihiro Shimoda…

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

Applied, thanks.

Best regards,
Nobuhiro

Signature · 1 line
Nobuhiro Iwamatsu