From e95b61cfb0c7203964c1a3f163e16a65f04d87ec Mon Sep 17 00:00:00 2001 From: wdenk Date: Mon, 4 Nov 2002 16:02:40 +0000 Subject: Patch by Guillaume Alexandre,, 04 Nov 2002: Improve PCI access on 32-bits Compact PCI bus Adjust VFD initialization on TRAB Cleanup RRvision video code --- board/pcippc2/pcippc2.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'board/pcippc2/pcippc2.c') diff --git a/board/pcippc2/pcippc2.c b/board/pcippc2/pcippc2.c index e1b065b0ce..80ca40250c 100644 --- a/board/pcippc2/pcippc2.c +++ b/board/pcippc2/pcippc2.c @@ -117,6 +117,8 @@ int misc_init_r (void) { pcippc2_fpga_init (); + pcippc2_cpci3264_init (); + #if defined(CONFIG_WATCHDOG) pcippc2_wdt_init (); #endif @@ -147,6 +149,25 @@ void doc_init (void) doc_probe (pcippc2_fpga1_phys + HW_FPGA1_DOC); } +void pcippc2_cpci3264_init (void) +{ + pci_dev_t bdf = pci_find_device(FPGA_VENDOR_ID, FPGA_DEVICE_ID, 0); + + if (bdf == -1) + { + puts("Unable to find FPGA !\n"); + hang(); + } + + if((in32(pcippc2_fpga0_phys + HW_FPGA0_BOARD) & 0x01000000) == 0x01000000) + /* 32-bits Compact PCI bus - LSB bit */ + { + iobarrier_rw(); + out32(BRIDGE(CPCI, PCIDG), 0x40000000); /* 32-bits bridge, Pipeline */ + iobarrier_rw(); + } +} + #if defined(CONFIG_WATCHDOG) void pcippc2_wdt_init (void) -- cgit v1.2.3