summaryrefslogtreecommitdiff
path: root/cpu/mpc85xx
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-10-10 20:23:57 +0000
committerwdenk <wdenk>2004-10-10 20:23:57 +0000
commitcf33678e51e02143ed67850b3f13646fd51fb489 (patch)
tree68d8c425710d63d266395181eb592ec61ba3c734 /cpu/mpc85xx
parent08b6aa61545d74afd4a9646adb469cf1320f4d8f (diff)
downloadu-boot-imx-cf33678e51e02143ed67850b3f13646fd51fb489.zip
u-boot-imx-cf33678e51e02143ed67850b3f13646fd51fb489.tar.gz
u-boot-imx-cf33678e51e02143ed67850b3f13646fd51fb489.tar.bz2
* Patch by Jon Loeliger, 24 Aug 2004:
- Fix PCI window on MPC85xx; remove unneeded PCI initialization from board_early_init_f() - Provide SW workaround for PCI initialization on 85xx CDS - Convert MPC85xxADS to use common CFI flash driver * Cleanup: avoid compiler warnings * Add CMC PU2 board to MAKEALL script
Diffstat (limited to 'cpu/mpc85xx')
-rw-r--r--cpu/mpc85xx/pci.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/cpu/mpc85xx/pci.c b/cpu/mpc85xx/pci.c
index 60c1e61..b61aab5 100644
--- a/cpu/mpc85xx/pci.c
+++ b/cpu/mpc85xx/pci.c
@@ -77,7 +77,7 @@ pci_mpc85xx_init(struct pci_controller *hose)
pcix->powbear1 = 0x00000000;
pcix->powar1 = 0x8004401c; /* 512M MEM space */
- pcix->potar2 = (CFG_PCI1_IO_BASE >> 12) & 0x000fffff;
+ pcix->potar2 = 0x00000000;
pcix->potear2 = 0x00000000;
pcix->powbar2 = (CFG_PCI1_IO_BASE >> 12) & 0x000fffff;
pcix->powbear2 = 0x00000000;
@@ -85,12 +85,38 @@ pci_mpc85xx_init(struct pci_controller *hose)
pcix->pitar1 = 0x00000000;
pcix->piwbar1 = 0x00000000;
- pcix->piwar1 = 0xa0F5501f;
+ pcix->piwar1 = 0xa0f5501e; /* Enable, Prefetch, Local Mem,
+ * Snoop R/W, 2G */
/*
* Hose scan.
*/
pci_register_hose(hose);
+
+#if defined(CONFIG_MPC8555CDS) || defined(CONFIG_MPC8541CDS)
+ /*
+ * This is a SW workaround for an apparent HW problem
+ * in the PCI controller on the MPC85555/41 CDS boards.
+ * The first config cycle must be to a valid, known
+ * device on the PCI bus in order to trick the PCI
+ * controller state machine into a known valid state.
+ * Without this, the first config cycle has the chance
+ * of hanging the controller permanently, just leaving
+ * it in a semi-working state, or leaving it working.
+ *
+ * Pick on the Tundra, Device 17, to get it right.
+ */
+ {
+ u8 header_type;
+
+ pci_hose_read_config_byte(hose,
+ PCI_BDF(0,17,0),
+ PCI_HEADER_TYPE,
+ &header_type);
+ }
+
+#endif
+
hose->last_busno = pci_hose_scan(hose);
}