Commit 58f957be authored by Martin Hicks's avatar Martin Hicks Committed by David Mosberger

[PATCH] ia64: compile fix for HP Sim serial/console

I was getting annoyed at having to mess around with the HP Simulator
stuff when trying to compile generic kernels.  Here's the fix that I
came up with.  It basically makes the HP Sim console another config
option that depends on the HP sim serial code.

It also sticks a couple of run-time checks in the init functions to only
setup and run the code on hpsim machines.
parent 74e930b8
...@@ -7,7 +7,10 @@ config HP_SIMETH ...@@ -7,7 +7,10 @@ config HP_SIMETH
config HP_SIMSERIAL config HP_SIMSERIAL
bool "Simulated serial driver support" bool "Simulated serial driver support"
default y if IA64_GENERIC
config HP_SIMSERIAL_CONSOLE
bool "Console for HP simulator"
depends on HP_SIMSERIAL
config HP_SIMSCSI config HP_SIMSCSI
bool "Simulated SCSI disk" bool "Simulated SCSI disk"
......
...@@ -7,9 +7,10 @@ ...@@ -7,9 +7,10 @@
# Copyright (C) Srinivasa Thirumalachar (sprasad@engr.sgi.com) # Copyright (C) Srinivasa Thirumalachar (sprasad@engr.sgi.com)
# #
obj-y := hpsim_console.o hpsim_irq.o hpsim_setup.o obj-y := hpsim_irq.o hpsim_setup.o
obj-$(CONFIG_IA64_GENERIC) += hpsim_machvec.o obj-$(CONFIG_IA64_GENERIC) += hpsim_machvec.o
obj-$(CONFIG_HP_SIMETH) += simeth.o obj-$(CONFIG_HP_SIMETH) += simeth.o
obj-$(CONFIG_HP_SIMSERIAL) += simserial.o obj-$(CONFIG_HP_SIMSERIAL) += simserial.o
obj-$(CONFIG_HP_SIMSERIAL_CONSOLE) += hpsim_console.o
obj-$(CONFIG_HP_SIMSCSI) += simscsi.o obj-$(CONFIG_HP_SIMSCSI) += simscsi.o
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* David Mosberger-Tang <davidm@hpl.hp.com> * David Mosberger-Tang <davidm@hpl.hp.com>
* Copyright (C) 1999 Vijay Chander <vijay@engr.sgi.com> * Copyright (C) 1999 Vijay Chander <vijay@engr.sgi.com>
*/ */
#include <linux/config.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kdev_t.h> #include <linux/kdev_t.h>
...@@ -24,8 +25,6 @@ ...@@ -24,8 +25,6 @@
#include "hpsim_ssc.h" #include "hpsim_ssc.h"
extern struct console hpsim_cons;
/* /*
* Simulator system call. * Simulator system call.
*/ */
...@@ -56,5 +55,11 @@ hpsim_setup (char **cmdline_p) ...@@ -56,5 +55,11 @@ hpsim_setup (char **cmdline_p)
{ {
ROOT_DEV = Root_SDA1; /* default to first SCSI drive */ ROOT_DEV = Root_SDA1; /* default to first SCSI drive */
register_console(&hpsim_cons); #ifdef CONFIG_HP_SIMSERIAL_CONSOLE
{
extern struct console hpsim_cons;
if (ia64_platform_is("hpsim"))
register_console(&hpsim_cons);
}
#endif
} }
...@@ -1025,6 +1025,9 @@ simrs_init (void) ...@@ -1025,6 +1025,9 @@ simrs_init (void)
int i; int i;
struct serial_state *state; struct serial_state *state;
if (!ia64_platform_is("hpsim"))
return -ENODEV;
show_serial_version(); show_serial_version();
/* Initialize the tty_driver structure */ /* Initialize the tty_driver structure */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment