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 "init=/etc/preinit noinitrd "
61 "mtdparts=physmap-flash.0:3520k@0x080000(kernel),2752k@0x140000(rootfs),8k@0x3f8000(NVRAM) "
62 "console=ttyS0,9600 root=/dev/mtdblock1 rootfstype=squashfs,jffs2 ";
64 extern unsigned long mips_machgroup
;
65 extern unsigned long mips_machtype
;
67 extern void setup_serial_port(void);
68 extern char * getenv(char *e
);
70 /* IDT 79EB434 memory map -- we really should be auto sizing it */
71 #define RAM_SIZE 32*1024*1024
73 char *__init
prom_getcmdline(void)
75 return &(arcs_cmdline
[0]);
78 void __init
prom_init(void)
81 sprintf(arcs_cmdline
, "%s", bootparm
);
83 /* set our arch type */
84 mips_machgroup
= MACH_GROUP_ARUBA
;
85 mips_machtype
= MACH_ARUBA_UNKNOWN
;
87 boardname
=getenv("boardname");
89 if (!strcmp(boardname
,"Muscat")) {
90 mips_machtype
= MACH_ARUBA_AP70
;
91 idt_cpu_freq
= 133000000;
93 } else if (!strcmp(boardname
,"Mataro")) {
94 mips_machtype
= MACH_ARUBA_AP65
;
95 idt_cpu_freq
= 110000000;
96 } else if (!strcmp(boardname
,"Merlot")) {
97 mips_machtype
= MACH_ARUBA_AP60
;
98 idt_cpu_freq
= 90000000;
101 /* turn on the console */
105 * give all RAM to boot allocator,
106 * except where the kernel was loaded
108 add_memory_region(0,RAM_SIZE
,BOOT_MEM_RAM
);
111 void prom_free_prom_memory(void)
113 printk("stubbed prom_free_prom_memory()\n");
This page took 0.051028 seconds and 5 git commands to generate.