diff options
author | Alex deVries <Alex.deVries@windriver.com> | 1999-02-06 03:57:37 +0000 |
---|---|---|
committer | Alex deVries <Alex.deVries@windriver.com> | 1999-02-06 03:57:37 +0000 |
commit | 2f7a646bdb098918bf1d541b2fe63c7a9a89192f (patch) | |
tree | b401efc2464f8cced8c885f8e08cf7477b2559e1 /drivers/sgi/char | |
parent | 7612165ef628025903698bcb33b7140c576f2963 (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/sgi/char')
-rw-r--r-- | drivers/sgi/char/Makefile | 13 | ||||
-rw-r--r-- | drivers/sgi/char/graphics.c | 29 | ||||
-rw-r--r-- | drivers/sgi/char/graphics.h | 1 | ||||
-rw-r--r-- | drivers/sgi/char/graphics_syms.c | 25 | ||||
-rw-r--r-- | drivers/sgi/char/usema.c | 2 | ||||
-rw-r--r-- | drivers/sgi/char/usema.h | 10 |
6 files changed, 71 insertions, 9 deletions
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 |