2 * Copyright 2002 Momentum Computer Inc.
3 * Author: Matthew Dharm <mdharm@momenco.com>
5 * Based on Ocelot Linux port, which is
6 * Copyright 2001 MontaVista Software Inc.
7 * Author: jsun@mvista.com or jsun@junsun.net
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
14 #include <linux/config.h>
15 #include <linux/init.h>
17 #include <linux/sched.h>
18 #include <linux/bootmem.h>
20 #include <asm/addrspace.h>
21 #include <asm/bootinfo.h>
23 #include <asm/gt64240.h>
25 #include "ocelot_pld.h"
27 struct callvectors
* debug_vectors
;
29 extern unsigned long marvell_base
;
30 extern unsigned long bus_clock
;
32 #ifdef CONFIG_GALILLEO_GT64240_ETH
33 extern unsigned char prom_mac_addr_base
[6];
36 const char *get_system_type(void)
38 return "Momentum Ocelot";
41 void __init
prom_init(void)
44 char **arg
= (char **) fw_arg1
;
45 char **env
= (char **) fw_arg2
;
46 struct callvectors
*cv
= (struct callvectors
*) fw_arg3
;
49 /* save the PROM vectors for debugging use */
52 /* arg[0] is "g", the rest is boot parameters */
53 arcs_cmdline
[0] = '\0';
54 for (i
= 1; i
< argc
; i
++) {
55 if (strlen(arcs_cmdline
) + strlen(arg
[i
] + 1)
56 >= sizeof(arcs_cmdline
))
58 strcat(arcs_cmdline
, arg
[i
]);
59 strcat(arcs_cmdline
, " ");
62 mips_machgroup
= MACH_GROUP_MOMENCO
;
63 mips_machtype
= MACH_MOMENCO_OCELOT_G
;
65 #ifdef CONFIG_GALILLEO_GT64240_ETH
66 /* get the base MAC address for on-board ethernet ports */
67 memcpy(prom_mac_addr_base
, (void*)0xfc807cf2, 6);
71 if (strncmp("gtbase", *env
, strlen("gtbase")) == 0) {
72 marvell_base
= simple_strtol(*env
+ strlen("gtbase="),
75 if (strncmp("busclock", *env
, strlen("busclock")) == 0) {
76 bus_clock
= simple_strtol(*env
+ strlen("busclock="),
83 unsigned long __init
prom_free_prom_memory(void)