1 /*
2 * Copyright 2004 PMC-Sierra Inc.
3 * Author: Manish Lachwani (lachwani@pmc-sierra.com)
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10
11 #include <linux/config.h>
12 #include <linux/init.h>
13 #include <linux/mm.h>
14 #include <linux/sched.h>
15 #include <linux/bootmem.h>
16 #include <asm/addrspace.h>
17 #include <asm/bootinfo.h>
18
19 /* PMON Call Vectors */
20 struct callvectors {
21 int (*open) (char*, int, int);
22 int (*close) (int);
23 int (*read) (int, void*, int);
24 int (*write) (int, void*, int);
25 off_t (*lseek) (int, off_t, int);
26 int (*printf) (const char*, ...);
27 void (*cacheflush) (void);
28 char* (*gets) (char*);
29 };
30
31 struct callvectors* debug_vectors;
32 char arcs_cmdline[CL_SIZE];
33 extern unsigned long cpu_clock;
34 unsigned char big_sur_mac_addr_base[6] = "00:11:22:33:44:aa";
35
get_system_type(void)36 const char *get_system_type(void)
37 {
38 return "Big Sur";
39 }
40
prom_init(int argc,char ** arg,char ** env,struct callvectors * cv)41 void __init prom_init(int argc, char **arg, char **env, struct callvectors *cv)
42 {
43 int i;
44
45 debug_vectors = cv;
46
47 /* PMON args begin with a g that stands for go */
48 arcs_cmdline[0] = '\0';
49 for (i = 1; i < argc; i++) {
50 if (strlen(arcs_cmdline) + strlen(arg[i] + 1)
51 >= sizeof(arcs_cmdline))
52 break;
53
54 strcat(arcs_cmdline, arg[i]);
55 strcat(arcs_cmdline, " ");
56 }
57
58 while (*env) {
59 if (strncmp("cpuclock", *env, strlen("cpuclock")) == 0) {
60 cpu_clock = simple_strtol(*env + strlen("cpuclock="),
61 NULL, 10);
62 }
63 env++;
64 }
65
66 mips_machgroup = MACH_GROUP_PMC;
67 mips_machtype = MACH_PMC_BIG_SUR;
68 }
69
prom_free_prom_memory(void)70 void __init prom_free_prom_memory(void)
71 {
72 }
73
prom_fixup_mem_map(unsigned long start,unsigned long end)74 void __init prom_fixup_mem_map(unsigned long start, unsigned long end)
75 {
76 }
77
78