2 * Ralink SoC common setup
4 * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
5 * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published
9 * by the Free Software Foundation.
12 #include <linux/kernel.h>
13 #include <linux/init.h>
15 #include <linux/serial_8250.h>
17 #include <asm/bootinfo.h>
18 #include <asm/addrspace.h>
20 #include <asm/mach-ralink/common.h>
21 #include <asm/mach-ralink/machine.h>
23 unsigned char ramips_sys_type
[RAMIPS_SYS_TYPE_LEN
];
25 const char *get_system_type(void)
27 return ramips_sys_type
;
30 static void __init
detect_mem_size(void)
35 base
= (void *) KSEG1ADDR(detect_mem_size
);
36 for (size
= ramips_mem_size_min
; size
< ramips_mem_size_max
;
38 if (!memcmp(base
, base
+ size
, 1024))
42 add_memory_region(ramips_mem_base
, size
, BOOT_MEM_RAM
);
45 void __init
ramips_early_serial_setup(int line
, unsigned base
, unsigned freq
,
51 memset(&p
, 0, sizeof(p
));
52 p
.flags
= UPF_SKIP_TEST
| UPF_FIXED_TYPE
;
59 p
.membase
= ioremap_nocache(p
.mapbase
, PAGE_SIZE
);
63 err
= early_serial_setup(&p
);
65 printk(KERN_ERR
"early serial%d registration failed %d\n",
69 void __init
plat_mem_setup(void)
71 set_io_port_base(KSEG1
);
77 __setup("board=", mips_machtype_setup
);
79 static int __init
ramips_machine_setup(void)
85 arch_initcall(ramips_machine_setup
);
87 static void __init
ramips_generic_init(void)
91 MIPS_MACHINE(RAMIPS_MACH_GENERIC
, "Generic", "Generic Ralink board",
This page took 0.058145 seconds and 5 git commands to generate.