diff options
Diffstat (limited to 'arch/ia64/hp')
-rw-r--r-- | arch/ia64/hp/sim/hpsim_console.c | 15 | ||||
-rw-r--r-- | arch/ia64/hp/sim/hpsim_setup.c | 9 |
2 files changed, 16 insertions, 8 deletions
diff --git a/arch/ia64/hp/sim/hpsim_console.c b/arch/ia64/hp/sim/hpsim_console.c index 6e149c8ab835..0475a5452404 100644 --- a/arch/ia64/hp/sim/hpsim_console.c +++ b/arch/ia64/hp/sim/hpsim_console.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <asm/machvec.h> | 21 | #include <asm/machvec.h> |
22 | #include <asm/pgtable.h> | 22 | #include <asm/pgtable.h> |
23 | #include <asm/sal.h> | 23 | #include <asm/sal.h> |
24 | #include <asm/hpsim.h> | ||
24 | 25 | ||
25 | #include "hpsim_ssc.h" | 26 | #include "hpsim_ssc.h" |
26 | 27 | ||
@@ -28,7 +29,7 @@ static int simcons_init (struct console *, char *); | |||
28 | static void simcons_write (struct console *, const char *, unsigned); | 29 | static void simcons_write (struct console *, const char *, unsigned); |
29 | static struct tty_driver *simcons_console_device (struct console *, int *); | 30 | static struct tty_driver *simcons_console_device (struct console *, int *); |
30 | 31 | ||
31 | struct console hpsim_cons = { | 32 | static struct console hpsim_cons = { |
32 | .name = "simcons", | 33 | .name = "simcons", |
33 | .write = simcons_write, | 34 | .write = simcons_write, |
34 | .device = simcons_console_device, | 35 | .device = simcons_console_device, |
@@ -62,3 +63,15 @@ static struct tty_driver *simcons_console_device (struct console *c, int *index) | |||
62 | *index = c->index; | 63 | *index = c->index; |
63 | return hp_simserial_driver; | 64 | return hp_simserial_driver; |
64 | } | 65 | } |
66 | |||
67 | int simcons_register(void) | ||
68 | { | ||
69 | if (!ia64_platform_is("hpsim")) | ||
70 | return 1; | ||
71 | |||
72 | if (hpsim_cons.flags & CON_ENABLED) | ||
73 | return 1; | ||
74 | |||
75 | register_console(&hpsim_cons); | ||
76 | return 0; | ||
77 | } | ||
diff --git a/arch/ia64/hp/sim/hpsim_setup.c b/arch/ia64/hp/sim/hpsim_setup.c index f2297192a582..f629e903ebc7 100644 --- a/arch/ia64/hp/sim/hpsim_setup.c +++ b/arch/ia64/hp/sim/hpsim_setup.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <asm/machvec.h> | 21 | #include <asm/machvec.h> |
22 | #include <asm/pgtable.h> | 22 | #include <asm/pgtable.h> |
23 | #include <asm/sal.h> | 23 | #include <asm/sal.h> |
24 | #include <asm/hpsim.h> | ||
24 | 25 | ||
25 | #include "hpsim_ssc.h" | 26 | #include "hpsim_ssc.h" |
26 | 27 | ||
@@ -41,11 +42,5 @@ hpsim_setup (char **cmdline_p) | |||
41 | { | 42 | { |
42 | ROOT_DEV = Root_SDA1; /* default to first SCSI drive */ | 43 | ROOT_DEV = Root_SDA1; /* default to first SCSI drive */ |
43 | 44 | ||
44 | #ifdef CONFIG_HP_SIMSERIAL_CONSOLE | 45 | simcons_register(); |
45 | { | ||
46 | extern struct console hpsim_cons; | ||
47 | if (ia64_platform_is("hpsim")) | ||
48 | register_console(&hpsim_cons); | ||
49 | } | ||
50 | #endif | ||
51 | } | 46 | } |