]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - arch/mips/vr41xx/nec-cmbvr4133/init.c
Merge git://oss.sgi.com:8090/oss/git/xfs-2.6
[mirror_ubuntu-artful-kernel.git] / arch / mips / vr41xx / nec-cmbvr4133 / init.c
1 /*
2 * arch/mips/vr41xx/nec-cmbvr4133/init.c
3 *
4 * PROM library initialisation code for NEC CMB-VR4133 board.
5 *
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>
9 *
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.
14 *
15 * Support for NEC-CMBVR4133 in 2.6
16 * Manish Lachwani (mlachwani@mvista.com)
17 */
18 #include <linux/config.h>
19
20 #ifdef CONFIG_ROCKHOPPER
21 #include <asm/io.h>
22 #include <linux/pci.h>
23
24 #define PCICONFDREG 0xaf000c14
25 #define PCICONFAREG 0xaf000c18
26
27 void disable_pcnet(void)
28 {
29 u32 data;
30
31 /*
32 * Workaround for the bug in PMON on VR4133. PMON leaves
33 * AMD PCNet controller (on Rockhopper) initialized and running in
34 * bus master mode. We have do disable it before doing any
35 * further initialization. Or we get problems with PCI bus 2
36 * and random lockups and crashes.
37 */
38
39 writel((2 << 16) |
40 (PCI_DEVFN(1,0) << 8) |
41 (0 & 0xfc) |
42 1UL,
43 PCICONFAREG);
44
45 data = readl(PCICONFDREG);
46
47 writel((2 << 16) |
48 (PCI_DEVFN(1,0) << 8) |
49 (4 & 0xfc) |
50 1UL,
51 PCICONFAREG);
52
53 data = readl(PCICONFDREG);
54
55 writel((2 << 16) |
56 (PCI_DEVFN(1,0) << 8) |
57 (4 & 0xfc) |
58 1UL,
59 PCICONFAREG);
60
61 data &= ~4;
62
63 writel(data, PCICONFDREG);
64 }
65 #endif
66