Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64694
b: refs/heads/master
c: 8b713c6
h: refs/heads/master
v: v3
  • Loading branch information
Peter Chubb authored and Tony Luck committed Sep 1, 2007
1 parent 60b2103 commit af52e7d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 99a19cf1c0eb22bad83fff060f08330ee9e029e2
refs/heads/master: 8b713c67bccef7cabb0ee915f47eb33d82636af9
15 changes: 14 additions & 1 deletion trunk/arch/ia64/hp/sim/hpsim_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
#include <asm/machvec.h>
#include <asm/pgtable.h>
#include <asm/sal.h>
#include <asm/hpsim.h>

#include "hpsim_ssc.h"

static int simcons_init (struct console *, char *);
static void simcons_write (struct console *, const char *, unsigned);
static struct tty_driver *simcons_console_device (struct console *, int *);

struct console hpsim_cons = {
static struct console hpsim_cons = {
.name = "simcons",
.write = simcons_write,
.device = simcons_console_device,
Expand Down Expand Up @@ -62,3 +63,15 @@ static struct tty_driver *simcons_console_device (struct console *c, int *index)
*index = c->index;
return hp_simserial_driver;
}

int simcons_register(void)
{
if (!ia64_platform_is("hpsim"))
return 1;

if (hpsim_cons.flags & CON_ENABLED)
return 1;

register_console(&hpsim_cons);
return 0;
}
9 changes: 2 additions & 7 deletions trunk/arch/ia64/hp/sim/hpsim_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <asm/machvec.h>
#include <asm/pgtable.h>
#include <asm/sal.h>
#include <asm/hpsim.h>

#include "hpsim_ssc.h"

Expand All @@ -41,11 +42,5 @@ hpsim_setup (char **cmdline_p)
{
ROOT_DEV = Root_SDA1; /* default to first SCSI drive */

#ifdef CONFIG_HP_SIMSERIAL_CONSOLE
{
extern struct console hpsim_cons;
if (ia64_platform_is("hpsim"))
register_console(&hpsim_cons);
}
#endif
simcons_register();
}
8 changes: 2 additions & 6 deletions trunk/arch/ia64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#include <asm/smp.h>
#include <asm/system.h>
#include <asm/unistd.h>
#include <asm/hpsim.h>

#if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE)
# error "struct cpuinfo_ia64 too big!"
Expand Down Expand Up @@ -389,13 +390,8 @@ early_console_setup (char *cmdline)
if (!efi_setup_pcdp_console(cmdline))
earlycons++;
#endif
#ifdef CONFIG_HP_SIMSERIAL_CONSOLE
{
extern struct console hpsim_cons;
register_console(&hpsim_cons);
if (!simcons_register())
earlycons++;
}
#endif

return (earlycons) ? 0 : -1;
}
Expand Down
10 changes: 10 additions & 0 deletions trunk/include/asm-ia64/hpsim.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef _ASMIA64_HPSIM_H
#define _ASMIA64_HPSIM_H

#ifndef CONFIG_HP_SIMSERIAL_CONSOLE
static inline int simcons_register(void) { return 1; }
#else
int simcons_register(void);
#endif

#endif

0 comments on commit af52e7d

Please sign in to comment.