aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/vr41xx/nec-cmbvr4133/init.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/mips/vr41xx/nec-cmbvr4133/init.c
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/mips/vr41xx/nec-cmbvr4133/init.c')
-rw-r--r--arch/mips/vr41xx/nec-cmbvr4133/init.c78
1 files changed, 78 insertions, 0 deletions
diff --git a/arch/mips/vr41xx/nec-cmbvr4133/init.c b/arch/mips/vr41xx/nec-cmbvr4133/init.c
new file mode 100644
index 000000000000..87f06b3f5a9c
--- /dev/null
+++ b/arch/mips/vr41xx/nec-cmbvr4133/init.c
@@ -0,0 +1,78 @@
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#include <linux/init.h>
20#include <linux/kernel.h>
21#include <linux/string.h>
22
23#include <asm/bootinfo.h>
24
25#ifdef CONFIG_ROCKHOPPER
26#include <asm/io.h>
27#include <linux/pci.h>
28
29#define PCICONFDREG 0xaf000c14
30#define PCICONFAREG 0xaf000c18
31#endif
32
33const char *get_system_type(void)
34{
35 return "NEC CMB-VR4133";
36}
37
38#ifdef CONFIG_ROCKHOPPER
39void disable_pcnet(void)
40{
41 u32 data;
42
43 /*
44 * Workaround for the bug in PMON on VR4133. PMON leaves
45 * AMD PCNet controller (on Rockhopper) initialized and running in
46 * bus master mode. We have do disable it before doing any
47 * further initialization. Or we get problems with PCI bus 2
48 * and random lockups and crashes.
49 */
50
51 writel((2 << 16) |
52 (PCI_DEVFN(1,0) << 8) |
53 (0 & 0xfc) |
54 1UL,
55 PCICONFAREG);
56
57 data = readl(PCICONFDREG);
58
59 writel((2 << 16) |
60 (PCI_DEVFN(1,0) << 8) |
61 (4 & 0xfc) |
62 1UL,
63 PCICONFAREG);
64
65 data = readl(PCICONFDREG);
66
67 writel((2 << 16) |
68 (PCI_DEVFN(1,0) << 8) |
69 (4 & 0xfc) |
70 1UL,
71 PCICONFAREG);
72
73 data &= ~4;
74
75 writel(data, PCICONFDREG);
76}
77#endif
78