13a6f5391d82e1a8d76974ff431e5bbbfaa7bdbe
[linux-flexiantxendom0-3.2.10.git] / arch / ia64 / hp / sim / hpsim_setup.c
1 /*
2  * Platform dependent support for HP simulator.
3  *
4  * Copyright (C) 1998, 1999, 2002 Hewlett-Packard Co
5  *      David Mosberger-Tang <davidm@hpl.hp.com>
6  * Copyright (C) 1999 Vijay Chander <vijay@engr.sgi.com>
7  */
8 #include <linux/console.h>
9 #include <linux/init.h>
10 #include <linux/kdev_t.h>
11 #include <linux/kernel.h>
12 #include <linux/major.h>
13 #include <linux/param.h>
14 #include <linux/root_dev.h>
15 #include <linux/string.h>
16 #include <linux/types.h>
17
18 #include <asm/delay.h>
19 #include <asm/irq.h>
20 #include <asm/pal.h>
21 #include <asm/machvec.h>
22 #include <asm/pgtable.h>
23 #include <asm/sal.h>
24
25 #include "hpsim_ssc.h"
26
27 extern struct console hpsim_cons;
28
29 /*
30  * Simulator system call.
31  */
32 asm (".text\n"
33      ".align 32\n"
34      ".global ia64_ssc\n"
35      ".proc ia64_ssc\n"
36      "ia64_ssc:\n"
37      "mov r15=r36\n"
38      "break 0x80001\n"
39      "br.ret.sptk.many rp\n"
40      ".endp\n");
41
42 void
43 ia64_ssc_connect_irq (long intr, long irq)
44 {
45         ia64_ssc(intr, irq, 0, 0, SSC_CONNECT_INTERRUPT);
46 }
47
48 void
49 ia64_ctl_trace (long on)
50 {
51         ia64_ssc(on, 0, 0, 0, SSC_CTL_TRACE);
52 }
53
54 void __init
55 hpsim_setup (char **cmdline_p)
56 {
57         ROOT_DEV = Root_SDA1;           /* default to first SCSI drive */
58
59         register_console(&hpsim_cons);
60 }