1 /**************************************************************************
3 * BRIEF MODULE DESCRIPTION
4 * prom interface routines
6 * Copyright 2004 IDT Inc. (rischelp@idt.com)
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 **************************************************************************
36 **************************************************************************
39 #include <linux/autoconf.h>
40 #include <linux/init.h>
42 #include <linux/module.h>
43 #include <linux/string.h>
44 #include <linux/console.h>
45 #include <asm/bootinfo.h>
46 #include <linux/bootmem.h>
47 #include <linux/ioport.h>
48 #include <linux/serial.h>
49 #include <linux/serialP.h>
50 #include <asm/serial.h>
51 #include <linux/ioport.h>
53 unsigned int idt_cpu_freq
;
54 EXPORT_SYMBOL(idt_cpu_freq
);
56 unsigned int arch_has_pci
=0;
58 /* Kernel Boot parameters */
59 static unsigned char bootparm
[] =
60 "root=/dev/mtdblock1 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,9600 init=/etc/preinit";
62 extern unsigned long mips_machgroup
;
63 extern unsigned long mips_machtype
;
65 extern void setup_serial_port(void);
66 extern char * getenv(char *e
);
68 /* IDT 79EB434 memory map -- we really should be auto sizing it */
69 #define RAM_SIZE 32*1024*1024
71 char *__init
prom_getcmdline(void)
73 return &(arcs_cmdline
[0]);
76 void __init
prom_init(void)
79 sprintf(arcs_cmdline
, "%s", bootparm
);
81 /* set our arch type */
82 mips_machgroup
= MACH_GROUP_ARUBA
;
83 mips_machtype
= MACH_ARUBA_UNKNOWN
;
85 boardname
=getenv("boardname");
87 if (!strcmp(boardname
,"Muscat")) {
88 mips_machtype
= MACH_ARUBA_AP70
;
89 idt_cpu_freq
= 133000000;
91 } else if (!strcmp(boardname
,"Mataro")) {
92 mips_machtype
= MACH_ARUBA_AP65
;
93 idt_cpu_freq
= 110000000;
94 } else if (!strcmp(boardname
,"Merlot")) {
95 mips_machtype
= MACH_ARUBA_AP60
;
96 idt_cpu_freq
= 90000000;
99 /* turn on the console */
103 * give all RAM to boot allocator,
104 * except where the kernel was loaded
106 add_memory_region(0,RAM_SIZE
,BOOT_MEM_RAM
);
109 void prom_free_prom_memory(void)
111 printk("stubbed prom_free_prom_memory()\n");
This page took 0.054904 seconds and 5 git commands to generate.