Commit 7b3166dbc3df5b72f2ba4ea130f4461e318a3838

Authored by Peter Chubb
Committed by Tony Luck
1 parent 8b713c67bc

[IA64] Cleanup HPSIM code (was: Re: Enable early console for Ski simulator)

After my last patch we have a new header file for HP simulator use.
Here's code to use it for stuff that used to have `extern' statements
inline in the code.  Functionality should not change with this patch.

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>

Showing 4 changed files with 10 additions and 12 deletions Side-by-side Diff

arch/ia64/hp/sim/hpsim_console.c
... ... @@ -59,7 +59,6 @@
59 59  
60 60 static struct tty_driver *simcons_console_device (struct console *c, int *index)
61 61 {
62   - extern struct tty_driver *hp_simserial_driver;
63 62 *index = c->index;
64 63 return hp_simserial_driver;
65 64 }
arch/ia64/hp/sim/simeth.c
... ... @@ -22,7 +22,10 @@
22 22 #include <linux/bitops.h>
23 23 #include <asm/system.h>
24 24 #include <asm/irq.h>
  25 +#include <asm/hpsim.h>
25 26  
  27 +#include "hpsim_ssc.h"
  28 +
26 29 #define SIMETH_RECV_MAX 10
27 30  
28 31 /*
... ... @@ -35,12 +38,6 @@
35 38 #define SIMETH_FRAME_SIZE ETH_FRAME_LEN
36 39  
37 40  
38   -#define SSC_NETDEV_PROBE 100
39   -#define SSC_NETDEV_SEND 101
40   -#define SSC_NETDEV_RECV 102
41   -#define SSC_NETDEV_ATTACH 103
42   -#define SSC_NETDEV_DETACH 104
43   -
44 41 #define NETWORK_INTR 8
45 42  
46 43 struct simeth_local {
... ... @@ -123,9 +120,6 @@
123 120  
124 121 return r;
125 122 }
126   -
127   -extern long ia64_ssc (long, long, long, long, int);
128   -extern void ia64_ssc_connect_irq (long intr, long irq);
129 123  
130 124 static inline int
131 125 netdev_probe(char *name, unsigned char *ether)
arch/ia64/hp/sim/simscsi.c
... ... @@ -14,6 +14,7 @@
14 14 #include <linux/kernel.h>
15 15 #include <linux/timer.h>
16 16 #include <asm/irq.h>
  17 +#include "hpsim_ssc.h"
17 18  
18 19 #include <scsi/scsi.h>
19 20 #include <scsi/scsi_cmnd.h>
... ... @@ -58,8 +59,6 @@
58 59 int fd;
59 60 unsigned count;
60 61 };
61   -
62   -extern long ia64_ssc (long arg0, long arg1, long arg2, long arg3, int nr);
63 62  
64 63 static int desc[16] = {
65 64 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
include/asm-ia64/hpsim.h
... ... @@ -7,5 +7,11 @@
7 7 int simcons_register(void);
8 8 #endif
9 9  
  10 +struct tty_driver;
  11 +extern struct tty_driver *hp_simserial_driver;
  12 +
  13 +void ia64_ssc_connect_irq(long intr, long irq);
  14 +void ia64_ctl_trace(long on);
  15 +
10 16 #endif