diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-07-25 18:45:45 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 14:31:57 -0400 |
commit | 23fbee9dd5d2a41d36af49ff8e1669fb0c29fda8 (patch) | |
tree | 4e24699269b9d4d2655d961e7a0ffb29931e9b2d /arch/mips/tx4938/toshiba_rbtx4938/prom.c | |
parent | 132940401174ed04f9e8f1ae2dad6f47da26ee0a (diff) |
Support for Toshiba's RBHMA4500 eval board for the TX4938.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/tx4938/toshiba_rbtx4938/prom.c')
-rw-r--r-- | arch/mips/tx4938/toshiba_rbtx4938/prom.c | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/prom.c b/arch/mips/tx4938/toshiba_rbtx4938/prom.c new file mode 100644 index 000000000000..7df8b32ba265 --- /dev/null +++ b/arch/mips/tx4938/toshiba_rbtx4938/prom.c | |||
@@ -0,0 +1,78 @@ | |||
1 | /* | ||
2 | * linux/arch/mips/tx4938/toshiba_rbtx4938/prom.c | ||
3 | * | ||
4 | * rbtx4938 specific prom routines | ||
5 | * Copyright (C) 2000-2001 Toshiba Corporation | ||
6 | * | ||
7 | * 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the | ||
8 | * terms of the GNU General Public License version 2. This program is | ||
9 | * licensed "as is" without any warranty of any kind, whether express | ||
10 | * or implied. | ||
11 | * | ||
12 | * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) | ||
13 | */ | ||
14 | |||
15 | #include <linux/config.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/mm.h> | ||
18 | #include <linux/sched.h> | ||
19 | #include <linux/bootmem.h> | ||
20 | |||
21 | #include <asm/addrspace.h> | ||
22 | #include <asm/bootinfo.h> | ||
23 | #include <asm/tx4938/tx4938.h> | ||
24 | |||
25 | void __init prom_init_cmdline(void) | ||
26 | { | ||
27 | int argc = (int) fw_arg0; | ||
28 | char **argv = (char **) fw_arg1; | ||
29 | int i; | ||
30 | |||
31 | /* ignore all built-in args if any f/w args given */ | ||
32 | if (argc > 1) { | ||
33 | *arcs_cmdline = '\0'; | ||
34 | } | ||
35 | |||
36 | for (i = 1; i < argc; i++) { | ||
37 | if (i != 1) { | ||
38 | strcat(arcs_cmdline, " "); | ||
39 | } | ||
40 | strcat(arcs_cmdline, argv[i]); | ||
41 | } | ||
42 | } | ||
43 | |||
44 | void __init prom_init(void) | ||
45 | { | ||
46 | extern int tx4938_get_mem_size(void); | ||
47 | int msize; | ||
48 | #ifndef CONFIG_TX4938_NAND_BOOT | ||
49 | prom_init_cmdline(); | ||
50 | #endif | ||
51 | mips_machgroup = MACH_GROUP_TOSHIBA; | ||
52 | mips_machtype = MACH_TOSHIBA_RBTX4938; | ||
53 | |||
54 | msize = tx4938_get_mem_size(); | ||
55 | add_memory_region(0, msize << 20, BOOT_MEM_RAM); | ||
56 | |||
57 | return; | ||
58 | } | ||
59 | |||
60 | unsigned long __init prom_free_prom_memory(void) | ||
61 | { | ||
62 | return 0; | ||
63 | } | ||
64 | |||
65 | void __init prom_fixup_mem_map(unsigned long start, unsigned long end) | ||
66 | { | ||
67 | return; | ||
68 | } | ||
69 | |||
70 | const char *get_system_type(void) | ||
71 | { | ||
72 | return "Toshiba RBTX4938"; | ||
73 | } | ||
74 | |||
75 | char * __init prom_getcmdline(void) | ||
76 | { | ||
77 | return &(arcs_cmdline[0]); | ||
78 | } | ||