Initial commit
[wrt350n-kernel.git] / arch / mips / vr41xx / nec-cmbvr4133 / init.c
blob7c5e18ee223186c51cb3ec28681257238afd2e09
1 /*
2 * arch/mips/vr41xx/nec-cmbvr4133/init.c
4 * PROM library initialisation code for NEC CMB-VR4133 board.
6 * Author: Yoichi Yuasa <yyuasa@mvista.com, or source@mvista.com> and
7 * Jun Sun <jsun@mvista.com, or source@mvista.com> and
8 * Alex Sapkov <asapkov@ru.mvista.com>
10 * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under
11 * the terms of the GNU General Public License version 2. This program
12 * is licensed "as is" without any warranty of any kind, whether express
13 * or implied.
15 * Support for NEC-CMBVR4133 in 2.6
16 * Manish Lachwani (mlachwani@mvista.com)
19 #ifdef CONFIG_ROCKHOPPER
20 #include <asm/io.h>
21 #include <linux/pci.h>
23 #define PCICONFDREG 0xaf000c14
24 #define PCICONFAREG 0xaf000c18
26 void disable_pcnet(void)
28 u32 data;
31 * Workaround for the bug in PMON on VR4133. PMON leaves
32 * AMD PCNet controller (on Rockhopper) initialized and running in
33 * bus master mode. We have do disable it before doing any
34 * further initialization. Or we get problems with PCI bus 2
35 * and random lockups and crashes.
38 writel((2 << 16) |
39 (PCI_DEVFN(1, 0) << 8) |
40 (0 & 0xfc) |
41 1UL,
42 PCICONFAREG);
44 data = readl(PCICONFDREG);
46 writel((2 << 16) |
47 (PCI_DEVFN(1, 0) << 8) |
48 (4 & 0xfc) |
49 1UL,
50 PCICONFAREG);
52 data = readl(PCICONFDREG);
54 writel((2 << 16) |
55 (PCI_DEVFN(1, 0) << 8) |
56 (4 & 0xfc) |
57 1UL,
58 PCICONFAREG);
60 data &= ~4;
62 writel(data, PCICONFDREG);
64 #endif