]> git.sur5r.net Git - u-boot/commitdiff
sh: Add some register value configurable to PCI of SH7780
authorYoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Wed, 25 Feb 2009 05:26:42 +0000 (14:26 +0900)
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Thu, 12 Mar 2009 14:58:30 +0000 (23:58 +0900)
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>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
drivers/pci/pci_sh7780.c
include/configs/r7780mp.h
include/configs/sh7785lcr.h

index 7555d96060b748e2a6e8004664edf049384d26a1..bc06f49e099121b2b0a7fa01522aa8f4dafc7075 100644 (file)
@@ -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);
index 72a3b5c8b1f22b927b00e484b699bf68ff987190..88eb56821f628aefd6e6e9d7395caf446ef28920 100644 (file)
 #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
index b4361caf6ee6fcf1c6693e594065a6a836eabab2..94c8d6b790c02c78f4f757834f2ecba22bf5fe4c 100644 (file)
 #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