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