MIPS: Remove useless zero initializations.
[deliverable/linux.git] / arch / mips / mipssim / sim_setup.c
CommitLineData
c78cbf49
RB
1/*
2 * Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved.
3 *
4 * This program is free software; you can distribute it and/or modify it
5 * under the terms of the GNU General Public License (Version 2) as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
16 *
17 */
18
c78cbf49
RB
19#include <linux/init.h>
20#include <linux/string.h>
21#include <linux/kernel.h>
f6e2373a
RB
22#include <linux/io.h>
23#include <linux/irq.h>
c78cbf49
RB
24#include <linux/ioport.h>
25#include <linux/tty.h>
26#include <linux/serial.h>
27#include <linux/serial_core.h>
b187f180 28#include <linux/serial_8250.h>
c78cbf49
RB
29
30#include <asm/cpu.h>
31#include <asm/bootinfo.h>
c78cbf49
RB
32#include <asm/mips-boards/generic.h>
33#include <asm/mips-boards/prom.h>
c78cbf49
RB
34#include <asm/time.h>
35#include <asm/mips-boards/sim.h>
36#include <asm/mips-boards/simint.h>
37
38
c78cbf49 39static void __init serial_init(void);
982f6ffe 40unsigned int _isbonito;
c78cbf49 41
c78cbf49
RB
42const char *get_system_type(void)
43{
44 return "MIPSsim";
45}
46
2925aba4 47void __init plat_mem_setup(void)
c78cbf49
RB
48{
49 set_io_port_base(0xbfd00000);
50
51 serial_init();
52
36a88530 53 pr_info("Linux started...\n");
c78cbf49 54
c78cbf49
RB
55}
56
87353d8a
RB
57extern struct plat_smp_ops ssmtc_smp_ops;
58
f6e2373a 59void __init prom_init(void)
c78cbf49
RB
60{
61 set_io_port_base(0xbfd00000);
62
36a88530 63 pr_info("\nLINUX started...\n");
c78cbf49
RB
64 prom_init_cmdline();
65 prom_meminit();
c78cbf49 66
87353d8a
RB
67#ifdef CONFIG_MIPS_MT_SMP
68 if (cpu_has_mipsmt)
69 register_smp_ops(&vsmp_smp_ops);
70 else
71 register_smp_ops(&up_smp_ops);
72#endif
73#ifdef CONFIG_MIPS_MT_SMTC
74 if (cpu_has_mipsmt)
75 register_smp_ops(&ssmtc_smp_ops);
76 else
77 register_smp_ops(&up_smp_ops);
78#endif
79}
c78cbf49
RB
80
81static void __init serial_init(void)
82{
83#ifdef CONFIG_SERIAL_8250
84 struct uart_port s;
85
86 memset(&s, 0, sizeof(s));
87
88 s.iobase = 0x3f8;
89
90 /* hardware int 4 - the serial int, is CPU int 6
91 but poll for now */
92 s.irq = 0;
a74b4605 93 s.uartclk = 1843200;
59a675b2 94 s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
9b4a1617 95 s.iotype = UPIO_PORT;
c78cbf49
RB
96 s.regshift = 0;
97 s.timeout = 4;
98
99 if (early_serial_setup(&s) != 0) {
36a88530 100 printk(KERN_ERR "Serial setup failed!\n");
c78cbf49
RB
101 }
102
103#endif
104}
This page took 0.354359 seconds and 5 git commands to generate.