2947473ad060ff3e3ea421be57b14b474b2d4034
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
16 * Copyright 2007 John Crispin <blogic@openwrt.org>
19 #include <linux/init.h>
20 #include <linux/string.h>
21 #include <linux/ctype.h>
22 #include <linux/kernel.h>
24 #include <linux/bootmem.h>
25 #include <linux/ioport.h>
26 #include <asm/bootinfo.h>
27 #include <asm/amazon/amazon.h>
28 #include <asm/amazon/irq.h>
29 #include <asm/amazon/model.h>
32 void prom_putchar(char c
)
34 /* Wait for FIFO to empty */
35 while ((amazon_readl(AMAZON_ASC_FSTAT
) >> 8) != 0x00) ;
36 /* Crude cr/nl handling is better than none */
38 amazon_writel('\r', AMAZON_ASC_TBUF
);
39 amazon_writel(c
, AMAZON_ASC_TBUF
);
42 void prom_printf(const char * fmt
, ...)
50 /* FIXME - hopefully i < sizeof(buf) */
51 l
= vsprintf(buf
, fmt
, args
);
55 for (p
= buf
; p
< buf_end
; p
++)
60 void __init
prom_init(void)
62 mips_machgroup
= MACH_GROUP_INFINEON
;
63 mips_machtype
= MACH_INFINEON_AMAZON
;
65 strcpy(&(arcs_cmdline
[0]), "console=ttyS0,115200 rootfstype=squashfs,jffs2 init=/etc/preinit");
67 add_memory_region(0x00000000, 0x1000000, BOOT_MEM_RAM
);
70 void prom_free_prom_memory(void)
74 const char *get_system_type(void)
76 return BOARD_SYSTEM_TYPE
;
This page took 0.040822 seconds and 3 git commands to generate.