summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlex deVries <Alex.deVries@windriver.com>1999-02-06 03:57:37 +0000
committerAlex deVries <Alex.deVries@windriver.com>1999-02-06 03:57:37 +0000
commit2f7a646bdb098918bf1d541b2fe63c7a9a89192f (patch)
treeb401efc2464f8cced8c885f8e08cf7477b2559e1 /drivers
parent7612165ef628025903698bcb33b7140c576f2963 (diff)
- fixed compiling in of ramdisks; we don't have the kernel segment defining initrd offset, etc.
- a couple of HAL related changes to make it build better - the start of making newport graphics a module; currently this breaks as a module, but works okay built into the kernel. - Alex
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/Config.in4
-rw-r--r--drivers/char/misc.c6
-rw-r--r--drivers/sgi/Config.in2
-rw-r--r--drivers/sgi/Makefile2
-rw-r--r--drivers/sgi/char/Makefile13
-rw-r--r--drivers/sgi/char/graphics.c29
-rw-r--r--drivers/sgi/char/graphics.h1
-rw-r--r--drivers/sgi/char/graphics_syms.c25
-rw-r--r--drivers/sgi/char/usema.c2
-rw-r--r--drivers/sgi/char/usema.h10
10 files changed, 77 insertions, 17 deletions
diff --git a/drivers/char/Config.in b/drivers/char/Config.in
index 5eb585a01..16a24938e 100644
--- a/drivers/char/Config.in
+++ b/drivers/char/Config.in
@@ -61,10 +61,6 @@ if [ "$CONFIG_MOUSE" = "y" ]; then
tristate 'PC110 digitizer pad support' CONFIG_PC110_PAD
fi
-if [ "$CONFIG_SGI" = "y" ]; then
- bool 'Support for SGI graphic devices' CONFIG_SGI_GRAPHICS
-fi
-
tristate 'QIC-02 tape support' CONFIG_QIC02_TAPE
if [ "$CONFIG_QIC02_TAPE" != "n" ]; then
bool 'Do you want runtime configuration for QIC-02' CONFIG_QIC02_DYNCONF
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index a961a1a4d..d449cf226 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -72,7 +72,9 @@ extern int amiga_mouse_init(void);
extern int atari_mouse_init(void);
extern int sun_mouse_init(void);
extern int adb_mouse_init(void);
+#ifdef CONFIG_SGI_NEWPORT_GFX
extern void gfx_register(void);
+#endif
extern void streamable_init(void);
extern void watchdog_init(void);
extern void wdt_init(void);
@@ -278,10 +280,10 @@ int __init misc_init(void)
#ifdef CONFIG_PMAC_PBOOK
pmu_device_init();
#endif
-#ifdef CONFIG_SGI_GRAPHICS
+#ifdef CONFIG_SGI_NEWPORT_GFX
gfx_register ();
- streamable_init ();
#endif
+ streamable_init ();
if (register_chrdev(MISC_MAJOR,"misc",&misc_fops)) {
printk("unable to get major %d for misc devices\n",
MISC_MAJOR);
diff --git a/drivers/sgi/Config.in b/drivers/sgi/Config.in
index 15bb83e2b..30830ca2e 100644
--- a/drivers/sgi/Config.in
+++ b/drivers/sgi/Config.in
@@ -13,7 +13,7 @@ bool 'SGI DS1286 RTC support' CONFIG_SGI_DS1286
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'SGI HAL2 Audio support' CONFIG_SGI_HAL2
+ tristate 'SGI Newport Graphics support' CONFIG_SGI_NEWPORT_GFX
fi
-
endmenu
diff --git a/drivers/sgi/Makefile b/drivers/sgi/Makefile
index e5ef5f820..675e9554f 100644
--- a/drivers/sgi/Makefile
+++ b/drivers/sgi/Makefile
@@ -8,7 +8,7 @@
# Note 2! The CFLAGS definitions are now in the main makefile...
SUB_DIRS :=
-MOD_SUB_DIRS := $(SUB_DIRS) audio
+MOD_SUB_DIRS := $(SUB_DIRS) char audio
ALL_SUB_DIRS := $(SUB_DIRS) char audio
diff --git a/drivers/sgi/char/Makefile b/drivers/sgi/char/Makefile
index e23a4e88b..ad1cf9067 100644
--- a/drivers/sgi/char/Makefile
+++ b/drivers/sgi/char/Makefile
@@ -8,8 +8,8 @@
# Note 2! The CFLAGS definitions are now in the main makefile...
O_TARGET := sgichar.o
-O_OBJS := graphics.o streamable.o newport.o sgicons.o \
- vga_font.o rrm.o shmiq.o usema.o
+O_OBJS := newport.o sgicons.o \
+ vga_font.o usema.o shmiq.o streamable.o
ifeq ($(CONFIG_SGI_SERIAL),y)
O_OBJS += sgiserial.o
@@ -19,4 +19,13 @@ ifeq ($(CONFIG_SGI_DS1286),y)
O_OBJS += ds1286.o
endif
+ifeq ($(CONFIG_SGI_NEWPORT_GFX),y)
+ O_OBJS += graphics.o rrm.o
+else
+ifeq ($(CONFIG_SGI_NEWPORT_GFX),m)
+ OX_OBJS += graphics_syms.o
+ MX_OBJS += graphics.o rrm.o
+endif
+endif
+
include $(TOPDIR)/Rules.make
diff --git a/drivers/sgi/char/graphics.c b/drivers/sgi/char/graphics.c
index 12f86d6dd..be6317d5f 100644
--- a/drivers/sgi/char/graphics.c
+++ b/drivers/sgi/char/graphics.c
@@ -1,4 +1,4 @@
-/* $Id: graphics.c,v 1.13 1998/08/25 09:18:57 ralf Exp $
+/* $Id: graphics.c,v 1.14 1998/09/19 19:17:50 ralf Exp $
*
* gfx.c: support for SGI's /dev/graphics, /dev/opengl
*
@@ -30,9 +30,12 @@
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/mman.h>
+#include <linux/malloc.h>
+#include <linux/module.h>
#include <asm/uaccess.h>
#include "gconsole.h"
#include "graphics.h"
+#include "usema.h"
#include <asm/gfx.h>
#include <asm/rrm.h>
#include <asm/page.h>
@@ -41,16 +44,17 @@
/* The boards */
extern struct graphics_ops *newport_probe (int, const char **);
-#ifdef PRODUCTION_DRIVER
-#define enable_gconsole()
-#define disable_gconsole()
-#endif
-
static struct graphics_ops cards [MAXCARDS];
static int boards;
#define GRAPHICS_CARD(inode) 0
+/*
+void enable_gconsole(void) {};
+void disable_gconsole(void) {};
+*/
+
+
int
sgi_graphics_open (struct inode *inode, struct file *file)
{
@@ -329,3 +333,16 @@ __initfunc(void gfx_init (const char **name))
if (boards > MAXCARDS)
printk (KERN_WARNING "Too many cards found on the system\n");
}
+
+#ifdef MODULE
+int init_module(void) {
+ printk("SGI Newport Graphics version %i.%i.%i\n",42,54,69);
+
+}
+
+void cleanup_module(void) {
+
+ printk("Shutting down SGI Newport Graphics\n");
+
+}
+#endif
diff --git a/drivers/sgi/char/graphics.h b/drivers/sgi/char/graphics.h
index d5a8d2979..fc08ab79c 100644
--- a/drivers/sgi/char/graphics.h
+++ b/drivers/sgi/char/graphics.h
@@ -25,4 +25,3 @@ struct graphics_ops {
void shmiq_init (void);
void streamable_init (void);
-void usema_init (void);
diff --git a/drivers/sgi/char/graphics_syms.c b/drivers/sgi/char/graphics_syms.c
new file mode 100644
index 000000000..948f78fee
--- /dev/null
+++ b/drivers/sgi/char/graphics_syms.c
@@ -0,0 +1,25 @@
+/*
+ * graphics_syms.c: interfaces for SGI Indy newport graphics
+ *
+ * Copyright (C) 1999 Alex deVries <puffin@redhat.com>
+ *
+ * We should not even be trying to compile this if we are not doing
+ * a module.
+ */
+
+#define __NO_VERSION__
+#include <linux/config.h>
+#include <linux/module.h>
+
+/* extern int rrm_command (unsigned int cmd, void *arg);
+extern int rrm_close (struct inode *inode, struct file *file);
+EXPORT_SYMBOL(rrm_command);
+EXPORT_SYMBOL(rrm_close);
+
+
+*/
+extern void shmiq_init (void);
+extern void usema_init(void);
+
+EXPORT_SYMBOL(shmiq_init);
+EXPORT_SYMBOL(usema_init);
diff --git a/drivers/sgi/char/usema.c b/drivers/sgi/char/usema.c
index db7c98396..517287527 100644
--- a/drivers/sgi/char/usema.c
+++ b/drivers/sgi/char/usema.c
@@ -33,6 +33,7 @@
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
+#include "usema.h"
#include <asm/usioctl.h>
#include <asm/mman.h>
@@ -43,6 +44,7 @@ struct irix_usema {
struct wait_queue *proc_list;
};
+
static int
sgi_usema_attach (usattach_t * attach, struct irix_usema *usema)
{
diff --git a/drivers/sgi/char/usema.h b/drivers/sgi/char/usema.h
new file mode 100644
index 000000000..2f82f87b8
--- /dev/null
+++ b/drivers/sgi/char/usema.h
@@ -0,0 +1,10 @@
+/* usema.h
+ *
+ * Copyright (C) 1996 Alex deVries <puffin@redhat.com>
+ */
+#ifndef _SGI_USEMA_H
+#define _SGI_USEMA_H
+
+void usema_init (void);
+
+#endif