aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/vr41xx/nec-cmbvr4133/setup.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/setup.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/setup.c')
-rw-r--r--arch/mips/vr41xx/nec-cmbvr4133/setup.c96
1 files changed, 96 insertions, 0 deletions
diff --git a/arch/mips/vr41xx/nec-cmbvr4133/setup.c b/arch/mips/vr41xx/nec-cmbvr4133/setup.c
new file mode 100644
index 000000000000..db686ce42e85
--- /dev/null
+++ b/arch/mips/vr41xx/nec-cmbvr4133/setup.c
@@ -0,0 +1,96 @@
1/*
2 * arch/mips/vr41xx/nec-cmbvr4133/setup.c
3 *
4 * Setup for the NEC CMB-VR4133.
5 *
6 * Author: Yoichi Yuasa <yyuasa@mvista.com, or source@mvista.com> and
7 * Alex Sapkov <asapkov@ru.mvista.com>
8 *
9 * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under
10 * the terms of the GNU General Public License version 2. This program
11 * is licensed "as is" without any warranty of any kind, whether express
12 * or implied.
13 *
14 * Support for CMBVR4133 board in 2.6
15 * Author: Manish Lachwani (mlachwani@mvista.com)
16 */
17#include <linux/config.h>
18#include <linux/init.h>
19#include <linux/ide.h>
20#include <linux/ioport.h>
21
22#include <asm/reboot.h>
23#include <asm/time.h>
24#include <asm/vr41xx/cmbvr4133.h>
25#include <asm/bootinfo.h>
26
27#ifdef CONFIG_MTD
28#include <linux/mtd/physmap.h>
29#include <linux/mtd/partitions.h>
30#include <linux/mtd/mtd.h>
31#include <linux/mtd/map.h>
32
33static struct mtd_partition cmbvr4133_mtd_parts[] = {
34 {
35 .name = "User FS",
36 .size = 0x1be0000,
37 .offset = 0,
38 .mask_flags = 0,
39 },
40 {
41 .name = "PMON",
42 .size = 0x140000,
43 .offset = MTDPART_OFS_APPEND,
44 .mask_flags = MTD_WRITEABLE, /* force read-only */
45 },
46 {
47 .name = "User FS2",
48 .size = MTDPART_SIZ_FULL,
49 .offset = MTDPART_OFS_APPEND,
50 .mask_flags = 0,
51 }
52};
53
54#define number_partitions (sizeof(cmbvr4133_mtd_parts)/sizeof(struct mtd_partition))
55#endif
56
57extern void i8259_init(void);
58
59static int __init nec_cmbvr4133_setup(void)
60{
61#ifdef CONFIG_ROCKHOPPER
62 extern void disable_pcnet(void);
63
64 disable_pcnet();
65#endif
66 set_io_port_base(KSEG1ADDR(0x16000000));
67
68 mips_machgroup = MACH_GROUP_NEC_VR41XX;
69 mips_machtype = MACH_NEC_CMBVR4133;
70
71#ifdef CONFIG_PCI
72#ifdef CONFIG_ROCKHOPPER
73 ali_m5229_preinit();
74#endif
75#endif
76
77#ifdef CONFIG_ROCKHOPPER
78 rockhopper_init_irq();
79#endif
80
81#ifdef CONFIG_MTD
82 /* we use generic physmap mapping driver and we use partitions */
83 physmap_configure(0x1C000000, 0x02000000, 4, NULL);
84 physmap_set_partitions(cmbvr4133_mtd_parts, number_partitions);
85#endif
86
87 /* 128 MB memory support */
88 add_memory_region(0, 0x08000000, BOOT_MEM_RAM);
89
90#ifdef CONFIG_ROCKHOPPER
91 i8259_init();
92#endif
93 return 0;
94}
95
96early_initcall(nec_cmbvr4133_setup);